diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock old mode 100755 new mode 100644 index d221b422..e4a9c9a2 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,24 @@ lockVersion: 2.0.0 -id: f50499c4-d106-4975-983f-ead3a386ec53 +id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: d35f4f2287646adf6b222b56b786719d + docChecksum: 10932993b99f723bb4dec08261897258 docVersion: "1.0" - speakeasyVersion: 1.399.2 - generationVersion: 2.416.6 - releaseVersion: 0.0.1-alpha.11 - configChecksum: 3a75dd73a304fb0621acb8c3a38cdf41 - repoURL: https://github.com/novuhq/novu-ts.git - installationURL: https://github.com/novuhq/novu-ts + speakeasyVersion: 1.446.1 + generationVersion: 2.462.1 + releaseVersion: 0.0.1-alpha.25 + configChecksum: 3e76faf756c7c8551645e6079f12b9af published: true features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.17.4 + core: 3.18.7 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 - envVarSecurityUsage: 0.1.1 + envVarSecurityUsage: 0.1.2 examples: 2.81.4 - flattening: 2.81.1 + flattening: 2.82.0 globalSecurity: 2.82.11 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 @@ -28,16 +26,15 @@ features: groups: 2.81.2 nameOverrides: 2.81.2 nullables: 0.1.0 - pagination: 2.82.6 + pagination: 2.82.7 responseFormat: 0.2.3 retries: 2.83.0 - sdkHooks: 0.1.0 - unions: 2.85.7 + sdkHooks: 0.2.0 + unions: 2.85.8 generatedFiles: - .eslintrc.cjs - .gitattributes - .npmignore - - CONTRIBUTING.md - FUNCTIONS.md - RUNTIMES.md - USAGE.md @@ -53,13 +50,8 @@ generatedFiles: - docs/models/components/addsubscribersrequestdto.md - docs/models/components/apikey.md - docs/models/components/backoffunit.md - - docs/models/components/bulkapplychangedto.md - docs/models/components/bulksubscribercreatedto.md - docs/models/components/bulktriggereventdto.md - - docs/models/components/change.md - - docs/models/components/changeresponsedto.md - - docs/models/components/changesresponsedto.md - - docs/models/components/changeworkflowstatusrequestdto.md - docs/models/components/channel.md - docs/models/components/channelcredentials.md - docs/models/components/channelpreference.md @@ -68,63 +60,51 @@ generatedFiles: - docs/models/components/channelsettings.md - docs/models/components/content.md - docs/models/components/controls.md - - docs/models/components/createfeedrequestdto.md - docs/models/components/createintegrationrequestdto.md - - docs/models/components/createlayoutresponsedto.md + - docs/models/components/createintegrationrequestdtochannel.md - docs/models/components/createnotificationgrouprequestdto.md - docs/models/components/createsubscriberrequestdto.md - - docs/models/components/createtenantrequestdto.md - - docs/models/components/createtenantrequestdtodata.md - - docs/models/components/createtenantresponsedto.md - - docs/models/components/createtenantresponsedtodata.md + - docs/models/components/createsubscriberrequestdtodata.md - docs/models/components/createtopicrequestdto.md - docs/models/components/createtopicresponsedto.md - - docs/models/components/createworkflowrequestdto.md - - docs/models/components/createworkflowrequestdtodata.md - - docs/models/components/createworkflowrequestdtonotificationgroup.md - docs/models/components/credentialsdto.md - docs/models/components/data.md - docs/models/components/databooleandto.md - - docs/models/components/datanumberdto.md - docs/models/components/delayregularmetadata.md - docs/models/components/delayregularmetadatatype.md + - docs/models/components/delayregularmetadataunit.md - docs/models/components/delayscheduledmetadata.md - docs/models/components/delayscheduledmetadatatype.md - docs/models/components/deletemessageresponsedto.md + - docs/models/components/deletemessageresponsedtostatus.md - docs/models/components/deletenotificationgroupresponsedto.md - docs/models/components/deletenotificationgroupresponsedtostatus.md - docs/models/components/deletesubscriberresponsedto.md - docs/models/components/deletesubscriberresponsedtostatus.md - docs/models/components/digestregularmetadata.md - docs/models/components/digestregularmetadatatype.md - - docs/models/components/digestregularmetadataunit.md - docs/models/components/digesttimedmetadata.md - docs/models/components/digesttimedmetadatatype.md - docs/models/components/digesttimedmetadataunit.md - - docs/models/components/direction.md - docs/models/components/emailblock.md - docs/models/components/emailblockstyles.md - docs/models/components/emailblocktype.md - docs/models/components/environmentresponsedto.md - docs/models/components/executiondetailsresponsedto.md - - docs/models/components/executiondetailsresponsedtochannel.md - - docs/models/components/executiondetailsresponsedtostatus.md - docs/models/components/feedid.md - docs/models/components/feedidentifier.md - docs/models/components/feedresponsedto.md - docs/models/components/fieldfilterpart.md - docs/models/components/filtertopicsresponsedto.md - - docs/models/components/getlayoutresponsedto.md - - docs/models/components/getlayoutresponsedtochannel.md - docs/models/components/getsubscriberpreferencesresponsedto.md - - docs/models/components/gettenantresponsedto.md - - docs/models/components/gettenantresponsedtodata.md - docs/models/components/gettopicresponsedto.md - docs/models/components/integrationresponsedto.md - docs/models/components/integrationresponsedtochannel.md - docs/models/components/markallmessageasrequestdto.md + - docs/models/components/markallmessageasrequestdtomarkas.md - docs/models/components/markas.md - docs/models/components/markmessageactionasseendto.md + - docs/models/components/markmessageactionasseendtopayload.md - docs/models/components/markmessageactionasseendtostatus.md - docs/models/components/messageaction.md - docs/models/components/messageactionresult.md @@ -139,9 +119,9 @@ generatedFiles: - docs/models/components/messageentity.md - docs/models/components/messageid.md - docs/models/components/messagemarkasrequestdto.md - - docs/models/components/messagemarkasrequestdtomarkas.md - docs/models/components/messageresponsedto.md - docs/models/components/messageresponsedtochannel.md + - docs/models/components/messageresponsedtooverrides.md - docs/models/components/messageresponsedtopayload.md - docs/models/components/messageresponsedtostatus.md - docs/models/components/messagetemplate.md @@ -161,15 +141,13 @@ generatedFiles: - docs/models/components/operator.md - docs/models/components/ordinal.md - docs/models/components/ordinalvalue.md - - docs/models/components/organizationbrandingresponsedto.md - - docs/models/components/organizationresponsedto.md - docs/models/components/overrides.md - docs/models/components/parentid.md - docs/models/components/payload.md - docs/models/components/preference.md - docs/models/components/preferencechannels.md + - docs/models/components/providerid.md - docs/models/components/removesubscribersrequestdto.md - - docs/models/components/renameorganizationdto.md - docs/models/components/renametopicrequestdto.md - docs/models/components/renametopicresponsedto.md - docs/models/components/replycallback.md @@ -179,9 +157,7 @@ generatedFiles: - docs/models/components/stepfilter.md - docs/models/components/stepfiltertype.md - docs/models/components/subscriberpayloaddto.md - - docs/models/components/subscriberpayloaddtodata.md - docs/models/components/subscriberresponsedto.md - - docs/models/components/system.md - docs/models/components/templateresponse.md - docs/models/components/tenant.md - docs/models/components/tenantpayloaddto.md @@ -192,12 +168,8 @@ generatedFiles: - docs/models/components/to.md - docs/models/components/topicdto.md - docs/models/components/topicpayloaddto.md - - docs/models/components/topicpayloaddtotype.md - docs/models/components/topicsubscriberdto.md - - docs/models/components/translations.md - docs/models/components/triggereventrequestdto.md - - docs/models/components/triggereventrequestdtooverrides.md - - docs/models/components/triggereventrequestdtopayload.md - docs/models/components/triggereventresponsedto.md - docs/models/components/triggereventresponsedtostatus.md - docs/models/components/triggereventtoallrequestdto.md @@ -208,143 +180,151 @@ generatedFiles: - docs/models/components/type.md - docs/models/components/unit.md - docs/models/components/unseencountresponse.md - - docs/models/components/updatebrandingdetailsdto.md - docs/models/components/updateintegrationrequestdto.md - - docs/models/components/updatelayoutrequestdto.md - - docs/models/components/updatelayoutresponsedto.md - - docs/models/components/updatelayoutresponsedtochannel.md - docs/models/components/updatesubscriberchannelrequestdto.md + - docs/models/components/updatesubscriberchannelrequestdtoproviderid.md - docs/models/components/updatesubscriberglobalpreferencesrequestdto.md - docs/models/components/updatesubscriberonlineflagrequestdto.md - docs/models/components/updatesubscriberpreferencerequestdto.md - docs/models/components/updatesubscriberpreferenceresponsedto.md - docs/models/components/updatesubscriberrequestdto.md - docs/models/components/updatesubscriberrequestdtodata.md - - docs/models/components/updatetenantrequestdto.md - - docs/models/components/updatetenantrequestdtodata.md - - docs/models/components/updatetenantresponsedto.md - - docs/models/components/updatetenantresponsedtodata.md - - docs/models/components/updateworkflowrequestdto.md - - docs/models/components/updateworkflowrequestdtodata.md - docs/models/components/value.md - - docs/models/components/variables.md - - docs/models/components/variablesresponsedto.md - docs/models/components/weekdays.md - docs/models/components/workflowintegrationstatus.md - docs/models/components/workflowresponse.md - docs/models/components/workflowresponsedata.md - - docs/models/components/workflowsresponsedto.md - - docs/models/operations/changescontrollerapplydiffrequest.md - - docs/models/operations/changescontrollergetchangesrequest.md - docs/models/operations/channel.md - docs/models/operations/channels.md + - docs/models/operations/environmentscontrollerv1getcurrentenvironmentresponse.md + - docs/models/operations/environmentscontrollerv1listmyenvironmentsresponse.md + - docs/models/operations/environmentscontrollerv1listorganizationapikeysresponse.md + - docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md - docs/models/operations/eventscontrollercancelrequest.md + - docs/models/operations/eventscontrollercancelresponse.md + - docs/models/operations/eventscontrollertriggerbulkresponse.md + - docs/models/operations/eventscontrollertriggerresponse.md - docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md - - docs/models/operations/feedscontrollerdeletefeedbyidrequest.md + - docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationresponse.md + - docs/models/operations/integrationscontrollercreateintegrationresponse.md + - docs/models/operations/integrationscontrollergetactiveintegrationsresponse.md - docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md + - docs/models/operations/integrationscontrollergetwebhooksupportstatusresponse.md + - docs/models/operations/integrationscontrollerlistintegrationsresponse.md - docs/models/operations/integrationscontrollerremoveintegrationrequest.md + - docs/models/operations/integrationscontrollerremoveintegrationresponse.md - docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md + - docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md - docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md - - docs/models/operations/layoutscontrollerdeletelayoutrequest.md - - docs/models/operations/layoutscontrollergetlayoutrequest.md - - docs/models/operations/layoutscontrollerlistlayoutsrequest.md - - docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md - - docs/models/operations/layoutscontrollerupdatelayoutrequest.md + - docs/models/operations/integrationscontrollerupdateintegrationbyidresponse.md - docs/models/operations/messagescontrollerdeletemessagerequest.md + - docs/models/operations/messagescontrollerdeletemessageresponse.md - docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md + - docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md - docs/models/operations/messagescontrollergetmessagesrequest.md + - docs/models/operations/messagescontrollergetmessagesresponse.md + - docs/models/operations/notificationgroupscontrollercreatenotificationgroupresponse.md - docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md + - docs/models/operations/notificationgroupscontrollerdeletenotificationgroupresponse.md - docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md + - docs/models/operations/notificationgroupscontrollergetnotificationgroupresponse.md + - docs/models/operations/notificationgroupscontrollerlistnotificationgroupsresponse.md - docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md + - docs/models/operations/notificationgroupscontrollerupdatenotificationgroupresponse.md - docs/models/operations/notificationscontrollergetactivitygraphstatsrequest.md + - docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md + - docs/models/operations/notificationscontrollergetactivitystatsresponse.md - docs/models/operations/notificationscontrollergetnotificationrequest.md + - docs/models/operations/notificationscontrollergetnotificationresponse.md - docs/models/operations/notificationscontrollerlistnotificationsrequest.md - - docs/models/operations/orderby.md + - docs/models/operations/notificationscontrollerlistnotificationsresponse.md - docs/models/operations/parameter.md - docs/models/operations/queryparamchannel.md + - docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md - docs/models/operations/subscriberscontrollerchataccessoauthrequest.md + - docs/models/operations/subscriberscontrollerchataccessoauthresponse.md - docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md + - docs/models/operations/subscriberscontrollerchatoauthcallbackresponse.md - docs/models/operations/subscriberscontrollerchatoauthcallbackresponsebody.md + - docs/models/operations/subscriberscontrollercreatesubscriberresponse.md - docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md + - docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md - docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md + - docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md - docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md - docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md + - docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelresponse.md - docs/models/operations/subscriberscontrollergetsubscriberrequest.md + - docs/models/operations/subscriberscontrollergetsubscriberresponse.md - docs/models/operations/subscriberscontrollergetunseencountrequest.md + - docs/models/operations/subscriberscontrollergetunseencountresponse.md - docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md + - docs/models/operations/subscriberscontrollerlistsubscriberpreferencesresponse.md - docs/models/operations/subscriberscontrollerlistsubscribersrequest.md - docs/models/operations/subscriberscontrollerlistsubscribersresponse.md - docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md - docs/models/operations/subscriberscontrollermarkactionasseenrequest.md + - docs/models/operations/subscriberscontrollermarkactionasseenresponse.md - docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md + - docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md - docs/models/operations/subscriberscontrollermarkmessagesasrequest.md + - docs/models/operations/subscriberscontrollermarkmessagesasresponse.md - docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md + - docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md - docs/models/operations/subscriberscontrollerremovesubscriberrequest.md + - docs/models/operations/subscriberscontrollerremovesubscriberresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md - - docs/models/operations/tenantcontrollergettenantbyidrequest.md - - docs/models/operations/tenantcontrollerlisttenantsrequest.md - - docs/models/operations/tenantcontrollerlisttenantsresponse.md - - docs/models/operations/tenantcontrollerlisttenantsresponsebody.md - - docs/models/operations/tenantcontrollerremovetenantrequest.md - - docs/models/operations/tenantcontrollerupdatetenantrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md - docs/models/operations/topicscontrolleraddsubscribersrequest.md + - docs/models/operations/topicscontrolleraddsubscribersresponse.md + - docs/models/operations/topicscontrollercreatetopicresponse.md - docs/models/operations/topicscontrollerdeletetopicrequest.md + - docs/models/operations/topicscontrollerdeletetopicresponse.md - docs/models/operations/topicscontrollergettopicrequest.md + - docs/models/operations/topicscontrollergettopicresponse.md - docs/models/operations/topicscontrollergettopicsubscriberrequest.md + - docs/models/operations/topicscontrollergettopicsubscriberresponse.md - docs/models/operations/topicscontrollerlisttopicsrequest.md + - docs/models/operations/topicscontrollerlisttopicsresponse.md - docs/models/operations/topicscontrollerremovesubscribersrequest.md + - docs/models/operations/topicscontrollerremovesubscribersresponse.md - docs/models/operations/topicscontrollerrenametopicrequest.md - - docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md - - docs/models/operations/workflowcontrollergetworkflowbyidrequest.md - - docs/models/operations/workflowcontrollerlistworkflowsrequest.md - - docs/models/operations/workflowcontrollerupdateactivestatusrequest.md - - docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md + - docs/models/operations/topicscontrollerrenametopicresponse.md - docs/sdks/apikeys/README.md - docs/sdks/authentication/README.md - - docs/sdks/changes/README.md - docs/sdks/credentials/README.md - docs/sdks/environments/README.md - docs/sdks/executiondetails/README.md - - docs/sdks/feeds/README.md - docs/sdks/integrations/README.md - - docs/sdks/layouts/README.md - docs/sdks/messages/README.md - docs/sdks/notifications/README.md - docs/sdks/novu/README.md - docs/sdks/novumessages/README.md - docs/sdks/novunotifications/README.md - docs/sdks/novusubscribers/README.md - - docs/sdks/organizations/README.md - docs/sdks/preferences/README.md - docs/sdks/properties/README.md - docs/sdks/stats/README.md - - docs/sdks/status/README.md - docs/sdks/subscribers/README.md - - docs/sdks/tenants/README.md - docs/sdks/topics/README.md - - docs/sdks/variables/README.md - docs/sdks/webhooks/README.md - docs/sdks/workflowgroups/README.md - - docs/sdks/workflows/README.md - jsr.json - package.json - src/core.ts - src/funcs/cancel.ts - - src/funcs/changesApply.ts - - src/funcs/changesApplyBulk.ts - - src/funcs/changesCount.ts - - src/funcs/changesRetrieve.ts - src/funcs/environmentsApiKeysList.ts - src/funcs/environmentsList.ts - src/funcs/environmentsRetrieve.ts - src/funcs/executionDetailsRetrieve.ts - - src/funcs/feedsCreate.ts - - src/funcs/feedsDelete.ts - - src/funcs/feedsRetrieve.ts - src/funcs/integrationsCreate.ts - src/funcs/integrationsDelete.ts - src/funcs/integrationsList.ts @@ -352,12 +332,6 @@ generatedFiles: - src/funcs/integrationsSetAsPrimary.ts - src/funcs/integrationsUpdate.ts - src/funcs/integrationsWebhooksRetrieve.ts - - src/funcs/layoutsCreate.ts - - src/funcs/layoutsDelete.ts - - src/funcs/layoutsList.ts - - src/funcs/layoutsRetrieve.ts - - src/funcs/layoutsSetAsDefault.ts - - src/funcs/layoutsUpdate.ts - src/funcs/messagesDelete.ts - src/funcs/messagesDeleteByTransactionId.ts - src/funcs/messagesRetrieve.ts @@ -365,9 +339,6 @@ generatedFiles: - src/funcs/notificationsRetrieve.ts - src/funcs/notificationsStatsGraph.ts - src/funcs/notificationsStatsRetrieve.ts - - src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts - - src/funcs/organizationsRetrieve.ts - - src/funcs/organizationsUpdate.ts - src/funcs/subscribersAuthenticationChatAccessOauth.ts - src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts - src/funcs/subscribersCreate.ts @@ -389,11 +360,6 @@ generatedFiles: - src/funcs/subscribersPropertiesUpdateOnlineFlag.ts - src/funcs/subscribersRetrieve.ts - src/funcs/subscribersUpdate.ts - - src/funcs/tenantsCreate.ts - - src/funcs/tenantsDelete.ts - - src/funcs/tenantsList.ts - - src/funcs/tenantsRetrieve.ts - - src/funcs/tenantsUpdate.ts - src/funcs/topicsCreate.ts - src/funcs/topicsDelete.ts - src/funcs/topicsList.ts @@ -410,13 +376,6 @@ generatedFiles: - src/funcs/workflowGroupsList.ts - src/funcs/workflowGroupsRetrieve.ts - src/funcs/workflowGroupsUpdate.ts - - src/funcs/workflowsCreate.ts - - src/funcs/workflowsDelete.ts - - src/funcs/workflowsList.ts - - src/funcs/workflowsRetrieve.ts - - src/funcs/workflowsStatusUpdate.ts - - src/funcs/workflowsUpdate.ts - - src/funcs/workflowsVariablesRetrieve.ts - src/hooks/hooks.ts - src/hooks/index.ts - src/hooks/types.ts @@ -444,28 +403,18 @@ generatedFiles: - src/models/components/activitystatsresponsedto.ts - src/models/components/addsubscribersrequestdto.ts - src/models/components/apikey.ts - - src/models/components/bulkapplychangedto.ts - src/models/components/bulksubscribercreatedto.ts - src/models/components/bulktriggereventdto.ts - - src/models/components/changeresponsedto.ts - - src/models/components/changesresponsedto.ts - - src/models/components/changeworkflowstatusrequestdto.ts - src/models/components/channelcredentials.ts - src/models/components/channelpreference.ts - src/models/components/channelsettings.ts - - src/models/components/createfeedrequestdto.ts - src/models/components/createintegrationrequestdto.ts - - src/models/components/createlayoutresponsedto.ts - src/models/components/createnotificationgrouprequestdto.ts - src/models/components/createsubscriberrequestdto.ts - - src/models/components/createtenantrequestdto.ts - - src/models/components/createtenantresponsedto.ts - src/models/components/createtopicrequestdto.ts - src/models/components/createtopicresponsedto.ts - - src/models/components/createworkflowrequestdto.ts - src/models/components/credentialsdto.ts - src/models/components/databooleandto.ts - - src/models/components/datanumberdto.ts - src/models/components/delayregularmetadata.ts - src/models/components/delayscheduledmetadata.ts - src/models/components/deletemessageresponsedto.ts @@ -480,9 +429,7 @@ generatedFiles: - src/models/components/feedresponsedto.ts - src/models/components/fieldfilterpart.ts - src/models/components/filtertopicsresponsedto.ts - - src/models/components/getlayoutresponsedto.ts - src/models/components/getsubscriberpreferencesresponsedto.ts - - src/models/components/gettenantresponsedto.ts - src/models/components/gettopicresponsedto.ts - src/models/components/index.ts - src/models/components/integrationresponsedto.ts @@ -503,12 +450,9 @@ generatedFiles: - src/models/components/notificationstepvariant.ts - src/models/components/notificationtrigger.ts - src/models/components/notificationtriggervariable.ts - - src/models/components/organizationbrandingresponsedto.ts - - src/models/components/organizationresponsedto.ts - src/models/components/preference.ts - src/models/components/preferencechannels.ts - src/models/components/removesubscribersrequestdto.ts - - src/models/components/renameorganizationdto.ts - src/models/components/renametopicrequestdto.ts - src/models/components/renametopicresponsedto.ts - src/models/components/security.ts @@ -525,52 +469,50 @@ generatedFiles: - src/models/components/triggereventresponsedto.ts - src/models/components/triggereventtoallrequestdto.ts - src/models/components/unseencountresponse.ts - - src/models/components/updatebrandingdetailsdto.ts - src/models/components/updateintegrationrequestdto.ts - - src/models/components/updatelayoutrequestdto.ts - - src/models/components/updatelayoutresponsedto.ts - src/models/components/updatesubscriberchannelrequestdto.ts - src/models/components/updatesubscriberglobalpreferencesrequestdto.ts - src/models/components/updatesubscriberonlineflagrequestdto.ts - src/models/components/updatesubscriberpreferencerequestdto.ts - src/models/components/updatesubscriberpreferenceresponsedto.ts - src/models/components/updatesubscriberrequestdto.ts - - src/models/components/updatetenantrequestdto.ts - - src/models/components/updatetenantresponsedto.ts - - src/models/components/updateworkflowrequestdto.ts - - src/models/components/variablesresponsedto.ts - src/models/components/workflowresponse.ts - - src/models/components/workflowsresponsedto.ts - src/models/errors/httpclienterrors.ts - src/models/errors/index.ts - src/models/errors/sdkerror.ts - src/models/errors/sdkvalidationerror.ts - - src/models/operations/changescontrollerapplydiff.ts - - src/models/operations/changescontrollergetchanges.ts + - src/models/operations/environmentscontrollerv1getcurrentenvironment.ts + - src/models/operations/environmentscontrollerv1listmyenvironments.ts + - src/models/operations/environmentscontrollerv1listorganizationapikeys.ts + - src/models/operations/eventscontrollerbroadcasteventtoall.ts - src/models/operations/eventscontrollercancel.ts + - src/models/operations/eventscontrollertrigger.ts + - src/models/operations/eventscontrollertriggerbulk.ts - src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts - - src/models/operations/feedscontrollerdeletefeedbyid.ts - src/models/operations/index.ts + - src/models/operations/integrationscontrollercreateintegration.ts + - src/models/operations/integrationscontrollergetactiveintegrations.ts - src/models/operations/integrationscontrollergetwebhooksupportstatus.ts + - src/models/operations/integrationscontrollerlistintegrations.ts - src/models/operations/integrationscontrollerremoveintegration.ts - src/models/operations/integrationscontrollersetintegrationasprimary.ts - src/models/operations/integrationscontrollerupdateintegrationbyid.ts - - src/models/operations/layoutscontrollerdeletelayout.ts - - src/models/operations/layoutscontrollergetlayout.ts - - src/models/operations/layoutscontrollerlistlayouts.ts - - src/models/operations/layoutscontrollersetdefaultlayout.ts - - src/models/operations/layoutscontrollerupdatelayout.ts - src/models/operations/messagescontrollerdeletemessage.ts - src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts - src/models/operations/messagescontrollergetmessages.ts + - src/models/operations/notificationgroupscontrollercreatenotificationgroup.ts - src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts - src/models/operations/notificationgroupscontrollergetnotificationgroup.ts + - src/models/operations/notificationgroupscontrollerlistnotificationgroups.ts - src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts - src/models/operations/notificationscontrollergetactivitygraphstats.ts + - src/models/operations/notificationscontrollergetactivitystats.ts - src/models/operations/notificationscontrollergetnotification.ts - src/models/operations/notificationscontrollerlistnotifications.ts + - src/models/operations/subscriberscontrollerbulkcreatesubscribers.ts - src/models/operations/subscriberscontrollerchataccessoauth.ts - src/models/operations/subscriberscontrollerchatoauthcallback.ts + - src/models/operations/subscriberscontrollercreatesubscriber.ts - src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts - src/models/operations/subscriberscontrollergetnotificationsfeed.ts - src/models/operations/subscriberscontrollergetsubscriber.ts @@ -588,50 +530,34 @@ generatedFiles: - src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts - src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts - src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts - - src/models/operations/tenantcontrollergettenantbyid.ts - - src/models/operations/tenantcontrollerlisttenants.ts - - src/models/operations/tenantcontrollerremovetenant.ts - - src/models/operations/tenantcontrollerupdatetenant.ts - src/models/operations/topicscontrolleraddsubscribers.ts + - src/models/operations/topicscontrollercreatetopic.ts - src/models/operations/topicscontrollerdeletetopic.ts - src/models/operations/topicscontrollergettopic.ts - src/models/operations/topicscontrollergettopicsubscriber.ts - src/models/operations/topicscontrollerlisttopics.ts - src/models/operations/topicscontrollerremovesubscribers.ts - src/models/operations/topicscontrollerrenametopic.ts - - src/models/operations/workflowcontrollerdeleteworkflowbyid.ts - - src/models/operations/workflowcontrollergetworkflowbyid.ts - - src/models/operations/workflowcontrollerlistworkflows.ts - - src/models/operations/workflowcontrollerupdateactivestatus.ts - - src/models/operations/workflowcontrollerupdateworkflowbyid.ts - src/sdk/apikeys.ts - src/sdk/authentication.ts - - src/sdk/changes.ts - src/sdk/credentials.ts - src/sdk/environments.ts - src/sdk/executiondetails.ts - - src/sdk/feeds.ts - src/sdk/index.ts - src/sdk/integrations.ts - - src/sdk/layouts.ts - src/sdk/messages.ts - src/sdk/notifications.ts - src/sdk/novumessages.ts - src/sdk/novunotifications.ts - src/sdk/novusubscribers.ts - - src/sdk/organizations.ts - src/sdk/preferences.ts - src/sdk/properties.ts - src/sdk/sdk.ts - src/sdk/stats.ts - - src/sdk/status.ts - src/sdk/subscribers.ts - - src/sdk/tenants.ts - src/sdk/topics.ts - - src/sdk/variables.ts - src/sdk/webhooks.ts - src/sdk/workflowgroups.ts - - src/sdk/workflows.ts - src/types/blobs.ts - src/types/constdatetime.ts - src/types/enums.ts @@ -642,230 +568,101 @@ generatedFiles: - src/types/streams.ts - tsconfig.json examples: - EventsController_cancel: - speakeasy-default-events-controller-cancel: - parameters: - path: - transactionId: "" - responses: - "200": - application/json: {"data": false} EventsController_trigger: speakeasy-default-events-controller-trigger: requestBody: - application/json: {"name": "workflow_identifier", "to": []} + application/json: {"name": "workflow_identifier", "to": [{"topicKey": "", "type": "Topic"}, {"topicKey": "", "type": "Topic"}]} responses: "201": - application/json: {"acknowledged": false, "status": "no_workflow_active_steps_defined"} - EventsController_broadcastEventToAll: - speakeasy-default-events-controller-broadcast-event-to-all: - requestBody: - application/json: {"name": ""} - responses: - "200": - application/json: {"acknowledged": true, "status": "trigger_not_active"} + application/json: {"acknowledged": true, "status": "processed"} EventsController_triggerBulk: speakeasy-default-events-controller-trigger-bulk: requestBody: - application/json: {"events": []} - responses: - "201": - application/json: [] - ChangesController_applyDiff: - speakeasy-default-changes-controller-apply-diff: - parameters: - path: - changeId: "" + 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"}]}]} responses: "201": - application/json: [] - ChangesController_bulkApplyDiff: - speakeasy-default-changes-controller-bulk-apply-diff: + application/json: [{"acknowledged": true, "status": "error"}, {"acknowledged": true, "status": "no_workflow_active_steps_defined"}, {"acknowledged": true, "status": "trigger_not_active"}] + EventsController_broadcastEventToAll: + speakeasy-default-events-controller-broadcast-event-to-all: requestBody: - application/json: {"changeIds": []} - responses: - "201": - application/json: [] - ChangesController_getChangesCount: - speakeasy-default-changes-controller-get-changes-count: + application/json: {"name": ""} responses: "200": - application/json: {"data": "2641.66"} - ChangesController_getChanges: - speakeasy-default-changes-controller-get-changes: + application/json: {"acknowledged": true, "status": "trigger_not_active"} + EventsController_cancel: + speakeasy-default-events-controller-cancel: parameters: - query: - promoted: "false" + path: + transactionId: "" responses: "200": - application/json: {"data": [], "page": "3704.56", "pageSize": "9451.91", "totalCount": "9198.31"} - EnvironmentsController_listMyEnvironments: - speakeasy-default-environments-controller-list-my-environments: + application/json: {"data": true} + EnvironmentsControllerV1_getCurrentEnvironment: + speakeasy-default-environments-controller-v1-get-current-environment: responses: "200": - application/json: [] - EnvironmentsController_getCurrentEnvironment: - speakeasy-default-environments-controller-get-current-environment: + application/json: {"name": "", "_organizationId": "", "identifier": "", "_parentId": ""} + EnvironmentsControllerV1_listMyEnvironments: + speakeasy-default-environments-controller-v1-list-my-environments: responses: "200": - application/json: {"_organizationId": "", "_parentId": "", "identifier": "", "name": ""} - EnvironmentsController_listOrganizationApiKeys: - speakeasy-default-environments-controller-list-organization-api-keys: + application/json: [{"name": "", "_organizationId": "", "identifier": "", "_parentId": ""}] + EnvironmentsControllerV1_listOrganizationApiKeys: + speakeasy-default-environments-controller-v1-list-organization-api-keys: responses: "200": - application/json: [] + application/json: [{"key": "", "_userId": ""}, {"key": "", "_userId": ""}, {"key": "", "_userId": ""}] ExecutionDetailsController_getExecutionDetailsForNotification: speakeasy-default-execution-details-controller-get-execution-details-for-notification: parameters: query: - notificationId: "" - subscriberId: "" + notificationId: "" + subscriberId: "" responses: "200": - application/json: [] - FeedsController_createFeed: - speakeasy-default-feeds-controller-create-feed: - requestBody: - application/json: {"name": ""} - responses: - "201": - application/json: {"data": [], "hasMore": true, "page": "4893.82", "pageSize": "6384.24"} - FeedsController_deleteFeedById: - speakeasy-default-feeds-controller-delete-feed-by-id: - parameters: - path: - feedId: "" - responses: - "200": - application/json: [] - FeedsController_getFeeds: - speakeasy-default-feeds-controller-get-feeds: - responses: - "200": - application/json: [] - IntegrationsController_createIntegration: - speakeasy-default-integrations-controller-create-integration: - requestBody: - application/json: {"channel": "sms", "providerId": ""} - responses: - "201": - application/json: {"_environmentId": "", "_organizationId": "", "active": false, "channel": "chat", "deleted": true, "deletedAt": "", "deletedBy": "", "identifier": "", "name": "", "primary": false, "providerId": ""} - IntegrationsController_removeIntegration: - speakeasy-default-integrations-controller-remove-integration: - parameters: - path: - integrationId: "" - responses: - "200": - application/json: [] - IntegrationsController_listIntegrations: - speakeasy-default-integrations-controller-list-integrations: - responses: - "200": - application/json: [] - IntegrationsController_getActiveIntegrations: - speakeasy-default-integrations-controller-get-active-integrations: - responses: - "200": - application/json: [] - IntegrationsController_setIntegrationAsPrimary: - speakeasy-default-integrations-controller-set-integration-as-primary: - parameters: - path: - integrationId: "" - responses: - "200": - application/json: {"_environmentId": "", "_organizationId": "", "active": false, "channel": "push", "deleted": true, "deletedAt": "", "deletedBy": "", "identifier": "", "name": "", "primary": true, "providerId": ""} - IntegrationsController_updateIntegrationById: - speakeasy-default-integrations-controller-update-integration-by-id: - parameters: - path: - integrationId: "" - responses: - "200": - application/json: {"_environmentId": "", "_organizationId": "", "active": false, "channel": "in_app", "deleted": true, "deletedAt": "", "deletedBy": "", "identifier": "", "name": "", "primary": false, "providerId": ""} - IntegrationsController_getWebhookSupportStatus: - speakeasy-default-integrations-controller-get-webhook-support-status: - parameters: - path: - providerOrIntegrationId: "" - responses: - "200": - application/json: false - LayoutsController_PropertyDescriptor: - speakeasy-default-layouts-controller-property-descriptor: - responses: - "201": - application/json: {"_id": ""} - LayoutsController_deleteLayout: - speakeasy-default-layouts-controller-delete-layout: - parameters: - path: - layoutId: "" - LayoutsController_listLayouts: - speakeasy-default-layouts-controller-list-layouts: {} - LayoutsController_getLayout: - speakeasy-default-layouts-controller-get-layout: + 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}] + NotificationsController_listNotifications: + speakeasy-default-notifications-controller-list-notifications: parameters: - path: - layoutId: "" + query: + channels: ["sms", "chat", "in_app"] + templates: [] + emails: [] + search: "" + subscriberIds: ["", ""] responses: "200": - application/json: {"_creatorId": "", "_environmentId": "", "_organizationId": "", "channel": "email", "content": "", "contentType": "", "identifier": "", "isDefault": true, "isDeleted": true, "name": ""} - LayoutsController_setDefaultLayout: - speakeasy-default-layouts-controller-set-default-layout: - parameters: - path: - layoutId: "" - LayoutsController_updateLayout: - speakeasy-default-layouts-controller-update-layout: + application/json: {"hasMore": false, "data": [], "pageSize": "7183.03", "page": "861.40"} + NotificationsController_getNotification: + speakeasy-default-notifications-controller-get-notification: parameters: path: - layoutId: "" - requestBody: - application/json: {"identifier": ""} + notificationId: "" responses: "200": - application/json: {"_creatorId": "", "_environmentId": "", "_organizationId": "", "channel": "push", "content": "", "contentType": "", "identifier": "", "isDefault": true, "isDeleted": true, "name": ""} - MessagesController_deleteMessage: - speakeasy-default-messages-controller-delete-message: - parameters: - path: - messageId: "" + application/json: {"_environmentId": "", "_organizationId": "", "transactionId": ""} + NotificationsController_getActivityStats: + speakeasy-default-notifications-controller-get-activity-stats: responses: "200": - application/json: {"acknowledged": true, "status": "deleted"} - MessagesController_deleteMessagesByTransactionId: - speakeasy-default-messages-controller-delete-messages-by-transaction-id: - parameters: - path: - transactionId: "" - query: {} - MessagesController_getMessages: - speakeasy-default-messages-controller-get-messages: + application/json: {"weeklySent": "7003.46", "monthlySent": "5588.34"} + NotificationsController_getActivityGraphStats: + speakeasy-default-notifications-controller-get-activity-graph-stats: responses: "200": - application/json: {"data": [], "hasMore": false, "page": "9451.91", "pageSize": "9198.31"} + application/json: [{"_id": "", "count": "5588.34", "templates": ["", ""], "channels": ["push", "sms"]}, {"_id": "", "count": "4508.24", "templates": [""], "channels": []}] NotificationGroupsController_createNotificationGroup: speakeasy-default-notification-groups-controller-create-notification-group: requestBody: application/json: {"name": ""} responses: "201": - application/json: {"_environmentId": "", "_organizationId": "", "name": ""} - NotificationGroupsController_deleteNotificationGroup: - speakeasy-default-notification-groups-controller-delete-notification-group: - parameters: - path: - id: "" - responses: - "200": - application/json: {"acknowledged": true, "status": "deleted"} + application/json: {"name": "", "_environmentId": "", "_organizationId": ""} NotificationGroupsController_listNotificationGroups: speakeasy-default-notification-groups-controller-list-notification-groups: responses: "200": - application/json: [] + application/json: [{"name": "", "_environmentId": "", "_organizationId": ""}, {"name": "", "_environmentId": "", "_organizationId": ""}, {"name": "", "_environmentId": "", "_organizationId": ""}] NotificationGroupsController_getNotificationGroup: speakeasy-default-notification-groups-controller-get-notification-group: parameters: @@ -873,7 +670,7 @@ examples: id: "" responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "name": ""} + application/json: {"name": "", "_environmentId": "", "_organizationId": ""} NotificationGroupsController_updateNotificationGroup: speakeasy-default-notification-groups-controller-update-notification-group: parameters: @@ -883,271 +680,265 @@ examples: application/json: {"name": ""} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "name": ""} - NotificationsController_listNotifications: - speakeasy-default-notifications-controller-list-notifications: - parameters: - query: - channels: [] - templates: [] - emails: [] - search: "" - subscriberIds: [] - responses: - "200": - application/json: {"data": [], "hasMore": false, "page": "998.95", "pageSize": "5472.72"} - NotificationsController_getNotification: - speakeasy-default-notifications-controller-get-notification: + application/json: {"name": "", "_environmentId": "", "_organizationId": ""} + NotificationGroupsController_deleteNotificationGroup: + speakeasy-default-notification-groups-controller-delete-notification-group: parameters: path: - notificationId: "" - responses: - "200": - application/json: {"_environmentId": "", "_organizationId": "", "transactionId": ""} - NotificationsController_getActivityGraphStats: - speakeasy-default-notifications-controller-get-activity-graph-stats: + id: "" responses: "200": - application/json: [] - NotificationsController_getActivityStats: - speakeasy-default-notifications-controller-get-activity-stats: + application/json: {"acknowledged": false, "status": "deleted"} + IntegrationsController_listIntegrations: + speakeasy-default-integrations-controller-list-integrations: responses: "200": - application/json: {"monthlySent": "3704.56", "weeklySent": "9451.91"} - EEOrganizationController_renameOrganization: - speakeasy-default-EE-organization-controller-rename-organization: + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "sms", "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "in_app", "active": false, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false}] + IntegrationsController_createIntegration: + speakeasy-default-integrations-controller-create-integration: requestBody: - application/json: {"name": ""} + application/json: {"providerId": "", "channel": "sms"} + responses: + "201": + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true} + IntegrationsController_getActiveIntegrations: + speakeasy-default-integrations-controller-get-active-integrations: responses: "200": - application/json: {"name": ""} - EEOrganizationController_getMyOrganization: - speakeasy-default-EE-organization-controller-get-my-organization: + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "email", "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}] + IntegrationsController_updateIntegrationById: + speakeasy-default-integrations-controller-update-integration-by-id: + parameters: + path: + integrationId: "" responses: "200": - application/json: {"branding": {"color": "grey", "contentBackground": "", "fontColor": "", "logo": ""}, "name": ""} - EEOrganizationController_updateBrandingDetails: - speakeasy-default-EE-organization-controller-update-branding-details: - requestBody: - application/json: {"color": "fuchsia", "contentBackground": "", "fontColor": "", "logo": ""} + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "push", "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false} + IntegrationsController_removeIntegration: + speakeasy-default-integrations-controller-remove-integration: + parameters: + path: + integrationId: "" responses: "200": - application/json: {"color": "red", "contentBackground": "", "fontColor": "", "logo": ""} - SubscribersController_createSubscriber: - speakeasy-default-subscribers-controller-create-subscriber: - requestBody: - application/json: {"subscriberId": ""} + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": true, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": false}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "active": true, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": false}] + IntegrationsController_setIntegrationAsPrimary: + speakeasy-default-integrations-controller-set-integration-as-primary: + parameters: + path: + integrationId: "" responses: - "201": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": true, "subscriberId": "", "updatedAt": ""} - SubscribersController_bulkCreateSubscribers: - speakeasy-default-subscribers-controller-bulk-create-subscribers: - requestBody: - application/json: {"subscribers": []} - SubscribersController_removeSubscriber: - speakeasy-default-subscribers-controller-remove-subscriber: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "push", "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false} + IntegrationsController_getWebhookSupportStatus: + speakeasy-default-integrations-controller-get-webhook-support-status: parameters: path: - subscriberId: "" + providerOrIntegrationId: "" responses: "200": - application/json: {"acknowledged": true, "status": "deleted"} + application/json: true SubscribersController_listSubscribers: speakeasy-default-subscribers-controller-list-subscribers: responses: "200": - application/json: {"data": [], "hasMore": false, "page": "998.95", "pageSize": "5472.72"} + 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": ""}]} + SubscribersController_createSubscriber: + speakeasy-default-subscribers-controller-create-subscriber: + requestBody: + application/json: {"subscriberId": ""} + responses: + "201": + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} SubscribersController_getSubscriber: speakeasy-default-subscribers-controller-get-subscriber: parameters: path: - subscriberId: "" + subscriberId: "" + query: {} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} SubscribersController_updateSubscriber: speakeasy-default-subscribers-controller-update-subscriber: parameters: path: - subscriberId: "" + subscriberId: "" responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} - SubscribersController_modifySubscriberChannel: - speakeasy-default-subscribers-controller-modify-subscriber-channel: + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} + SubscribersController_removeSubscriber: + speakeasy-default-subscribers-controller-remove-subscriber: parameters: path: - subscriberId: "" - requestBody: - application/json: {"credentials": {"webhookUrl": ""}, "providerId": "3462.44"} + subscriberId: "" responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} - SubscribersController_deleteSubscriberCredentials: - speakeasy-default-subscribers-controller-delete-subscriber-credentials: - parameters: - path: - subscriberId: "" - providerId: "" + application/json: {"acknowledged": false, "status": "deleted"} + SubscribersController_bulkCreateSubscribers: + speakeasy-default-subscribers-controller-bulk-create-subscribers: + requestBody: + application/json: {"subscribers": [""]} SubscribersController_updateSubscriberChannel: speakeasy-default-subscribers-controller-update-subscriber-channel: parameters: path: - subscriberId: "" + subscriberId: "" requestBody: - application/json: {"credentials": {"webhookUrl": ""}, "providerId": "8574.78"} + application/json: {"providerId": "pushpad", "credentials": {"webhookUrl": "https://grown-worth.name"}} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": true, "subscriberId": "", "updatedAt": ""} - SubscribersController_chatAccessOauth: - speakeasy-default-subscribers-controller-chat-access-oauth: - parameters: - path: - subscriberId: "" - providerId: "" - query: - hmacHash: "" - environmentId: "" - SubscribersController_chatOauthCallback: - speakeasy-default-subscribers-controller-chat-oauth-callback: - parameters: - path: - subscriberId: "" - providerId: "" - query: - code: "" - hmacHash: "" - environmentId: "" - SubscribersController_markAllUnreadAsRead: - speakeasy-default-subscribers-controller-mark-all-unread-as-read: - parameters: - path: - subscriberId: "" - requestBody: - application/json: {"markAs": "seen"} - responses: - "201": - application/json: "9412.34" - SubscribersController_markMessagesAs: - speakeasy-default-subscribers-controller-mark-messages-as: - parameters: - path: - subscriberId: "" - requestBody: - application/json: {"markAs": "seen", "messageId": ""} - responses: - "201": - application/json: [] - SubscribersController_markActionAsSeen: - speakeasy-default-subscribers-controller-mark-action-as-seen: + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} + SubscribersController_modifySubscriberChannel: + speakeasy-default-subscribers-controller-modify-subscriber-channel: parameters: path: - messageId: "" - type: "" - subscriberId: "" + subscriberId: "" requestBody: - application/json: {"status": "done"} - responses: - "201": - application/json: {"_environmentId": "", "_messageTemplateId": "", "_notificationId": "", "_organizationId": "", "_subscriberId": "", "_templateId": "", "channel": "email", "content": {"content": "", "type": "button"}, "createdAt": "", "cta": {}, "errorId": "", "errorText": "", "read": true, "seen": false, "status": "sent", "transactionId": ""} - SubscribersController_getNotificationsFeed: - "": - parameters: - path: - subscriberId: "" - query: - payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=" + application/json: {"providerId": "zulip", "credentials": {"webhookUrl": "https://talkative-pop.org"}} responses: "200": - application/json: {"data": [], "hasMore": false, "page": "9451.91", "pageSize": "9198.31"} - SubscribersController_getUnseenCount: - speakeasy-default-subscribers-controller-get-unseen-count: + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} + SubscribersController_deleteSubscriberCredentials: + speakeasy-default-subscribers-controller-delete-subscriber-credentials: parameters: path: - subscriberId: "" - query: - seen: true - limit: "4322.81" - responses: - "200": - application/json: {"count": "4327.98"} + subscriberId: "" + providerId: "" SubscribersController_updateSubscriberOnlineFlag: speakeasy-default-subscribers-controller-update-subscriber-online-flag: parameters: path: - subscriberId: "" + subscriberId: "" requestBody: - application/json: {"isOnline": false} + application/json: {"isOnline": true} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": true, "subscriberId": "", "updatedAt": ""} + application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} SubscribersController_listSubscriberPreferences: speakeasy-default-subscribers-controller-list-subscriber-preferences: parameters: path: - subscriberId: "" + subscriberId: "" + query: {} responses: "200": - application/json: [] + application/json: [{"template": {"_id": "", "name": "", "critical": false, "triggers": ["", ""]}, "preference": {"enabled": false}}, {"template": {"_id": "", "name": "", "critical": false, "triggers": [""]}, "preference": {"enabled": true}}] SubscribersController_getSubscriberPreferenceByLevel: speakeasy-default-subscribers-controller-get-subscriber-preference-by-level: parameters: path: - parameter: "Topic" - subscriberId: "" + parameter: "global" + subscriberId: "" + query: {} responses: "200": - application/json: [] + application/json: [{"preference": {"enabled": true}}, {"preference": {"enabled": true}}] SubscribersController_updateSubscriberPreference: speakeasy-default-subscribers-controller-update-subscriber-preference: parameters: path: - subscriberId: "" + subscriberId: "" parameter: "" responses: "200": - application/json: {"preference": {"enabled": false}, "template": {"_id": "", "critical": true, "name": "", "triggers": []}} - SubscribersController_updateSubscriberGlobalPreferences: - speakeasy-default-subscribers-controller-update-subscriber-global-preferences: + application/json: {"template": {"_id": "", "name": "", "critical": false, "triggers": ["", ""]}, "preference": {"enabled": true}} + SubscribersController_getNotificationsFeed: + "": parameters: path: - subscriberId: "" + subscriberId: "" + query: + payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=" responses: "200": - application/json: {"preference": {"enabled": false}, "template": {"_id": "", "critical": false, "name": "", "triggers": []}} - TenantController_createTenant: - speakeasy-default-tenant-controller-create-tenant: + application/json: {"page": "1526.70", "hasMore": true, "pageSize": "9643.05", "data": [{"hasMore": true, "data": ["", ""], "pageSize": "1031.10", "page": "1522.73"}, {"hasMore": false, "data": [], "pageSize": "5271.67", "page": "9499.10"}]} + SubscribersController_markMessagesAs: + speakeasy-default-subscribers-controller-mark-messages-as: + parameters: + path: + subscriberId: "" requestBody: - application/json: {"identifier": "", "name": ""} + application/json: {"messageId": "", "markAs": "read"} + SubscribersController_chatOauthCallback: + speakeasy-default-subscribers-controller-chat-oauth-callback: + parameters: + path: + subscriberId: "" + providerId: "" + query: + code: "" + hmacHash: "" + environmentId: "" + SubscribersController_chatAccessOauth: + speakeasy-default-subscribers-controller-chat-access-oauth: + parameters: + path: + subscriberId: "" + providerId: "" + query: + hmacHash: "" + environmentId: "" + SubscribersController_updateSubscriberGlobalPreferences: + speakeasy-default-subscribers-controller-update-subscriber-global-preferences: + parameters: + path: + subscriberId: "" responses: "200": - application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} - TenantController_removeTenant: - speakeasy-default-tenant-controller-remove-tenant: + application/json: {"template": {"_id": "", "name": "", "critical": true, "triggers": [""]}, "preference": {"enabled": true}} + SubscribersController_getUnseenCount: + speakeasy-default-subscribers-controller-get-unseen-count: parameters: path: - identifier: "" - TenantController_listTenants: - speakeasy-default-tenant-controller-list-tenants: + subscriberId: "" + query: + seen: false + limit: "2979.49" responses: "200": - application/json: {"data": [], "hasMore": false, "page": "998.95", "pageSize": "5472.72"} - TenantController_getTenantById: - speakeasy-default-tenant-controller-get-tenant-by-id: + application/json: {"count": "5438.83"} + SubscribersController_markAllUnreadAsRead: + speakeasy-default-subscribers-controller-mark-all-unread-as-read: parameters: path: - identifier: "" + subscriberId: "" + requestBody: + application/json: {"markAs": "seen"} + responses: + "201": + application/json: "4603.37" + SubscribersController_markActionAsSeen: + speakeasy-default-subscribers-controller-mark-action-as-seen: + parameters: + path: + messageId: "" + type: "" + subscriberId: "" + 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": ""} + MessagesController_getMessages: + speakeasy-default-messages-controller-get-messages: responses: "200": - application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} - TenantController_updateTenant: - speakeasy-default-tenant-controller-update-tenant: + application/json: {"hasMore": false, "data": ["", ""], "pageSize": "5442.21", "page": "5212.35"} + MessagesController_deleteMessage: + speakeasy-default-messages-controller-delete-message: parameters: path: - identifier: "" + messageId: "" responses: "200": - application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} + application/json: {"acknowledged": false, "status": "deleted"} + MessagesController_deleteMessagesByTransactionId: + speakeasy-default-messages-controller-delete-messages-by-transaction-id: + parameters: + path: + transactionId: "" + query: {} TopicsController_createTopic: speakeasy-default-topics-controller-create-topic: requestBody: @@ -1155,26 +946,16 @@ examples: responses: "201": application/json: {"key": ""} - TopicsController_deleteTopic: - speakeasy-default-topics-controller-delete-topic: - parameters: - path: - topicKey: "" TopicsController_listTopics: speakeasy-default-topics-controller-list-topics: responses: "200": - application/json: {"data": [], "page": "7685.78", "pageSize": "998.95", "totalCount": "5472.72"} - TopicsController_renameTopic: - speakeasy-default-topics-controller-rename-topic: + application/json: {"data": [{"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": []}], "page": "5984.80", "pageSize": "6512.03", "totalCount": "163.09"} + TopicsController_deleteTopic: + speakeasy-default-topics-controller-delete-topic: parameters: path: topicKey: "" - requestBody: - application/json: {"name": ""} - responses: - "200": - application/json: {"_environmentId": "", "_organizationId": "", "key": "", "name": "", "subscribers": []} TopicsController_getTopic: speakeasy-default-topics-controller-get-topic: parameters: @@ -1182,80 +963,38 @@ examples: topicKey: "" responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "key": "", "name": "", "subscribers": []} - TopicsController_addSubscribers: - speakeasy-default-topics-controller-add-subscribers: + application/json: {"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": ["", ""]} + TopicsController_renameTopic: + speakeasy-default-topics-controller-rename-topic: parameters: path: topicKey: "" requestBody: - application/json: {"subscribers": []} - TopicsController_removeSubscribers: - speakeasy-default-topics-controller-remove-subscribers: + application/json: {"name": ""} + responses: + "200": + application/json: {"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": ["", "", ""]} + TopicsController_addSubscribers: + speakeasy-default-topics-controller-add-subscribers: parameters: path: topicKey: "" requestBody: - application/json: {"subscribers": []} + application/json: {"subscribers": ["", ""]} TopicsController_getTopicSubscriber: speakeasy-default-topics-controller-get-topic-subscriber: parameters: path: - externalSubscriberId: "" + externalSubscriberId: "" topicKey: "" responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "_topicId": "", "externalSubscriberId": "", "topicKey": ""} - WorkflowController_create: - speakeasy-default-workflow-controller-create: - requestBody: - application/json: {"name": "", "notificationGroupId": "", "steps": []} - responses: - "201": - application/json: {"_creatorId": "", "_environmentId": "", "_notificationGroupId": "", "_organizationId": "", "active": true, "critical": false, "deleted": false, "deletedAt": "", "deletedBy": "", "description": "Synchronised full-range emulation", "draft": true, "name": "", "steps": [], "tags": [], "triggers": []} - WorkflowController_deleteWorkflowById: - speakeasy-default-workflow-controller-delete-workflow-by-id: - parameters: - path: - workflowId: "" - responses: - "200": - application/json: {"data": true} - WorkflowController_listWorkflows: - speakeasy-default-workflow-controller-list-workflows: - responses: - "200": - application/json: {"data": [], "page": "7685.78", "pageSize": "998.95", "totalCount": "5472.72"} - WorkflowController_getWorkflowById: - speakeasy-default-workflow-controller-get-workflow-by-id: - parameters: - path: - workflowId: "" - responses: - "200": - application/json: {"_creatorId": "", "_environmentId": "", "_notificationGroupId": "", "_organizationId": "", "active": false, "critical": true, "deleted": true, "deletedAt": "", "deletedBy": "", "description": "Programmable dynamic Graphic Interface", "draft": false, "name": "", "steps": [], "tags": [], "triggers": []} - WorkflowController_updateWorkflowById: - speakeasy-default-workflow-controller-update-workflow-by-id: - parameters: - path: - workflowId: "" - requestBody: - application/json: {"name": "", "notificationGroupId": ""} - responses: - "200": - application/json: {"_creatorId": "", "_environmentId": "", "_notificationGroupId": "", "_organizationId": "", "active": false, "critical": true, "deleted": true, "deletedAt": "", "deletedBy": "", "description": "Advanced encompassing orchestration", "draft": false, "name": "", "steps": [], "tags": [], "triggers": []} - WorkflowController_getWorkflowVariables: - speakeasy-default-workflow-controller-get-workflow-variables: - responses: - "200": - application/json: {} - WorkflowController_updateActiveStatus: - speakeasy-default-workflow-controller-update-active-status: + application/json: {"_organizationId": "", "_environmentId": "", "_subscriberId": "", "_topicId": "", "topicKey": "", "externalSubscriberId": ""} + TopicsController_removeSubscribers: + speakeasy-default-topics-controller-remove-subscribers: parameters: path: - workflowId: "" + topicKey: "" requestBody: - application/json: {"active": false} - responses: - "200": - application/json: {"_creatorId": "", "_environmentId": "", "_notificationGroupId": "", "_organizationId": "", "active": true, "critical": true, "deleted": false, "deletedAt": "", "deletedBy": "", "description": "Future-proofed next generation workforce", "draft": false, "name": "", "steps": [], "tags": [], "triggers": []} + application/json: {"subscribers": ["", ""]} +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 542fce51..fff16e97 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -1,6 +1,7 @@ configVersion: 2.0.0 generation: sdkClassName: Novu + maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample useClassNamesForArrayFields: true @@ -10,8 +11,9 @@ generation: requestResponseComponentNamesFeb2024: true auth: oAuth2ClientCredentialsEnabled: false + oAuth2PasswordEnabled: false typescript: - version: 0.0.1-alpha.11 + version: 0.0.1-alpha.25 additionalDependencies: dependencies: {} devDependencies: {} @@ -19,8 +21,10 @@ typescript: additionalPackageJSON: {} author: Novu clientServerStatusCodesAsErrors: true + defaultErrorName: SDKError enumFormat: union flattenGlobalSecurity: true + flatteningOrder: body-first imports: option: openapi paths: diff --git a/.speakeasy/speakeasy-modifications-overlay.yaml b/.speakeasy/speakeasy-modifications-overlay.yaml new file mode 100644 index 00000000..46aeb830 --- /dev/null +++ b/.speakeasy/speakeasy-modifications-overlay.yaml @@ -0,0 +1,401 @@ +overlay: 1.0.0 +info: + title: Speakeasy Modifications + version: 0.0.6 + x-speakeasy-metadata: + after: "" + before: "" + type: speakeasy-modifications +actions: + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["patch"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Preferences.updateGlobal() + after: sdk.subscribersPreferences.updateGlobal() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/notification-groups/{id}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Workflow groups.NotificationGroupsController_deleteNotificationGroup() + after: sdk.workflowGroups.delete() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/events/trigger/{transactionId}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Events.cancel() + after: sdk.events.cancelByTransactionId() + reviewed_at: 1732563929240 + created_at: 1732563888541 + disabled: true + - target: $["paths"]["/v1/integrations/webhook/provider/{providerOrIntegrationId}/status"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.Webhooks.IntegrationsController_getWebhookSupportStatus() + after: sdk.integrationsWebhooks.getStatus() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Authentication.chatAccessOauth() + after: sdk.subscribers.authentication.handleOauth() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/{externalSubscriberId}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.Subscribers.TopicsController_getTopicSubscriber() + after: sdk.topics.subscribers.check() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/topics/{topicKey}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.TopicsController_deleteTopic() + after: sdk.topics.delete() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notifications/stats"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Notifications.Stats.NotificationsController_getActivityStats() + after: sdk.notifications.stats.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/messages"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Messages.MessagesController_getMessages() + after: sdk.messages.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/integrations"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.IntegrationsController_listIntegrations() + after: sdk.integrations.list() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Preferences.retrieveByLevel() + after: sdk.subscribers.preferences.getByLevel() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/environments/me"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Environments.EnvironmentsControllerV1_getCurrentEnvironment() + after: sdk.environments.getCurrent() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/feed"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Notifications.SubscribersController_getNotificationsFeed() + after: sdk.subscribers.notifications.getFeed() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["patch"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Preferences.SubscribersController_updateSubscriberPreference() + after: sdk.subscribers.preferences.update() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notification-groups/{id}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Workflow groups.NotificationGroupsController_getNotificationGroup() + after: sdk.workflowGroups.get() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["patch"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Credentials.append() + after: sdk.subscribers.credentials.append() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Preferences.SubscribersController_listSubscriberPreferences() + after: sdk.subscribers.preferences.get() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/integrations/{integrationId}"]["put"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.IntegrationsController_updateIntegrationById() + after: sdk.integrations.update() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notification-groups/{id}"]["patch"] + x-speakeasy-metadata: + type: method-name + before: sdk.Workflow groups.NotificationGroupsController_updateNotificationGroup() + after: sdk.workflowGroups.update() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/environments"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Environments.EnvironmentsControllerV1_listMyEnvironments() + after: sdk.environments.getAll() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notification-groups"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Workflow groups.NotificationGroupsController_createNotificationGroup() + after: sdk.workflowGroups.create() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/unseen"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Notifications.unseenCount() + after: sdk.subscribersNotifications.getUnseenCount() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["put"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Credentials.SubscribersController_updateSubscriberChannel() + after: sdk.subscribers.credentials.update() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-as"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Messages.markAllAs() + after: sdk.subscribers.messages.mark() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/integrations/{integrationId}/set-primary"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.setAsPrimary() + after: sdk.integrations.setPrimary() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notifications"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Notifications.NotificationsController_listNotifications() + after: sdk.notifications.list() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notifications/graph/stats"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Notifications.Stats.graph() + after: sdk.notificationsStats.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/notifications/{notificationId}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Notifications.NotificationsController_getNotification() + after: sdk.notifications.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/removal"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.Subscribers.TopicsController_removeSubscribers() + after: sdk.topics.subscribers.remove() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.SubscribersController_getSubscriber() + after: sdk.subscribers.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/topics/{topicKey}"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.TopicsController_getTopic() + after: sdk.topics.get() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Credentials.SubscribersController_deleteSubscriberCredentials() + after: sdk.subscribers.credentials.delete() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Authentication.chatAccessOauthCallBack() + after: sdk.subscribers.authentication.handleOauthCallback() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.SubscribersController_listSubscribers() + after: sdk.subscribers.getAll() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/topics"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.TopicsController_listTopics() + after: sdk.topics.getAll() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["put"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.SubscribersController_updateSubscriber() + after: sdk.subscribers.update() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/environments/api-keys"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Environments.ApiKeys.EnvironmentsControllerV1_listOrganizationApiKeys() + after: sdk.environments.apiKeys.list() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/notification-groups"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Workflow groups.NotificationGroupsController_listNotificationGroups() + after: sdk.workflowGroups.list() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/topics/{topicKey}/subscribers"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.Subscribers.assign() + after: sdk.topics.subscribers.add() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/messages/{messageId}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Messages.MessagesController_deleteMessage() + after: sdk.messages.delete() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-all"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Messages.markAll() + after: sdk.subscribersMessages.markAll() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/topics"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Topics.TopicsController_createTopic() + after: sdk.topics.create() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/execution-details"]["get"] + x-speakeasy-metadata: + type: method-name + before: sdk.Execution Details.ExecutionDetailsController_getExecutionDetailsForNotification() + after: sdk.executionDetails.get() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/online-status"]["patch"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.properties.updateOnlineFlag() + after: sdk.subscribers.properties.updateOnlineStatus() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.SubscribersController_removeSubscriber() + after: sdk.subscribers.delete() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/integrations"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.IntegrationsController_createIntegration() + after: sdk.integrations.create() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.Messages.updateAsSeen() + after: sdk.subscribersMessages.updateAsSeen() + reviewed_at: 1732386050400 + created_at: 1732385969424 + disabled: true + - target: $["paths"]["/v1/integrations/{integrationId}"]["delete"] + x-speakeasy-metadata: + type: method-name + before: sdk.Integrations.IntegrationsController_removeIntegration() + after: sdk.integrations.delete() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true + - target: $["paths"]["/v1/subscribers"]["post"] + x-speakeasy-metadata: + type: method-name + before: sdk.Subscribers.SubscribersController_createSubscriber() + after: sdk.subscribers.create() + reviewed_at: 1732386050400 + created_at: 1732385969423 + disabled: true diff --git a/.speakeasy/temp/a32d33/openapi/bundle/openapi.json b/.speakeasy/temp/a32d33/openapi/bundle/openapi.json new file mode 100644 index 00000000..079d0850 --- /dev/null +++ b/.speakeasy/temp/a32d33/openapi/bundle/openapi.json @@ -0,0 +1 @@ +{"openapi": "3.0.0", "paths": {"/v1/environments/me": {"get": {"operationId": "EnvironmentsControllerV1_getCurrentEnvironment", "summary": "Get current environment", "parameters": [], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnvironmentResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Environments"], "security": [{"api-key": []}]}}, "/v1/environments": {"get": {"operationId": "EnvironmentsControllerV1_listMyEnvironments", "summary": "Get environments", "parameters": [], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EnvironmentResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Environments"], "security": [{"api-key": []}]}}, "/v1/environments/api-keys": {"get": {"operationId": "EnvironmentsControllerV1_listOrganizationApiKeys", "x-speakeasy-group": "Environments.ApiKeys", "summary": "Get api keys", "parameters": [], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ApiKey"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Environments"], "security": [{"api-key": []}]}}, "/v1/execution-details": {"get": {"operationId": "ExecutionDetailsController_getExecutionDetailsForNotification", "summary": "Get execution details", "parameters": [{"name": "notificationId", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "subscriberId", "required": true, "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ExecutionDetailsResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Execution Details"], "security": [{"api-key": []}]}}, "/v1/events/trigger": {"post": {"operationId": "EventsController_trigger", "x-speakeasy-group": "", "x-speakeasy-usage-example": {"title": "Trigger Notification Event"}, "x-speakeasy-name-override": "trigger", "summary": "Trigger event", "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerEventRequestDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerEventResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Events"], "security": [{"api-key": []}]}}, "/v1/events/trigger/bulk": {"post": {"operationId": "EventsController_triggerBulk", "x-speakeasy-group": "", "x-speakeasy-usage-example": {"title": "Trigger Notification Events in Bulk"}, "x-speakeasy-name-override": "triggerBulk", "summary": "Bulk trigger event", "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkTriggerEventDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/TriggerEventResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Events"], "security": [{"api-key": []}]}}, "/v1/events/trigger/broadcast": {"post": {"operationId": "EventsController_broadcastEventToAll", "x-speakeasy-group": "", "x-speakeasy-usage-example": {"title": "Broadcast Event to All"}, "x-speakeasy-name-override": "triggerBroadcast", "summary": "Broadcast event to all", "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerEventToAllRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerEventResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Events"], "security": [{"api-key": []}]}}, "/v1/events/trigger/{transactionId}": {"delete": {"operationId": "EventsController_cancel", "x-speakeasy-group": "", "x-speakeasy-usage-example": {"title": "Cancel Triggered Event"}, "x-speakeasy-name-override": "cancelByTransactionId", "summary": "Cancel triggered event", "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", "parameters": [{"name": "transactionId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DataBooleanDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Events"], "security": [{"api-key": []}]}}, "/v1/notifications": {"get": {"operationId": "NotificationsController_listNotifications", "summary": "Get notifications", "parameters": [{"name": "channels", "required": true, "in": "query", "schema": {"type": "array", "items": {"type": "string", "enum": ["in_app", "email", "sms", "chat", "push"]}}}, {"name": "templates", "required": true, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "emails", "required": true, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "search", "required": true, "in": "query", "deprecated": true, "schema": {"type": "string"}}, {"name": "subscriberIds", "required": true, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "page", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "transactionId", "required": false, "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActivitiesResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Notifications"], "security": [{"api-key": []}]}}, "/v1/notifications/stats": {"get": {"operationId": "NotificationsController_getActivityStats", "x-speakeasy-group": "Notifications.Stats", "summary": "Get notification statistics", "parameters": [], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActivityStatsResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Notifications"], "security": [{"api-key": []}]}}, "/v1/notifications/graph/stats": {"get": {"operationId": "NotificationsController_getActivityGraphStats", "x-speakeasy-name-override": "graph", "x-speakeasy-group": "Notifications.Stats", "summary": "Get notification graph statistics", "parameters": [{"name": "days", "required": false, "in": "query", "schema": {"type": "number"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ActivityGraphStatesResponse"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Notifications"], "security": [{"api-key": []}]}}, "/v1/notifications/{notificationId}": {"get": {"operationId": "NotificationsController_getNotification", "summary": "Get notification", "parameters": [{"name": "notificationId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActivityNotificationResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Notifications"], "security": [{"api-key": []}]}}, "/v1/notification-groups": {"post": {"operationId": "NotificationGroupsController_createNotificationGroup", "summary": "Create workflow group", "description": "workflow group was previously named notification group", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateNotificationGroupRequestDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotificationGroupResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Workflow groups"], "security": [{"api-key": []}]}, "get": {"operationId": "NotificationGroupsController_listNotificationGroups", "summary": "Get workflow groups", "description": "workflow group was previously named notification group", "parameters": [], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/NotificationGroupResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Workflow groups"], "security": [{"api-key": []}]}}, "/v1/notification-groups/{id}": {"get": {"operationId": "NotificationGroupsController_getNotificationGroup", "summary": "Get workflow group", "description": "workflow group was previously named notification group", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotificationGroupResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Workflow groups"], "security": [{"api-key": []}]}, "patch": {"operationId": "NotificationGroupsController_updateNotificationGroup", "summary": "Update workflow group", "description": "workflow group was previously named notification group", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateNotificationGroupRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotificationGroupResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Workflow groups"], "security": [{"api-key": []}]}, "delete": {"operationId": "NotificationGroupsController_deleteNotificationGroup", "summary": "Delete workflow group", "description": "workflow group was previously named notification group", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteNotificationGroupResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Workflow groups"], "security": [{"api-key": []}]}}, "/v1/integrations": {"get": {"operationId": "IntegrationsController_listIntegrations", "summary": "Get integrations", "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [], "responses": {"200": {"description": "The list of integrations belonging to the organization that are successfully returned.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}, "post": {"operationId": "IntegrationsController_createIntegration", "summary": "Create integration", "description": "Create an integration for the current environment the user is based on the API key provided", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateIntegrationRequestDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}}, "/v1/integrations/active": {"get": {"operationId": "IntegrationsController_getActiveIntegrations", "x-speakeasy-name-override": "listActive", "summary": "Get active integrations", "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [], "responses": {"200": {"description": "The list of active integrations belonging to the organization that are successfully returned.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}}, "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": {"get": {"operationId": "IntegrationsController_getWebhookSupportStatus", "x-speakeasy-group": "Integrations.Webhooks", "summary": "Get webhook support status for provider", "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", "parameters": [{"name": "providerOrIntegrationId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "The status of the webhook for the provider requested", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "boolean"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}}, "/v1/integrations/{integrationId}": {"put": {"operationId": "IntegrationsController_updateIntegrationById", "summary": "Update integration", "parameters": [{"name": "integrationId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateIntegrationRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}, "404": {"description": "The integration with the integrationId provided does not exist in the database.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}, "delete": {"operationId": "IntegrationsController_removeIntegration", "summary": "Delete integration", "parameters": [{"name": "integrationId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}}, "/v1/integrations/{integrationId}/set-primary": {"post": {"operationId": "IntegrationsController_setIntegrationAsPrimary", "x-speakeasy-name-override": "setAsPrimary", "summary": "Set integration as primary", "parameters": [{"name": "integrationId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationResponseDto"}}}}, "404": {"description": "The integration with the integrationId provided does not exist in the database.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Integrations"], "security": [{"api-key": []}]}}, "/v1/subscribers": {"get": {"operationId": "SubscribersController_listSubscribers", "x-speakeasy-pagination": {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.data.resultArray"}}, "summary": "Get subscribers", "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", "parameters": [{"name": "page", "required": false, "in": "query", "schema": {"type": "number"}}, {"name": "limit", "required": false, "in": "query", "schema": {"maximum": 100, "default": 10, "type": "number"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/PaginatedResponseDto"}, {"properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}]}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "post": {"operationId": "SubscribersController_createSubscriber", "summary": "Create subscriber", "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateSubscriberRequestDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}": {"get": {"operationId": "SubscribersController_getSubscriber", "summary": "Get subscriber", "description": "Get subscriber by your internal id used to identify the subscriber", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "includeTopics", "required": false, "in": "query", "description": "Includes the topics associated with the subscriber", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "put": {"operationId": "SubscribersController_updateSubscriber", "summary": "Update subscriber", "description": "Used to update the subscriber entity with new information", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "delete": {"operationId": "SubscribersController_removeSubscriber", "summary": "Delete subscriber", "description": "Deletes a subscriber entity from the Novu platform", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteSubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/bulk": {"post": {"operationId": "SubscribersController_bulkCreateSubscribers", "x-speakeasy-name-override": "createBulk", "summary": "Bulk create subscribers", "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkSubscriberCreateDto"}}}}, "responses": {"201": {"description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/credentials": {"put": {"operationId": "SubscribersController_updateSubscriberChannel", "x-speakeasy-group": "Subscribers.Credentials", "summary": "Update subscriber credentials", "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "patch": {"operationId": "SubscribersController_modifySubscriberChannel", "x-speakeasy-name-override": "append", "x-speakeasy-group": "Subscribers.Credentials", "summary": "Modify subscriber credentials", "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n\n This endpoint appends provided credentials and deviceTokens to the existing ones.", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/credentials/{providerId}": {"delete": {"operationId": "SubscribersController_deleteSubscriberCredentials", "x-speakeasy-group": "Subscribers.Credentials", "summary": "Delete subscriber credentials by providerId", "description": "Delete subscriber credentials such as slack and expo tokens.", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "providerId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"204": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/online-status": {"patch": {"operationId": "SubscribersController_updateSubscriberOnlineFlag", "x-speakeasy-name-override": "updateOnlineFlag", "x-speakeasy-group": "Subscribers.properties", "summary": "Update subscriber online status", "description": "Used to update the subscriber isOnline flag.", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriberResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/preferences": {"get": {"operationId": "SubscribersController_listSubscriberPreferences", "x-speakeasy-group": "Subscribers.Preferences", "summary": "Get subscriber preferences", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "includeInactiveChannels", "required": false, "in": "query", "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", "schema": {"type": "boolean"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "patch": {"operationId": "SubscribersController_updateSubscriberGlobalPreferences", "x-speakeasy-name-override": "updateGlobal", "x-speakeasy-group": "Subscribers.Preferences", "summary": "Update subscriber global preferences", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/preferences/{parameter}": {"get": {"operationId": "SubscribersController_getSubscriberPreferenceByLevel", "x-speakeasy-name-override": "retrieveByLevel", "x-speakeasy-group": "Subscribers.Preferences", "summary": "Get subscriber preferences by level", "parameters": [{"name": "includeInactiveChannels", "required": false, "in": "query", "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", "schema": {"type": "boolean"}}, {"name": "parameter", "required": true, "in": "path", "description": "the preferences level to be retrieved (template / global) ", "schema": {"enum": ["global", "template"], "type": "string"}}, {"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}, "patch": {"operationId": "SubscribersController_updateSubscriberPreference", "x-speakeasy-group": "Subscribers.Preferences", "summary": "Update subscriber preference", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "parameter", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/notifications/feed": {"get": {"operationId": "SubscribersController_getNotificationsFeed", "x-speakeasy-group": "Subscribers.Notifications", "summary": "Get in-app notification feed for a particular subscriber", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "page", "required": false, "in": "query", "schema": {"type": "number"}}, {"name": "limit", "required": false, "in": "query", "schema": {"maximum": 100, "default": 10, "type": "number"}}, {"name": "read", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "seen", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "payload", "required": false, "in": "query", "description": "Base64 encoded string of the partial payload JSON object", "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", "schema": {"type": "string"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/PaginatedResponseDto"}, {"properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/FeedResponseDto"}}}}]}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/notifications/unseen": {"get": {"operationId": "SubscribersController_getUnseenCount", "x-speakeasy-name-override": "unseenCount", "x-speakeasy-group": "Subscribers.Notifications", "summary": "Get the unseen in-app notifications count for subscribers feed", "parameters": [{"name": "seen", "required": true, "in": "query", "schema": {"type": "boolean"}}, {"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "limit", "required": true, "in": "query", "schema": {"type": "number"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnseenCountResponse"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/messages/mark-as": {"post": {"operationId": "SubscribersController_markMessagesAs", "x-speakeasy-name-override": "markAllAs", "x-speakeasy-group": "Subscribers.Messages", "summary": "Mark a subscriber messages as seen, read, unseen or unread", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageMarkAsRequestDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/MessageEntity"}}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/messages/mark-all": {"post": {"operationId": "SubscribersController_markAllUnreadAsRead", "x-speakeasy-name-override": "markAll", "x-speakeasy-group": "Subscribers.Messages", "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkAllMessageAsRequestDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "number"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": {"post": {"operationId": "SubscribersController_markActionAsSeen", "x-speakeasy-name-override": "updateAsSeen", "x-speakeasy-group": "Subscribers.Messages", "summary": "Mark message action as seen", "parameters": [{"name": "messageId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "type", "required": true, "in": "path", "schema": {}}, {"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkMessageActionAsSeenDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": {"get": {"operationId": "SubscribersController_chatOauthCallback", "x-speakeasy-name-override": "chatAccessOauthCallBack", "x-speakeasy-group": "Subscribers.Authentication", "summary": "Handle providers oauth redirect", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "providerId", "required": true, "in": "path", "schema": {}}, {"name": "code", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "hmacHash", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "environmentId", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "integrationIdentifier", "required": false, "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": {"get": {"operationId": "SubscribersController_chatAccessOauth", "x-speakeasy-name-override": "chatAccessOauth", "x-speakeasy-group": "Subscribers.Authentication", "summary": "Handle chat oauth", "parameters": [{"name": "subscriberId", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "providerId", "required": true, "in": "path", "schema": {}}, {"name": "hmacHash", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "environmentId", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "integrationIdentifier", "required": false, "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Subscribers"], "security": [{"api-key": []}]}}, "/v1/messages": {"get": {"operationId": "MessagesController_getMessages", "summary": "Get messages", "description": "Returns a list of messages, could paginate using the `page` query parameter", "parameters": [{"name": "channel", "required": false, "in": "query", "schema": {"enum": ["in_app", "email", "sms", "chat", "push"], "type": "string"}}, {"name": "subscriberId", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "transactionId", "required": false, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "page", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "limit", "required": false, "in": "query", "schema": {"default": 10, "type": "number"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActivitiesResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Messages"], "security": [{"api-key": []}]}}, "/v1/messages/{messageId}": {"delete": {"operationId": "MessagesController_deleteMessage", "summary": "Delete message", "description": "Deletes a message entity from the Novu platform", "parameters": [{"name": "messageId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteMessageResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Messages"], "security": [{"api-key": []}]}}, "/v1/messages/transaction/{transactionId}": {"delete": {"operationId": "MessagesController_deleteMessagesByTransactionId", "x-speakeasy-name-override": "deleteByTransactionId", "summary": "Delete messages by transactionId", "description": "Deletes messages entity from the Novu platform using TransactionId of message", "parameters": [{"name": "channel", "required": false, "in": "query", "description": "The channel of the message to be deleted", "schema": {"enum": ["in_app", "email", "sms", "chat", "push"], "type": "string"}}, {"name": "transactionId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"204": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Messages"], "security": [{"api-key": []}]}}, "/v1/topics": {"post": {"operationId": "TopicsController_createTopic", "summary": "Topic creation", "description": "Create a topic", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTopicRequestDto"}}}}, "responses": {"201": {"description": "Created", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTopicResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}, "get": {"operationId": "TopicsController_listTopics", "summary": "Filter topics", "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", "parameters": [{"name": "page", "required": false, "in": "query", "description": "Number of page for the pagination", "schema": {"minimum": 0, "default": 0, "type": "number"}}, {"name": "pageSize", "required": false, "in": "query", "description": "Size of page for the pagination", "schema": {"minimum": 0, "default": 10, "type": "number"}}, {"name": "key", "required": false, "in": "query", "description": "Topic key", "schema": {"type": "string"}}], "responses": {"200": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FilterTopicsResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}}, "/v1/topics/{topicKey}/subscribers": {"post": {"operationId": "TopicsController_addSubscribers", "x-speakeasy-name-override": "assign", "x-speakeasy-group": "Topics.Subscribers", "summary": "Subscribers addition", "description": "Add subscribers to a topic by key", "parameters": [{"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddSubscribersRequestDto"}}}}, "responses": {"204": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}}, "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": {"get": {"operationId": "TopicsController_getTopicSubscriber", "x-speakeasy-group": "Topics.Subscribers", "summary": "Check topic subscriber", "description": "Check if a subscriber belongs to a certain topic", "parameters": [{"name": "externalSubscriberId", "required": true, "in": "path", "description": "The external subscriber id", "schema": {"type": "string"}}, {"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TopicSubscriberDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}}, "/v1/topics/{topicKey}/subscribers/removal": {"post": {"operationId": "TopicsController_removeSubscribers", "x-speakeasy-group": "Topics.Subscribers", "summary": "Subscribers removal", "description": "Remove subscribers from a topic", "parameters": [{"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RemoveSubscribersRequestDto"}}}}, "responses": {"204": {"headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "description": ""}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}}, "/v1/topics/{topicKey}": {"delete": {"operationId": "TopicsController_deleteTopic", "summary": "Delete topic", "description": "Delete a topic by its topic key if it has no subscribers", "parameters": [{"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "responses": {"204": {"description": "The topic has been deleted correctly", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}}, "404": {"description": "The topic with the key provided does not exist in the database so it can not be deleted.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}}, "409": {"description": "The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}, "get": {"operationId": "TopicsController_getTopic", "summary": "Get topic", "description": "Get a topic by its topic key", "parameters": [{"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetTopicResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}, "patch": {"operationId": "TopicsController_renameTopic", "x-speakeasy-name-override": "rename", "summary": "Rename a topic", "description": "Rename a topic by providing a new name", "parameters": [{"name": "topicKey", "required": true, "in": "path", "description": "The topic key", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameTopicRequestDto"}}}}, "responses": {"200": {"description": "Ok", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameTopicResponseDto"}}}}, "409": {"description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}, "Link": {"$ref": "#/components/headers/Link"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second"}}}}, "429": {"description": "The client has sent too many requests in a given amount of time. ", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "API rate limit exceeded"}}}}, "503": {"description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", "headers": {"Content-Type": {"$ref": "#/components/headers/Content-Type"}, "RateLimit-Limit": {"$ref": "#/components/headers/RateLimit-Limit"}, "RateLimit-Remaining": {"$ref": "#/components/headers/RateLimit-Remaining"}, "RateLimit-Reset": {"$ref": "#/components/headers/RateLimit-Reset"}, "RateLimit-Policy": {"$ref": "#/components/headers/RateLimit-Policy"}, "Idempotency-Key": {"$ref": "#/components/headers/Idempotency-Key"}, "Idempotency-Replay": {"$ref": "#/components/headers/Idempotency-Replay"}, "Retry-After": {"$ref": "#/components/headers/Retry-After"}}, "content": {"application/json": {"schema": {"type": "string", "example": "Please wait some time, then try again."}}}}}, "tags": ["Topics"], "security": [{"api-key": []}]}}}, "info": {"title": "Novu API", "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", "version": "1.0", "contact": {"name": "Novu Support", "url": "https://discord.gg/novu", "email": "support@novu.co"}, "termsOfService": "https://novu.co/terms", "license": {"name": "MIT", "url": "https://opensource.org/license/mit"}}, "tags": [{"name": "Events", "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", "externalDocs": {"url": "https://docs.novu.co/workflows"}}, {"name": "Subscribers", "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", "externalDocs": {"url": "https://docs.novu.co/subscribers/subscribers"}}, {"name": "Topics", "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", "externalDocs": {"url": "https://docs.novu.co/subscribers/topics"}}, {"name": "Notification", "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", "externalDocs": {"url": "https://docs.novu.co/getting-started/introduction"}}, {"name": "Integrations", "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", "externalDocs": {"url": "https://docs.novu.co/channels-and-providers/integration-store"}}, {"name": "Layouts", "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", "externalDocs": {"url": "https://docs.novu.co/content-creation-design/layouts"}}, {"name": "Workflows", "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", "externalDocs": {"url": "https://docs.novu.co/workflows"}}, {"name": "Notification Templates", "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name."}, {"name": "Workflow groups", "description": "Workflow groups are used to organize workflows into logical groups."}, {"name": "Changes", "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", "externalDocs": {"url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production"}}, {"name": "Environments", "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", "externalDocs": {"url": "https://docs.novu.co/platform/environments"}}, {"name": "Inbound Parse", "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", "externalDocs": {"url": "https://docs.novu.co/platform/inbound-parse-webhook"}}, {"name": "Feeds", "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", "externalDocs": {"url": "https://docs.novu.co/activity-feed"}}, {"name": "Tenants", "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", "externalDocs": {"url": "https://docs.novu.co/tenants"}}, {"name": "Messages", "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", "externalDocs": {"url": "https://docs.novu.co/workflows/messages"}}, {"name": "Organizations", "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", "externalDocs": {"url": "https://docs.novu.co/platform/organizations"}}, {"name": "Execution Details", "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", "externalDocs": {"url": "https://docs.novu.co/activity-feed"}}], "servers": [{"url": "https://api.novu.co"}, {"url": "https://eu.api.novu.co"}], "components": {"securitySchemes": {"api-key": {"type": "apiKey", "in": "header", "name": "Authorization", "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \"."}}, "schemas": {"DataWrapperDto": {"type": "object", "properties": {"data": {"type": "object"}}, "required": ["data"]}, "EnvironmentResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "name": {"type": "string"}, "_organizationId": {"type": "string"}, "identifier": {"type": "string"}, "apiKeys": {"type": "array", "items": {"type": "string"}}, "_parentId": {"type": "string"}, "slug": {"type": "string"}}, "required": ["name", "_organizationId", "identifier", "_parentId"]}, "ApiKey": {"type": "object", "properties": {"key": {"type": "string"}, "_userId": {"type": "string"}}, "required": ["key", "_userId"]}, "ExecutionDetailsResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_organizationId": {"type": "string"}, "_jobId": {"type": "string"}, "_environmentId": {"type": "string"}, "_notificationId": {"type": "string"}, "_notificationTemplateId": {"type": "string"}, "_subscriberId": {"type": "string"}, "_messageId": {"type": "string"}, "providerId": {"type": "string"}, "transactionId": {"type": "string"}, "channel": {"type": "string", "enum": ["in_app", "email", "sms", "chat", "push", "digest", "trigger", "delay", "custom"]}, "detail": {"type": "string"}, "source": {"type": "string", "enum": ["Credentials", "Internal", "Payload", "Webhook"]}, "status": {"type": "string", "enum": ["Success", "Warning", "Failed", "Pending", "Queued", "ReadConfirmation"]}, "isTest": {"type": "boolean"}, "isRetry": {"type": "boolean"}, "createdAt": {"type": "string"}}, "required": ["_organizationId", "_jobId", "_environmentId", "_notificationId", "_notificationTemplateId", "_subscriberId", "transactionId", "channel", "detail", "source", "status", "isTest", "isRetry"]}, "TriggerEventResponseDto": {"type": "object", "properties": {"acknowledged": {"type": "boolean", "description": "If trigger was acknowledged or not"}, "status": {"enum": ["error", "trigger_not_active", "no_workflow_active_steps_defined", "no_workflow_steps_defined", "processed", "subscriber_id_missing", "no_tenant_found"], "type": "string", "description": "Status for trigger"}, "error": {"description": "In case of an error, this field will contain the error message", "type": "array", "items": {"type": "string"}}, "transactionId": {"type": "string", "description": "Transaction id for trigger"}}, "required": ["acknowledged", "status"]}, "TopicPayloadDto": {"type": "object", "properties": {"topicKey": {"type": "string"}, "type": {"enum": ["Subscriber", "Topic"], "type": "string", "example": "Topic"}}, "required": ["topicKey", "type"]}, "TenantPayloadDto": {"type": "object", "properties": {"identifier": {"type": "string"}, "name": {"type": "string"}, "data": {"type": "object"}}}, "SubscriberPayloadDto": {"type": "object", "properties": {"subscriberId": {"type": "string", "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems"}, "email": {"type": "string"}, "firstName": {"type": "string"}, "lastName": {"type": "string"}, "phone": {"type": "string"}, "avatar": {"type": "string", "description": "An http url to the profile image of your subscriber"}, "locale": {"type": "string"}, "data": {"type": "object"}, "channels": {"type": "array", "items": {"type": "string"}}}, "required": ["subscriberId"]}, "TriggerEventRequestDto": {"type": "object", "properties": {"name": {"type": "string", "description": "The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page.", "example": "workflow_identifier"}, "payload": {"type": "object", "description": "The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.", "example": {"comment_id": "string", "post": {"text": "string"}}}, "overrides": {"type": "object", "description": "This could be used to override provider specific configurations", "example": {"fcm": {"data": {"key": "value"}}}}, "to": {"type": "array", "description": "The recipients list of people who will receive the notification.", "items": {"oneOf": [{"$ref": "#/components/schemas/SubscriberPayloadDto"}, {"type": "string", "description": "Unique identifier of a subscriber in your systems", "example": "SUBSCRIBER_ID"}, {"$ref": "#/components/schemas/TopicPayloadDto"}]}}, "transactionId": {"type": "string", "description": "A unique identifier for this transaction, we will generated a UUID if not provided."}, "actor": {"description": "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n ", "oneOf": [{"type": "string", "description": "Unique identifier of a subscriber in your systems"}, {"$ref": "#/components/schemas/SubscriberPayloadDto"}]}, "tenant": {"description": "It is used to specify a tenant context during trigger event.\n Existing tenants will be updated with the provided details.\n ", "oneOf": [{"type": "string", "description": "Unique identifier of a tenant in your system"}, {"$ref": "#/components/schemas/TenantPayloadDto"}]}, "bridgeUrl": {"type": "string"}, "controls": {"type": "object"}}, "required": ["name", "to"]}, "BulkTriggerEventDto": {"type": "object", "properties": {"events": {"type": "array", "items": {"$ref": "#/components/schemas/TriggerEventRequestDto"}}}, "required": ["events"]}, "TriggerEventToAllRequestDto": {"type": "object", "properties": {"name": {"type": "string", "description": "The trigger identifier associated for the template you wish to send. This identifier can be found on the template page."}, "payload": {"type": "object", "description": "The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.", "example": {"comment_id": "string", "post": {"text": "string"}}}, "overrides": {"type": "object", "description": "This could be used to override provider specific configurations", "example": {"fcm": {"data": {"key": "value"}}}}, "transactionId": {"type": "string", "description": "A unique identifier for this transaction, we will generated a UUID if not provided."}, "actor": {"description": "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n ", "oneOf": [{"type": "string", "description": "Unique identifier of a subscriber in your systems"}, {"$ref": "#/components/schemas/SubscriberPayloadDto"}]}, "tenant": {"description": "It is used to specify a tenant context during trigger event.\n If a new tenant object is provided, we will create a new tenant.\n ", "oneOf": [{"type": "string", "description": "Unique identifier of a tenant in your system"}, {"$ref": "#/components/schemas/TenantPayloadDto"}]}}, "required": ["name", "payload"]}, "DataBooleanDto": {"type": "object", "properties": {"data": {"type": "boolean"}}, "required": ["data"]}, "ActivitiesResponseDto": {"type": "object", "properties": {"hasMore": {"type": "boolean"}, "data": {"type": "array", "items": {"type": "string"}}, "pageSize": {"type": "number"}, "page": {"type": "number"}}, "required": ["hasMore", "data", "pageSize", "page"]}, "ActivityStatsResponseDto": {"type": "object", "properties": {"weeklySent": {"type": "number"}, "monthlySent": {"type": "number"}}, "required": ["weeklySent", "monthlySent"]}, "ActivityGraphStatesResponse": {"type": "object", "properties": {"_id": {"type": "string"}, "count": {"type": "number"}, "templates": {"type": "array", "items": {"type": "string"}}, "channels": {"type": "array", "items": {"type": "string", "enum": ["in_app", "email", "sms", "chat", "push"]}}}, "required": ["_id", "count", "templates", "channels"]}, "ActivityNotificationSubscriberResponseDto": {"type": "object", "properties": {"firstName": {"type": "string"}, "_id": {"type": "string"}, "lastName": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}}, "required": ["_id"]}, "ActivityNotificationTemplateResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "name": {"type": "string"}, "triggers": {"type": "array", "items": {"type": "string"}}}, "required": ["name", "triggers"]}, "ActivityNotificationResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_environmentId": {"type": "string"}, "_organizationId": {"type": "string"}, "transactionId": {"type": "string"}, "createdAt": {"type": "string"}, "channels": {"type": "string", "items": {"type": "string", "enum": ["in_app", "email", "sms", "chat", "push", "digest", "trigger", "delay", "custom"]}, "enum": ["in_app", "email", "sms", "chat", "push", "digest", "trigger", "delay", "custom"]}, "subscriber": {"$ref": "#/components/schemas/ActivityNotificationSubscriberResponseDto"}, "template": {"$ref": "#/components/schemas/ActivityNotificationTemplateResponseDto"}, "jobs": {"type": "array", "items": {"type": "string"}}}, "required": ["_environmentId", "_organizationId", "transactionId"]}, "NotificationGroupResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "name": {"type": "string"}, "_environmentId": {"type": "string"}, "_organizationId": {"type": "string"}, "_parentId": {"type": "string"}}, "required": ["name", "_environmentId", "_organizationId"]}, "CreateNotificationGroupRequestDto": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}, "DeleteNotificationGroupResponseDto": {"type": "object", "properties": {"acknowledged": {"type": "boolean", "description": "A boolean stating the success of the action"}, "status": {"type": "string", "description": "The status enum for the performed action", "enum": ["deleted"]}}, "required": ["acknowledged", "status"]}, "CredentialsDto": {"type": "object", "properties": {"apiKey": {"type": "string"}, "user": {"type": "string"}, "secretKey": {"type": "string"}, "domain": {"type": "string"}, "password": {"type": "string"}, "host": {"type": "string"}, "port": {"type": "string"}, "secure": {"type": "boolean"}, "region": {"type": "string"}, "accountSid": {"type": "string"}, "messageProfileId": {"type": "string"}, "token": {"type": "string"}, "from": {"type": "string"}, "senderName": {"type": "string"}, "projectName": {"type": "string"}, "applicationId": {"type": "string"}, "clientId": {"type": "string"}, "requireTls": {"type": "boolean"}, "ignoreTls": {"type": "boolean"}, "tlsOptions": {"type": "object"}, "baseUrl": {"type": "string"}, "webhookUrl": {"type": "string"}, "redirectUrl": {"type": "string"}, "hmac": {"type": "boolean"}, "serviceAccount": {"type": "string"}, "ipPoolName": {"type": "string"}, "apiKeyRequestHeader": {"type": "string"}, "secretKeyRequestHeader": {"type": "string"}, "idPath": {"type": "string"}, "datePath": {"type": "string"}, "apiToken": {"type": "string"}, "authenticateByToken": {"type": "boolean"}, "authenticationTokenKey": {"type": "string"}, "instanceId": {"type": "string"}, "alertUid": {"type": "string"}, "title": {"type": "string"}, "imageUrl": {"type": "string"}, "state": {"type": "string"}, "externalLink": {"type": "string"}, "channelId": {"type": "string"}, "phoneNumberIdentification": {"type": "string"}, "accessKey": {"type": "string"}}}, "FieldFilterPart": {"type": "object", "properties": {"field": {"type": "string"}, "value": {"type": "string"}, "operator": {"type": "string", "enum": ["LARGER", "SMALLER", "LARGER_EQUAL", "SMALLER_EQUAL", "EQUAL", "NOT_EQUAL", "ALL_IN", "ANY_IN", "NOT_IN", "BETWEEN", "NOT_BETWEEN", "LIKE", "NOT_LIKE", "IN"]}, "on": {"type": "string", "enum": ["subscriber", "payload"]}}, "required": ["field", "value", "operator", "on"]}, "StepFilter": {"type": "object", "properties": {"isNegated": {"type": "boolean"}, "type": {"type": "string", "enum": ["BOOLEAN", "TEXT", "DATE", "NUMBER", "STATEMENT", "LIST", "MULTI_LIST", "GROUP"]}, "value": {"type": "string", "enum": ["AND", "OR"]}, "children": {"type": "array", "items": {"$ref": "#/components/schemas/FieldFilterPart"}}}, "required": ["isNegated", "type", "value", "children"]}, "IntegrationResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_environmentId": {"type": "string"}, "_organizationId": {"type": "string"}, "name": {"type": "string"}, "identifier": {"type": "string"}, "providerId": {"type": "string"}, "channel": {"enum": ["in_app", "email", "sms", "chat", "push"], "type": "string"}, "credentials": {"$ref": "#/components/schemas/CredentialsDto"}, "active": {"type": "boolean"}, "deleted": {"type": "boolean"}, "deletedAt": {"type": "string"}, "deletedBy": {"type": "string"}, "primary": {"type": "boolean"}, "conditions": {"type": "array", "items": {"$ref": "#/components/schemas/StepFilter"}}}, "required": ["_environmentId", "_organizationId", "name", "identifier", "providerId", "channel", "credentials", "active", "deleted", "deletedAt", "deletedBy", "primary"]}, "CreateIntegrationRequestDto": {"type": "object", "properties": {"name": {"type": "string"}, "identifier": {"type": "string"}, "_environmentId": {"type": "string"}, "providerId": {"type": "string"}, "channel": {"enum": ["in_app", "email", "sms", "chat", "push"], "type": "string"}, "credentials": {"$ref": "#/components/schemas/CredentialsDto"}, "active": {"type": "boolean", "description": "If the integration is active the validation on the credentials field will run"}, "check": {"type": "boolean"}, "conditions": {"type": "array", "items": {"$ref": "#/components/schemas/StepFilter"}}}, "required": ["providerId", "channel"]}, "UpdateIntegrationRequestDto": {"type": "object", "properties": {"name": {"type": "string"}, "identifier": {"type": "string"}, "_environmentId": {"type": "string"}, "active": {"type": "boolean", "description": "If the integration is active the validation on the credentials field will run"}, "credentials": {"$ref": "#/components/schemas/CredentialsDto"}, "removeNovuBranding": {"type": "boolean", "description": "If true, the Novu branding will be removed from the Inbox component"}, "check": {"type": "boolean"}, "conditions": {"type": "array", "items": {"$ref": "#/components/schemas/StepFilter"}}}}, "PaginatedResponseDto": {"type": "object", "properties": {"page": {"type": "number", "description": "The current page of the paginated response"}, "hasMore": {"type": "boolean", "description": "Does the list have more items to fetch"}, "pageSize": {"type": "number", "description": "Number of items on each page"}, "data": {"description": "The list of items matching the query", "type": "array", "items": {"type": "object"}}}, "required": ["page", "hasMore", "pageSize", "data"]}, "ChannelCredentials": {"type": "object", "properties": {"webhookUrl": {"type": "string", "description": "Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider."}, "channel": {"type": "string", "description": "Channel specification for Mattermost chat notifications"}, "deviceTokens": {"description": "Contains an array of the subscriber device tokens for a given provider. Used on Push integrations", "type": "array", "items": {"type": "string"}}, "alertUid": {"type": "string", "description": "alert_uid for grafana on-call webhook payload"}, "title": {"type": "string", "description": "title to be used with grafana on call webhook"}, "imageUrl": {"type": "string", "description": "image_url property fo grafana on call webhook"}, "state": {"type": "string", "description": "state property fo grafana on call webhook"}, "externalUrl": {"type": "string", "description": "link_to_upstream_details property fo grafana on call webhook"}}, "required": ["webhookUrl"]}, "ChannelSettings": {"type": "object", "properties": {"providerId": {"type": "string", "enum": ["slack", "discord", "msteams", "mattermost", "ryver", "zulip", "grafana-on-call", "getstream", "rocket-chat", "whatsapp-business", "fcm", "apns", "expo", "one-signal", "pushpad", "push-webhook", "pusher-beams"], "description": "The provider identifier for the credentials"}, "integrationIdentifier": {"type": "string", "description": "The integration identifier"}, "credentials": {"description": "Credentials payload for the specified provider", "allOf": [{"$ref": "#/components/schemas/ChannelCredentials"}]}, "_integrationId": {"type": "string", "description": "Id of the integration that is used for this channel"}}, "required": ["providerId", "credentials", "_integrationId"]}, "SubscriberResponseDto": {"type": "object", "properties": {"_id": {"type": "string", "description": "The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that"}, "firstName": {"type": "string"}, "lastName": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "avatar": {"type": "string"}, "locale": {"type": "string"}, "subscriberId": {"type": "string", "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems"}, "channels": {"description": "Channels settings for subscriber", "type": "array", "items": {"$ref": "#/components/schemas/ChannelSettings"}}, "topics": {"description": "Topics that subscriber belongs to", "type": "array", "items": {"type": "string"}}, "isOnline": {"type": "boolean"}, "lastOnlineAt": {"type": "string"}, "_organizationId": {"type": "string"}, "_environmentId": {"type": "string"}, "deleted": {"type": "boolean"}, "createdAt": {"type": "string"}, "updatedAt": {"type": "string"}, "__v": {"type": "number"}}, "required": ["subscriberId", "_organizationId", "_environmentId", "deleted", "createdAt", "updatedAt"]}, "CreateSubscriberRequestDto": {"type": "object", "properties": {"subscriberId": {"type": "string", "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems"}, "email": {"type": "string"}, "firstName": {"type": "string"}, "lastName": {"type": "string"}, "phone": {"type": "string"}, "avatar": {"type": "string", "description": "An http url to the profile image of your subscriber"}, "locale": {"type": "string"}, "data": {"type": "object"}, "channels": {"type": "array", "items": {"type": "string"}}}, "required": ["subscriberId"]}, "BulkSubscriberCreateDto": {"type": "object", "properties": {"subscribers": {"type": "array", "items": {"type": "string"}}}, "required": ["subscribers"]}, "UpdateSubscriberRequestDto": {"type": "object", "properties": {"email": {"type": "string"}, "firstName": {"type": "string"}, "lastName": {"type": "string"}, "phone": {"type": "string"}, "avatar": {"type": "string"}, "locale": {"type": "string"}, "data": {"type": "object"}, "channels": {"type": "array", "items": {"type": "string"}}}}, "UpdateSubscriberChannelRequestDto": {"type": "object", "properties": {"providerId": {"type": "string", "enum": ["slack", "discord", "msteams", "mattermost", "ryver", "zulip", "grafana-on-call", "getstream", "rocket-chat", "whatsapp-business", "fcm", "apns", "expo", "one-signal", "pushpad", "push-webhook", "pusher-beams"], "description": "The provider identifier for the credentials"}, "integrationIdentifier": {"type": "string", "description": "The integration identifier"}, "credentials": {"description": "Credentials payload for the specified provider", "allOf": [{"$ref": "#/components/schemas/ChannelCredentials"}]}}, "required": ["providerId", "credentials"]}, "UpdateSubscriberOnlineFlagRequestDto": {"type": "object", "properties": {"isOnline": {"type": "boolean"}}, "required": ["isOnline"]}, "DeleteSubscriberResponseDto": {"type": "object", "properties": {"acknowledged": {"type": "boolean", "description": "A boolean stating the success of the action"}, "status": {"type": "string", "description": "The status enum for the performed action", "enum": ["deleted"]}}, "required": ["acknowledged", "status"]}, "TemplateResponse": {"type": "object", "properties": {"_id": {"type": "string", "description": "Unique identifier of the workflow"}, "name": {"type": "string", "description": "Name of the workflow"}, "critical": {"type": "boolean", "description": "Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen"}, "triggers": {"description": "Triggers are the events that will trigger the workflow.", "type": "array", "items": {"type": "string"}}}, "required": ["_id", "name", "critical", "triggers"]}, "PreferenceChannels": {"type": "object", "properties": {"email": {"type": "boolean"}, "sms": {"type": "boolean"}, "in_app": {"type": "boolean"}, "chat": {"type": "boolean"}, "push": {"type": "boolean"}}}, "Preference": {"type": "object", "properties": {"enabled": {"type": "boolean", "description": "Sets if the workflow is fully enabled for all channels or not for the subscriber."}, "channels": {"description": "Subscriber preferences for the different channels regarding this workflow", "allOf": [{"$ref": "#/components/schemas/PreferenceChannels"}]}}, "required": ["enabled", "channels"]}, "UpdateSubscriberPreferenceResponseDto": {"type": "object", "properties": {"template": {"description": "The workflow information and if it is critical or not", "allOf": [{"$ref": "#/components/schemas/TemplateResponse"}]}, "preference": {"description": "The preferences of the subscriber regarding the related workflow", "allOf": [{"$ref": "#/components/schemas/Preference"}]}}, "required": ["template", "preference"]}, "GetSubscriberPreferencesResponseDto": {"type": "object", "properties": {"template": {"description": "The workflow information and if it is critical or not", "allOf": [{"$ref": "#/components/schemas/TemplateResponse"}]}, "preference": {"description": "The preferences of the subscriber regarding the related workflow", "allOf": [{"$ref": "#/components/schemas/Preference"}]}}, "required": ["preference"]}, "ChannelPreference": {"type": "object", "properties": {"type": {"type": "string", "enum": ["in_app", "email", "sms", "chat", "push"], "description": "The type of channel that is enabled or not"}, "enabled": {"type": "boolean", "description": "If channel is enabled or not"}}, "required": ["type", "enabled"]}, "UpdateSubscriberPreferenceRequestDto": {"type": "object", "properties": {"channel": {"description": "The subscriber preferences for every ChannelTypeEnum for the workflow assigned.", "allOf": [{"$ref": "#/components/schemas/ChannelPreference"}]}, "enabled": {"type": "boolean", "description": "Sets if the workflow is fully enabled for all channels or not for the subscriber."}}}, "UpdateSubscriberGlobalPreferencesRequestDto": {"type": "object", "properties": {"enabled": {"type": "boolean", "description": "Enable or disable the subscriber global preferences."}, "preferences": {"description": "The subscriber global preferences for every ChannelTypeEnum.", "type": "array", "items": {"$ref": "#/components/schemas/ChannelPreference"}}}}, "FeedResponseDto": {"type": "object", "properties": {"totalCount": {"type": "number"}, "hasMore": {"type": "boolean"}, "data": {"type": "array", "items": {"type": "string"}}, "pageSize": {"type": "number"}, "page": {"type": "number"}}, "required": ["hasMore", "data", "pageSize", "page"]}, "UnseenCountResponse": {"type": "object", "properties": {"count": {"type": "number"}}, "required": ["count"]}, "MessageMarkAsRequestDto": {"type": "object", "properties": {"messageId": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "markAs": {"enum": ["read", "seen", "unread", "unseen"], "type": "string"}}, "required": ["messageId", "markAs"]}, "MessageEntity": {"type": "object", "properties": {}}, "MarkAllMessageAsRequestDto": {"type": "object", "properties": {"feedIdentifier": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}], "description": "Optional feed identifier or array of feed identifiers"}, "markAs": {"enum": ["read", "seen", "unread", "unseen"], "type": "string", "description": "Mark all subscriber messages as read, unread, seen or unseen"}}, "required": ["markAs"]}, "EmailBlockStyles": {"type": "object", "properties": {"textAlign": {"type": "string", "enum": ["center", "left", "right"]}}, "required": ["textAlign"]}, "EmailBlock": {"type": "object", "properties": {"type": {"enum": ["button", "text"], "type": "string"}, "content": {"type": "string"}, "url": {"type": "string"}, "styles": {"$ref": "#/components/schemas/EmailBlockStyles"}}, "required": ["type", "content"]}, "MessageCTAData": {"type": "object", "properties": {"url": {"type": "string"}}}, "MessageButton": {"type": "object", "properties": {"type": {"type": "string", "enum": ["primary", "secondary"]}, "content": {"type": "string"}, "resultContent": {"type": "string"}}, "required": ["type", "content"]}, "MessageActionResult": {"type": "object", "properties": {"payload": {"type": "object"}, "type": {"type": "string", "enum": ["primary", "secondary"]}}}, "MessageAction": {"type": "object", "properties": {"status": {"type": "string", "enum": ["pending", "done"]}, "buttons": {"type": "array", "items": {"$ref": "#/components/schemas/MessageButton"}}, "result": {"$ref": "#/components/schemas/MessageActionResult"}}}, "MessageCTA": {"type": "object", "properties": {"type": {"type": "string", "enum": ["redirect"]}, "data": {"$ref": "#/components/schemas/MessageCTAData"}, "action": {"$ref": "#/components/schemas/MessageAction"}}, "required": ["data"]}, "NotificationGroup": {"type": "object", "properties": {"_id": {"type": "string"}, "name": {"type": "string"}, "_environmentId": {"type": "string"}, "_organizationId": {"type": "string"}, "_parentId": {"type": "string"}}, "required": ["name", "_environmentId", "_organizationId"]}, "DigestRegularMetadata": {"type": "object", "properties": {"amount": {"type": "number"}, "unit": {"type": "string", "enum": ["seconds", "minutes", "hours", "days", "weeks", "months"]}, "digestKey": {"type": "string"}, "type": {"type": "string", "enum": ["regular", "backoff"]}, "backoff": {"type": "boolean"}, "backoffAmount": {"type": "number"}, "backoffUnit": {"type": "string", "enum": ["seconds", "minutes", "hours", "days", "weeks", "months"]}, "updateMode": {"type": "boolean"}}, "required": ["type"]}, "TimedConfig": {"type": "object", "properties": {"atTime": {"type": "string"}, "weekDays": {"type": "array", "items": {"type": "string", "enum": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]}}, "monthDays": {"type": "array", "items": {"type": "string"}}, "ordinal": {"type": "string", "enum": ["1", "2", "3", "4", "5", "last"]}, "ordinalValue": {"type": "string", "enum": ["day", "weekday", "weekend", "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]}, "monthlyType": {"type": "string", "enum": ["each", "on"]}}}, "DigestTimedMetadata": {"type": "object", "properties": {"amount": {"type": "number"}, "unit": {"type": "string", "enum": ["seconds", "minutes", "hours", "days", "weeks", "months"]}, "digestKey": {"type": "string"}, "type": {"type": "string", "enum": ["timed"]}, "timed": {"$ref": "#/components/schemas/TimedConfig"}}, "required": ["type"]}, "DelayRegularMetadata": {"type": "object", "properties": {"amount": {"type": "number"}, "unit": {"type": "string", "enum": ["seconds", "minutes", "hours", "days", "weeks", "months"]}, "type": {"type": "string", "enum": ["regular"]}}, "required": ["type"]}, "DelayScheduledMetadata": {"type": "object", "properties": {"type": {"type": "string", "enum": ["scheduled"]}, "delayPath": {"type": "string"}}, "required": ["type", "delayPath"]}, "MessageTemplate": {"type": "object", "properties": {}}, "NotificationStepVariant": {"type": "object", "properties": {"_id": {"type": "string"}, "uuid": {"type": "string"}, "name": {"type": "string"}, "_templateId": {"type": "string"}, "active": {"type": "boolean"}, "shouldStopOnFail": {"type": "boolean"}, "template": {"$ref": "#/components/schemas/MessageTemplate"}, "filters": {"type": "array", "items": {"$ref": "#/components/schemas/StepFilter"}}, "_parentId": {"type": "object"}, "metadata": {"oneOf": [{"$ref": "#/components/schemas/DigestRegularMetadata"}, {"$ref": "#/components/schemas/DigestTimedMetadata"}, {"$ref": "#/components/schemas/DelayRegularMetadata"}, {"$ref": "#/components/schemas/DelayScheduledMetadata"}]}, "replyCallback": {"type": "object"}}}, "NotificationStep": {"type": "object", "properties": {"_id": {"type": "string"}, "uuid": {"type": "string"}, "name": {"type": "string"}, "_templateId": {"type": "string"}, "active": {"type": "boolean"}, "shouldStopOnFail": {"type": "boolean"}, "template": {"$ref": "#/components/schemas/MessageTemplate"}, "filters": {"type": "array", "items": {"$ref": "#/components/schemas/StepFilter"}}, "_parentId": {"type": "object"}, "metadata": {"oneOf": [{"$ref": "#/components/schemas/DigestRegularMetadata"}, {"$ref": "#/components/schemas/DigestTimedMetadata"}, {"$ref": "#/components/schemas/DelayRegularMetadata"}, {"$ref": "#/components/schemas/DelayScheduledMetadata"}]}, "replyCallback": {"type": "object"}, "variants": {"$ref": "#/components/schemas/NotificationStepVariant"}}}, "NotificationTriggerVariable": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}, "NotificationTrigger": {"type": "object", "properties": {"type": {"type": "string", "enum": ["event"]}, "identifier": {"type": "string"}, "variables": {"type": "array", "items": {"$ref": "#/components/schemas/NotificationTriggerVariable"}}, "subscriberVariables": {"type": "array", "items": {"$ref": "#/components/schemas/NotificationTriggerVariable"}}}, "required": ["type", "identifier", "variables"]}, "WorkflowResponse": {"type": "object", "properties": {"_id": {"type": "string"}, "name": {"type": "string"}, "description": {"type": "string"}, "active": {"type": "boolean"}, "draft": {"type": "boolean"}, "preferenceSettings": {"$ref": "#/components/schemas/PreferenceChannels"}, "critical": {"type": "boolean"}, "tags": {"type": "array", "items": {"type": "string"}}, "steps": {"type": "array", "items": {"$ref": "#/components/schemas/NotificationStep"}}, "_organizationId": {"type": "string"}, "_creatorId": {"type": "string"}, "_environmentId": {"type": "string"}, "triggers": {"type": "array", "items": {"$ref": "#/components/schemas/NotificationTrigger"}}, "_notificationGroupId": {"type": "string"}, "_parentId": {"type": "string"}, "deleted": {"type": "boolean"}, "deletedAt": {"type": "string"}, "deletedBy": {"type": "string"}, "notificationGroup": {"$ref": "#/components/schemas/NotificationGroup"}, "data": {"type": "object"}, "workflowIntegrationStatus": {"type": "object"}}, "required": ["name", "description", "active", "draft", "preferenceSettings", "critical", "tags", "steps", "_organizationId", "_creatorId", "_environmentId", "triggers", "_notificationGroupId", "deleted", "deletedAt", "deletedBy"]}, "MessageResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_templateId": {"type": "string"}, "_environmentId": {"type": "string"}, "_messageTemplateId": {"type": "string"}, "_organizationId": {"type": "string"}, "_notificationId": {"type": "string"}, "_subscriberId": {"type": "string"}, "subscriber": {"$ref": "#/components/schemas/SubscriberResponseDto"}, "template": {"$ref": "#/components/schemas/WorkflowResponse"}, "templateIdentifier": {"type": "string"}, "createdAt": {"type": "string"}, "lastSeenDate": {"type": "string"}, "lastReadDate": {"type": "string"}, "content": {"oneOf": [{"$ref": "#/components/schemas/EmailBlock"}, {"type": "string"}]}, "transactionId": {"type": "string"}, "subject": {"type": "string"}, "channel": {"enum": ["in_app", "email", "sms", "chat", "push"], "type": "string"}, "read": {"type": "boolean"}, "seen": {"type": "boolean"}, "email": {"type": "string"}, "phone": {"type": "string"}, "directWebhookUrl": {"type": "string"}, "providerId": {"type": "string"}, "deviceTokens": {"type": "array", "items": {"type": "string"}}, "title": {"type": "string"}, "cta": {"$ref": "#/components/schemas/MessageCTA"}, "_feedId": {"type": "object", "nullable": true}, "status": {"type": "string", "enum": ["sent", "error", "warning"]}, "errorId": {"type": "string"}, "errorText": {"type": "string"}, "payload": {"type": "object", "description": "The payload that was used to send the notification trigger"}, "overrides": {"type": "object", "description": "Provider specific overrides used when triggering the notification"}}, "required": ["_templateId", "_environmentId", "_messageTemplateId", "_organizationId", "_notificationId", "_subscriberId", "createdAt", "content", "transactionId", "channel", "read", "seen", "cta", "status", "errorId", "errorText", "payload", "overrides"]}, "MarkMessageActionAsSeenDto": {"type": "object", "properties": {"status": {"enum": ["pending", "done"], "type": "string", "description": "Message action status"}, "payload": {"type": "object", "description": "Message action payload"}}, "required": ["status"]}, "DeleteMessageResponseDto": {"type": "object", "properties": {"acknowledged": {"type": "boolean", "description": "A boolean stating the success of the action"}, "status": {"type": "string", "description": "The status enum for the performed action", "enum": ["deleted"]}}, "required": ["acknowledged", "status"]}, "CreateTopicResponseDto": {"type": "object", "properties": {"_id": {"type": "string", "description": "The unique identifier for the Topic created."}, "key": {"type": "string", "description": "User defined custom key and provided by the user that will be an unique identifier for the Topic created."}}, "required": ["key"]}, "CreateTopicRequestDto": {"type": "object", "properties": {"key": {"type": "string", "description": "User defined custom key and provided by the user that will be an unique identifier for the Topic created."}, "name": {"type": "string", "description": "User defined custom name and provided by the user that will name the Topic created."}}, "required": ["key", "name"]}, "AddSubscribersRequestDto": {"type": "object", "properties": {"subscribers": {"description": "List of subscriber identifiers that will be associated to the topic", "type": "array", "items": {"type": "string"}}}, "required": ["subscribers"]}, "TopicSubscriberDto": {"type": "object", "properties": {"_organizationId": {"type": "string"}, "_environmentId": {"type": "string"}, "_subscriberId": {"type": "string"}, "_topicId": {"type": "string"}, "topicKey": {"type": "string"}, "externalSubscriberId": {"type": "string"}}, "required": ["_organizationId", "_environmentId", "_subscriberId", "_topicId", "topicKey", "externalSubscriberId"]}, "RemoveSubscribersRequestDto": {"type": "object", "properties": {"subscribers": {"description": "List of subscriber identifiers that will be removed to the topic", "type": "array", "items": {"type": "string"}}}, "required": ["subscribers"]}, "TopicDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_organizationId": {"type": "string"}, "_environmentId": {"type": "string"}, "key": {"type": "string"}, "name": {"type": "string"}, "subscribers": {"type": "array", "items": {"type": "string"}}}, "required": ["_organizationId", "_environmentId", "key", "name", "subscribers"]}, "FilterTopicsResponseDto": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/TopicDto"}}, "page": {"type": "number"}, "pageSize": {"type": "number"}, "totalCount": {"type": "number"}}, "required": ["data", "page", "pageSize", "totalCount"]}, "GetTopicResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_organizationId": {"type": "string"}, "_environmentId": {"type": "string"}, "key": {"type": "string"}, "name": {"type": "string"}, "subscribers": {"type": "array", "items": {"type": "string"}}}, "required": ["_organizationId", "_environmentId", "key", "name", "subscribers"]}, "RenameTopicResponseDto": {"type": "object", "properties": {"_id": {"type": "string"}, "_organizationId": {"type": "string"}, "_environmentId": {"type": "string"}, "key": {"type": "string"}, "name": {"type": "string"}, "subscribers": {"type": "array", "items": {"type": "string"}}}, "required": ["_organizationId", "_environmentId", "key", "name", "subscribers"]}, "RenameTopicRequestDto": {"type": "object", "properties": {"name": {"type": "string", "description": "User defined custom name and provided by the user to rename the topic."}}, "required": ["name"]}, "GeneratePreviewResponseDto": {"type": "object", "properties": {}}}, "headers": {"Content-Type": {"required": true, "description": "The MIME type of the response body.", "schema": {"type": "string"}, "example": "application/json"}, "RateLimit-Limit": {"required": false, "description": "The number of requests that the client is permitted to make per second. The actual maximum may differ when burst is enabled.", "schema": {"type": "string"}, "example": "100"}, "RateLimit-Remaining": {"required": false, "description": "The number of requests remaining until the next window.", "schema": {"type": "string"}, "example": "93"}, "RateLimit-Reset": {"required": false, "description": "The remaining seconds until a request of the same cost will be refreshed.", "schema": {"type": "string"}, "example": "8"}, "RateLimit-Policy": {"required": false, "description": "The rate limit policy that was used to evaluate the request.", "schema": {"type": "string"}, "example": "100;w=1;burst=110;comment=\"token bucket\";category=\"trigger\";cost=\"single\""}, "Retry-After": {"required": false, "description": "The number of seconds after which the client may retry the request that was previously rejected.", "schema": {"type": "string"}, "example": "8"}, "Idempotency-Key": {"required": false, "description": "The idempotency key used to evaluate the request.", "schema": {"type": "string"}, "example": "8"}, "Idempotency-Replay": {"required": false, "description": "Whether the request was a replay of a previous request.", "schema": {"type": "string"}, "example": "true"}, "Link": {"required": false, "description": "A link to the documentation.", "schema": {"type": "string"}, "example": "https://docs.novu.co/"}}}, "externalDocs": {"description": "Novu Documentation", "url": "https://docs.novu.co"}, "x-speakeasy-name-override": [{"operationId": "^.*get.*", "methodNameOverride": "retrieve"}, {"operationId": "^.*retrieve.*", "methodNameOverride": "retrieve"}, {"operationId": "^.*create.*", "methodNameOverride": "create"}, {"operationId": "^.*update.*", "methodNameOverride": "update"}, {"operationId": "^.*list.*", "methodNameOverride": "list"}, {"operationId": "^.*delete.*", "methodNameOverride": "delete"}, {"operationId": "^.*remove.*", "methodNameOverride": "delete"}], "x-speakeasy-retries": {"strategy": "backoff", "backoff": {"initialInterval": 500, "maxInterval": 30000, "maxElapsedTime": 3600000, "exponent": 1.5}, "statusCodes": ["408", "409", "429", "5XX"], "retryConnectionErrors": true}} diff --git a/.speakeasy/temp/applied_hdbdDBZBfI.yaml b/.speakeasy/temp/applied_hdbdDBZBfI.yaml new file mode 100644 index 00000000..aad4f49e --- /dev/null +++ b/.speakeasy/temp/applied_hdbdDBZBfI.yaml @@ -0,0 +1,8807 @@ +openapi: 3.0.0 +paths: + /v1/environments/me: + get: + operationId: EnvironmentsControllerV1_getCurrentEnvironment + summary: Get current environment + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments: + get: + operationId: EnvironmentsControllerV1_listMyEnvironments + summary: Get environments + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments/api-keys: + get: + operationId: EnvironmentsControllerV1_listOrganizationApiKeys + x-speakeasy-group: Environments.ApiKeys + summary: Get api keys + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiKey' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/execution-details: + get: + operationId: ExecutionDetailsController_getExecutionDetailsForNotification + summary: Get execution details + parameters: + - name: notificationId + required: true + in: query + schema: + type: string + - name: subscriberId + required: true + in: query + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExecutionDetailsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Execution Details + security: + - api-key: [] + /v1/events/trigger: + post: + operationId: EventsController_trigger + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Event + x-speakeasy-name-override: trigger + summary: Trigger event + description: "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/bulk: + post: + operationId: EventsController_triggerBulk + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Events in Bulk + x-speakeasy-name-override: triggerBulk + summary: Bulk trigger event + description: "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTriggerEventDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/broadcast: + post: + operationId: EventsController_broadcastEventToAll + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Broadcast Event to All + x-speakeasy-name-override: triggerBroadcast + summary: Broadcast event to all + description: >- + Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. + + In the future could be used to trigger events to a subset of subscribers based on defined filters. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventToAllRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/{transactionId}: + delete: + operationId: EventsController_cancel + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Cancel Triggered Event + x-speakeasy-name-override: cancel + summary: Cancel triggered event + description: "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n " + parameters: + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DataBooleanDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/notifications: + get: + operationId: NotificationsController_listNotifications + summary: Get notifications + parameters: + - name: channels + required: true + in: query + schema: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - name: templates + required: true + in: query + schema: + type: array + items: + type: string + - name: emails + required: true + in: query + schema: + type: array + items: + type: string + - name: search + required: true + in: query + deprecated: true + schema: + type: string + - name: subscriberIds + required: true + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: transactionId + required: false + in: query + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/stats: + get: + operationId: NotificationsController_getActivityStats + x-speakeasy-group: Notifications.Stats + summary: Get notification statistics + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityStatsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/graph/stats: + get: + operationId: NotificationsController_getActivityGraphStats + x-speakeasy-name-override: graph + x-speakeasy-group: Notifications.Stats + summary: Get notification graph statistics + parameters: + - name: days + required: false + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivityGraphStatesResponse' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/{notificationId}: + get: + operationId: NotificationsController_getNotification + summary: Get notification + parameters: + - name: notificationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityNotificationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notification-groups: + post: + operationId: NotificationGroupsController_createNotificationGroup + summary: Create workflow group + description: workflow group was previously named notification group + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + get: + operationId: NotificationGroupsController_listNotificationGroups + summary: Get workflow groups + description: workflow group was previously named notification group + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/notification-groups/{id}: + get: + operationId: NotificationGroupsController_getNotificationGroup + summary: Get workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + patch: + operationId: NotificationGroupsController_updateNotificationGroup + summary: Update workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + delete: + operationId: NotificationGroupsController_deleteNotificationGroup + summary: Delete workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteNotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/integrations: + get: + operationId: IntegrationsController_listIntegrations + summary: Get integrations + description: >- + Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of integrations belonging to the organization that are successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + post: + operationId: IntegrationsController_createIntegration + summary: Create integration + description: >- + Create an integration for the current environment the user is based on the API key provided + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateIntegrationRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/active: + get: + operationId: IntegrationsController_getActiveIntegrations + x-speakeasy-name-override: listActive + summary: Get active integrations + description: >- + Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of active integrations belonging to the organization that are successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/webhook/provider/{providerOrIntegrationId}/status: + get: + operationId: IntegrationsController_getWebhookSupportStatus + x-speakeasy-group: Integrations.Webhooks + summary: Get webhook support status for provider + description: >- + Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value + parameters: + - name: providerOrIntegrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: The status of the webhook for the provider requested + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: boolean + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}: + put: + operationId: IntegrationsController_updateIntegrationById + summary: Update integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIntegrationRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + delete: + operationId: IntegrationsController_removeIntegration + summary: Delete integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}/set-primary: + post: + operationId: IntegrationsController_setIntegrationAsPrimary + x-speakeasy-name-override: setAsPrimary + summary: Set integration as primary + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/subscribers: + get: + operationId: SubscribersController_listSubscribers + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: page + in: parameters + type: page + - name: limit + in: parameters + type: limit + outputs: + results: $.data.resultArray + summary: Get subscribers + description: >- + Returns a list of subscribers, could paginated using the `page` and `limit` query parameter + parameters: + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + post: + operationId: SubscribersController_createSubscriber + summary: Create subscriber + description: >- + Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSubscriberRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}: + get: + operationId: SubscribersController_getSubscriber + summary: Get subscriber + description: Get subscriber by your internal id used to identify the subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeTopics + required: false + in: query + description: Includes the topics associated with the subscriber + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + put: + operationId: SubscribersController_updateSubscriber + summary: Update subscriber + description: Used to update the subscriber entity with new information + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + delete: + operationId: SubscribersController_removeSubscriber + summary: Delete subscriber + description: Deletes a subscriber entity from the Novu platform + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteSubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/bulk: + post: + operationId: SubscribersController_bulkCreateSubscribers + x-speakeasy-name-override: createBulk + summary: Bulk create subscribers + description: "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkSubscriberCreateDto' + responses: + '201': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials: + put: + operationId: SubscribersController_updateSubscriberChannel + x-speakeasy-group: Subscribers.Credentials + summary: Update subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack and push tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_modifySubscriberChannel + x-speakeasy-name-override: append + x-speakeasy-group: Subscribers.Credentials + summary: Modify subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack and push tokens. + + This endpoint appends provided credentials and deviceTokens to the existing ones. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}: + delete: + operationId: SubscribersController_deleteSubscriberCredentials + x-speakeasy-group: Subscribers.Credentials + summary: Delete subscriber credentials by providerId + description: Delete subscriber credentials such as slack and expo tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/online-status: + patch: + operationId: SubscribersController_updateSubscriberOnlineFlag + x-speakeasy-name-override: updateOnlineFlag + x-speakeasy-group: Subscribers.properties + summary: Update subscriber online status + description: Used to update the subscriber isOnline flag. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberOnlineFlagRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences: + get: + operationId: SubscribersController_listSubscriberPreferences + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + schema: + type: boolean + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberGlobalPreferences + x-speakeasy-name-override: updateGlobal + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber global preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences/{parameter}: + get: + operationId: SubscribersController_getSubscriberPreferenceByLevel + x-speakeasy-name-override: retrieveByLevel + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences by level + parameters: + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + schema: + type: boolean + - name: parameter + required: true + in: path + description: 'the preferences level to be retrieved (template / global) ' + schema: + enum: + - global + - template + type: string + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GetSubscriberPreferencesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberPreference + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber preference + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: parameter + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/feed: + get: + operationId: SubscribersController_getNotificationsFeed + x-speakeasy-group: Subscribers.Notifications + summary: Get in-app notification feed for a particular subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + - name: read + required: false + in: query + schema: + type: boolean + - name: seen + required: false + in: query + schema: + type: boolean + - name: payload + required: false + in: query + description: Base64 encoded string of the partial payload JSON object + example: >- + btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30= + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/FeedResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/unseen: + get: + operationId: SubscribersController_getUnseenCount + x-speakeasy-name-override: unseenCount + x-speakeasy-group: Subscribers.Notifications + summary: Get the unseen in-app notifications count for subscribers feed + parameters: + - name: seen + required: true + in: query + schema: + type: boolean + - name: subscriberId + required: true + in: path + schema: + type: string + - name: limit + required: true + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UnseenCountResponse' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-as: + post: + operationId: SubscribersController_markMessagesAs + x-speakeasy-name-override: markAllAs + x-speakeasy-group: Subscribers.Messages + summary: Mark a subscriber messages as seen, read, unseen or unread + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MessageMarkAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-all: + post: + operationId: SubscribersController_markAllUnreadAsRead + x-speakeasy-name-override: markAll + x-speakeasy-group: Subscribers.Messages + summary: >- + Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkAllMessageAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: number + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}: + post: + operationId: SubscribersController_markActionAsSeen + x-speakeasy-name-override: updateAsSeen + x-speakeasy-group: Subscribers.Messages + summary: Mark message action as seen + parameters: + - name: messageId + required: true + in: path + schema: + type: string + - name: type + required: true + in: path + schema: {} + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkMessageActionAsSeenDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback: + get: + operationId: SubscribersController_chatOauthCallback + x-speakeasy-name-override: chatAccessOauthCallBack + x-speakeasy-group: Subscribers.Authentication + summary: Handle providers oauth redirect + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: code + required: true + in: query + schema: + type: string + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth: + get: + operationId: SubscribersController_chatAccessOauth + x-speakeasy-name-override: chatAccessOauth + x-speakeasy-group: Subscribers.Authentication + summary: Handle chat oauth + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/messages: + get: + operationId: MessagesController_getMessages + summary: Get messages + description: >- + Returns a list of messages, could paginate using the `page` query parameter + parameters: + - name: channel + required: false + in: query + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: subscriberId + required: false + in: query + schema: + type: string + - name: transactionId + required: false + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: limit + required: false + in: query + schema: + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/{messageId}: + delete: + operationId: MessagesController_deleteMessage + summary: Delete message + description: Deletes a message entity from the Novu platform + parameters: + - name: messageId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteMessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/transaction/{transactionId}: + delete: + operationId: MessagesController_deleteMessagesByTransactionId + x-speakeasy-name-override: deleteByTransactionId + summary: Delete messages by transactionId + description: >- + Deletes messages entity from the Novu platform using TransactionId of message + parameters: + - name: channel + required: false + in: query + description: The channel of the message to be deleted + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/topics: + post: + operationId: TopicsController_createTopic + summary: Topic creation + description: Create a topic + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_listTopics + summary: Filter topics + description: >- + Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter + parameters: + - name: page + required: false + in: query + description: Number of page for the pagination + schema: + minimum: 0 + default: 0 + type: number + - name: pageSize + required: false + in: query + description: Size of page for the pagination + schema: + minimum: 0 + default: 10 + type: number + - name: key + required: false + in: query + description: Topic key + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FilterTopicsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers: + post: + operationId: TopicsController_addSubscribers + x-speakeasy-name-override: assign + x-speakeasy-group: Topics.Subscribers + summary: Subscribers addition + description: Add subscribers to a topic by key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/{externalSubscriberId}: + get: + operationId: TopicsController_getTopicSubscriber + x-speakeasy-group: Topics.Subscribers + summary: Check topic subscriber + description: Check if a subscriber belongs to a certain topic + parameters: + - name: externalSubscriberId + required: true + in: path + description: The external subscriber id + schema: + type: string + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TopicSubscriberDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/removal: + post: + operationId: TopicsController_removeSubscribers + x-speakeasy-group: Topics.Subscribers + summary: Subscribers removal + description: Remove subscribers from a topic + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}: + delete: + operationId: TopicsController_deleteTopic + summary: Delete topic + description: Delete a topic by its topic key if it has no subscribers + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '204': + description: The topic has been deleted correctly + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '404': + description: >- + The topic with the key provided does not exist in the database so it can not be deleted. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_getTopic + summary: Get topic + description: Get a topic by its topic key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/GetTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + patch: + operationId: TopicsController_renameTopic + x-speakeasy-name-override: rename + summary: Rename a topic + description: Rename a topic by providing a new name + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] +info: + title: Novu API + description: >- + Novu REST API. Please see https://docs.novu.co/api-reference for more details. + version: '1.0' + contact: + name: Novu Support + url: https://discord.gg/novu + email: support@novu.co + termsOfService: https://novu.co/terms + license: + name: MIT + url: https://opensource.org/license/mit +tags: + - name: Events + description: >- + Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions. + externalDocs: + url: https://docs.novu.co/workflows + - name: Subscribers + description: >- + A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages. + externalDocs: + url: https://docs.novu.co/subscribers/subscribers + - name: Topics + description: >- + Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more. + externalDocs: + url: https://docs.novu.co/subscribers/topics + - name: Notification + description: >- + A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness. + externalDocs: + url: https://docs.novu.co/getting-started/introduction + - name: Integrations + description: >- + With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers. + externalDocs: + url: https://docs.novu.co/channels-and-providers/integration-store + - name: Layouts + description: >- + Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform. + externalDocs: + url: https://docs.novu.co/content-creation-design/layouts + - name: Workflows + description: >- + All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system. + externalDocs: + url: https://docs.novu.co/workflows + - name: Notification Templates + description: >- + Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name. + - name: Workflow groups + description: Workflow groups are used to organize workflows into logical groups. + - name: Changes + description: >- + Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready. + externalDocs: + url: >- + https://docs.novu.co/platform/environments#promoting-pending-changes-to-production + - name: Environments + description: >- + Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another. + externalDocs: + url: https://docs.novu.co/platform/environments + - name: Inbound Parse + description: >- + Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format. + externalDocs: + url: https://docs.novu.co/platform/inbound-parse-webhook + - name: Feeds + description: >- + Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type. + externalDocs: + url: https://docs.novu.co/activity-feed + - name: Tenants + description: >- + A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations. + externalDocs: + url: https://docs.novu.co/tenants + - name: Messages + description: >- + A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages. + externalDocs: + url: https://docs.novu.co/workflows/messages + - name: Organizations + description: >- + An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account. + externalDocs: + url: https://docs.novu.co/platform/organizations + - name: Execution Details + description: >- + Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution. + externalDocs: + url: https://docs.novu.co/activity-feed +servers: + - url: https://api.novu.co + - url: https://eu.api.novu.co +components: + securitySchemes: + api-key: + type: apiKey + in: header + name: Authorization + description: >- + API key authentication. Allowed headers-- "Authorization: ApiKey ". + schemas: + DataWrapperDto: + type: object + properties: + data: + type: object + required: + - data + EnvironmentResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _organizationId: + type: string + identifier: + type: string + apiKeys: + type: array + items: + type: string + _parentId: + type: string + slug: + type: string + required: + - name + - _organizationId + - identifier + - _parentId + ApiKey: + type: object + properties: + key: + type: string + _userId: + type: string + required: + - key + - _userId + ExecutionDetailsResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _jobId: + type: string + _environmentId: + type: string + _notificationId: + type: string + _notificationTemplateId: + type: string + _subscriberId: + type: string + _messageId: + type: string + providerId: + type: string + transactionId: + type: string + channel: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + detail: + type: string + source: + type: string + enum: + - Credentials + - Internal + - Payload + - Webhook + status: + type: string + enum: + - Success + - Warning + - Failed + - Pending + - Queued + - ReadConfirmation + isTest: + type: boolean + isRetry: + type: boolean + createdAt: + type: string + required: + - _organizationId + - _jobId + - _environmentId + - _notificationId + - _notificationTemplateId + - _subscriberId + - transactionId + - channel + - detail + - source + - status + - isTest + - isRetry + TriggerEventResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: If trigger was acknowledged or not + status: + enum: + - error + - trigger_not_active + - no_workflow_active_steps_defined + - no_workflow_steps_defined + - processed + - subscriber_id_missing + - no_tenant_found + type: string + description: Status for trigger + error: + description: In case of an error, this field will contain the error message + type: array + items: + type: string + transactionId: + type: string + description: Transaction id for trigger + required: + - acknowledged + - status + TopicPayloadDto: + type: object + properties: + topicKey: + type: string + type: + enum: + - Subscriber + - Topic + type: string + example: Topic + required: + - topicKey + - type + TenantPayloadDto: + type: object + properties: + identifier: + type: string + name: + type: string + data: + type: object + SubscriberPayloadDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + TriggerEventRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page. + example: workflow_identifier + payload: + type: object + description: "The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI." + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + to: + type: array + description: The recipients list of people who will receive the notification. + items: + oneOf: + - $ref: '#/components/schemas/SubscriberPayloadDto' + - type: string + description: Unique identifier of a subscriber in your systems + example: SUBSCRIBER_ID + - $ref: '#/components/schemas/TopicPayloadDto' + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID if not provided. + actor: + description: "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n " + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: "It is used to specify a tenant context during trigger event.\n Existing tenants will be updated with the provided details.\n " + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + bridgeUrl: + type: string + controls: + type: object + required: + - name + - to + BulkTriggerEventDto: + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/TriggerEventRequestDto' + required: + - events + TriggerEventToAllRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier associated for the template you wish to send. This identifier can be found on the template page. + payload: + type: object + description: "The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI." + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID if not provided. + actor: + description: "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n " + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: "It is used to specify a tenant context during trigger event.\n If a new tenant object is provided, we will create a new tenant.\n " + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + required: + - name + - payload + DataBooleanDto: + type: object + properties: + data: + type: boolean + required: + - data + ActivitiesResponseDto: + type: object + properties: + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + ActivityStatsResponseDto: + type: object + properties: + weeklySent: + type: number + monthlySent: + type: number + required: + - weeklySent + - monthlySent + ActivityGraphStatesResponse: + type: object + properties: + _id: + type: string + count: + type: number + templates: + type: array + items: + type: string + channels: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + required: + - _id + - count + - templates + - channels + ActivityNotificationSubscriberResponseDto: + type: object + properties: + firstName: + type: string + _id: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + required: + - _id + ActivityNotificationTemplateResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + triggers: + type: array + items: + type: string + required: + - name + - triggers + ActivityNotificationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + transactionId: + type: string + createdAt: + type: string + channels: + type: string + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + subscriber: + $ref: '#/components/schemas/ActivityNotificationSubscriberResponseDto' + template: + $ref: '#/components/schemas/ActivityNotificationTemplateResponseDto' + jobs: + type: array + items: + type: string + required: + - _environmentId + - _organizationId + - transactionId + NotificationGroupResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + CreateNotificationGroupRequestDto: + type: object + properties: + name: + type: string + required: + - name + DeleteNotificationGroupResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CredentialsDto: + type: object + properties: + apiKey: + type: string + user: + type: string + secretKey: + type: string + domain: + type: string + password: + type: string + host: + type: string + port: + type: string + secure: + type: boolean + region: + type: string + accountSid: + type: string + messageProfileId: + type: string + token: + type: string + from: + type: string + senderName: + type: string + projectName: + type: string + applicationId: + type: string + clientId: + type: string + requireTls: + type: boolean + ignoreTls: + type: boolean + tlsOptions: + type: object + baseUrl: + type: string + webhookUrl: + type: string + redirectUrl: + type: string + hmac: + type: boolean + serviceAccount: + type: string + ipPoolName: + type: string + apiKeyRequestHeader: + type: string + secretKeyRequestHeader: + type: string + idPath: + type: string + datePath: + type: string + apiToken: + type: string + authenticateByToken: + type: boolean + authenticationTokenKey: + type: string + instanceId: + type: string + alertUid: + type: string + title: + type: string + imageUrl: + type: string + state: + type: string + externalLink: + type: string + channelId: + type: string + phoneNumberIdentification: + type: string + accessKey: + type: string + FieldFilterPart: + type: object + properties: + field: + type: string + value: + type: string + operator: + type: string + enum: + - LARGER + - SMALLER + - LARGER_EQUAL + - SMALLER_EQUAL + - EQUAL + - NOT_EQUAL + - ALL_IN + - ANY_IN + - NOT_IN + - BETWEEN + - NOT_BETWEEN + - LIKE + - NOT_LIKE + - IN + 'on': + type: string + enum: + - subscriber + - payload + required: + - field + - value + - operator + - 'on' + StepFilter: + type: object + properties: + isNegated: + type: boolean + type: + type: string + enum: + - BOOLEAN + - TEXT + - DATE + - NUMBER + - STATEMENT + - LIST + - MULTI_LIST + - GROUP + value: + type: string + enum: + - AND + - OR + children: + type: array + items: + $ref: '#/components/schemas/FieldFilterPart' + required: + - isNegated + - type + - value + - children + IntegrationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + name: + type: string + identifier: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + primary: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - _environmentId + - _organizationId + - name + - identifier + - providerId + - channel + - credentials + - active + - deleted + - deletedAt + - deletedBy + - primary + CreateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field will run + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - providerId + - channel + UpdateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field will run + credentials: + $ref: '#/components/schemas/CredentialsDto' + removeNovuBranding: + type: boolean + description: If true, the Novu branding will be removed from the Inbox component + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + PaginatedResponseDto: + type: object + properties: + page: + type: number + description: The current page of the paginated response + hasMore: + type: boolean + description: Does the list have more items to fetch + pageSize: + type: number + description: Number of items on each page + data: + description: The list of items matching the query + type: array + items: + type: object + required: + - page + - hasMore + - pageSize + - data + ChannelCredentials: + type: object + properties: + webhookUrl: + type: string + description: >- + Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. + channel: + type: string + description: Channel specification for Mattermost chat notifications + deviceTokens: + description: >- + Contains an array of the subscriber device tokens for a given provider. Used on Push integrations + type: array + items: + type: string + alertUid: + type: string + description: alert_uid for grafana on-call webhook payload + title: + type: string + description: title to be used with grafana on call webhook + imageUrl: + type: string + description: image_url property fo grafana on call webhook + state: + type: string + description: state property fo grafana on call webhook + externalUrl: + type: string + description: link_to_upstream_details property fo grafana on call webhook + required: + - webhookUrl + ChannelSettings: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + _integrationId: + type: string + description: Id of the integration that is used for this channel + required: + - providerId + - credentials + - _integrationId + SubscriberResponseDto: + type: object + properties: + _id: + type: string + description: >- + The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + channels: + description: Channels settings for subscriber + type: array + items: + $ref: '#/components/schemas/ChannelSettings' + topics: + description: Topics that subscriber belongs to + type: array + items: + type: string + isOnline: + type: boolean + lastOnlineAt: + type: string + _organizationId: + type: string + _environmentId: + type: string + deleted: + type: boolean + createdAt: + type: string + updatedAt: + type: string + __v: + type: number + required: + - subscriberId + - _organizationId + - _environmentId + - deleted + - createdAt + - updatedAt + CreateSubscriberRequestDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + BulkSubscriberCreateDto: + type: object + properties: + subscribers: + type: array + items: + type: string + required: + - subscribers + UpdateSubscriberRequestDto: + type: object + properties: + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + UpdateSubscriberChannelRequestDto: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + required: + - providerId + - credentials + UpdateSubscriberOnlineFlagRequestDto: + type: object + properties: + isOnline: + type: boolean + required: + - isOnline + DeleteSubscriberResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + TemplateResponse: + type: object + properties: + _id: + type: string + description: Unique identifier of the workflow + name: + type: string + description: Name of the workflow + critical: + type: boolean + description: >- + Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen + triggers: + description: Triggers are the events that will trigger the workflow. + type: array + items: + type: string + required: + - _id + - name + - critical + - triggers + PreferenceChannels: + type: object + properties: + email: + type: boolean + sms: + type: boolean + in_app: + type: boolean + chat: + type: boolean + push: + type: boolean + Preference: + type: object + properties: + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for the subscriber. + channels: + description: >- + Subscriber preferences for the different channels regarding this workflow + allOf: + - $ref: '#/components/schemas/PreferenceChannels' + required: + - enabled + - channels + UpdateSubscriberPreferenceResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - template + - preference + GetSubscriberPreferencesResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - preference + ChannelPreference: + type: object + properties: + type: + type: string + enum: + - in_app + - email + - sms + - chat + - push + description: The type of channel that is enabled or not + enabled: + type: boolean + description: If channel is enabled or not + required: + - type + - enabled + UpdateSubscriberPreferenceRequestDto: + type: object + properties: + channel: + description: >- + The subscriber preferences for every ChannelTypeEnum for the workflow assigned. + allOf: + - $ref: '#/components/schemas/ChannelPreference' + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for the subscriber. + UpdateSubscriberGlobalPreferencesRequestDto: + type: object + properties: + enabled: + type: boolean + description: Enable or disable the subscriber global preferences. + preferences: + description: The subscriber global preferences for every ChannelTypeEnum. + type: array + items: + $ref: '#/components/schemas/ChannelPreference' + FeedResponseDto: + type: object + properties: + totalCount: + type: number + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + UnseenCountResponse: + type: object + properties: + count: + type: number + required: + - count + MessageMarkAsRequestDto: + type: object + properties: + messageId: + oneOf: + - type: string + - type: array + items: + type: string + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + required: + - messageId + - markAs + MessageEntity: + type: object + properties: {} + MarkAllMessageAsRequestDto: + type: object + properties: + feedIdentifier: + oneOf: + - type: string + - type: array + items: + type: string + description: Optional feed identifier or array of feed identifiers + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + description: Mark all subscriber messages as read, unread, seen or unseen + required: + - markAs + EmailBlockStyles: + type: object + properties: + textAlign: + type: string + enum: + - center + - left + - right + required: + - textAlign + EmailBlock: + type: object + properties: + type: + enum: + - button + - text + type: string + content: + type: string + url: + type: string + styles: + $ref: '#/components/schemas/EmailBlockStyles' + required: + - type + - content + MessageCTAData: + type: object + properties: + url: + type: string + MessageButton: + type: object + properties: + type: + type: string + enum: + - primary + - secondary + content: + type: string + resultContent: + type: string + required: + - type + - content + MessageActionResult: + type: object + properties: + payload: + type: object + type: + type: string + enum: + - primary + - secondary + MessageAction: + type: object + properties: + status: + type: string + enum: + - pending + - done + buttons: + type: array + items: + $ref: '#/components/schemas/MessageButton' + result: + $ref: '#/components/schemas/MessageActionResult' + MessageCTA: + type: object + properties: + type: + type: string + enum: + - redirect + data: + $ref: '#/components/schemas/MessageCTAData' + action: + $ref: '#/components/schemas/MessageAction' + required: + - data + NotificationGroup: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + DigestRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - regular + - backoff + backoff: + type: boolean + backoffAmount: + type: number + backoffUnit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + updateMode: + type: boolean + required: + - type + TimedConfig: + type: object + properties: + atTime: + type: string + weekDays: + type: array + items: + type: string + enum: + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + - sunday + monthDays: + type: array + items: + type: string + ordinal: + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - last + ordinalValue: + type: string + enum: + - day + - weekday + - weekend + - sunday + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + monthlyType: + type: string + enum: + - each + - 'on' + DigestTimedMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - timed + timed: + $ref: '#/components/schemas/TimedConfig' + required: + - type + DelayRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + type: + type: string + enum: + - regular + required: + - type + DelayScheduledMetadata: + type: object + properties: + type: + type: string + enum: + - scheduled + delayPath: + type: string + required: + - type + - delayPath + MessageTemplate: + type: object + properties: {} + NotificationStepVariant: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + NotificationStep: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + variants: + $ref: '#/components/schemas/NotificationStepVariant' + NotificationTriggerVariable: + type: object + properties: + name: + type: string + required: + - name + NotificationTrigger: + type: object + properties: + type: + type: string + enum: + - event + identifier: + type: string + variables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + subscriberVariables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + required: + - type + - identifier + - variables + WorkflowResponse: + type: object + properties: + _id: + type: string + name: + type: string + description: + type: string + active: + type: boolean + draft: + type: boolean + preferenceSettings: + $ref: '#/components/schemas/PreferenceChannels' + critical: + type: boolean + tags: + type: array + items: + type: string + steps: + type: array + items: + $ref: '#/components/schemas/NotificationStep' + _organizationId: + type: string + _creatorId: + type: string + _environmentId: + type: string + triggers: + type: array + items: + $ref: '#/components/schemas/NotificationTrigger' + _notificationGroupId: + type: string + _parentId: + type: string + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + notificationGroup: + $ref: '#/components/schemas/NotificationGroup' + data: + type: object + workflowIntegrationStatus: + type: object + required: + - name + - description + - active + - draft + - preferenceSettings + - critical + - tags + - steps + - _organizationId + - _creatorId + - _environmentId + - triggers + - _notificationGroupId + - deleted + - deletedAt + - deletedBy + MessageResponseDto: + type: object + properties: + _id: + type: string + _templateId: + type: string + _environmentId: + type: string + _messageTemplateId: + type: string + _organizationId: + type: string + _notificationId: + type: string + _subscriberId: + type: string + subscriber: + $ref: '#/components/schemas/SubscriberResponseDto' + template: + $ref: '#/components/schemas/WorkflowResponse' + templateIdentifier: + type: string + createdAt: + type: string + lastSeenDate: + type: string + lastReadDate: + type: string + content: + oneOf: + - $ref: '#/components/schemas/EmailBlock' + - type: string + transactionId: + type: string + subject: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + read: + type: boolean + seen: + type: boolean + email: + type: string + phone: + type: string + directWebhookUrl: + type: string + providerId: + type: string + deviceTokens: + type: array + items: + type: string + title: + type: string + cta: + $ref: '#/components/schemas/MessageCTA' + _feedId: + type: object + nullable: true + status: + type: string + enum: + - sent + - error + - warning + errorId: + type: string + errorText: + type: string + payload: + type: object + description: The payload that was used to send the notification trigger + overrides: + type: object + description: Provider specific overrides used when triggering the notification + required: + - _templateId + - _environmentId + - _messageTemplateId + - _organizationId + - _notificationId + - _subscriberId + - createdAt + - content + - transactionId + - channel + - read + - seen + - cta + - status + - errorId + - errorText + - payload + - overrides + MarkMessageActionAsSeenDto: + type: object + properties: + status: + enum: + - pending + - done + type: string + description: Message action status + payload: + type: object + description: Message action payload + required: + - status + DeleteMessageResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CreateTopicResponseDto: + type: object + properties: + _id: + type: string + description: The unique identifier for the Topic created. + key: + type: string + description: >- + User defined custom key and provided by the user that will be an unique identifier for the Topic created. + required: + - key + CreateTopicRequestDto: + type: object + properties: + key: + type: string + description: >- + User defined custom key and provided by the user that will be an unique identifier for the Topic created. + name: + type: string + description: >- + User defined custom name and provided by the user that will name the Topic created. + required: + - key + - name + AddSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be associated to the topic + type: array + items: + type: string + required: + - subscribers + TopicSubscriberDto: + type: object + properties: + _organizationId: + type: string + _environmentId: + type: string + _subscriberId: + type: string + _topicId: + type: string + topicKey: + type: string + externalSubscriberId: + type: string + required: + - _organizationId + - _environmentId + - _subscriberId + - _topicId + - topicKey + - externalSubscriberId + RemoveSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be removed to the topic + type: array + items: + type: string + required: + - subscribers + TopicDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + FilterTopicsResponseDto: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/TopicDto' + page: + type: number + pageSize: + type: number + totalCount: + type: number + required: + - data + - page + - pageSize + - totalCount + GetTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicRequestDto: + type: object + properties: + name: + type: string + description: >- + User defined custom name and provided by the user to rename the topic. + required: + - name + GeneratePreviewResponseDto: + type: object + properties: {} + headers: + Content-Type: + required: true + description: The MIME type of the response body. + schema: + type: string + example: application/json + RateLimit-Limit: + required: false + description: >- + The number of requests that the client is permitted to make per second. The actual maximum may differ when burst is enabled. + schema: + type: string + example: '100' + RateLimit-Remaining: + required: false + description: The number of requests remaining until the next window. + schema: + type: string + example: '93' + RateLimit-Reset: + required: false + description: >- + The remaining seconds until a request of the same cost will be refreshed. + schema: + type: string + example: '8' + RateLimit-Policy: + required: false + description: The rate limit policy that was used to evaluate the request. + schema: + type: string + example: >- + 100;w=1;burst=110;comment="token bucket";category="trigger";cost="single" + Retry-After: + required: false + description: >- + The number of seconds after which the client may retry the request that was previously rejected. + schema: + type: string + example: '8' + Idempotency-Key: + required: false + description: The idempotency key used to evaluate the request. + schema: + type: string + example: '8' + Idempotency-Replay: + required: false + description: Whether the request was a replay of a previous request. + schema: + type: string + example: 'true' + Link: + required: false + description: A link to the documentation. + schema: + type: string + example: https://docs.novu.co/ +externalDocs: + description: Novu Documentation + url: https://docs.novu.co +x-speakeasy-name-override: + - operationId: ^.*get.* + methodNameOverride: retrieve + - operationId: ^.*retrieve.* + methodNameOverride: retrieve + - operationId: ^.*create.* + methodNameOverride: create + - operationId: ^.*update.* + methodNameOverride: update + - operationId: ^.*list.* + methodNameOverride: list + - operationId: ^.*delete.* + methodNameOverride: delete + - operationId: ^.*remove.* + methodNameOverride: delete +x-speakeasy-retries: + strategy: backoff + backoff: + initialInterval: 500 + maxInterval: 30000 + maxElapsedTime: 3600000 + exponent: 1.5 + statusCodes: + - '408' + - '409' + - '429' + - 5XX + retryConnectionErrors: true diff --git a/.speakeasy/temp/downloaded_HKVFJyjOtH.yaml b/.speakeasy/temp/downloaded_HKVFJyjOtH.yaml new file mode 100644 index 00000000..8e0ac771 --- /dev/null +++ b/.speakeasy/temp/downloaded_HKVFJyjOtH.yaml @@ -0,0 +1,9166 @@ +openapi: 3.0.0 +paths: + /v1/environments/me: + get: + operationId: EnvironmentsControllerV1_getCurrentEnvironment + summary: Get current environment + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments: + get: + operationId: EnvironmentsControllerV1_listMyEnvironments + summary: Get environments + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments/api-keys: + get: + operationId: EnvironmentsControllerV1_listOrganizationApiKeys + x-speakeasy-group: Environments.ApiKeys + summary: Get api keys + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiKey' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/execution-details: + get: + operationId: ExecutionDetailsController_getExecutionDetailsForNotification + summary: Get execution details + parameters: + - name: notificationId + required: true + in: query + schema: + type: string + - name: subscriberId + required: true + in: query + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExecutionDetailsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Execution Details + security: + - api-key: [] + /v1/events/trigger: + post: + operationId: EventsController_trigger + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Event + x-speakeasy-name-override: trigger + summary: Trigger event + description: |2- + + Trigger event is the main (and only) way to send notifications to subscribers. + The trigger identifier is used to match the particular workflow associated with it. + Additional information can be passed according the body interface below. + + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/bulk: + post: + operationId: EventsController_triggerBulk + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Events in Bulk + x-speakeasy-name-override: triggerBulk + summary: Bulk trigger event + description: |2- + + Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. + The bulk API is limited to 100 events per request. + + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTriggerEventDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/broadcast: + post: + operationId: EventsController_broadcastEventToAll + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Broadcast Event to All + x-speakeasy-name-override: triggerBroadcast + summary: Broadcast event to all + description: >- + Trigger a broadcast event to all existing subscribers, could be used to + send announcements, etc. + In the future could be used to trigger events to a subset of subscribers based on defined filters. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventToAllRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/{transactionId}: + delete: + operationId: EventsController_cancel + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Cancel Triggered Event + x-speakeasy-name-override: cancel + summary: Cancel triggered event + description: |2- + + Using a previously generated transactionId during the event trigger, + will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... + + parameters: + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DataBooleanDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/notifications: + get: + operationId: NotificationsController_listNotifications + summary: Get notifications + parameters: + - name: channels + required: true + in: query + schema: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - name: templates + required: true + in: query + schema: + type: array + items: + type: string + - name: emails + required: true + in: query + schema: + type: array + items: + type: string + - name: search + required: true + in: query + deprecated: true + schema: + type: string + - name: subscriberIds + required: true + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: transactionId + required: false + in: query + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/stats: + get: + operationId: NotificationsController_getActivityStats + x-speakeasy-group: Notifications.Stats + summary: Get notification statistics + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityStatsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/graph/stats: + get: + operationId: NotificationsController_getActivityGraphStats + x-speakeasy-name-override: graph + x-speakeasy-group: Notifications.Stats + summary: Get notification graph statistics + parameters: + - name: days + required: false + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivityGraphStatesResponse' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/{notificationId}: + get: + operationId: NotificationsController_getNotification + summary: Get notification + parameters: + - name: notificationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityNotificationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notification-groups: + post: + operationId: NotificationGroupsController_createNotificationGroup + summary: Create workflow group + description: workflow group was previously named notification group + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + get: + operationId: NotificationGroupsController_listNotificationGroups + summary: Get workflow groups + description: workflow group was previously named notification group + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/notification-groups/{id}: + get: + operationId: NotificationGroupsController_getNotificationGroup + summary: Get workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + patch: + operationId: NotificationGroupsController_updateNotificationGroup + summary: Update workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + delete: + operationId: NotificationGroupsController_deleteNotificationGroup + summary: Delete workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteNotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/integrations: + get: + operationId: IntegrationsController_listIntegrations + summary: Get integrations + description: >- + Return all the integrations the user has created for that organization. + Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of integrations belonging to the organization that are + successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + post: + operationId: IntegrationsController_createIntegration + summary: Create integration + description: >- + Create an integration for the current environment the user is based on + the API key provided + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateIntegrationRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/active: + get: + operationId: IntegrationsController_getActiveIntegrations + x-speakeasy-name-override: listActive + summary: Get active integrations + description: >- + Return all the active integrations the user has created for that + organization. Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of active integrations belonging to the organization that + are successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/webhook/provider/{providerOrIntegrationId}/status: + get: + operationId: IntegrationsController_getWebhookSupportStatus + x-speakeasy-group: Integrations.Webhooks + summary: Get webhook support status for provider + description: >- + Return the status of the webhook for this provider, if it is supported + or if it is not based on a boolean value + parameters: + - name: providerOrIntegrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: The status of the webhook for the provider requested + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: boolean + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}: + put: + operationId: IntegrationsController_updateIntegrationById + summary: Update integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIntegrationRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in + the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + delete: + operationId: IntegrationsController_removeIntegration + summary: Delete integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}/set-primary: + post: + operationId: IntegrationsController_setIntegrationAsPrimary + x-speakeasy-name-override: setAsPrimary + summary: Set integration as primary + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in + the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/subscribers: + get: + operationId: SubscribersController_listSubscribers + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: page + in: parameters + type: page + - name: limit + in: parameters + type: limit + outputs: + results: $.data.resultArray + summary: Get subscribers + description: >- + Returns a list of subscribers, could paginated using the `page` and + `limit` query parameter + parameters: + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + post: + operationId: SubscribersController_createSubscriber + summary: Create subscriber + description: >- + Creates a subscriber entity, in the Novu platform. The subscriber will + be later used to receive notifications, and access notification feeds. + Communication credentials such as email, phone number, and 3 rd party + credentials i.e slack tokens could be later associated to this entity. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSubscriberRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}: + get: + operationId: SubscribersController_getSubscriber + summary: Get subscriber + description: Get subscriber by your internal id used to identify the subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeTopics + required: false + in: query + description: Includes the topics associated with the subscriber + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + put: + operationId: SubscribersController_updateSubscriber + summary: Update subscriber + description: Used to update the subscriber entity with new information + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + delete: + operationId: SubscribersController_removeSubscriber + summary: Delete subscriber + description: Deletes a subscriber entity from the Novu platform + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteSubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/bulk: + post: + operationId: SubscribersController_bulkCreateSubscribers + x-speakeasy-name-override: createBulk + summary: Bulk create subscribers + description: |2- + + Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API. + The bulk API is limited to 500 subscribers per request. + + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkSubscriberCreateDto' + responses: + '201': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials: + put: + operationId: SubscribersController_updateSubscriberChannel + x-speakeasy-group: Subscribers.Credentials + summary: Update subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack + and push tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_modifySubscriberChannel + x-speakeasy-name-override: append + x-speakeasy-group: Subscribers.Credentials + summary: Modify subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack + and push tokens. + This endpoint appends provided credentials and deviceTokens to the existing ones. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}: + delete: + operationId: SubscribersController_deleteSubscriberCredentials + x-speakeasy-group: Subscribers.Credentials + summary: Delete subscriber credentials by providerId + description: Delete subscriber credentials such as slack and expo tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/online-status: + patch: + operationId: SubscribersController_updateSubscriberOnlineFlag + x-speakeasy-name-override: updateOnlineFlag + x-speakeasy-group: Subscribers.properties + summary: Update subscriber online status + description: Used to update the subscriber isOnline flag. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberOnlineFlagRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences: + get: + operationId: SubscribersController_listSubscriberPreferences + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be + included in the retrieved preferences. Default is true + schema: + type: boolean + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberGlobalPreferences + x-speakeasy-name-override: updateGlobal + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber global preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences/{parameter}: + get: + operationId: SubscribersController_getSubscriberPreferenceByLevel + x-speakeasy-name-override: retrieveByLevel + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences by level + parameters: + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be + included in the retrieved preferences. Default is true + schema: + type: boolean + - name: parameter + required: true + in: path + description: 'the preferences level to be retrieved (template / global) ' + schema: + enum: + - global + - template + type: string + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GetSubscriberPreferencesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberPreference + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber preference + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: parameter + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/feed: + get: + operationId: SubscribersController_getNotificationsFeed + x-speakeasy-group: Subscribers.Notifications + summary: Get in-app notification feed for a particular subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + - name: read + required: false + in: query + schema: + type: boolean + - name: seen + required: false + in: query + schema: + type: boolean + - name: payload + required: false + in: query + description: Base64 encoded string of the partial payload JSON object + example: >- + btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string + like eyJmb28iOjEyM30= + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/FeedResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/unseen: + get: + operationId: SubscribersController_getUnseenCount + x-speakeasy-name-override: unseenCount + x-speakeasy-group: Subscribers.Notifications + summary: Get the unseen in-app notifications count for subscribers feed + parameters: + - name: seen + required: true + in: query + schema: + type: boolean + - name: subscriberId + required: true + in: path + schema: + type: string + - name: limit + required: true + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UnseenCountResponse' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-as: + post: + operationId: SubscribersController_markMessagesAs + x-speakeasy-name-override: markAllAs + x-speakeasy-group: Subscribers.Messages + summary: Mark a subscriber messages as seen, read, unseen or unread + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MessageMarkAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-all: + post: + operationId: SubscribersController_markAllUnreadAsRead + x-speakeasy-name-override: markAll + x-speakeasy-group: Subscribers.Messages + summary: >- + Marks all the subscriber messages as read, unread, seen or unseen. + Optionally you can pass feed id (or array) to mark messages of a + particular feed. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkAllMessageAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: number + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}: + post: + operationId: SubscribersController_markActionAsSeen + x-speakeasy-name-override: updateAsSeen + x-speakeasy-group: Subscribers.Messages + summary: Mark message action as seen + parameters: + - name: messageId + required: true + in: path + schema: + type: string + - name: type + required: true + in: path + schema: {} + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkMessageActionAsSeenDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback: + get: + operationId: SubscribersController_chatOauthCallback + x-speakeasy-name-override: chatAccessOauthCallBack + x-speakeasy-group: Subscribers.Authentication + summary: Handle providers oauth redirect + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: code + required: true + in: query + schema: + type: string + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth: + get: + operationId: SubscribersController_chatAccessOauth + x-speakeasy-name-override: chatAccessOauth + x-speakeasy-group: Subscribers.Authentication + summary: Handle chat oauth + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/messages: + get: + operationId: MessagesController_getMessages + summary: Get messages + description: >- + Returns a list of messages, could paginate using the `page` query + parameter + parameters: + - name: channel + required: false + in: query + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: subscriberId + required: false + in: query + schema: + type: string + - name: transactionId + required: false + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: limit + required: false + in: query + schema: + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/{messageId}: + delete: + operationId: MessagesController_deleteMessage + summary: Delete message + description: Deletes a message entity from the Novu platform + parameters: + - name: messageId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteMessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/transaction/{transactionId}: + delete: + operationId: MessagesController_deleteMessagesByTransactionId + x-speakeasy-name-override: deleteByTransactionId + summary: Delete messages by transactionId + description: >- + Deletes messages entity from the Novu platform using TransactionId of + message + parameters: + - name: channel + required: false + in: query + description: The channel of the message to be deleted + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/topics: + post: + operationId: TopicsController_createTopic + summary: Topic creation + description: Create a topic + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_listTopics + summary: Filter topics + description: >- + Returns a list of topics that can be paginated using the `page` query + parameter and filtered by the topic key with the `key` query parameter + parameters: + - name: page + required: false + in: query + description: Number of page for the pagination + schema: + minimum: 0 + default: 0 + type: number + - name: pageSize + required: false + in: query + description: Size of page for the pagination + schema: + minimum: 0 + default: 10 + type: number + - name: key + required: false + in: query + description: Topic key + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FilterTopicsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers: + post: + operationId: TopicsController_addSubscribers + x-speakeasy-name-override: assign + x-speakeasy-group: Topics.Subscribers + summary: Subscribers addition + description: Add subscribers to a topic by key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/{externalSubscriberId}: + get: + operationId: TopicsController_getTopicSubscriber + x-speakeasy-group: Topics.Subscribers + summary: Check topic subscriber + description: Check if a subscriber belongs to a certain topic + parameters: + - name: externalSubscriberId + required: true + in: path + description: The external subscriber id + schema: + type: string + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TopicSubscriberDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/removal: + post: + operationId: TopicsController_removeSubscribers + x-speakeasy-group: Topics.Subscribers + summary: Subscribers removal + description: Remove subscribers from a topic + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}: + delete: + operationId: TopicsController_deleteTopic + summary: Delete topic + description: Delete a topic by its topic key if it has no subscribers + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '204': + description: The topic has been deleted correctly + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '404': + description: >- + The topic with the key provided does not exist in the database so it + can not be deleted. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The topic you are trying to delete has subscribers assigned to it. + Delete the subscribers before deleting the topic. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_getTopic + summary: Get topic + description: Get a topic by its topic key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/GetTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + patch: + operationId: TopicsController_renameTopic + x-speakeasy-name-override: rename + summary: Rename a topic + description: Rename a topic by providing a new name + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the + current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is + currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a + temporary overload or scheduled maintenance, which will likely be + alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] +info: + title: Novu API + description: >- + Novu REST API. Please see https://docs.novu.co/api-reference for more + details. + version: '1.0' + contact: + name: Novu Support + url: https://discord.gg/novu + email: support@novu.co + termsOfService: https://novu.co/terms + license: + name: MIT + url: https://opensource.org/license/mit +tags: + - name: Events + description: >- + Events represent a change in state of a subscriber. They are used to + trigger workflows, and enable you to send notifications to subscribers + based on their actions. + externalDocs: + url: https://docs.novu.co/workflows + - name: Subscribers + description: >- + A subscriber in Novu represents someone who should receive a message. A + subscriber’s profile information contains important attributes about the + subscriber that will be used in messages (name, email). The subscriber + object can contain other key-value pairs that can be used to further + personalize your messages. + externalDocs: + url: https://docs.novu.co/subscribers/subscribers + - name: Topics + description: >- + Topics are a way to group subscribers together so that they can be + notified of events at once. A topic is identified by a custom key. This + can be helpful for things like sending out marketing emails or notifying + users of new features. Topics can also be used to send notifications to + the subscribers who have been grouped together based on their interests, + location, activities and much more. + externalDocs: + url: https://docs.novu.co/subscribers/topics + - name: Notification + description: >- + A notification conveys information from source to recipient, triggered by + a workflow acting as a message blueprint. Notifications can be individual + or bundled as digest for user-friendliness. + externalDocs: + url: https://docs.novu.co/getting-started/introduction + - name: Integrations + description: >- + With the help of the Integration Store, you can easily integrate your + favorite delivery provider. During the runtime of the API, the + Integrations Store is responsible for storing the configurations of all + the providers. + externalDocs: + url: https://docs.novu.co/channels-and-providers/integration-store + - name: Layouts + description: >- + Novu allows the creation of layouts - a specific HTML design or structure + to wrap content of email notifications. Layouts can be manipulated and + assigned to new or existing workflows within the Novu platform, allowing + users to create, manage, and assign these layouts to workflows, so they + can be reused to structure the appearance of notifications sent through + the platform. + externalDocs: + url: https://docs.novu.co/content-creation-design/layouts + - name: Workflows + description: >- + All notifications are sent via a workflow. Each workflow acts as a + container for the logic and blueprint that are associated with a type of + notification in your system. + externalDocs: + url: https://docs.novu.co/workflows + - name: Notification Templates + description: >- + Deprecated. Use Workflows (/workflows) instead, which provide the same + functionality under a new name. + - name: Workflow groups + description: Workflow groups are used to organize workflows into logical groups. + - name: Changes + description: >- + Changes represent a change in state of an environment. They are analagous + to a pending pull request in git, enabling you to test changes before they + are applied to your environment and atomically apply them when you are + ready. + externalDocs: + url: >- + https://docs.novu.co/platform/environments#promoting-pending-changes-to-production + - name: Environments + description: >- + Novu uses the concept of environments to ensure logical separation of your + data and configuration. This means that subscribers, and preferences + created in one environment are never accessible to another. + externalDocs: + url: https://docs.novu.co/platform/environments + - name: Inbound Parse + description: >- + Inbound Webhook is a feature that allows processing of incoming emails for + a domain or subdomain. The feature parses the contents of the email and + POSTs the information to a specified URL in a multipart/form-data format. + externalDocs: + url: https://docs.novu.co/platform/inbound-parse-webhook + - name: Feeds + description: >- + Novu provides a notification activity feed that monitors every outgoing + message associated with its relevant metadata. This can be used to monitor + activity and discover potential issues with a specific provider or a + channel type. + externalDocs: + url: https://docs.novu.co/activity-feed + - name: Tenants + description: >- + A tenant represents a group of users. As a developer, when your apps have + organizations, they are referred to as tenants. Tenants in Novu provides + the ability to tailor specific notification experiences to users of + different groups or organizations. + externalDocs: + url: https://docs.novu.co/tenants + - name: Messages + description: >- + A message in Novu represents a notification delivered to a recipient on a + particular channel. Messages contain information about the request that + triggered its delivery, a view of the data sent to the recipient, and a + timeline of its lifecycle events. Learn more about messages. + externalDocs: + url: https://docs.novu.co/workflows/messages + - name: Organizations + description: >- + An organization serves as a separate entity within your Novu account. Each + organization you create has its own separate integration store, workflows, + subscribers, and API keys. This separation of resources allows you to + manage multi-tenant environments and separate domains within a single + account. + externalDocs: + url: https://docs.novu.co/platform/organizations + - name: Execution Details + description: >- + Execution details are used to track the execution of a workflow. They + provided detailed information on the execution of a workflow, including + the status of each step, the input and output of each step, and the + overall status of the execution. + externalDocs: + url: https://docs.novu.co/activity-feed +servers: + - url: https://api.novu.co + - url: https://eu.api.novu.co +components: + securitySchemes: + api-key: + type: apiKey + in: header + name: Authorization + description: >- + API key authentication. Allowed headers-- "Authorization: ApiKey + ". + schemas: + DataWrapperDto: + type: object + properties: + data: + type: object + required: + - data + EnvironmentResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _organizationId: + type: string + identifier: + type: string + apiKeys: + type: array + items: + type: string + _parentId: + type: string + slug: + type: string + required: + - name + - _organizationId + - identifier + - _parentId + ApiKey: + type: object + properties: + key: + type: string + _userId: + type: string + required: + - key + - _userId + ExecutionDetailsResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _jobId: + type: string + _environmentId: + type: string + _notificationId: + type: string + _notificationTemplateId: + type: string + _subscriberId: + type: string + _messageId: + type: string + providerId: + type: string + transactionId: + type: string + channel: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + detail: + type: string + source: + type: string + enum: + - Credentials + - Internal + - Payload + - Webhook + status: + type: string + enum: + - Success + - Warning + - Failed + - Pending + - Queued + - ReadConfirmation + isTest: + type: boolean + isRetry: + type: boolean + createdAt: + type: string + required: + - _organizationId + - _jobId + - _environmentId + - _notificationId + - _notificationTemplateId + - _subscriberId + - transactionId + - channel + - detail + - source + - status + - isTest + - isRetry + TriggerEventResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: If trigger was acknowledged or not + status: + enum: + - error + - trigger_not_active + - no_workflow_active_steps_defined + - no_workflow_steps_defined + - processed + - subscriber_id_missing + - no_tenant_found + type: string + description: Status for trigger + error: + description: In case of an error, this field will contain the error message + type: array + items: + type: string + transactionId: + type: string + description: Transaction id for trigger + required: + - acknowledged + - status + TopicPayloadDto: + type: object + properties: + topicKey: + type: string + type: + enum: + - Subscriber + - Topic + type: string + example: Topic + required: + - topicKey + - type + TenantPayloadDto: + type: object + properties: + identifier: + type: string + name: + type: string + data: + type: object + SubscriberPayloadDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually + correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + TriggerEventRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier of the workflow you wish to send. This + identifier can be found on the workflow page. + example: workflow_identifier + payload: + type: object + description: >- + The payload object is used to pass additional custom information + that could be used to render the workflow, or perform routing rules + based on it. + This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + to: + type: array + description: The recipients list of people who will receive the notification. + items: + oneOf: + - $ref: '#/components/schemas/SubscriberPayloadDto' + - type: string + description: Unique identifier of a subscriber in your systems + example: SUBSCRIBER_ID + - $ref: '#/components/schemas/TopicPayloadDto' + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID + if not provided. + actor: + description: >- + It is used to display the Avatar of the provided actor's subscriber + id or actor object. + If a new actor object is provided, we will create a new subscriber in our system + + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: |- + It is used to specify a tenant context during trigger event. + Existing tenants will be updated with the provided details. + + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + bridgeUrl: + type: string + controls: + type: object + required: + - name + - to + BulkTriggerEventDto: + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/TriggerEventRequestDto' + required: + - events + TriggerEventToAllRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier associated for the template you wish to send. + This identifier can be found on the template page. + payload: + type: object + description: >- + The payload object is used to pass additional custom information + that could be used to render the template, or perform routing rules + based on it. + This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID + if not provided. + actor: + description: >- + It is used to display the Avatar of the provided actor's subscriber + id or actor object. + If a new actor object is provided, we will create a new subscriber in our system + + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: |- + It is used to specify a tenant context during trigger event. + If a new tenant object is provided, we will create a new tenant. + + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + required: + - name + - payload + DataBooleanDto: + type: object + properties: + data: + type: boolean + required: + - data + ActivitiesResponseDto: + type: object + properties: + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + ActivityStatsResponseDto: + type: object + properties: + weeklySent: + type: number + monthlySent: + type: number + required: + - weeklySent + - monthlySent + ActivityGraphStatesResponse: + type: object + properties: + _id: + type: string + count: + type: number + templates: + type: array + items: + type: string + channels: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + required: + - _id + - count + - templates + - channels + ActivityNotificationSubscriberResponseDto: + type: object + properties: + firstName: + type: string + _id: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + required: + - _id + ActivityNotificationTemplateResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + triggers: + type: array + items: + type: string + required: + - name + - triggers + ActivityNotificationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + transactionId: + type: string + createdAt: + type: string + channels: + type: string + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + subscriber: + $ref: '#/components/schemas/ActivityNotificationSubscriberResponseDto' + template: + $ref: '#/components/schemas/ActivityNotificationTemplateResponseDto' + jobs: + type: array + items: + type: string + required: + - _environmentId + - _organizationId + - transactionId + NotificationGroupResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + CreateNotificationGroupRequestDto: + type: object + properties: + name: + type: string + required: + - name + DeleteNotificationGroupResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CredentialsDto: + type: object + properties: + apiKey: + type: string + user: + type: string + secretKey: + type: string + domain: + type: string + password: + type: string + host: + type: string + port: + type: string + secure: + type: boolean + region: + type: string + accountSid: + type: string + messageProfileId: + type: string + token: + type: string + from: + type: string + senderName: + type: string + projectName: + type: string + applicationId: + type: string + clientId: + type: string + requireTls: + type: boolean + ignoreTls: + type: boolean + tlsOptions: + type: object + baseUrl: + type: string + webhookUrl: + type: string + redirectUrl: + type: string + hmac: + type: boolean + serviceAccount: + type: string + ipPoolName: + type: string + apiKeyRequestHeader: + type: string + secretKeyRequestHeader: + type: string + idPath: + type: string + datePath: + type: string + apiToken: + type: string + authenticateByToken: + type: boolean + authenticationTokenKey: + type: string + instanceId: + type: string + alertUid: + type: string + title: + type: string + imageUrl: + type: string + state: + type: string + externalLink: + type: string + channelId: + type: string + phoneNumberIdentification: + type: string + accessKey: + type: string + FieldFilterPart: + type: object + properties: + field: + type: string + value: + type: string + operator: + type: string + enum: + - LARGER + - SMALLER + - LARGER_EQUAL + - SMALLER_EQUAL + - EQUAL + - NOT_EQUAL + - ALL_IN + - ANY_IN + - NOT_IN + - BETWEEN + - NOT_BETWEEN + - LIKE + - NOT_LIKE + - IN + 'on': + type: string + enum: + - subscriber + - payload + required: + - field + - value + - operator + - 'on' + StepFilter: + type: object + properties: + isNegated: + type: boolean + type: + type: string + enum: + - BOOLEAN + - TEXT + - DATE + - NUMBER + - STATEMENT + - LIST + - MULTI_LIST + - GROUP + value: + type: string + enum: + - AND + - OR + children: + type: array + items: + $ref: '#/components/schemas/FieldFilterPart' + required: + - isNegated + - type + - value + - children + IntegrationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + name: + type: string + identifier: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + primary: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - _environmentId + - _organizationId + - name + - identifier + - providerId + - channel + - credentials + - active + - deleted + - deletedAt + - deletedBy + - primary + CreateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field + will run + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - providerId + - channel + UpdateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field + will run + credentials: + $ref: '#/components/schemas/CredentialsDto' + removeNovuBranding: + type: boolean + description: If true, the Novu branding will be removed from the Inbox component + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + PaginatedResponseDto: + type: object + properties: + page: + type: number + description: The current page of the paginated response + hasMore: + type: boolean + description: Does the list have more items to fetch + pageSize: + type: number + description: Number of items on each page + data: + description: The list of items matching the query + type: array + items: + type: object + required: + - page + - hasMore + - pageSize + - data + ChannelCredentials: + type: object + properties: + webhookUrl: + type: string + description: >- + Webhook url used by chat app integrations. The webhook should be + obtained from the chat app provider. + channel: + type: string + description: Channel specification for Mattermost chat notifications + deviceTokens: + description: >- + Contains an array of the subscriber device tokens for a given + provider. Used on Push integrations + type: array + items: + type: string + alertUid: + type: string + description: alert_uid for grafana on-call webhook payload + title: + type: string + description: title to be used with grafana on call webhook + imageUrl: + type: string + description: image_url property fo grafana on call webhook + state: + type: string + description: state property fo grafana on call webhook + externalUrl: + type: string + description: link_to_upstream_details property fo grafana on call webhook + required: + - webhookUrl + ChannelSettings: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + _integrationId: + type: string + description: Id of the integration that is used for this channel + required: + - providerId + - credentials + - _integrationId + SubscriberResponseDto: + type: object + properties: + _id: + type: string + description: >- + The internal id novu generated for your subscriber, this is not the + subscriberId matching your query. See `subscriberId` for that + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually + correlates to the id the user in your systems + channels: + description: Channels settings for subscriber + type: array + items: + $ref: '#/components/schemas/ChannelSettings' + topics: + description: Topics that subscriber belongs to + type: array + items: + type: string + isOnline: + type: boolean + lastOnlineAt: + type: string + _organizationId: + type: string + _environmentId: + type: string + deleted: + type: boolean + createdAt: + type: string + updatedAt: + type: string + __v: + type: number + required: + - subscriberId + - _organizationId + - _environmentId + - deleted + - createdAt + - updatedAt + CreateSubscriberRequestDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually + correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + BulkSubscriberCreateDto: + type: object + properties: + subscribers: + type: array + items: + type: string + required: + - subscribers + UpdateSubscriberRequestDto: + type: object + properties: + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + UpdateSubscriberChannelRequestDto: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + required: + - providerId + - credentials + UpdateSubscriberOnlineFlagRequestDto: + type: object + properties: + isOnline: + type: boolean + required: + - isOnline + DeleteSubscriberResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + TemplateResponse: + type: object + properties: + _id: + type: string + description: Unique identifier of the workflow + name: + type: string + description: Name of the workflow + critical: + type: boolean + description: >- + Critical templates will always be delivered to the end user and + should be hidden from the subscriber preferences screen + triggers: + description: Triggers are the events that will trigger the workflow. + type: array + items: + type: string + required: + - _id + - name + - critical + - triggers + PreferenceChannels: + type: object + properties: + email: + type: boolean + sms: + type: boolean + in_app: + type: boolean + chat: + type: boolean + push: + type: boolean + Preference: + type: object + properties: + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for + the subscriber. + channels: + description: >- + Subscriber preferences for the different channels regarding this + workflow + allOf: + - $ref: '#/components/schemas/PreferenceChannels' + required: + - enabled + - channels + UpdateSubscriberPreferenceResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - template + - preference + GetSubscriberPreferencesResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - preference + ChannelPreference: + type: object + properties: + type: + type: string + enum: + - in_app + - email + - sms + - chat + - push + description: The type of channel that is enabled or not + enabled: + type: boolean + description: If channel is enabled or not + required: + - type + - enabled + UpdateSubscriberPreferenceRequestDto: + type: object + properties: + channel: + description: >- + The subscriber preferences for every ChannelTypeEnum for the + workflow assigned. + allOf: + - $ref: '#/components/schemas/ChannelPreference' + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for + the subscriber. + UpdateSubscriberGlobalPreferencesRequestDto: + type: object + properties: + enabled: + type: boolean + description: Enable or disable the subscriber global preferences. + preferences: + description: The subscriber global preferences for every ChannelTypeEnum. + type: array + items: + $ref: '#/components/schemas/ChannelPreference' + FeedResponseDto: + type: object + properties: + totalCount: + type: number + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + UnseenCountResponse: + type: object + properties: + count: + type: number + required: + - count + MessageMarkAsRequestDto: + type: object + properties: + messageId: + oneOf: + - type: string + - type: array + items: + type: string + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + required: + - messageId + - markAs + MessageEntity: + type: object + properties: {} + MarkAllMessageAsRequestDto: + type: object + properties: + feedIdentifier: + oneOf: + - type: string + - type: array + items: + type: string + description: Optional feed identifier or array of feed identifiers + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + description: Mark all subscriber messages as read, unread, seen or unseen + required: + - markAs + EmailBlockStyles: + type: object + properties: + textAlign: + type: string + enum: + - center + - left + - right + required: + - textAlign + EmailBlock: + type: object + properties: + type: + enum: + - button + - text + type: string + content: + type: string + url: + type: string + styles: + $ref: '#/components/schemas/EmailBlockStyles' + required: + - type + - content + MessageCTAData: + type: object + properties: + url: + type: string + MessageButton: + type: object + properties: + type: + type: string + enum: + - primary + - secondary + content: + type: string + resultContent: + type: string + required: + - type + - content + MessageActionResult: + type: object + properties: + payload: + type: object + type: + type: string + enum: + - primary + - secondary + MessageAction: + type: object + properties: + status: + type: string + enum: + - pending + - done + buttons: + type: array + items: + $ref: '#/components/schemas/MessageButton' + result: + $ref: '#/components/schemas/MessageActionResult' + MessageCTA: + type: object + properties: + type: + type: string + enum: + - redirect + data: + $ref: '#/components/schemas/MessageCTAData' + action: + $ref: '#/components/schemas/MessageAction' + required: + - data + NotificationGroup: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + DigestRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - regular + - backoff + backoff: + type: boolean + backoffAmount: + type: number + backoffUnit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + updateMode: + type: boolean + required: + - type + TimedConfig: + type: object + properties: + atTime: + type: string + weekDays: + type: array + items: + type: string + enum: + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + - sunday + monthDays: + type: array + items: + type: string + ordinal: + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - last + ordinalValue: + type: string + enum: + - day + - weekday + - weekend + - sunday + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + monthlyType: + type: string + enum: + - each + - 'on' + DigestTimedMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - timed + timed: + $ref: '#/components/schemas/TimedConfig' + required: + - type + DelayRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + type: + type: string + enum: + - regular + required: + - type + DelayScheduledMetadata: + type: object + properties: + type: + type: string + enum: + - scheduled + delayPath: + type: string + required: + - type + - delayPath + MessageTemplate: + type: object + properties: {} + NotificationStepVariant: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + NotificationStep: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + variants: + $ref: '#/components/schemas/NotificationStepVariant' + NotificationTriggerVariable: + type: object + properties: + name: + type: string + required: + - name + NotificationTrigger: + type: object + properties: + type: + type: string + enum: + - event + identifier: + type: string + variables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + subscriberVariables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + required: + - type + - identifier + - variables + WorkflowResponse: + type: object + properties: + _id: + type: string + name: + type: string + description: + type: string + active: + type: boolean + draft: + type: boolean + preferenceSettings: + $ref: '#/components/schemas/PreferenceChannels' + critical: + type: boolean + tags: + type: array + items: + type: string + steps: + type: array + items: + $ref: '#/components/schemas/NotificationStep' + _organizationId: + type: string + _creatorId: + type: string + _environmentId: + type: string + triggers: + type: array + items: + $ref: '#/components/schemas/NotificationTrigger' + _notificationGroupId: + type: string + _parentId: + type: string + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + notificationGroup: + $ref: '#/components/schemas/NotificationGroup' + data: + type: object + workflowIntegrationStatus: + type: object + required: + - name + - description + - active + - draft + - preferenceSettings + - critical + - tags + - steps + - _organizationId + - _creatorId + - _environmentId + - triggers + - _notificationGroupId + - deleted + - deletedAt + - deletedBy + MessageResponseDto: + type: object + properties: + _id: + type: string + _templateId: + type: string + _environmentId: + type: string + _messageTemplateId: + type: string + _organizationId: + type: string + _notificationId: + type: string + _subscriberId: + type: string + subscriber: + $ref: '#/components/schemas/SubscriberResponseDto' + template: + $ref: '#/components/schemas/WorkflowResponse' + templateIdentifier: + type: string + createdAt: + type: string + lastSeenDate: + type: string + lastReadDate: + type: string + content: + oneOf: + - $ref: '#/components/schemas/EmailBlock' + - type: string + transactionId: + type: string + subject: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + read: + type: boolean + seen: + type: boolean + email: + type: string + phone: + type: string + directWebhookUrl: + type: string + providerId: + type: string + deviceTokens: + type: array + items: + type: string + title: + type: string + cta: + $ref: '#/components/schemas/MessageCTA' + _feedId: + type: object + nullable: true + status: + type: string + enum: + - sent + - error + - warning + errorId: + type: string + errorText: + type: string + payload: + type: object + description: The payload that was used to send the notification trigger + overrides: + type: object + description: Provider specific overrides used when triggering the notification + required: + - _templateId + - _environmentId + - _messageTemplateId + - _organizationId + - _notificationId + - _subscriberId + - createdAt + - content + - transactionId + - channel + - read + - seen + - cta + - status + - errorId + - errorText + - payload + - overrides + MarkMessageActionAsSeenDto: + type: object + properties: + status: + enum: + - pending + - done + type: string + description: Message action status + payload: + type: object + description: Message action payload + required: + - status + DeleteMessageResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CreateTopicResponseDto: + type: object + properties: + _id: + type: string + description: The unique identifier for the Topic created. + key: + type: string + description: >- + User defined custom key and provided by the user that will be an + unique identifier for the Topic created. + required: + - key + CreateTopicRequestDto: + type: object + properties: + key: + type: string + description: >- + User defined custom key and provided by the user that will be an + unique identifier for the Topic created. + name: + type: string + description: >- + User defined custom name and provided by the user that will name the + Topic created. + required: + - key + - name + AddSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be associated to the topic + type: array + items: + type: string + required: + - subscribers + TopicSubscriberDto: + type: object + properties: + _organizationId: + type: string + _environmentId: + type: string + _subscriberId: + type: string + _topicId: + type: string + topicKey: + type: string + externalSubscriberId: + type: string + required: + - _organizationId + - _environmentId + - _subscriberId + - _topicId + - topicKey + - externalSubscriberId + RemoveSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be removed to the topic + type: array + items: + type: string + required: + - subscribers + TopicDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + FilterTopicsResponseDto: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/TopicDto' + page: + type: number + pageSize: + type: number + totalCount: + type: number + required: + - data + - page + - pageSize + - totalCount + GetTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicRequestDto: + type: object + properties: + name: + type: string + description: >- + User defined custom name and provided by the user to rename the + topic. + required: + - name + GeneratePreviewResponseDto: + type: object + properties: {} + headers: + Content-Type: + required: true + description: The MIME type of the response body. + schema: + type: string + example: application/json + RateLimit-Limit: + required: false + description: >- + The number of requests that the client is permitted to make per second. + The actual maximum may differ when burst is enabled. + schema: + type: string + example: '100' + RateLimit-Remaining: + required: false + description: The number of requests remaining until the next window. + schema: + type: string + example: '93' + RateLimit-Reset: + required: false + description: >- + The remaining seconds until a request of the same cost will be + refreshed. + schema: + type: string + example: '8' + RateLimit-Policy: + required: false + description: The rate limit policy that was used to evaluate the request. + schema: + type: string + example: >- + 100;w=1;burst=110;comment="token + bucket";category="trigger";cost="single" + Retry-After: + required: false + description: >- + The number of seconds after which the client may retry the request that + was previously rejected. + schema: + type: string + example: '8' + Idempotency-Key: + required: false + description: The idempotency key used to evaluate the request. + schema: + type: string + example: '8' + Idempotency-Replay: + required: false + description: Whether the request was a replay of a previous request. + schema: + type: string + example: 'true' + Link: + required: false + description: A link to the documentation. + schema: + type: string + example: https://docs.novu.co/ +externalDocs: + description: Novu Documentation + url: https://docs.novu.co +x-speakeasy-name-override: + - operationId: ^.*get.* + methodNameOverride: retrieve + - operationId: ^.*retrieve.* + methodNameOverride: retrieve + - operationId: ^.*create.* + methodNameOverride: create + - operationId: ^.*update.* + methodNameOverride: update + - operationId: ^.*list.* + methodNameOverride: list + - operationId: ^.*delete.* + methodNameOverride: delete + - operationId: ^.*remove.* + methodNameOverride: delete +x-speakeasy-retries: + strategy: backoff + backoff: + initialInterval: 500 + maxInterval: 30000 + maxElapsedTime: 3600000 + exponent: 1.5 + statusCodes: + - '408' + - '409' + - '429' + - 5XX + retryConnectionErrors: true diff --git a/.speakeasy/temp/overlay_kQfMvHVybU.yaml b/.speakeasy/temp/overlay_kQfMvHVybU.yaml new file mode 100644 index 00000000..aad4f49e --- /dev/null +++ b/.speakeasy/temp/overlay_kQfMvHVybU.yaml @@ -0,0 +1,8807 @@ +openapi: 3.0.0 +paths: + /v1/environments/me: + get: + operationId: EnvironmentsControllerV1_getCurrentEnvironment + summary: Get current environment + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments: + get: + operationId: EnvironmentsControllerV1_listMyEnvironments + summary: Get environments + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EnvironmentResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/environments/api-keys: + get: + operationId: EnvironmentsControllerV1_listOrganizationApiKeys + x-speakeasy-group: Environments.ApiKeys + summary: Get api keys + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiKey' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Environments + security: + - api-key: [] + /v1/execution-details: + get: + operationId: ExecutionDetailsController_getExecutionDetailsForNotification + summary: Get execution details + parameters: + - name: notificationId + required: true + in: query + schema: + type: string + - name: subscriberId + required: true + in: query + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExecutionDetailsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Execution Details + security: + - api-key: [] + /v1/events/trigger: + post: + operationId: EventsController_trigger + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Event + x-speakeasy-name-override: trigger + summary: Trigger event + description: "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/bulk: + post: + operationId: EventsController_triggerBulk + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Trigger Notification Events in Bulk + x-speakeasy-name-override: triggerBulk + summary: Bulk trigger event + description: "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTriggerEventDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/broadcast: + post: + operationId: EventsController_broadcastEventToAll + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Broadcast Event to All + x-speakeasy-name-override: triggerBroadcast + summary: Broadcast event to all + description: >- + Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. + + In the future could be used to trigger events to a subset of subscribers based on defined filters. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventToAllRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/TriggerEventResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/events/trigger/{transactionId}: + delete: + operationId: EventsController_cancel + x-speakeasy-group: '' + x-speakeasy-usage-example: + title: Cancel Triggered Event + x-speakeasy-name-override: cancel + summary: Cancel triggered event + description: "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n " + parameters: + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DataBooleanDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Events + security: + - api-key: [] + /v1/notifications: + get: + operationId: NotificationsController_listNotifications + summary: Get notifications + parameters: + - name: channels + required: true + in: query + schema: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - name: templates + required: true + in: query + schema: + type: array + items: + type: string + - name: emails + required: true + in: query + schema: + type: array + items: + type: string + - name: search + required: true + in: query + deprecated: true + schema: + type: string + - name: subscriberIds + required: true + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: transactionId + required: false + in: query + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/stats: + get: + operationId: NotificationsController_getActivityStats + x-speakeasy-group: Notifications.Stats + summary: Get notification statistics + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityStatsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/graph/stats: + get: + operationId: NotificationsController_getActivityGraphStats + x-speakeasy-name-override: graph + x-speakeasy-group: Notifications.Stats + summary: Get notification graph statistics + parameters: + - name: days + required: false + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivityGraphStatesResponse' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notifications/{notificationId}: + get: + operationId: NotificationsController_getNotification + summary: Get notification + parameters: + - name: notificationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityNotificationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Notifications + security: + - api-key: [] + /v1/notification-groups: + post: + operationId: NotificationGroupsController_createNotificationGroup + summary: Create workflow group + description: workflow group was previously named notification group + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + get: + operationId: NotificationGroupsController_listNotificationGroups + summary: Get workflow groups + description: workflow group was previously named notification group + parameters: [] + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/notification-groups/{id}: + get: + operationId: NotificationGroupsController_getNotificationGroup + summary: Get workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + patch: + operationId: NotificationGroupsController_updateNotificationGroup + summary: Update workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNotificationGroupRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + delete: + operationId: NotificationGroupsController_deleteNotificationGroup + summary: Delete workflow group + description: workflow group was previously named notification group + parameters: + - name: id + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteNotificationGroupResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Workflow groups + security: + - api-key: [] + /v1/integrations: + get: + operationId: IntegrationsController_listIntegrations + summary: Get integrations + description: >- + Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of integrations belonging to the organization that are successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + post: + operationId: IntegrationsController_createIntegration + summary: Create integration + description: >- + Create an integration for the current environment the user is based on the API key provided + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateIntegrationRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/active: + get: + operationId: IntegrationsController_getActiveIntegrations + x-speakeasy-name-override: listActive + summary: Get active integrations + description: >- + Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + parameters: [] + responses: + '200': + description: >- + The list of active integrations belonging to the organization that are successfully returned. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/webhook/provider/{providerOrIntegrationId}/status: + get: + operationId: IntegrationsController_getWebhookSupportStatus + x-speakeasy-group: Integrations.Webhooks + summary: Get webhook support status for provider + description: >- + Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value + parameters: + - name: providerOrIntegrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: The status of the webhook for the provider requested + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: boolean + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}: + put: + operationId: IntegrationsController_updateIntegrationById + summary: Update integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIntegrationRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + delete: + operationId: IntegrationsController_removeIntegration + summary: Delete integration + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IntegrationResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/integrations/{integrationId}/set-primary: + post: + operationId: IntegrationsController_setIntegrationAsPrimary + x-speakeasy-name-override: setAsPrimary + summary: Set integration as primary + parameters: + - name: integrationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/IntegrationResponseDto' + '404': + description: >- + The integration with the integrationId provided does not exist in the database. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Integrations + security: + - api-key: [] + /v1/subscribers: + get: + operationId: SubscribersController_listSubscribers + x-speakeasy-pagination: + type: offsetLimit + inputs: + - name: page + in: parameters + type: page + - name: limit + in: parameters + type: limit + outputs: + results: $.data.resultArray + summary: Get subscribers + description: >- + Returns a list of subscribers, could paginated using the `page` and `limit` query parameter + parameters: + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + post: + operationId: SubscribersController_createSubscriber + summary: Create subscriber + description: >- + Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSubscriberRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}: + get: + operationId: SubscribersController_getSubscriber + summary: Get subscriber + description: Get subscriber by your internal id used to identify the subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeTopics + required: false + in: query + description: Includes the topics associated with the subscriber + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + put: + operationId: SubscribersController_updateSubscriber + summary: Update subscriber + description: Used to update the subscriber entity with new information + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + delete: + operationId: SubscribersController_removeSubscriber + summary: Delete subscriber + description: Deletes a subscriber entity from the Novu platform + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteSubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/bulk: + post: + operationId: SubscribersController_bulkCreateSubscribers + x-speakeasy-name-override: createBulk + summary: Bulk create subscribers + description: "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n " + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BulkSubscriberCreateDto' + responses: + '201': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials: + put: + operationId: SubscribersController_updateSubscriberChannel + x-speakeasy-group: Subscribers.Credentials + summary: Update subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack and push tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_modifySubscriberChannel + x-speakeasy-name-override: append + x-speakeasy-group: Subscribers.Credentials + summary: Modify subscriber credentials + description: >- + Subscriber credentials associated to the delivery methods such as slack and push tokens. + + This endpoint appends provided credentials and deviceTokens to the existing ones. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberChannelRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}: + delete: + operationId: SubscribersController_deleteSubscriberCredentials + x-speakeasy-group: Subscribers.Credentials + summary: Delete subscriber credentials by providerId + description: Delete subscriber credentials such as slack and expo tokens. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/online-status: + patch: + operationId: SubscribersController_updateSubscriberOnlineFlag + x-speakeasy-name-override: updateOnlineFlag + x-speakeasy-group: Subscribers.properties + summary: Update subscriber online status + description: Used to update the subscriber isOnline flag. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberOnlineFlagRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences: + get: + operationId: SubscribersController_listSubscriberPreferences + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + schema: + type: boolean + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberGlobalPreferences + x-speakeasy-name-override: updateGlobal + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber global preferences + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/preferences/{parameter}: + get: + operationId: SubscribersController_getSubscriberPreferenceByLevel + x-speakeasy-name-override: retrieveByLevel + x-speakeasy-group: Subscribers.Preferences + summary: Get subscriber preferences by level + parameters: + - name: includeInactiveChannels + required: false + in: query + description: >- + A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + schema: + type: boolean + - name: parameter + required: true + in: path + description: 'the preferences level to be retrieved (template / global) ' + schema: + enum: + - global + - template + type: string + - name: subscriberId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GetSubscriberPreferencesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + patch: + operationId: SubscribersController_updateSubscriberPreference + x-speakeasy-group: Subscribers.Preferences + summary: Update subscriber preference + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: parameter + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSubscriberPreferenceResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/feed: + get: + operationId: SubscribersController_getNotificationsFeed + x-speakeasy-group: Subscribers.Notifications + summary: Get in-app notification feed for a particular subscriber + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + maximum: 100 + default: 10 + type: number + - name: read + required: false + in: query + schema: + type: boolean + - name: seen + required: false + in: query + schema: + type: boolean + - name: payload + required: false + in: query + description: Base64 encoded string of the partial payload JSON object + example: >- + btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30= + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedResponseDto' + - properties: + data: + type: array + items: + $ref: '#/components/schemas/FeedResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/notifications/unseen: + get: + operationId: SubscribersController_getUnseenCount + x-speakeasy-name-override: unseenCount + x-speakeasy-group: Subscribers.Notifications + summary: Get the unseen in-app notifications count for subscribers feed + parameters: + - name: seen + required: true + in: query + schema: + type: boolean + - name: subscriberId + required: true + in: path + schema: + type: string + - name: limit + required: true + in: query + schema: + type: number + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/UnseenCountResponse' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-as: + post: + operationId: SubscribersController_markMessagesAs + x-speakeasy-name-override: markAllAs + x-speakeasy-group: Subscribers.Messages + summary: Mark a subscriber messages as seen, read, unseen or unread + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MessageMarkAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/mark-all: + post: + operationId: SubscribersController_markAllUnreadAsRead + x-speakeasy-name-override: markAll + x-speakeasy-group: Subscribers.Messages + summary: >- + Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkAllMessageAsRequestDto' + responses: + '201': + description: '' + content: + application/json: + schema: + type: number + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}: + post: + operationId: SubscribersController_markActionAsSeen + x-speakeasy-name-override: updateAsSeen + x-speakeasy-group: Subscribers.Messages + summary: Mark message action as seen + parameters: + - name: messageId + required: true + in: path + schema: + type: string + - name: type + required: true + in: path + schema: {} + - name: subscriberId + required: true + in: path + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MarkMessageActionAsSeenDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback: + get: + operationId: SubscribersController_chatOauthCallback + x-speakeasy-name-override: chatAccessOauthCallBack + x-speakeasy-group: Subscribers.Authentication + summary: Handle providers oauth redirect + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: code + required: true + in: query + schema: + type: string + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/subscribers/{subscriberId}/credentials/{providerId}/oauth: + get: + operationId: SubscribersController_chatAccessOauth + x-speakeasy-name-override: chatAccessOauth + x-speakeasy-group: Subscribers.Authentication + summary: Handle chat oauth + parameters: + - name: subscriberId + required: true + in: path + schema: + type: string + - name: providerId + required: true + in: path + schema: {} + - name: hmacHash + required: true + in: query + schema: + type: string + - name: environmentId + required: true + in: query + schema: + type: string + - name: integrationIdentifier + required: false + in: query + schema: + type: string + responses: + '200': + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Subscribers + security: + - api-key: [] + /v1/messages: + get: + operationId: MessagesController_getMessages + summary: Get messages + description: >- + Returns a list of messages, could paginate using the `page` query parameter + parameters: + - name: channel + required: false + in: query + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: subscriberId + required: false + in: query + schema: + type: string + - name: transactionId + required: false + in: query + schema: + type: array + items: + type: string + - name: page + required: false + in: query + schema: + default: 0 + type: number + - name: limit + required: false + in: query + schema: + default: 10 + type: number + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivitiesResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/{messageId}: + delete: + operationId: MessagesController_deleteMessage + summary: Delete message + description: Deletes a message entity from the Novu platform + parameters: + - name: messageId + required: true + in: path + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteMessageResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/messages/transaction/{transactionId}: + delete: + operationId: MessagesController_deleteMessagesByTransactionId + x-speakeasy-name-override: deleteByTransactionId + summary: Delete messages by transactionId + description: >- + Deletes messages entity from the Novu platform using TransactionId of message + parameters: + - name: channel + required: false + in: query + description: The channel of the message to be deleted + schema: + enum: + - in_app + - email + - sms + - chat + - push + type: string + - name: transactionId + required: true + in: path + schema: + type: string + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Messages + security: + - api-key: [] + /v1/topics: + post: + operationId: TopicsController_createTopic + summary: Topic creation + description: Create a topic + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicRequestDto' + responses: + '201': + description: Created + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_listTopics + summary: Filter topics + description: >- + Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter + parameters: + - name: page + required: false + in: query + description: Number of page for the pagination + schema: + minimum: 0 + default: 0 + type: number + - name: pageSize + required: false + in: query + description: Size of page for the pagination + schema: + minimum: 0 + default: 10 + type: number + - name: key + required: false + in: query + description: Topic key + schema: + type: string + responses: + '200': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FilterTopicsResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers: + post: + operationId: TopicsController_addSubscribers + x-speakeasy-name-override: assign + x-speakeasy-group: Topics.Subscribers + summary: Subscribers addition + description: Add subscribers to a topic by key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/{externalSubscriberId}: + get: + operationId: TopicsController_getTopicSubscriber + x-speakeasy-group: Topics.Subscribers + summary: Check topic subscriber + description: Check if a subscriber belongs to a certain topic + parameters: + - name: externalSubscriberId + required: true + in: path + description: The external subscriber id + schema: + type: string + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TopicSubscriberDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}/subscribers/removal: + post: + operationId: TopicsController_removeSubscribers + x-speakeasy-group: Topics.Subscribers + summary: Subscribers removal + description: Remove subscribers from a topic + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveSubscribersRequestDto' + responses: + '204': + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + description: '' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + /v1/topics/{topicKey}: + delete: + operationId: TopicsController_deleteTopic + summary: Delete topic + description: Delete a topic by its topic key if it has no subscribers + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '204': + description: The topic has been deleted correctly + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '404': + description: >- + The topic with the key provided does not exist in the database so it can not be deleted. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + '409': + description: >- + The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + get: + operationId: TopicsController_getTopic + summary: Get topic + description: Get a topic by its topic key + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/GetTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] + patch: + operationId: TopicsController_renameTopic + x-speakeasy-name-override: rename + summary: Rename a topic + description: Rename a topic by providing a new name + parameters: + - name: topicKey + required: true + in: path + description: The topic key + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicRequestDto' + responses: + '200': + description: Ok + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + content: + application/json: + schema: + $ref: '#/components/schemas/RenameTopicResponseDto' + '409': + description: >- + The request could not be completed due to a conflict with the current state of the target resource. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: string + example: >- + Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second + '429': + description: 'The client has sent too many requests in a given amount of time. ' + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: API rate limit exceeded + '503': + description: >- + The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. + headers: + Content-Type: + $ref: '#/components/headers/Content-Type' + RateLimit-Limit: + $ref: '#/components/headers/RateLimit-Limit' + RateLimit-Remaining: + $ref: '#/components/headers/RateLimit-Remaining' + RateLimit-Reset: + $ref: '#/components/headers/RateLimit-Reset' + RateLimit-Policy: + $ref: '#/components/headers/RateLimit-Policy' + Idempotency-Key: + $ref: '#/components/headers/Idempotency-Key' + Idempotency-Replay: + $ref: '#/components/headers/Idempotency-Replay' + Retry-After: + $ref: '#/components/headers/Retry-After' + content: + application/json: + schema: + type: string + example: Please wait some time, then try again. + tags: + - Topics + security: + - api-key: [] +info: + title: Novu API + description: >- + Novu REST API. Please see https://docs.novu.co/api-reference for more details. + version: '1.0' + contact: + name: Novu Support + url: https://discord.gg/novu + email: support@novu.co + termsOfService: https://novu.co/terms + license: + name: MIT + url: https://opensource.org/license/mit +tags: + - name: Events + description: >- + Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions. + externalDocs: + url: https://docs.novu.co/workflows + - name: Subscribers + description: >- + A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages. + externalDocs: + url: https://docs.novu.co/subscribers/subscribers + - name: Topics + description: >- + Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more. + externalDocs: + url: https://docs.novu.co/subscribers/topics + - name: Notification + description: >- + A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness. + externalDocs: + url: https://docs.novu.co/getting-started/introduction + - name: Integrations + description: >- + With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers. + externalDocs: + url: https://docs.novu.co/channels-and-providers/integration-store + - name: Layouts + description: >- + Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform. + externalDocs: + url: https://docs.novu.co/content-creation-design/layouts + - name: Workflows + description: >- + All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system. + externalDocs: + url: https://docs.novu.co/workflows + - name: Notification Templates + description: >- + Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name. + - name: Workflow groups + description: Workflow groups are used to organize workflows into logical groups. + - name: Changes + description: >- + Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready. + externalDocs: + url: >- + https://docs.novu.co/platform/environments#promoting-pending-changes-to-production + - name: Environments + description: >- + Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another. + externalDocs: + url: https://docs.novu.co/platform/environments + - name: Inbound Parse + description: >- + Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format. + externalDocs: + url: https://docs.novu.co/platform/inbound-parse-webhook + - name: Feeds + description: >- + Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type. + externalDocs: + url: https://docs.novu.co/activity-feed + - name: Tenants + description: >- + A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations. + externalDocs: + url: https://docs.novu.co/tenants + - name: Messages + description: >- + A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages. + externalDocs: + url: https://docs.novu.co/workflows/messages + - name: Organizations + description: >- + An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account. + externalDocs: + url: https://docs.novu.co/platform/organizations + - name: Execution Details + description: >- + Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution. + externalDocs: + url: https://docs.novu.co/activity-feed +servers: + - url: https://api.novu.co + - url: https://eu.api.novu.co +components: + securitySchemes: + api-key: + type: apiKey + in: header + name: Authorization + description: >- + API key authentication. Allowed headers-- "Authorization: ApiKey ". + schemas: + DataWrapperDto: + type: object + properties: + data: + type: object + required: + - data + EnvironmentResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _organizationId: + type: string + identifier: + type: string + apiKeys: + type: array + items: + type: string + _parentId: + type: string + slug: + type: string + required: + - name + - _organizationId + - identifier + - _parentId + ApiKey: + type: object + properties: + key: + type: string + _userId: + type: string + required: + - key + - _userId + ExecutionDetailsResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _jobId: + type: string + _environmentId: + type: string + _notificationId: + type: string + _notificationTemplateId: + type: string + _subscriberId: + type: string + _messageId: + type: string + providerId: + type: string + transactionId: + type: string + channel: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + detail: + type: string + source: + type: string + enum: + - Credentials + - Internal + - Payload + - Webhook + status: + type: string + enum: + - Success + - Warning + - Failed + - Pending + - Queued + - ReadConfirmation + isTest: + type: boolean + isRetry: + type: boolean + createdAt: + type: string + required: + - _organizationId + - _jobId + - _environmentId + - _notificationId + - _notificationTemplateId + - _subscriberId + - transactionId + - channel + - detail + - source + - status + - isTest + - isRetry + TriggerEventResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: If trigger was acknowledged or not + status: + enum: + - error + - trigger_not_active + - no_workflow_active_steps_defined + - no_workflow_steps_defined + - processed + - subscriber_id_missing + - no_tenant_found + type: string + description: Status for trigger + error: + description: In case of an error, this field will contain the error message + type: array + items: + type: string + transactionId: + type: string + description: Transaction id for trigger + required: + - acknowledged + - status + TopicPayloadDto: + type: object + properties: + topicKey: + type: string + type: + enum: + - Subscriber + - Topic + type: string + example: Topic + required: + - topicKey + - type + TenantPayloadDto: + type: object + properties: + identifier: + type: string + name: + type: string + data: + type: object + SubscriberPayloadDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + TriggerEventRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page. + example: workflow_identifier + payload: + type: object + description: "The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI." + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + to: + type: array + description: The recipients list of people who will receive the notification. + items: + oneOf: + - $ref: '#/components/schemas/SubscriberPayloadDto' + - type: string + description: Unique identifier of a subscriber in your systems + example: SUBSCRIBER_ID + - $ref: '#/components/schemas/TopicPayloadDto' + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID if not provided. + actor: + description: "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n " + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: "It is used to specify a tenant context during trigger event.\n Existing tenants will be updated with the provided details.\n " + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + bridgeUrl: + type: string + controls: + type: object + required: + - name + - to + BulkTriggerEventDto: + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/TriggerEventRequestDto' + required: + - events + TriggerEventToAllRequestDto: + type: object + properties: + name: + type: string + description: >- + The trigger identifier associated for the template you wish to send. This identifier can be found on the template page. + payload: + type: object + description: "The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI." + example: + comment_id: string + post: + text: string + overrides: + type: object + description: This could be used to override provider specific configurations + example: + fcm: + data: + key: value + transactionId: + type: string + description: >- + A unique identifier for this transaction, we will generated a UUID if not provided. + actor: + description: "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n " + oneOf: + - type: string + description: Unique identifier of a subscriber in your systems + - $ref: '#/components/schemas/SubscriberPayloadDto' + tenant: + description: "It is used to specify a tenant context during trigger event.\n If a new tenant object is provided, we will create a new tenant.\n " + oneOf: + - type: string + description: Unique identifier of a tenant in your system + - $ref: '#/components/schemas/TenantPayloadDto' + required: + - name + - payload + DataBooleanDto: + type: object + properties: + data: + type: boolean + required: + - data + ActivitiesResponseDto: + type: object + properties: + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + ActivityStatsResponseDto: + type: object + properties: + weeklySent: + type: number + monthlySent: + type: number + required: + - weeklySent + - monthlySent + ActivityGraphStatesResponse: + type: object + properties: + _id: + type: string + count: + type: number + templates: + type: array + items: + type: string + channels: + type: array + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + required: + - _id + - count + - templates + - channels + ActivityNotificationSubscriberResponseDto: + type: object + properties: + firstName: + type: string + _id: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + required: + - _id + ActivityNotificationTemplateResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + triggers: + type: array + items: + type: string + required: + - name + - triggers + ActivityNotificationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + transactionId: + type: string + createdAt: + type: string + channels: + type: string + items: + type: string + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + enum: + - in_app + - email + - sms + - chat + - push + - digest + - trigger + - delay + - custom + subscriber: + $ref: '#/components/schemas/ActivityNotificationSubscriberResponseDto' + template: + $ref: '#/components/schemas/ActivityNotificationTemplateResponseDto' + jobs: + type: array + items: + type: string + required: + - _environmentId + - _organizationId + - transactionId + NotificationGroupResponseDto: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + CreateNotificationGroupRequestDto: + type: object + properties: + name: + type: string + required: + - name + DeleteNotificationGroupResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CredentialsDto: + type: object + properties: + apiKey: + type: string + user: + type: string + secretKey: + type: string + domain: + type: string + password: + type: string + host: + type: string + port: + type: string + secure: + type: boolean + region: + type: string + accountSid: + type: string + messageProfileId: + type: string + token: + type: string + from: + type: string + senderName: + type: string + projectName: + type: string + applicationId: + type: string + clientId: + type: string + requireTls: + type: boolean + ignoreTls: + type: boolean + tlsOptions: + type: object + baseUrl: + type: string + webhookUrl: + type: string + redirectUrl: + type: string + hmac: + type: boolean + serviceAccount: + type: string + ipPoolName: + type: string + apiKeyRequestHeader: + type: string + secretKeyRequestHeader: + type: string + idPath: + type: string + datePath: + type: string + apiToken: + type: string + authenticateByToken: + type: boolean + authenticationTokenKey: + type: string + instanceId: + type: string + alertUid: + type: string + title: + type: string + imageUrl: + type: string + state: + type: string + externalLink: + type: string + channelId: + type: string + phoneNumberIdentification: + type: string + accessKey: + type: string + FieldFilterPart: + type: object + properties: + field: + type: string + value: + type: string + operator: + type: string + enum: + - LARGER + - SMALLER + - LARGER_EQUAL + - SMALLER_EQUAL + - EQUAL + - NOT_EQUAL + - ALL_IN + - ANY_IN + - NOT_IN + - BETWEEN + - NOT_BETWEEN + - LIKE + - NOT_LIKE + - IN + 'on': + type: string + enum: + - subscriber + - payload + required: + - field + - value + - operator + - 'on' + StepFilter: + type: object + properties: + isNegated: + type: boolean + type: + type: string + enum: + - BOOLEAN + - TEXT + - DATE + - NUMBER + - STATEMENT + - LIST + - MULTI_LIST + - GROUP + value: + type: string + enum: + - AND + - OR + children: + type: array + items: + $ref: '#/components/schemas/FieldFilterPart' + required: + - isNegated + - type + - value + - children + IntegrationResponseDto: + type: object + properties: + _id: + type: string + _environmentId: + type: string + _organizationId: + type: string + name: + type: string + identifier: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + primary: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - _environmentId + - _organizationId + - name + - identifier + - providerId + - channel + - credentials + - active + - deleted + - deletedAt + - deletedBy + - primary + CreateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + providerId: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + credentials: + $ref: '#/components/schemas/CredentialsDto' + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field will run + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + required: + - providerId + - channel + UpdateIntegrationRequestDto: + type: object + properties: + name: + type: string + identifier: + type: string + _environmentId: + type: string + active: + type: boolean + description: >- + If the integration is active the validation on the credentials field will run + credentials: + $ref: '#/components/schemas/CredentialsDto' + removeNovuBranding: + type: boolean + description: If true, the Novu branding will be removed from the Inbox component + check: + type: boolean + conditions: + type: array + items: + $ref: '#/components/schemas/StepFilter' + PaginatedResponseDto: + type: object + properties: + page: + type: number + description: The current page of the paginated response + hasMore: + type: boolean + description: Does the list have more items to fetch + pageSize: + type: number + description: Number of items on each page + data: + description: The list of items matching the query + type: array + items: + type: object + required: + - page + - hasMore + - pageSize + - data + ChannelCredentials: + type: object + properties: + webhookUrl: + type: string + description: >- + Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. + channel: + type: string + description: Channel specification for Mattermost chat notifications + deviceTokens: + description: >- + Contains an array of the subscriber device tokens for a given provider. Used on Push integrations + type: array + items: + type: string + alertUid: + type: string + description: alert_uid for grafana on-call webhook payload + title: + type: string + description: title to be used with grafana on call webhook + imageUrl: + type: string + description: image_url property fo grafana on call webhook + state: + type: string + description: state property fo grafana on call webhook + externalUrl: + type: string + description: link_to_upstream_details property fo grafana on call webhook + required: + - webhookUrl + ChannelSettings: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + _integrationId: + type: string + description: Id of the integration that is used for this channel + required: + - providerId + - credentials + - _integrationId + SubscriberResponseDto: + type: object + properties: + _id: + type: string + description: >- + The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that + firstName: + type: string + lastName: + type: string + email: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + channels: + description: Channels settings for subscriber + type: array + items: + $ref: '#/components/schemas/ChannelSettings' + topics: + description: Topics that subscriber belongs to + type: array + items: + type: string + isOnline: + type: boolean + lastOnlineAt: + type: string + _organizationId: + type: string + _environmentId: + type: string + deleted: + type: boolean + createdAt: + type: string + updatedAt: + type: string + __v: + type: number + required: + - subscriberId + - _organizationId + - _environmentId + - deleted + - createdAt + - updatedAt + CreateSubscriberRequestDto: + type: object + properties: + subscriberId: + type: string + description: >- + The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + description: An http url to the profile image of your subscriber + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + required: + - subscriberId + BulkSubscriberCreateDto: + type: object + properties: + subscribers: + type: array + items: + type: string + required: + - subscribers + UpdateSubscriberRequestDto: + type: object + properties: + email: + type: string + firstName: + type: string + lastName: + type: string + phone: + type: string + avatar: + type: string + locale: + type: string + data: + type: object + channels: + type: array + items: + type: string + UpdateSubscriberChannelRequestDto: + type: object + properties: + providerId: + type: string + enum: + - slack + - discord + - msteams + - mattermost + - ryver + - zulip + - grafana-on-call + - getstream + - rocket-chat + - whatsapp-business + - fcm + - apns + - expo + - one-signal + - pushpad + - push-webhook + - pusher-beams + description: The provider identifier for the credentials + integrationIdentifier: + type: string + description: The integration identifier + credentials: + description: Credentials payload for the specified provider + allOf: + - $ref: '#/components/schemas/ChannelCredentials' + required: + - providerId + - credentials + UpdateSubscriberOnlineFlagRequestDto: + type: object + properties: + isOnline: + type: boolean + required: + - isOnline + DeleteSubscriberResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + TemplateResponse: + type: object + properties: + _id: + type: string + description: Unique identifier of the workflow + name: + type: string + description: Name of the workflow + critical: + type: boolean + description: >- + Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen + triggers: + description: Triggers are the events that will trigger the workflow. + type: array + items: + type: string + required: + - _id + - name + - critical + - triggers + PreferenceChannels: + type: object + properties: + email: + type: boolean + sms: + type: boolean + in_app: + type: boolean + chat: + type: boolean + push: + type: boolean + Preference: + type: object + properties: + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for the subscriber. + channels: + description: >- + Subscriber preferences for the different channels regarding this workflow + allOf: + - $ref: '#/components/schemas/PreferenceChannels' + required: + - enabled + - channels + UpdateSubscriberPreferenceResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - template + - preference + GetSubscriberPreferencesResponseDto: + type: object + properties: + template: + description: The workflow information and if it is critical or not + allOf: + - $ref: '#/components/schemas/TemplateResponse' + preference: + description: The preferences of the subscriber regarding the related workflow + allOf: + - $ref: '#/components/schemas/Preference' + required: + - preference + ChannelPreference: + type: object + properties: + type: + type: string + enum: + - in_app + - email + - sms + - chat + - push + description: The type of channel that is enabled or not + enabled: + type: boolean + description: If channel is enabled or not + required: + - type + - enabled + UpdateSubscriberPreferenceRequestDto: + type: object + properties: + channel: + description: >- + The subscriber preferences for every ChannelTypeEnum for the workflow assigned. + allOf: + - $ref: '#/components/schemas/ChannelPreference' + enabled: + type: boolean + description: >- + Sets if the workflow is fully enabled for all channels or not for the subscriber. + UpdateSubscriberGlobalPreferencesRequestDto: + type: object + properties: + enabled: + type: boolean + description: Enable or disable the subscriber global preferences. + preferences: + description: The subscriber global preferences for every ChannelTypeEnum. + type: array + items: + $ref: '#/components/schemas/ChannelPreference' + FeedResponseDto: + type: object + properties: + totalCount: + type: number + hasMore: + type: boolean + data: + type: array + items: + type: string + pageSize: + type: number + page: + type: number + required: + - hasMore + - data + - pageSize + - page + UnseenCountResponse: + type: object + properties: + count: + type: number + required: + - count + MessageMarkAsRequestDto: + type: object + properties: + messageId: + oneOf: + - type: string + - type: array + items: + type: string + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + required: + - messageId + - markAs + MessageEntity: + type: object + properties: {} + MarkAllMessageAsRequestDto: + type: object + properties: + feedIdentifier: + oneOf: + - type: string + - type: array + items: + type: string + description: Optional feed identifier or array of feed identifiers + markAs: + enum: + - read + - seen + - unread + - unseen + type: string + description: Mark all subscriber messages as read, unread, seen or unseen + required: + - markAs + EmailBlockStyles: + type: object + properties: + textAlign: + type: string + enum: + - center + - left + - right + required: + - textAlign + EmailBlock: + type: object + properties: + type: + enum: + - button + - text + type: string + content: + type: string + url: + type: string + styles: + $ref: '#/components/schemas/EmailBlockStyles' + required: + - type + - content + MessageCTAData: + type: object + properties: + url: + type: string + MessageButton: + type: object + properties: + type: + type: string + enum: + - primary + - secondary + content: + type: string + resultContent: + type: string + required: + - type + - content + MessageActionResult: + type: object + properties: + payload: + type: object + type: + type: string + enum: + - primary + - secondary + MessageAction: + type: object + properties: + status: + type: string + enum: + - pending + - done + buttons: + type: array + items: + $ref: '#/components/schemas/MessageButton' + result: + $ref: '#/components/schemas/MessageActionResult' + MessageCTA: + type: object + properties: + type: + type: string + enum: + - redirect + data: + $ref: '#/components/schemas/MessageCTAData' + action: + $ref: '#/components/schemas/MessageAction' + required: + - data + NotificationGroup: + type: object + properties: + _id: + type: string + name: + type: string + _environmentId: + type: string + _organizationId: + type: string + _parentId: + type: string + required: + - name + - _environmentId + - _organizationId + DigestRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - regular + - backoff + backoff: + type: boolean + backoffAmount: + type: number + backoffUnit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + updateMode: + type: boolean + required: + - type + TimedConfig: + type: object + properties: + atTime: + type: string + weekDays: + type: array + items: + type: string + enum: + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + - sunday + monthDays: + type: array + items: + type: string + ordinal: + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - last + ordinalValue: + type: string + enum: + - day + - weekday + - weekend + - sunday + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + monthlyType: + type: string + enum: + - each + - 'on' + DigestTimedMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + digestKey: + type: string + type: + type: string + enum: + - timed + timed: + $ref: '#/components/schemas/TimedConfig' + required: + - type + DelayRegularMetadata: + type: object + properties: + amount: + type: number + unit: + type: string + enum: + - seconds + - minutes + - hours + - days + - weeks + - months + type: + type: string + enum: + - regular + required: + - type + DelayScheduledMetadata: + type: object + properties: + type: + type: string + enum: + - scheduled + delayPath: + type: string + required: + - type + - delayPath + MessageTemplate: + type: object + properties: {} + NotificationStepVariant: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + NotificationStep: + type: object + properties: + _id: + type: string + uuid: + type: string + name: + type: string + _templateId: + type: string + active: + type: boolean + shouldStopOnFail: + type: boolean + template: + $ref: '#/components/schemas/MessageTemplate' + filters: + type: array + items: + $ref: '#/components/schemas/StepFilter' + _parentId: + type: object + metadata: + oneOf: + - $ref: '#/components/schemas/DigestRegularMetadata' + - $ref: '#/components/schemas/DigestTimedMetadata' + - $ref: '#/components/schemas/DelayRegularMetadata' + - $ref: '#/components/schemas/DelayScheduledMetadata' + replyCallback: + type: object + variants: + $ref: '#/components/schemas/NotificationStepVariant' + NotificationTriggerVariable: + type: object + properties: + name: + type: string + required: + - name + NotificationTrigger: + type: object + properties: + type: + type: string + enum: + - event + identifier: + type: string + variables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + subscriberVariables: + type: array + items: + $ref: '#/components/schemas/NotificationTriggerVariable' + required: + - type + - identifier + - variables + WorkflowResponse: + type: object + properties: + _id: + type: string + name: + type: string + description: + type: string + active: + type: boolean + draft: + type: boolean + preferenceSettings: + $ref: '#/components/schemas/PreferenceChannels' + critical: + type: boolean + tags: + type: array + items: + type: string + steps: + type: array + items: + $ref: '#/components/schemas/NotificationStep' + _organizationId: + type: string + _creatorId: + type: string + _environmentId: + type: string + triggers: + type: array + items: + $ref: '#/components/schemas/NotificationTrigger' + _notificationGroupId: + type: string + _parentId: + type: string + deleted: + type: boolean + deletedAt: + type: string + deletedBy: + type: string + notificationGroup: + $ref: '#/components/schemas/NotificationGroup' + data: + type: object + workflowIntegrationStatus: + type: object + required: + - name + - description + - active + - draft + - preferenceSettings + - critical + - tags + - steps + - _organizationId + - _creatorId + - _environmentId + - triggers + - _notificationGroupId + - deleted + - deletedAt + - deletedBy + MessageResponseDto: + type: object + properties: + _id: + type: string + _templateId: + type: string + _environmentId: + type: string + _messageTemplateId: + type: string + _organizationId: + type: string + _notificationId: + type: string + _subscriberId: + type: string + subscriber: + $ref: '#/components/schemas/SubscriberResponseDto' + template: + $ref: '#/components/schemas/WorkflowResponse' + templateIdentifier: + type: string + createdAt: + type: string + lastSeenDate: + type: string + lastReadDate: + type: string + content: + oneOf: + - $ref: '#/components/schemas/EmailBlock' + - type: string + transactionId: + type: string + subject: + type: string + channel: + enum: + - in_app + - email + - sms + - chat + - push + type: string + read: + type: boolean + seen: + type: boolean + email: + type: string + phone: + type: string + directWebhookUrl: + type: string + providerId: + type: string + deviceTokens: + type: array + items: + type: string + title: + type: string + cta: + $ref: '#/components/schemas/MessageCTA' + _feedId: + type: object + nullable: true + status: + type: string + enum: + - sent + - error + - warning + errorId: + type: string + errorText: + type: string + payload: + type: object + description: The payload that was used to send the notification trigger + overrides: + type: object + description: Provider specific overrides used when triggering the notification + required: + - _templateId + - _environmentId + - _messageTemplateId + - _organizationId + - _notificationId + - _subscriberId + - createdAt + - content + - transactionId + - channel + - read + - seen + - cta + - status + - errorId + - errorText + - payload + - overrides + MarkMessageActionAsSeenDto: + type: object + properties: + status: + enum: + - pending + - done + type: string + description: Message action status + payload: + type: object + description: Message action payload + required: + - status + DeleteMessageResponseDto: + type: object + properties: + acknowledged: + type: boolean + description: A boolean stating the success of the action + status: + type: string + description: The status enum for the performed action + enum: + - deleted + required: + - acknowledged + - status + CreateTopicResponseDto: + type: object + properties: + _id: + type: string + description: The unique identifier for the Topic created. + key: + type: string + description: >- + User defined custom key and provided by the user that will be an unique identifier for the Topic created. + required: + - key + CreateTopicRequestDto: + type: object + properties: + key: + type: string + description: >- + User defined custom key and provided by the user that will be an unique identifier for the Topic created. + name: + type: string + description: >- + User defined custom name and provided by the user that will name the Topic created. + required: + - key + - name + AddSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be associated to the topic + type: array + items: + type: string + required: + - subscribers + TopicSubscriberDto: + type: object + properties: + _organizationId: + type: string + _environmentId: + type: string + _subscriberId: + type: string + _topicId: + type: string + topicKey: + type: string + externalSubscriberId: + type: string + required: + - _organizationId + - _environmentId + - _subscriberId + - _topicId + - topicKey + - externalSubscriberId + RemoveSubscribersRequestDto: + type: object + properties: + subscribers: + description: List of subscriber identifiers that will be removed to the topic + type: array + items: + type: string + required: + - subscribers + TopicDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + FilterTopicsResponseDto: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/TopicDto' + page: + type: number + pageSize: + type: number + totalCount: + type: number + required: + - data + - page + - pageSize + - totalCount + GetTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicResponseDto: + type: object + properties: + _id: + type: string + _organizationId: + type: string + _environmentId: + type: string + key: + type: string + name: + type: string + subscribers: + type: array + items: + type: string + required: + - _organizationId + - _environmentId + - key + - name + - subscribers + RenameTopicRequestDto: + type: object + properties: + name: + type: string + description: >- + User defined custom name and provided by the user to rename the topic. + required: + - name + GeneratePreviewResponseDto: + type: object + properties: {} + headers: + Content-Type: + required: true + description: The MIME type of the response body. + schema: + type: string + example: application/json + RateLimit-Limit: + required: false + description: >- + The number of requests that the client is permitted to make per second. The actual maximum may differ when burst is enabled. + schema: + type: string + example: '100' + RateLimit-Remaining: + required: false + description: The number of requests remaining until the next window. + schema: + type: string + example: '93' + RateLimit-Reset: + required: false + description: >- + The remaining seconds until a request of the same cost will be refreshed. + schema: + type: string + example: '8' + RateLimit-Policy: + required: false + description: The rate limit policy that was used to evaluate the request. + schema: + type: string + example: >- + 100;w=1;burst=110;comment="token bucket";category="trigger";cost="single" + Retry-After: + required: false + description: >- + The number of seconds after which the client may retry the request that was previously rejected. + schema: + type: string + example: '8' + Idempotency-Key: + required: false + description: The idempotency key used to evaluate the request. + schema: + type: string + example: '8' + Idempotency-Replay: + required: false + description: Whether the request was a replay of a previous request. + schema: + type: string + example: 'true' + Link: + required: false + description: A link to the documentation. + schema: + type: string + example: https://docs.novu.co/ +externalDocs: + description: Novu Documentation + url: https://docs.novu.co +x-speakeasy-name-override: + - operationId: ^.*get.* + methodNameOverride: retrieve + - operationId: ^.*retrieve.* + methodNameOverride: retrieve + - operationId: ^.*create.* + methodNameOverride: create + - operationId: ^.*update.* + methodNameOverride: update + - operationId: ^.*list.* + methodNameOverride: list + - operationId: ^.*delete.* + methodNameOverride: delete + - operationId: ^.*remove.* + methodNameOverride: delete +x-speakeasy-retries: + strategy: backoff + backoff: + initialInterval: 500 + maxInterval: 30000 + maxElapsedTime: 3600000 + exponent: 1.5 + statusCodes: + - '408' + - '409' + - '429' + - 5XX + retryConnectionErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2030e082..4d164662 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,29 +1,29 @@ -speakeasyVersion: 1.399.2 +speakeasyVersion: 1.446.1 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:395eba518bfd3c604bf1fdd5dba5d7b7fd45b266e2e943805083c8bad4771fdd - sourceBlobDigest: sha256:a87a8330164b61538704ebe0d75d9adb307d3cc249d11a835b8cd71be3703570 + sourceRevisionDigest: sha256:c77250e635feb6b1fe84fe653d9d7ce35f58224275ff6ec53f2a7f03612152db + sourceBlobDigest: sha256:bc022fff17ca61a16d6bc4756a4a8be369dd384e1f83297043f6620e0e7b67ce tags: - latest - - main + - "1.0" targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:395eba518bfd3c604bf1fdd5dba5d7b7fd45b266e2e943805083c8bad4771fdd - sourceBlobDigest: sha256:a87a8330164b61538704ebe0d75d9adb307d3cc249d11a835b8cd71be3703570 + sourceRevisionDigest: sha256:c77250e635feb6b1fe84fe653d9d7ce35f58224275ff6ec53f2a7f03612152db + sourceBlobDigest: sha256:bc022fff17ca61a16d6bc4756a4a8be369dd384e1f83297043f6620e0e7b67ce codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:ec9766637494086a4198568b8ec23f28a71e7af7bebc6b0b5b38460ea0edc273 + codeSamplesRevisionDigest: sha256:b67b8d3df54fa78c47a53028b19fe74de57e58dc3e244b962d1f91a7e4f97c56 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: json-development: inputs: - - location: http://api.novu.co/openapi.sdk.json + - location: http://127.0.0.1:3000/openapi.sdk.yaml overlays: - - location: ./sources/cleanup-overlay.yaml + - location: .speakeasy/speakeasy-modifications-overlay.yaml output: sources/json-development.json registry: location: registry.speakeasyapi.dev/novu/novu/json-development diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 7e7d37e1..81de5674 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -3,21 +3,20 @@ speakeasyVersion: latest sources: json-development: inputs: - - location: http://api.novu.co/openapi.sdk.json - # - location: ./sources/openapi.sdk.json + - location: http://127.0.0.1:3000/openapi.sdk.yaml overlays: - - location: ./sources/cleanup-overlay.yaml + - location: .speakeasy/speakeasy-modifications-overlay.yaml + output: sources/json-development.json registry: location: registry.speakeasyapi.dev/novu/novu/json-development - output: sources/json-development.json targets: my-first-target: target: typescript source: json-development + publish: + npm: + token: $npm_token codeSamples: output: sources/code-samples.yaml registry: location: registry.speakeasyapi.dev/novu/novu/code-samples-typescript - publish: - npm: - token: $npm_token diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 24c670de..c9b1a5c4 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -20,7 +20,7 @@ specific category of applications. ```typescript import { NovuCore } from "@novu/api/core.js"; -import { cancel } from "@novu/api/funcs/cancel.js"; +import { trigger } from "@novu/api/funcs/trigger.js"; import { SDKValidationError } from "@novu/api/models/errors/sdkvalidationerror.js"; // Use `NovuCore` for best tree-shaking performance. @@ -30,7 +30,19 @@ const novu = new NovuCore({ }); async function run() { - const res = await cancel(novu, ""); + const res = await trigger(novu, { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); switch (true) { case res.ok: @@ -52,7 +64,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); diff --git a/README.md b/README.md index 97019519..032dfcc7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). ## SDK Example Usage -### Cancel Triggered Event +### Trigger Notification Event ```typescript import { Novu } from "@novu/api"; @@ -83,7 +83,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -93,7 +105,7 @@ run(); ``` -### Trigger Notification Event +### Trigger Notification Events in Bulk ```typescript import { Novu } from "@novu/api"; @@ -103,14 +115,41 @@ const novu = new Novu({ }); async function run() { - const result = await novu.trigger({ - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ + const result = await novu.triggerBulk({ + events: [ { - topicKey: "", - type: "Topic", + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + subscriberId: "", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], }, ], }); @@ -135,7 +174,6 @@ const novu = new Novu({ async function run() { const result = await novu.triggerBroadcast({ name: "", - overrides: {}, payload: {}, }); @@ -147,7 +185,7 @@ run(); ``` -### Trigger Notification Events in Bulk +### Cancel Triggered Event ```typescript import { Novu } from "@novu/api"; @@ -157,9 +195,7 @@ const novu = new Novu({ }); async function run() { - const result = await novu.triggerBulk({ - events: [], - }); + const result = await novu.cancel(""); // Handle the result console.log(result); @@ -176,17 +212,10 @@ run();
Available methods -### [changes](docs/sdks/changes/README.md) - -* [apply](docs/sdks/changes/README.md#apply) - Apply change -* [applyBulk](docs/sdks/changes/README.md#applybulk) - Apply changes -* [count](docs/sdks/changes/README.md#count) - Get changes count -* [retrieve](docs/sdks/changes/README.md#retrieve) - Get changes - ### [environments](docs/sdks/environments/README.md) -* [list](docs/sdks/environments/README.md#list) - Get environments * [retrieve](docs/sdks/environments/README.md#retrieve) - Get current environment +* [list](docs/sdks/environments/README.md#list) - Get environments #### [environments.apiKeys](docs/sdks/apikeys/README.md) @@ -196,39 +225,24 @@ run(); * [retrieve](docs/sdks/executiondetails/README.md#retrieve) - Get execution details -### [feeds](docs/sdks/feeds/README.md) - -* [create](docs/sdks/feeds/README.md#create) - Create feed -* [delete](docs/sdks/feeds/README.md#delete) - Delete feed -* [retrieve](docs/sdks/feeds/README.md#retrieve) - Get feeds - ### [integrations](docs/sdks/integrations/README.md) -* [create](docs/sdks/integrations/README.md#create) - Create integration -* [delete](docs/sdks/integrations/README.md#delete) - Delete integration * [list](docs/sdks/integrations/README.md#list) - Get integrations +* [create](docs/sdks/integrations/README.md#create) - Create integration * [listActive](docs/sdks/integrations/README.md#listactive) - Get active integrations -* [setAsPrimary](docs/sdks/integrations/README.md#setasprimary) - Set integration as primary * [update](docs/sdks/integrations/README.md#update) - Update integration +* [delete](docs/sdks/integrations/README.md#delete) - Delete integration +* [setAsPrimary](docs/sdks/integrations/README.md#setasprimary) - Set integration as primary #### [integrations.webhooks](docs/sdks/webhooks/README.md) * [retrieve](docs/sdks/webhooks/README.md#retrieve) - Get webhook support status for provider -### [layouts](docs/sdks/layouts/README.md) - -* [create](docs/sdks/layouts/README.md#create) - Layout creation -* [delete](docs/sdks/layouts/README.md#delete) - Delete layout -* [list](docs/sdks/layouts/README.md#list) - Filter layouts -* [retrieve](docs/sdks/layouts/README.md#retrieve) - Get layout -* [setAsDefault](docs/sdks/layouts/README.md#setasdefault) - Set default layout -* [update](docs/sdks/layouts/README.md#update) - Update a layout - ### [messages](docs/sdks/messages/README.md) +* [retrieve](docs/sdks/messages/README.md#retrieve) - Get messages * [delete](docs/sdks/messages/README.md#delete) - Delete message * [deleteByTransactionId](docs/sdks/messages/README.md#deletebytransactionid) - Delete messages by transactionId -* [retrieve](docs/sdks/messages/README.md#retrieve) - Get messages ### [notifications](docs/sdks/notifications/README.md) @@ -237,46 +251,40 @@ run(); #### [notifications.stats](docs/sdks/stats/README.md) -* [graph](docs/sdks/stats/README.md#graph) - Get notification graph statistics * [retrieve](docs/sdks/stats/README.md#retrieve) - Get notification statistics +* [graph](docs/sdks/stats/README.md#graph) - Get notification graph statistics ### [Novu SDK](docs/sdks/novu/README.md) -* [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event * [trigger](docs/sdks/novu/README.md#trigger) - Trigger event -* [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all * [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event - -### [organizations](docs/sdks/organizations/README.md) - -* [eeOrganizationControllerRenameOrganization](docs/sdks/organizations/README.md#eeorganizationcontrollerrenameorganization) - Rename organization name -* [retrieve](docs/sdks/organizations/README.md#retrieve) - Fetch current organization details -* [update](docs/sdks/organizations/README.md#update) - Update organization branding details +* [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all +* [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event ### [subscribers](docs/sdks/subscribers/README.md) -* [create](docs/sdks/subscribers/README.md#create) - Create subscriber -* [createBulk](docs/sdks/subscribers/README.md#createbulk) - Bulk create subscribers -* [delete](docs/sdks/subscribers/README.md#delete) - Delete subscriber * [list](docs/sdks/subscribers/README.md#list) - Get subscribers +* [create](docs/sdks/subscribers/README.md#create) - Create subscriber * [retrieve](docs/sdks/subscribers/README.md#retrieve) - Get subscriber * [update](docs/sdks/subscribers/README.md#update) - Update subscriber +* [delete](docs/sdks/subscribers/README.md#delete) - Delete subscriber +* [createBulk](docs/sdks/subscribers/README.md#createbulk) - Bulk create subscribers #### [subscribers.authentication](docs/sdks/authentication/README.md) -* [chatAccessOauth](docs/sdks/authentication/README.md#chataccessoauth) - Handle chat oauth * [chatAccessOauthCallBack](docs/sdks/authentication/README.md#chataccessoauthcallback) - Handle providers oauth redirect +* [chatAccessOauth](docs/sdks/authentication/README.md#chataccessoauth) - Handle chat oauth #### [subscribers.credentials](docs/sdks/credentials/README.md) +* [update](docs/sdks/credentials/README.md#update) - Update subscriber credentials * [append](docs/sdks/credentials/README.md#append) - Modify subscriber credentials * [delete](docs/sdks/credentials/README.md#delete) - Delete subscriber credentials by providerId -* [update](docs/sdks/credentials/README.md#update) - Update subscriber credentials #### [subscribers.messages](docs/sdks/novumessages/README.md) -* [markAll](docs/sdks/novumessages/README.md#markall) - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. * [markAllAs](docs/sdks/novumessages/README.md#markallas) - Mark a subscriber messages as seen, read, unseen or unread +* [markAll](docs/sdks/novumessages/README.md#markall) - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. * [updateAsSeen](docs/sdks/novumessages/README.md#updateasseen) - Mark message action as seen #### [subscribers.notifications](docs/sdks/novunotifications/README.md) @@ -287,59 +295,35 @@ run(); #### [subscribers.preferences](docs/sdks/preferences/README.md) * [list](docs/sdks/preferences/README.md#list) - Get subscriber preferences +* [updateGlobal](docs/sdks/preferences/README.md#updateglobal) - Update subscriber global preferences * [retrieveByLevel](docs/sdks/preferences/README.md#retrievebylevel) - Get subscriber preferences by level * [update](docs/sdks/preferences/README.md#update) - Update subscriber preference -* [updateGlobal](docs/sdks/preferences/README.md#updateglobal) - Update subscriber global preferences #### [subscribers.properties](docs/sdks/properties/README.md) * [updateOnlineFlag](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status -### [tenants](docs/sdks/tenants/README.md) - -* [create](docs/sdks/tenants/README.md#create) - Create tenant -* [delete](docs/sdks/tenants/README.md#delete) - Delete tenant -* [list](docs/sdks/tenants/README.md#list) - Get tenants -* [retrieve](docs/sdks/tenants/README.md#retrieve) - Get tenant -* [update](docs/sdks/tenants/README.md#update) - Update tenant - ### [topics](docs/sdks/topics/README.md) * [create](docs/sdks/topics/README.md#create) - Topic creation -* [delete](docs/sdks/topics/README.md#delete) - Delete topic * [list](docs/sdks/topics/README.md#list) - Filter topics -* [rename](docs/sdks/topics/README.md#rename) - Rename a topic +* [delete](docs/sdks/topics/README.md#delete) - Delete topic * [retrieve](docs/sdks/topics/README.md#retrieve) - Get topic +* [rename](docs/sdks/topics/README.md#rename) - Rename a topic #### [topics.subscribers](docs/sdks/novusubscribers/README.md) * [assign](docs/sdks/novusubscribers/README.md#assign) - Subscribers addition -* [delete](docs/sdks/novusubscribers/README.md#delete) - Subscribers removal * [retrieve](docs/sdks/novusubscribers/README.md#retrieve) - Check topic subscriber +* [delete](docs/sdks/novusubscribers/README.md#delete) - Subscribers removal ### [workflowGroups](docs/sdks/workflowgroups/README.md) * [create](docs/sdks/workflowgroups/README.md#create) - Create workflow group -* [delete](docs/sdks/workflowgroups/README.md#delete) - Delete workflow group * [list](docs/sdks/workflowgroups/README.md#list) - Get workflow groups * [retrieve](docs/sdks/workflowgroups/README.md#retrieve) - Get workflow group * [update](docs/sdks/workflowgroups/README.md#update) - Update workflow group - -### [workflows](docs/sdks/workflows/README.md) - -* [create](docs/sdks/workflows/README.md#create) - Create workflow -* [delete](docs/sdks/workflows/README.md#delete) - Delete workflow -* [list](docs/sdks/workflows/README.md#list) - Get workflows -* [retrieve](docs/sdks/workflows/README.md#retrieve) - Get workflow -* [update](docs/sdks/workflows/README.md#update) - Update workflow - -#### [workflows.status](docs/sdks/status/README.md) - -* [update](docs/sdks/status/README.md#update) - Update workflow status - -#### [workflows.variables](docs/sdks/variables/README.md) - -* [retrieve](docs/sdks/variables/README.md#retrieve) - Get available variables +* [delete](docs/sdks/workflowgroups/README.md#delete) - Delete workflow group
@@ -359,91 +343,62 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions -- [cancel](docs/sdks/novu/README.md#cancel) -- [changesApplyBulk](docs/sdks/changes/README.md#applybulk) -- [changesApply](docs/sdks/changes/README.md#apply) -- [changesCount](docs/sdks/changes/README.md#count) -- [changesRetrieve](docs/sdks/changes/README.md#retrieve) -- [environmentsApiKeysList](docs/sdks/apikeys/README.md#list) -- [environmentsList](docs/sdks/environments/README.md#list) -- [environmentsRetrieve](docs/sdks/environments/README.md#retrieve) -- [executionDetailsRetrieve](docs/sdks/executiondetails/README.md#retrieve) -- [feedsCreate](docs/sdks/feeds/README.md#create) -- [feedsDelete](docs/sdks/feeds/README.md#delete) -- [feedsRetrieve](docs/sdks/feeds/README.md#retrieve) -- [integrationsCreate](docs/sdks/integrations/README.md#create) -- [integrationsDelete](docs/sdks/integrations/README.md#delete) -- [integrationsListActive](docs/sdks/integrations/README.md#listactive) -- [integrationsList](docs/sdks/integrations/README.md#list) -- [integrationsSetAsPrimary](docs/sdks/integrations/README.md#setasprimary) -- [integrationsUpdate](docs/sdks/integrations/README.md#update) -- [integrationsWebhooksRetrieve](docs/sdks/webhooks/README.md#retrieve) -- [layoutsCreate](docs/sdks/layouts/README.md#create) -- [layoutsDelete](docs/sdks/layouts/README.md#delete) -- [layoutsList](docs/sdks/layouts/README.md#list) -- [layoutsRetrieve](docs/sdks/layouts/README.md#retrieve) -- [layoutsSetAsDefault](docs/sdks/layouts/README.md#setasdefault) -- [layoutsUpdate](docs/sdks/layouts/README.md#update) -- [messagesDeleteByTransactionId](docs/sdks/messages/README.md#deletebytransactionid) -- [messagesDelete](docs/sdks/messages/README.md#delete) -- [messagesRetrieve](docs/sdks/messages/README.md#retrieve) -- [notificationsList](docs/sdks/notifications/README.md#list) -- [notificationsRetrieve](docs/sdks/notifications/README.md#retrieve) -- [notificationsStatsGraph](docs/sdks/stats/README.md#graph) -- [notificationsStatsRetrieve](docs/sdks/stats/README.md#retrieve) -- [organizationsEEOrganizationControllerRenameOrganization](docs/sdks/organizations/README.md#eeorganizationcontrollerrenameorganization) -- [organizationsRetrieve](docs/sdks/organizations/README.md#retrieve) -- [organizationsUpdate](docs/sdks/organizations/README.md#update) -- [subscribersAuthenticationChatAccessOauthCallBack](docs/sdks/authentication/README.md#chataccessoauthcallback) -- [subscribersAuthenticationChatAccessOauth](docs/sdks/authentication/README.md#chataccessoauth) -- [subscribersCreateBulk](docs/sdks/subscribers/README.md#createbulk) -- [subscribersCreate](docs/sdks/subscribers/README.md#create) -- [subscribersCredentialsAppend](docs/sdks/credentials/README.md#append) -- [subscribersCredentialsDelete](docs/sdks/credentials/README.md#delete) -- [subscribersCredentialsUpdate](docs/sdks/credentials/README.md#update) -- [subscribersDelete](docs/sdks/subscribers/README.md#delete) -- [subscribersList](docs/sdks/subscribers/README.md#list) -- [subscribersMessagesMarkAllAs](docs/sdks/novumessages/README.md#markallas) -- [subscribersMessagesMarkAll](docs/sdks/novumessages/README.md#markall) -- [subscribersMessagesUpdateAsSeen](docs/sdks/novumessages/README.md#updateasseen) -- [subscribersNotificationsRetrieve](docs/sdks/novunotifications/README.md#retrieve) -- [subscribersNotificationsUnseenCount](docs/sdks/novunotifications/README.md#unseencount) -- [subscribersPreferencesList](docs/sdks/preferences/README.md#list) -- [subscribersPreferencesRetrieveByLevel](docs/sdks/preferences/README.md#retrievebylevel) -- [subscribersPreferencesUpdateGlobal](docs/sdks/preferences/README.md#updateglobal) -- [subscribersPreferencesUpdate](docs/sdks/preferences/README.md#update) -- [subscribersPropertiesUpdateOnlineFlag](docs/sdks/properties/README.md#updateonlineflag) -- [subscribersRetrieve](docs/sdks/subscribers/README.md#retrieve) -- [subscribersUpdate](docs/sdks/subscribers/README.md#update) -- [tenantsCreate](docs/sdks/tenants/README.md#create) -- [tenantsDelete](docs/sdks/tenants/README.md#delete) -- [tenantsList](docs/sdks/tenants/README.md#list) -- [tenantsRetrieve](docs/sdks/tenants/README.md#retrieve) -- [tenantsUpdate](docs/sdks/tenants/README.md#update) -- [topicsCreate](docs/sdks/topics/README.md#create) -- [topicsDelete](docs/sdks/topics/README.md#delete) -- [topicsList](docs/sdks/topics/README.md#list) -- [topicsRename](docs/sdks/topics/README.md#rename) -- [topicsRetrieve](docs/sdks/topics/README.md#retrieve) -- [topicsSubscribersAssign](docs/sdks/novusubscribers/README.md#assign) -- [topicsSubscribersDelete](docs/sdks/novusubscribers/README.md#delete) -- [topicsSubscribersRetrieve](docs/sdks/novusubscribers/README.md#retrieve) -- [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) -- [triggerBulk](docs/sdks/novu/README.md#triggerbulk) -- [trigger](docs/sdks/novu/README.md#trigger) -- [workflowGroupsCreate](docs/sdks/workflowgroups/README.md#create) -- [workflowGroupsDelete](docs/sdks/workflowgroups/README.md#delete) -- [workflowGroupsList](docs/sdks/workflowgroups/README.md#list) -- [workflowGroupsRetrieve](docs/sdks/workflowgroups/README.md#retrieve) -- [workflowGroupsUpdate](docs/sdks/workflowgroups/README.md#update) -- [workflowsCreate](docs/sdks/workflows/README.md#create) -- [workflowsDelete](docs/sdks/workflows/README.md#delete) -- [workflowsList](docs/sdks/workflows/README.md#list) -- [workflowsRetrieve](docs/sdks/workflows/README.md#retrieve) -- [workflowsStatusUpdate](docs/sdks/status/README.md#update) -- [workflowsUpdate](docs/sdks/workflows/README.md#update) -- [workflowsVariablesRetrieve](docs/sdks/variables/README.md#retrieve) - +- [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event +- [`environmentsApiKeysList`](docs/sdks/apikeys/README.md#list) - Get api keys +- [`environmentsList`](docs/sdks/environments/README.md#list) - Get environments +- [`environmentsRetrieve`](docs/sdks/environments/README.md#retrieve) - Get current environment +- [`executionDetailsRetrieve`](docs/sdks/executiondetails/README.md#retrieve) - Get execution details +- [`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 +- [`integrationsListActive`](docs/sdks/integrations/README.md#listactive) - Get active integrations +- [`integrationsSetAsPrimary`](docs/sdks/integrations/README.md#setasprimary) - Set integration as primary +- [`integrationsUpdate`](docs/sdks/integrations/README.md#update) - Update integration +- [`integrationsWebhooksRetrieve`](docs/sdks/webhooks/README.md#retrieve) - Get webhook support status for provider +- [`messagesDelete`](docs/sdks/messages/README.md#delete) - Delete message +- [`messagesDeleteByTransactionId`](docs/sdks/messages/README.md#deletebytransactionid) - Delete messages by transactionId +- [`messagesRetrieve`](docs/sdks/messages/README.md#retrieve) - Get messages +- [`notificationsList`](docs/sdks/notifications/README.md#list) - Get notifications +- [`notificationsRetrieve`](docs/sdks/notifications/README.md#retrieve) - Get notification +- [`notificationsStatsGraph`](docs/sdks/stats/README.md#graph) - Get notification graph statistics +- [`notificationsStatsRetrieve`](docs/sdks/stats/README.md#retrieve) - Get notification statistics +- [`subscribersAuthenticationChatAccessOauth`](docs/sdks/authentication/README.md#chataccessoauth) - Handle chat oauth +- [`subscribersAuthenticationChatAccessOauthCallBack`](docs/sdks/authentication/README.md#chataccessoauthcallback) - Handle providers oauth redirect +- [`subscribersCreate`](docs/sdks/subscribers/README.md#create) - Create subscriber +- [`subscribersCreateBulk`](docs/sdks/subscribers/README.md#createbulk) - Bulk create subscribers +- [`subscribersCredentialsAppend`](docs/sdks/credentials/README.md#append) - Modify subscriber credentials +- [`subscribersCredentialsDelete`](docs/sdks/credentials/README.md#delete) - Delete subscriber credentials by providerId +- [`subscribersCredentialsUpdate`](docs/sdks/credentials/README.md#update) - Update subscriber credentials +- [`subscribersDelete`](docs/sdks/subscribers/README.md#delete) - Delete subscriber +- [`subscribersList`](docs/sdks/subscribers/README.md#list) - Get subscribers +- [`subscribersMessagesMarkAll`](docs/sdks/novumessages/README.md#markall) - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. +- [`subscribersMessagesMarkAllAs`](docs/sdks/novumessages/README.md#markallas) - Mark a subscriber messages as seen, read, unseen or unread +- [`subscribersMessagesUpdateAsSeen`](docs/sdks/novumessages/README.md#updateasseen) - Mark message action as seen +- [`subscribersNotificationsRetrieve`](docs/sdks/novunotifications/README.md#retrieve) - Get in-app notification feed for a particular subscriber +- [`subscribersNotificationsUnseenCount`](docs/sdks/novunotifications/README.md#unseencount) - Get the unseen in-app notifications count for subscribers feed +- [`subscribersPreferencesList`](docs/sdks/preferences/README.md#list) - Get subscriber preferences +- [`subscribersPreferencesRetrieveByLevel`](docs/sdks/preferences/README.md#retrievebylevel) - Get subscriber preferences by level +- [`subscribersPreferencesUpdate`](docs/sdks/preferences/README.md#update) - Update subscriber preference +- [`subscribersPreferencesUpdateGlobal`](docs/sdks/preferences/README.md#updateglobal) - Update subscriber global preferences +- [`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 +- [`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) - Filter topics +- [`topicsRename`](docs/sdks/topics/README.md#rename) - Rename a topic +- [`topicsRetrieve`](docs/sdks/topics/README.md#retrieve) - Get topic +- [`topicsSubscribersAssign`](docs/sdks/novusubscribers/README.md#assign) - Subscribers addition +- [`topicsSubscribersDelete`](docs/sdks/novusubscribers/README.md#delete) - Subscribers removal +- [`topicsSubscribersRetrieve`](docs/sdks/novusubscribers/README.md#retrieve) - Check topic subscriber +- [`trigger`](docs/sdks/novu/README.md#trigger) - Trigger event +- [`triggerBroadcast`](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all +- [`triggerBulk`](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event +- [`workflowGroupsCreate`](docs/sdks/workflowgroups/README.md#create) - Create workflow group +- [`workflowGroupsDelete`](docs/sdks/workflowgroups/README.md#delete) - Delete workflow group +- [`workflowGroupsList`](docs/sdks/workflowgroups/README.md#list) - Get workflow groups +- [`workflowGroupsRetrieve`](docs/sdks/workflowgroups/README.md#retrieve) - Get workflow group +- [`workflowGroupsUpdate`](docs/sdks/workflowgroups/README.md#update) - Update workflow group @@ -484,14 +439,23 @@ run(); ## Error Handling -All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. +All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`. + +If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module: -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| HTTP Client Error | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | +| RequestAbortedError | HTTP request was aborted by the client | +| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | +| ConnectionError | HTTP client was unable to make a request to a server | +| InvalidRequestError | Any input used to create a request is invalid | +| UnexpectedClientError | Unrecognised or unexpected error | -Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. +In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `trigger` method may throw the following errors: +| Error Type | Status Code | Content Type | +| --------------- | ----------- | ------------ | +| errors.SDKError | 4XX, 5XX | \*/\* | ```typescript import { Novu } from "@novu/api"; @@ -504,7 +468,19 @@ const novu = new Novu({ async function run() { let result; try { - result = await novu.cancel(""); + result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -527,6 +503,8 @@ async function run() { run(); ``` + +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. @@ -534,12 +512,14 @@ run(); ### Select Server by Index -You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: +You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | +| --- | ------------------------ | +| 0 | `https://api.novu.co` | +| 1 | `https://eu.api.novu.co` | -| # | Server | Variables | -| - | ------ | --------- | -| 0 | `https://api.novu.co` | None | -| 1 | `https://eu.api.novu.co` | None | +#### Example ```typescript import { Novu } from "@novu/api"; @@ -550,7 +530,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -560,11 +552,9 @@ run(); ``` - ### Override Server URL Per-Client -The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example: - +The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: ```typescript import { Novu } from "@novu/api"; @@ -574,7 +564,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -641,9 +643,9 @@ const sdk = new Novu({ httpClient }); This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| -------- | -------- | -------- | -| `apiKey` | apiKey | API key | +| Name | Type | Scheme | +| -------- | ------ | ------- | +| `apiKey` | apiKey | API key | To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example: ```typescript @@ -654,7 +656,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -679,7 +693,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel("", { + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }, { retries: { strategy: "backoff", backoff: { @@ -719,7 +745,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); diff --git a/USAGE.md b/USAGE.md index 827664bf..a07188eb 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,5 +1,5 @@ -### Cancel Triggered Event +### Trigger Notification Event ```typescript import { Novu } from "@novu/api"; @@ -9,7 +9,19 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); // Handle the result console.log(result); @@ -19,7 +31,7 @@ run(); ``` -### Trigger Notification Event +### Trigger Notification Events in Bulk ```typescript import { Novu } from "@novu/api"; @@ -29,14 +41,41 @@ const novu = new Novu({ }); async function run() { - const result = await novu.trigger({ - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ + const result = await novu.triggerBulk({ + events: [ { - topicKey: "", - type: "Topic", + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + subscriberId: "", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], }, ], }); @@ -61,7 +100,6 @@ const novu = new Novu({ async function run() { const result = await novu.triggerBroadcast({ name: "", - overrides: {}, payload: {}, }); @@ -73,7 +111,7 @@ run(); ``` -### Trigger Notification Events in Bulk +### Cancel Triggered Event ```typescript import { Novu } from "@novu/api"; @@ -83,9 +121,7 @@ const novu = new Novu({ }); async function run() { - const result = await novu.triggerBulk({ - events: [], - }); + const result = await novu.cancel(""); // Handle the result console.log(result); diff --git a/docs/models/components/activitiesresponsedto.md b/docs/models/components/activitiesresponsedto.md index 8e565df5..c4fa33ec 100644 --- a/docs/models/components/activitiesresponsedto.md +++ b/docs/models/components/activitiesresponsedto.md @@ -6,12 +6,12 @@ import { ActivitiesResponseDto } from "@novu/api/models/components"; let value: ActivitiesResponseDto = { + hasMore: false, data: [ "", ], - hasMore: false, - page: 9786.19, - pageSize: 4736.08, + pageSize: 9767.61, + page: 6048.46, }; ``` @@ -19,7 +19,7 @@ let value: ActivitiesResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *string*[] | :heavy_check_mark: | N/A | | `hasMore` | *boolean* | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_check_mark: | N/A | -| `pageSize` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `data` | *string*[] | :heavy_check_mark: | N/A | +| `pageSize` | *number* | :heavy_check_mark: | N/A | +| `page` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/activitygraphstatesresponse.md b/docs/models/components/activitygraphstatesresponse.md index 0f32d1c5..2acbe744 100644 --- a/docs/models/components/activitygraphstatesresponse.md +++ b/docs/models/components/activitygraphstatesresponse.md @@ -7,13 +7,13 @@ import { ActivityGraphStatesResponse } from "@novu/api/models/components"; let value: ActivityGraphStatesResponse = { id: "", - channels: [ - "sms", - ], - count: 5204.78, + count: 2961.40, templates: [ "", ], + channels: [ + "in_app", + ], }; ``` @@ -22,6 +22,6 @@ let value: ActivityGraphStatesResponse = { | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `id` | *string* | :heavy_check_mark: | N/A | -| `channels` | [components.Channels](../../models/components/channels.md)[] | :heavy_check_mark: | N/A | | `count` | *number* | :heavy_check_mark: | N/A | -| `templates` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| `templates` | *string*[] | :heavy_check_mark: | N/A | +| `channels` | [components.Channels](../../models/components/channels.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/activitynotificationresponsedto.md b/docs/models/components/activitynotificationresponsedto.md index dbf0ad4e..65be8f43 100644 --- a/docs/models/components/activitynotificationresponsedto.md +++ b/docs/models/components/activitynotificationresponsedto.md @@ -6,9 +6,9 @@ import { ActivityNotificationResponseDto } from "@novu/api/models/components"; let value: ActivityNotificationResponseDto = { - environmentId: "", - organizationId: "", - transactionId: "", + environmentId: "", + organizationId: "", + transactionId: "", }; ``` @@ -16,12 +16,12 @@ let value: ActivityNotificationResponseDto = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | -| `channels` | [components.ActivityNotificationResponseDtoChannels](../../models/components/activitynotificationresponsedtochannels.md) | :heavy_minus_sign: | N/A | +| `transactionId` | *string* | :heavy_check_mark: | N/A | | `createdAt` | *string* | :heavy_minus_sign: | N/A | -| `jobs` | *string*[] | :heavy_minus_sign: | N/A | +| `channels` | [components.ActivityNotificationResponseDtoChannels](../../models/components/activitynotificationresponsedtochannels.md) | :heavy_minus_sign: | N/A | | `subscriber` | [components.ActivityNotificationSubscriberResponseDto](../../models/components/activitynotificationsubscriberresponsedto.md) | :heavy_minus_sign: | N/A | | `template` | [components.ActivityNotificationTemplateResponseDto](../../models/components/activitynotificationtemplateresponsedto.md) | :heavy_minus_sign: | N/A | -| `transactionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `jobs` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/activitynotificationresponsedtochannels.md b/docs/models/components/activitynotificationresponsedtochannels.md index b14c69e3..452b1139 100644 --- a/docs/models/components/activitynotificationresponsedtochannels.md +++ b/docs/models/components/activitynotificationresponsedtochannels.md @@ -5,7 +5,7 @@ ```typescript import { ActivityNotificationResponseDtoChannels } from "@novu/api/models/components"; -let value: ActivityNotificationResponseDtoChannels = "delay"; +let value: ActivityNotificationResponseDtoChannels = "trigger"; ``` ## Values diff --git a/docs/models/components/activitynotificationsubscriberresponsedto.md b/docs/models/components/activitynotificationsubscriberresponsedto.md index d842710e..f6fb409b 100644 --- a/docs/models/components/activitynotificationsubscriberresponsedto.md +++ b/docs/models/components/activitynotificationsubscriberresponsedto.md @@ -14,8 +14,8 @@ let value: ActivityNotificationSubscriberResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `email` | *string* | :heavy_minus_sign: | N/A | | `firstName` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | | `lastName` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | | `phone` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/activitystatsresponsedto.md b/docs/models/components/activitystatsresponsedto.md index 5638b4aa..46aee20a 100644 --- a/docs/models/components/activitystatsresponsedto.md +++ b/docs/models/components/activitystatsresponsedto.md @@ -6,8 +6,8 @@ import { ActivityStatsResponseDto } from "@novu/api/models/components"; let value: ActivityStatsResponseDto = { - monthlySent: 7805.29, - weeklySent: 6788.8, + weeklySent: 391.88, + monthlySent: 2828.07, }; ``` @@ -15,5 +15,5 @@ let value: ActivityStatsResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `monthlySent` | *number* | :heavy_check_mark: | N/A | -| `weeklySent` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `weeklySent` | *number* | :heavy_check_mark: | N/A | +| `monthlySent` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/actor.md b/docs/models/components/actor.md index 7e6bb009..ea709b08 100644 --- a/docs/models/components/actor.md +++ b/docs/models/components/actor.md @@ -4,27 +4,20 @@ It is used to display the Avatar of the provided actor's subscriber id or actor If a new actor object is provided, we will create a new subscriber in our system -## Example Usage - -```typescript -import { Actor } from "@novu/api/models/components"; - -let value: Actor = { - subscriberId: "", -}; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `components.SubscriberPayloadDto` ```typescript -const value: components.SubscriberPayloadDto = /* values here */ +const value: components.SubscriberPayloadDto = { + subscriberId: "", +}; ``` diff --git a/docs/models/components/apikey.md b/docs/models/components/apikey.md index 1711b1aa..32d8641c 100644 --- a/docs/models/components/apikey.md +++ b/docs/models/components/apikey.md @@ -6,8 +6,8 @@ import { ApiKey } from "@novu/api/models/components"; let value: ApiKey = { - userId: "", key: "", + userId: "", }; ``` @@ -15,5 +15,5 @@ let value: ApiKey = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `userId` | *string* | :heavy_check_mark: | N/A | -| `key` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `key` | *string* | :heavy_check_mark: | N/A | +| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/backoffunit.md b/docs/models/components/backoffunit.md index 797a4899..a7ea32ff 100644 --- a/docs/models/components/backoffunit.md +++ b/docs/models/components/backoffunit.md @@ -5,7 +5,7 @@ ```typescript import { BackoffUnit } from "@novu/api/models/components"; -let value: BackoffUnit = "hours"; +let value: BackoffUnit = "weeks"; ``` ## Values diff --git a/docs/models/components/bulkapplychangedto.md b/docs/models/components/bulkapplychangedto.md deleted file mode 100644 index 6b6ced19..00000000 --- a/docs/models/components/bulkapplychangedto.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkApplyChangeDto - -## Example Usage - -```typescript -import { BulkApplyChangeDto } from "@novu/api/models/components"; - -let value: BulkApplyChangeDto = { - changeIds: [ - "", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `changeIds` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/bulktriggereventdto.md b/docs/models/components/bulktriggereventdto.md index 7df06717..a93c4ac6 100644 --- a/docs/models/components/bulktriggereventdto.md +++ b/docs/models/components/bulktriggereventdto.md @@ -6,7 +6,16 @@ import { BulkTriggerEventDto } from "@novu/api/models/components"; let value: BulkTriggerEventDto = { - events: [], + events: [ + { + name: "workflow_identifier", + payload: {}, + overrides: {}, + to: [ + "SUBSCRIBER_ID", + ], + }, + ], }; ``` diff --git a/docs/models/components/change.md b/docs/models/components/change.md deleted file mode 100644 index 63d57454..00000000 --- a/docs/models/components/change.md +++ /dev/null @@ -1,14 +0,0 @@ -# Change - -## Example Usage - -```typescript -import { Change } from "@novu/api/models/components"; - -let value: Change = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/changeresponsedto.md b/docs/models/components/changeresponsedto.md deleted file mode 100644 index 821a95c0..00000000 --- a/docs/models/components/changeresponsedto.md +++ /dev/null @@ -1,33 +0,0 @@ -# ChangeResponseDto - -## Example Usage - -```typescript -import { ChangeResponseDto } from "@novu/api/models/components"; - -let value: ChangeResponseDto = { - creatorId: "", - entityId: "", - environmentId: "", - organizationId: "", - change: {}, - createdAt: "", - enabled: false, - type: "NotificationTemplate", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `creatorId` | *string* | :heavy_check_mark: | N/A | -| `entityId` | *string* | :heavy_check_mark: | N/A | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_minus_sign: | N/A | -| `change` | [components.Change](../../models/components/change.md) | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `enabled` | *boolean* | :heavy_check_mark: | N/A | -| `type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/changesresponsedto.md b/docs/models/components/changesresponsedto.md deleted file mode 100644 index bfdf6c29..00000000 --- a/docs/models/components/changesresponsedto.md +++ /dev/null @@ -1,25 +0,0 @@ -# ChangesResponseDto - -## Example Usage - -```typescript -import { ChangesResponseDto } from "@novu/api/models/components"; - -let value: ChangesResponseDto = { - data: [ - "", - ], - page: 3843.82, - pageSize: 4375.87, - totalCount: 2975.34, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *string*[] | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_check_mark: | N/A | -| `pageSize` | *number* | :heavy_check_mark: | N/A | -| `totalCount` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeworkflowstatusrequestdto.md b/docs/models/components/changeworkflowstatusrequestdto.md deleted file mode 100644 index e30d73d6..00000000 --- a/docs/models/components/changeworkflowstatusrequestdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChangeWorkflowStatusRequestDto - -## Example Usage - -```typescript -import { ChangeWorkflowStatusRequestDto } from "@novu/api/models/components"; - -let value: ChangeWorkflowStatusRequestDto = { - active: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `active` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/channel.md b/docs/models/components/channel.md index 317e9115..0f6af4c2 100644 --- a/docs/models/components/channel.md +++ b/docs/models/components/channel.md @@ -5,11 +5,11 @@ ```typescript import { Channel } from "@novu/api/models/components"; -let value: Channel = "push"; +let value: Channel = "delay"; ``` ## Values ```typescript -"in_app" | "email" | "sms" | "chat" | "push" +"in_app" | "email" | "sms" | "chat" | "push" | "digest" | "trigger" | "delay" | "custom" ``` \ No newline at end of file diff --git a/docs/models/components/channelcredentials.md b/docs/models/components/channelcredentials.md index 69f27e90..a4462dc6 100644 --- a/docs/models/components/channelcredentials.md +++ b/docs/models/components/channelcredentials.md @@ -6,7 +6,7 @@ import { ChannelCredentials } from "@novu/api/models/components"; let value: ChannelCredentials = { - webhookUrl: "", + webhookUrl: "https://finished-receptor.org", }; ``` @@ -14,11 +14,11 @@ let value: ChannelCredentials = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `alertUid` | *string* | :heavy_minus_sign: | alert_uid for grafana on-call webhook payload | +| `webhookUrl` | *string* | :heavy_check_mark: | Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. | | `channel` | *string* | :heavy_minus_sign: | Channel specification for Mattermost chat notifications | | `deviceTokens` | *string*[] | :heavy_minus_sign: | Contains an array of the subscriber device tokens for a given provider. Used on Push integrations | -| `externalUrl` | *string* | :heavy_minus_sign: | link_to_upstream_details property fo grafana on call webhook | +| `alertUid` | *string* | :heavy_minus_sign: | alert_uid for grafana on-call webhook payload | +| `title` | *string* | :heavy_minus_sign: | title to be used with grafana on call webhook | | `imageUrl` | *string* | :heavy_minus_sign: | image_url property fo grafana on call webhook | | `state` | *string* | :heavy_minus_sign: | state property fo grafana on call webhook | -| `title` | *string* | :heavy_minus_sign: | title to be used with grafana on call webhook | -| `webhookUrl` | *string* | :heavy_check_mark: | Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. | \ No newline at end of file +| `externalUrl` | *string* | :heavy_minus_sign: | link_to_upstream_details property fo grafana on call webhook | \ No newline at end of file diff --git a/docs/models/components/channelpreference.md b/docs/models/components/channelpreference.md index 35f6985c..ddd3acb6 100644 --- a/docs/models/components/channelpreference.md +++ b/docs/models/components/channelpreference.md @@ -6,8 +6,8 @@ import { ChannelPreference } from "@novu/api/models/components"; let value: ChannelPreference = { + type: "push", enabled: false, - type: "chat", }; ``` @@ -15,5 +15,5 @@ let value: ChannelPreference = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `enabled` | *boolean* | :heavy_check_mark: | If channel is enabled or not | -| `type` | [components.ChannelPreferenceType](../../models/components/channelpreferencetype.md) | :heavy_check_mark: | The type of channel that is enabled or not | \ No newline at end of file +| `type` | [components.ChannelPreferenceType](../../models/components/channelpreferencetype.md) | :heavy_check_mark: | The type of channel that is enabled or not | +| `enabled` | *boolean* | :heavy_check_mark: | If channel is enabled or not | \ No newline at end of file diff --git a/docs/models/components/channelpreferencetype.md b/docs/models/components/channelpreferencetype.md index 47790754..3fe32c71 100644 --- a/docs/models/components/channelpreferencetype.md +++ b/docs/models/components/channelpreferencetype.md @@ -7,7 +7,7 @@ The type of channel that is enabled or not ```typescript import { ChannelPreferenceType } from "@novu/api/models/components"; -let value: ChannelPreferenceType = "email"; +let value: ChannelPreferenceType = "sms"; ``` ## Values diff --git a/docs/models/components/channels.md b/docs/models/components/channels.md index 37b84013..921dc283 100644 --- a/docs/models/components/channels.md +++ b/docs/models/components/channels.md @@ -5,7 +5,7 @@ ```typescript import { Channels } from "@novu/api/models/components"; -let value: Channels = "push"; +let value: Channels = "in_app"; ``` ## Values diff --git a/docs/models/components/channelsettings.md b/docs/models/components/channelsettings.md index 7a44047d..ec7684c0 100644 --- a/docs/models/components/channelsettings.md +++ b/docs/models/components/channelsettings.md @@ -6,11 +6,11 @@ import { ChannelSettings } from "@novu/api/models/components"; let value: ChannelSettings = { - integrationId: "", + providerId: "mattermost", credentials: { - webhookUrl: "", + webhookUrl: "https://ajar-solvency.com", }, - providerId: 1433.53, + integrationId: "", }; ``` @@ -18,7 +18,7 @@ let value: ChannelSettings = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `integrationId` | *string* | :heavy_check_mark: | Id of the integration that is used for this channel | -| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | +| `providerId` | [components.ProviderId](../../models/components/providerid.md) | :heavy_check_mark: | The provider identifier for the credentials | | `integrationIdentifier` | *string* | :heavy_minus_sign: | The integration identifier | -| `providerId` | *number* | :heavy_check_mark: | The provider identifier for the credentials | \ No newline at end of file +| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | +| `integrationId` | *string* | :heavy_check_mark: | Id of the integration that is used for this channel | \ No newline at end of file diff --git a/docs/models/components/content.md b/docs/models/components/content.md index 68c3b013..1f27e6d7 100644 --- a/docs/models/components/content.md +++ b/docs/models/components/content.md @@ -1,24 +1,20 @@ # Content -## Example Usage - -```typescript -import { Content } from "@novu/api/models/components"; - -let value: Content = ""; -``` ## Supported Types ### `components.EmailBlock` ```typescript -const value: components.EmailBlock = /* values here */ +const value: components.EmailBlock = { + type: "text", + content: "", +}; ``` ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` diff --git a/docs/models/components/createfeedrequestdto.md b/docs/models/components/createfeedrequestdto.md deleted file mode 100644 index 5b278ef4..00000000 --- a/docs/models/components/createfeedrequestdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateFeedRequestDto - -## Example Usage - -```typescript -import { CreateFeedRequestDto } from "@novu/api/models/components"; - -let value: CreateFeedRequestDto = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createintegrationrequestdto.md b/docs/models/components/createintegrationrequestdto.md index 3652982a..65b94eb8 100644 --- a/docs/models/components/createintegrationrequestdto.md +++ b/docs/models/components/createintegrationrequestdto.md @@ -6,21 +6,21 @@ import { CreateIntegrationRequestDto } from "@novu/api/models/components"; let value: CreateIntegrationRequestDto = { - channel: "push", - providerId: "", + providerId: "", + channel: "chat", }; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_minus_sign: | N/A | -| `active` | *boolean* | :heavy_minus_sign: | If the integration is active the validation on the credentials field will run | -| `channel` | [components.Channel](../../models/components/channel.md) | :heavy_check_mark: | N/A | -| `check` | *boolean* | :heavy_minus_sign: | N/A | -| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | -| `credentials` | [components.CredentialsDto](../../models/components/credentialsdto.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `providerId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | +| `environmentId` | *string* | :heavy_minus_sign: | N/A | +| `providerId` | *string* | :heavy_check_mark: | N/A | +| `channel` | [components.CreateIntegrationRequestDtoChannel](../../models/components/createintegrationrequestdtochannel.md) | :heavy_check_mark: | N/A | +| `credentials` | [components.CredentialsDto](../../models/components/credentialsdto.md) | :heavy_minus_sign: | N/A | +| `active` | *boolean* | :heavy_minus_sign: | If the integration is active the validation on the credentials field will run | +| `check` | *boolean* | :heavy_minus_sign: | N/A | +| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createintegrationrequestdtochannel.md b/docs/models/components/createintegrationrequestdtochannel.md new file mode 100644 index 00000000..c908a7b9 --- /dev/null +++ b/docs/models/components/createintegrationrequestdtochannel.md @@ -0,0 +1,15 @@ +# CreateIntegrationRequestDtoChannel + +## Example Usage + +```typescript +import { CreateIntegrationRequestDtoChannel } from "@novu/api/models/components"; + +let value: CreateIntegrationRequestDtoChannel = "in_app"; +``` + +## Values + +```typescript +"in_app" | "email" | "sms" | "chat" | "push" +``` \ No newline at end of file diff --git a/docs/models/components/createlayoutresponsedto.md b/docs/models/components/createlayoutresponsedto.md deleted file mode 100644 index 4ac7fb63..00000000 --- a/docs/models/components/createlayoutresponsedto.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateLayoutResponseDto - -## Example Usage - -```typescript -import { CreateLayoutResponseDto } from "@novu/api/models/components"; - -let value: CreateLayoutResponseDto = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier for the Layout created. | \ No newline at end of file diff --git a/docs/models/components/createsubscriberrequestdto.md b/docs/models/components/createsubscriberrequestdto.md index 169be995..3af75e08 100644 --- a/docs/models/components/createsubscriberrequestdto.md +++ b/docs/models/components/createsubscriberrequestdto.md @@ -6,7 +6,7 @@ import { CreateSubscriberRequestDto } from "@novu/api/models/components"; let value: CreateSubscriberRequestDto = { - subscriberId: "", + subscriberId: "", }; ``` @@ -14,12 +14,12 @@ let value: CreateSubscriberRequestDto = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | -| `channels` | *string*[] | :heavy_minus_sign: | N/A | -| `data` | [components.Data](../../models/components/data.md) | :heavy_minus_sign: | N/A | +| `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | | `email` | *string* | :heavy_minus_sign: | N/A | | `firstName` | *string* | :heavy_minus_sign: | N/A | | `lastName` | *string* | :heavy_minus_sign: | N/A | -| `locale` | *string* | :heavy_minus_sign: | N/A | | `phone` | *string* | :heavy_minus_sign: | N/A | -| `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | \ No newline at end of file +| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | +| `locale` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.CreateSubscriberRequestDtoData](../../models/components/createsubscriberrequestdtodata.md) | :heavy_minus_sign: | N/A | +| `channels` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createtenantrequestdtodata.md b/docs/models/components/createsubscriberrequestdtodata.md similarity index 50% rename from docs/models/components/createtenantrequestdtodata.md rename to docs/models/components/createsubscriberrequestdtodata.md index 031368cd..f0b620c2 100644 --- a/docs/models/components/createtenantrequestdtodata.md +++ b/docs/models/components/createsubscriberrequestdtodata.md @@ -1,11 +1,11 @@ -# CreateTenantRequestDtoData +# CreateSubscriberRequestDtoData ## Example Usage ```typescript -import { CreateTenantRequestDtoData } from "@novu/api/models/components"; +import { CreateSubscriberRequestDtoData } from "@novu/api/models/components"; -let value: CreateTenantRequestDtoData = {}; +let value: CreateSubscriberRequestDtoData = {}; ``` ## Fields diff --git a/docs/models/components/createtenantrequestdto.md b/docs/models/components/createtenantrequestdto.md deleted file mode 100644 index 046af22c..00000000 --- a/docs/models/components/createtenantrequestdto.md +++ /dev/null @@ -1,20 +0,0 @@ -# CreateTenantRequestDto - -## Example Usage - -```typescript -import { CreateTenantRequestDto } from "@novu/api/models/components"; - -let value: CreateTenantRequestDto = { - identifier: "", - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [components.CreateTenantRequestDtoData](../../models/components/createtenantrequestdtodata.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createtenantresponsedto.md b/docs/models/components/createtenantresponsedto.md deleted file mode 100644 index 64f852cc..00000000 --- a/docs/models/components/createtenantresponsedto.md +++ /dev/null @@ -1,27 +0,0 @@ -# CreateTenantResponseDto - -## Example Usage - -```typescript -import { CreateTenantResponseDto } from "@novu/api/models/components"; - -let value: CreateTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `data` | [components.CreateTenantResponseDtoData](../../models/components/createtenantresponsedtodata.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createtenantresponsedtodata.md b/docs/models/components/createtenantresponsedtodata.md deleted file mode 100644 index 045f176f..00000000 --- a/docs/models/components/createtenantresponsedtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateTenantResponseDtoData - -## Example Usage - -```typescript -import { CreateTenantResponseDtoData } from "@novu/api/models/components"; - -let value: CreateTenantResponseDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/createworkflowrequestdto.md b/docs/models/components/createworkflowrequestdto.md deleted file mode 100644 index 04129fba..00000000 --- a/docs/models/components/createworkflowrequestdto.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateWorkflowRequestDto - -## Example Usage - -```typescript -import { CreateWorkflowRequestDto } from "@novu/api/models/components"; - -let value: CreateWorkflowRequestDto = { - name: "", - notificationGroupId: "", - steps: [], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `active` | *boolean* | :heavy_minus_sign: | N/A | -| `blueprintId` | *string* | :heavy_minus_sign: | N/A | -| `critical` | *boolean* | :heavy_minus_sign: | N/A | -| `data` | [components.CreateWorkflowRequestDtoData](../../models/components/createworkflowrequestdtodata.md) | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| ~~`draft`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | -| `name` | *string* | :heavy_check_mark: | N/A | -| `notificationGroup` | [components.CreateWorkflowRequestDtoNotificationGroup](../../models/components/createworkflowrequestdtonotificationgroup.md) | :heavy_minus_sign: | N/A | -| `notificationGroupId` | *string* | :heavy_check_mark: | N/A | -| `preferenceSettings` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_minus_sign: | N/A | -| `steps` | [components.NotificationStep](../../models/components/notificationstep.md)[] | :heavy_check_mark: | N/A | -| `tags` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createworkflowrequestdtodata.md b/docs/models/components/createworkflowrequestdtodata.md deleted file mode 100644 index 63865de6..00000000 --- a/docs/models/components/createworkflowrequestdtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateWorkflowRequestDtoData - -## Example Usage - -```typescript -import { CreateWorkflowRequestDtoData } from "@novu/api/models/components"; - -let value: CreateWorkflowRequestDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/createworkflowrequestdtonotificationgroup.md b/docs/models/components/createworkflowrequestdtonotificationgroup.md deleted file mode 100644 index 50bd4b8c..00000000 --- a/docs/models/components/createworkflowrequestdtonotificationgroup.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateWorkflowRequestDtoNotificationGroup - -## Example Usage - -```typescript -import { CreateWorkflowRequestDtoNotificationGroup } from "@novu/api/models/components"; - -let value: CreateWorkflowRequestDtoNotificationGroup = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/credentialsdto.md b/docs/models/components/credentialsdto.md index 15d93e79..3a905cac 100644 --- a/docs/models/components/credentialsdto.md +++ b/docs/models/components/credentialsdto.md @@ -12,45 +12,45 @@ let value: CredentialsDto = {}; | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `accessKey` | *string* | :heavy_minus_sign: | N/A | -| `accountSid` | *string* | :heavy_minus_sign: | N/A | -| `alertUid` | *string* | :heavy_minus_sign: | N/A | | `apiKey` | *string* | :heavy_minus_sign: | N/A | -| `apiKeyRequestHeader` | *string* | :heavy_minus_sign: | N/A | -| `apiToken` | *string* | :heavy_minus_sign: | N/A | -| `applicationId` | *string* | :heavy_minus_sign: | N/A | -| `authenticateByToken` | *boolean* | :heavy_minus_sign: | N/A | -| `authenticationTokenKey` | *string* | :heavy_minus_sign: | N/A | -| `baseUrl` | *string* | :heavy_minus_sign: | N/A | -| `channelId` | *string* | :heavy_minus_sign: | N/A | -| `clientId` | *string* | :heavy_minus_sign: | N/A | -| `datePath` | *string* | :heavy_minus_sign: | N/A | +| `user` | *string* | :heavy_minus_sign: | N/A | +| `secretKey` | *string* | :heavy_minus_sign: | N/A | | `domain` | *string* | :heavy_minus_sign: | N/A | -| `externalLink` | *string* | :heavy_minus_sign: | N/A | -| `from` | *string* | :heavy_minus_sign: | N/A | -| `hmac` | *boolean* | :heavy_minus_sign: | N/A | -| `host` | *string* | :heavy_minus_sign: | N/A | -| `idPath` | *string* | :heavy_minus_sign: | N/A | -| `ignoreTls` | *boolean* | :heavy_minus_sign: | N/A | -| `imageUrl` | *string* | :heavy_minus_sign: | N/A | -| `instanceId` | *string* | :heavy_minus_sign: | N/A | -| `ipPoolName` | *string* | :heavy_minus_sign: | N/A | -| `messageProfileId` | *string* | :heavy_minus_sign: | N/A | | `password` | *string* | :heavy_minus_sign: | N/A | -| `phoneNumberIdentification` | *string* | :heavy_minus_sign: | N/A | +| `host` | *string* | :heavy_minus_sign: | N/A | | `port` | *string* | :heavy_minus_sign: | N/A | -| `projectName` | *string* | :heavy_minus_sign: | N/A | -| `redirectUrl` | *string* | :heavy_minus_sign: | N/A | -| `region` | *string* | :heavy_minus_sign: | N/A | -| `requireTls` | *boolean* | :heavy_minus_sign: | N/A | -| `secretKey` | *string* | :heavy_minus_sign: | N/A | -| `secretKeyRequestHeader` | *string* | :heavy_minus_sign: | N/A | | `secure` | *boolean* | :heavy_minus_sign: | N/A | +| `region` | *string* | :heavy_minus_sign: | N/A | +| `accountSid` | *string* | :heavy_minus_sign: | N/A | +| `messageProfileId` | *string* | :heavy_minus_sign: | N/A | +| `token` | *string* | :heavy_minus_sign: | N/A | +| `from` | *string* | :heavy_minus_sign: | N/A | | `senderName` | *string* | :heavy_minus_sign: | N/A | +| `projectName` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `clientId` | *string* | :heavy_minus_sign: | N/A | +| `requireTls` | *boolean* | :heavy_minus_sign: | N/A | +| `ignoreTls` | *boolean* | :heavy_minus_sign: | N/A | +| `tlsOptions` | [components.TlsOptions](../../models/components/tlsoptions.md) | :heavy_minus_sign: | N/A | +| `baseUrl` | *string* | :heavy_minus_sign: | N/A | +| `webhookUrl` | *string* | :heavy_minus_sign: | N/A | +| `redirectUrl` | *string* | :heavy_minus_sign: | N/A | +| `hmac` | *boolean* | :heavy_minus_sign: | N/A | | `serviceAccount` | *string* | :heavy_minus_sign: | N/A | -| `state` | *string* | :heavy_minus_sign: | N/A | +| `ipPoolName` | *string* | :heavy_minus_sign: | N/A | +| `apiKeyRequestHeader` | *string* | :heavy_minus_sign: | N/A | +| `secretKeyRequestHeader` | *string* | :heavy_minus_sign: | N/A | +| `idPath` | *string* | :heavy_minus_sign: | N/A | +| `datePath` | *string* | :heavy_minus_sign: | N/A | +| `apiToken` | *string* | :heavy_minus_sign: | N/A | +| `authenticateByToken` | *boolean* | :heavy_minus_sign: | N/A | +| `authenticationTokenKey` | *string* | :heavy_minus_sign: | N/A | +| `instanceId` | *string* | :heavy_minus_sign: | N/A | +| `alertUid` | *string* | :heavy_minus_sign: | N/A | | `title` | *string* | :heavy_minus_sign: | N/A | -| `tlsOptions` | [components.TlsOptions](../../models/components/tlsoptions.md) | :heavy_minus_sign: | N/A | -| `token` | *string* | :heavy_minus_sign: | N/A | -| `user` | *string* | :heavy_minus_sign: | N/A | -| `webhookUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `imageUrl` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `externalLink` | *string* | :heavy_minus_sign: | N/A | +| `channelId` | *string* | :heavy_minus_sign: | N/A | +| `phoneNumberIdentification` | *string* | :heavy_minus_sign: | N/A | +| `accessKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/datanumberdto.md b/docs/models/components/datanumberdto.md deleted file mode 100644 index ca2e5cd0..00000000 --- a/docs/models/components/datanumberdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# DataNumberDto - -## Example Usage - -```typescript -import { DataNumberDto } from "@novu/api/models/components"; - -let value: DataNumberDto = { - data: 6458.94, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/delayregularmetadata.md b/docs/models/components/delayregularmetadata.md index 6b465e75..152d6ccf 100644 --- a/docs/models/components/delayregularmetadata.md +++ b/docs/models/components/delayregularmetadata.md @@ -15,5 +15,5 @@ let value: DelayRegularMetadata = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `amount` | *number* | :heavy_minus_sign: | N/A | -| `type` | [components.DelayRegularMetadataType](../../models/components/delayregularmetadatatype.md) | :heavy_check_mark: | N/A | -| `unit` | [components.Unit](../../models/components/unit.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `unit` | [components.DelayRegularMetadataUnit](../../models/components/delayregularmetadataunit.md) | :heavy_minus_sign: | N/A | +| `type` | [components.DelayRegularMetadataType](../../models/components/delayregularmetadatatype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/delayregularmetadataunit.md b/docs/models/components/delayregularmetadataunit.md new file mode 100644 index 00000000..579f0e83 --- /dev/null +++ b/docs/models/components/delayregularmetadataunit.md @@ -0,0 +1,15 @@ +# DelayRegularMetadataUnit + +## Example Usage + +```typescript +import { DelayRegularMetadataUnit } from "@novu/api/models/components"; + +let value: DelayRegularMetadataUnit = "hours"; +``` + +## Values + +```typescript +"seconds" | "minutes" | "hours" | "days" | "weeks" | "months" +``` \ No newline at end of file diff --git a/docs/models/components/delayscheduledmetadata.md b/docs/models/components/delayscheduledmetadata.md index c66808b0..cc5d6fdf 100644 --- a/docs/models/components/delayscheduledmetadata.md +++ b/docs/models/components/delayscheduledmetadata.md @@ -6,8 +6,8 @@ import { DelayScheduledMetadata } from "@novu/api/models/components"; let value: DelayScheduledMetadata = { - delayPath: "", type: "scheduled", + delayPath: "", }; ``` @@ -15,5 +15,5 @@ let value: DelayScheduledMetadata = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `delayPath` | *string* | :heavy_check_mark: | N/A | -| `type` | [components.DelayScheduledMetadataType](../../models/components/delayscheduledmetadatatype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | [components.DelayScheduledMetadataType](../../models/components/delayscheduledmetadatatype.md) | :heavy_check_mark: | N/A | +| `delayPath` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/deletemessageresponsedto.md b/docs/models/components/deletemessageresponsedto.md index be84162e..2942b551 100644 --- a/docs/models/components/deletemessageresponsedto.md +++ b/docs/models/components/deletemessageresponsedto.md @@ -13,7 +13,7 @@ let value: DeleteMessageResponseDto = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `acknowledged` | *boolean* | :heavy_check_mark: | A boolean stating the success of the action | -| `status` | [components.Status](../../models/components/status.md) | :heavy_check_mark: | The status enum for the performed action | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `acknowledged` | *boolean* | :heavy_check_mark: | A boolean stating the success of the action | +| `status` | [components.DeleteMessageResponseDtoStatus](../../models/components/deletemessageresponsedtostatus.md) | :heavy_check_mark: | The status enum for the performed action | \ No newline at end of file diff --git a/docs/models/components/deletemessageresponsedtostatus.md b/docs/models/components/deletemessageresponsedtostatus.md new file mode 100644 index 00000000..60cab91b --- /dev/null +++ b/docs/models/components/deletemessageresponsedtostatus.md @@ -0,0 +1,17 @@ +# DeleteMessageResponseDtoStatus + +The status enum for the performed action + +## Example Usage + +```typescript +import { DeleteMessageResponseDtoStatus } from "@novu/api/models/components"; + +let value: DeleteMessageResponseDtoStatus = "deleted"; +``` + +## Values + +```typescript +"deleted" +``` \ No newline at end of file diff --git a/docs/models/components/digestregularmetadata.md b/docs/models/components/digestregularmetadata.md index 33d02c99..b667be64 100644 --- a/docs/models/components/digestregularmetadata.md +++ b/docs/models/components/digestregularmetadata.md @@ -6,7 +6,7 @@ import { DigestRegularMetadata } from "@novu/api/models/components"; let value: DigestRegularMetadata = { - type: "backoff", + type: "regular", }; ``` @@ -15,10 +15,10 @@ let value: DigestRegularMetadata = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `amount` | *number* | :heavy_minus_sign: | N/A | +| `unit` | [components.Unit](../../models/components/unit.md) | :heavy_minus_sign: | N/A | +| `digestKey` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.DigestRegularMetadataType](../../models/components/digestregularmetadatatype.md) | :heavy_check_mark: | N/A | | `backoff` | *boolean* | :heavy_minus_sign: | N/A | | `backoffAmount` | *number* | :heavy_minus_sign: | N/A | | `backoffUnit` | [components.BackoffUnit](../../models/components/backoffunit.md) | :heavy_minus_sign: | N/A | -| `digestKey` | *string* | :heavy_minus_sign: | N/A | -| `type` | [components.DigestRegularMetadataType](../../models/components/digestregularmetadatatype.md) | :heavy_check_mark: | N/A | -| `unit` | [components.DigestRegularMetadataUnit](../../models/components/digestregularmetadataunit.md) | :heavy_minus_sign: | N/A | | `updateMode` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/digestregularmetadataunit.md b/docs/models/components/digestregularmetadataunit.md deleted file mode 100644 index f0387535..00000000 --- a/docs/models/components/digestregularmetadataunit.md +++ /dev/null @@ -1,15 +0,0 @@ -# DigestRegularMetadataUnit - -## Example Usage - -```typescript -import { DigestRegularMetadataUnit } from "@novu/api/models/components"; - -let value: DigestRegularMetadataUnit = "months"; -``` - -## Values - -```typescript -"seconds" | "minutes" | "hours" | "days" | "weeks" | "months" -``` \ No newline at end of file diff --git a/docs/models/components/digesttimedmetadata.md b/docs/models/components/digesttimedmetadata.md index 8de2266e..c45fc8d6 100644 --- a/docs/models/components/digesttimedmetadata.md +++ b/docs/models/components/digesttimedmetadata.md @@ -15,7 +15,7 @@ let value: DigestTimedMetadata = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `amount` | *number* | :heavy_minus_sign: | N/A | +| `unit` | [components.DigestTimedMetadataUnit](../../models/components/digesttimedmetadataunit.md) | :heavy_minus_sign: | N/A | | `digestKey` | *string* | :heavy_minus_sign: | N/A | -| `timed` | [components.TimedConfig](../../models/components/timedconfig.md) | :heavy_minus_sign: | N/A | | `type` | [components.DigestTimedMetadataType](../../models/components/digesttimedmetadatatype.md) | :heavy_check_mark: | N/A | -| `unit` | [components.DigestTimedMetadataUnit](../../models/components/digesttimedmetadataunit.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `timed` | [components.TimedConfig](../../models/components/timedconfig.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/direction.md b/docs/models/components/direction.md deleted file mode 100644 index 624b7435..00000000 --- a/docs/models/components/direction.md +++ /dev/null @@ -1,15 +0,0 @@ -# Direction - -## Example Usage - -```typescript -import { Direction } from "@novu/api/models/components"; - -let value: Direction = "trl"; -``` - -## Values - -```typescript -"ltr" | "trl" -``` \ No newline at end of file diff --git a/docs/models/components/emailblock.md b/docs/models/components/emailblock.md index da8b172a..885e482c 100644 --- a/docs/models/components/emailblock.md +++ b/docs/models/components/emailblock.md @@ -6,8 +6,8 @@ import { EmailBlock } from "@novu/api/models/components"; let value: EmailBlock = { + type: "button", content: "", - type: "text", }; ``` @@ -15,7 +15,7 @@ let value: EmailBlock = { | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `content` | *string* | :heavy_check_mark: | N/A | -| `styles` | [components.EmailBlockStyles](../../models/components/emailblockstyles.md) | :heavy_minus_sign: | N/A | | `type` | [components.EmailBlockType](../../models/components/emailblocktype.md) | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `content` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_minus_sign: | N/A | +| `styles` | [components.EmailBlockStyles](../../models/components/emailblockstyles.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/environmentresponsedto.md b/docs/models/components/environmentresponsedto.md index 9cde3edf..c9b4473d 100644 --- a/docs/models/components/environmentresponsedto.md +++ b/docs/models/components/environmentresponsedto.md @@ -6,10 +6,10 @@ import { EnvironmentResponseDto } from "@novu/api/models/components"; let value: EnvironmentResponseDto = { - organizationId: "", - parentId: "", - identifier: "", name: "", + organizationId: "", + identifier: "", + parentId: "", }; ``` @@ -18,8 +18,9 @@ let value: EnvironmentResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_check_mark: | N/A | -| `apiKeys` | *string*[] | :heavy_minus_sign: | N/A | | `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `apiKeys` | *string*[] | :heavy_minus_sign: | N/A | +| `parentId` | *string* | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/executiondetailsresponsedto.md b/docs/models/components/executiondetailsresponsedto.md index b12ad80d..62471cb7 100644 --- a/docs/models/components/executiondetailsresponsedto.md +++ b/docs/models/components/executiondetailsresponsedto.md @@ -6,40 +6,40 @@ import { ExecutionDetailsResponseDto } from "@novu/api/models/components"; let value: ExecutionDetailsResponseDto = { - environmentId: "", - jobId: "", - notificationId: "", - notificationTemplateId: "", - organizationId: "", - subscriberId: "", - channel: "sms", + organizationId: "", + jobId: "", + environmentId: "", + notificationId: "", + notificationTemplateId: "", + subscriberId: "", + transactionId: "", + channel: "in_app", detail: "", - isRetry: false, - isTest: false, - source: "Internal", + source: "Webhook", status: "Failed", - transactionId: "", + isTest: false, + isRetry: false, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `jobId` | *string* | :heavy_check_mark: | N/A | -| `messageId` | *string* | :heavy_minus_sign: | N/A | -| `notificationId` | *string* | :heavy_check_mark: | N/A | -| `notificationTemplateId` | *string* | :heavy_check_mark: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `channel` | [components.ExecutionDetailsResponseDtoChannel](../../models/components/executiondetailsresponsedtochannel.md) | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_minus_sign: | N/A | -| `detail` | *string* | :heavy_check_mark: | N/A | -| `isRetry` | *boolean* | :heavy_check_mark: | N/A | -| `isTest` | *boolean* | :heavy_check_mark: | N/A | -| `providerId` | *string* | :heavy_minus_sign: | N/A | -| `source` | [components.Source](../../models/components/source.md) | :heavy_check_mark: | N/A | -| `status` | [components.ExecutionDetailsResponseDtoStatus](../../models/components/executiondetailsresponsedtostatus.md) | :heavy_check_mark: | N/A | -| `transactionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `organizationId` | *string* | :heavy_check_mark: | N/A | +| `jobId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `notificationTemplateId` | *string* | :heavy_check_mark: | N/A | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `messageId` | *string* | :heavy_minus_sign: | N/A | +| `providerId` | *string* | :heavy_minus_sign: | N/A | +| `transactionId` | *string* | :heavy_check_mark: | N/A | +| `channel` | [components.Channel](../../models/components/channel.md) | :heavy_check_mark: | N/A | +| `detail` | *string* | :heavy_check_mark: | N/A | +| `source` | [components.Source](../../models/components/source.md) | :heavy_check_mark: | N/A | +| `status` | [components.Status](../../models/components/status.md) | :heavy_check_mark: | N/A | +| `isTest` | *boolean* | :heavy_check_mark: | N/A | +| `isRetry` | *boolean* | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/executiondetailsresponsedtochannel.md b/docs/models/components/executiondetailsresponsedtochannel.md deleted file mode 100644 index aa40f980..00000000 --- a/docs/models/components/executiondetailsresponsedtochannel.md +++ /dev/null @@ -1,15 +0,0 @@ -# ExecutionDetailsResponseDtoChannel - -## Example Usage - -```typescript -import { ExecutionDetailsResponseDtoChannel } from "@novu/api/models/components"; - -let value: ExecutionDetailsResponseDtoChannel = "custom"; -``` - -## Values - -```typescript -"in_app" | "email" | "sms" | "chat" | "push" | "digest" | "trigger" | "delay" | "custom" -``` \ No newline at end of file diff --git a/docs/models/components/executiondetailsresponsedtostatus.md b/docs/models/components/executiondetailsresponsedtostatus.md deleted file mode 100644 index 169e8d8a..00000000 --- a/docs/models/components/executiondetailsresponsedtostatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# ExecutionDetailsResponseDtoStatus - -## Example Usage - -```typescript -import { ExecutionDetailsResponseDtoStatus } from "@novu/api/models/components"; - -let value: ExecutionDetailsResponseDtoStatus = "ReadConfirmation"; -``` - -## Values - -```typescript -"Success" | "Warning" | "Failed" | "Pending" | "Queued" | "ReadConfirmation" -``` \ No newline at end of file diff --git a/docs/models/components/feedidentifier.md b/docs/models/components/feedidentifier.md index 524dd4b6..10cebf51 100644 --- a/docs/models/components/feedidentifier.md +++ b/docs/models/components/feedidentifier.md @@ -2,27 +2,20 @@ Optional feed identifier or array of feed identifiers -## Example Usage - -```typescript -import { FeedIdentifier } from "@novu/api/models/components"; - -let value: FeedIdentifier = [ - "", -]; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `string[]` ```typescript -const value: string[] = /* values here */ +const value: string[] = [ + "", +]; ``` diff --git a/docs/models/components/feedresponsedto.md b/docs/models/components/feedresponsedto.md index 0f40b894..c8a09ed7 100644 --- a/docs/models/components/feedresponsedto.md +++ b/docs/models/components/feedresponsedto.md @@ -6,12 +6,12 @@ import { FeedResponseDto } from "@novu/api/models/components"; let value: FeedResponseDto = { + hasMore: false, data: [ "", ], - hasMore: false, - page: 7917.25, - pageSize: 8121.69, + pageSize: 6994.79, + page: 2974.37, }; ``` @@ -19,8 +19,8 @@ let value: FeedResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *string*[] | :heavy_check_mark: | N/A | +| `totalCount` | *number* | :heavy_minus_sign: | N/A | | `hasMore` | *boolean* | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_check_mark: | N/A | +| `data` | *string*[] | :heavy_check_mark: | N/A | | `pageSize` | *number* | :heavy_check_mark: | N/A | -| `totalCount` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `page` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/fieldfilterpart.md b/docs/models/components/fieldfilterpart.md index 367c6044..c8c2e97b 100644 --- a/docs/models/components/fieldfilterpart.md +++ b/docs/models/components/fieldfilterpart.md @@ -7,9 +7,9 @@ import { FieldFilterPart } from "@novu/api/models/components"; let value: FieldFilterPart = { field: "", - on: "subscriber", - operator: "NOT_EQUAL", value: "", + operator: "EQUAL", + on: "payload", }; ``` @@ -18,6 +18,6 @@ let value: FieldFilterPart = { | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | | `field` | *string* | :heavy_check_mark: | N/A | -| `on` | [components.On](../../models/components/on.md) | :heavy_check_mark: | N/A | +| `value` | *string* | :heavy_check_mark: | N/A | | `operator` | [components.Operator](../../models/components/operator.md) | :heavy_check_mark: | N/A | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `on` | [components.On](../../models/components/on.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/filtertopicsresponsedto.md b/docs/models/components/filtertopicsresponsedto.md index 60bd21ba..09083966 100644 --- a/docs/models/components/filtertopicsresponsedto.md +++ b/docs/models/components/filtertopicsresponsedto.md @@ -8,8 +8,8 @@ import { FilterTopicsResponseDto } from "@novu/api/models/components"; let value: FilterTopicsResponseDto = { data: [ { - environmentId: "", - organizationId: "", + organizationId: "", + environmentId: "", key: "", name: "", subscribers: [ @@ -17,9 +17,9 @@ let value: FilterTopicsResponseDto = { ], }, ], - page: 3637.11, - pageSize: 3250.47, - totalCount: 5701.97, + page: 580.29, + pageSize: 4344.17, + totalCount: 3117.96, }; ``` diff --git a/docs/models/components/getlayoutresponsedto.md b/docs/models/components/getlayoutresponsedto.md deleted file mode 100644 index 1cf25cd6..00000000 --- a/docs/models/components/getlayoutresponsedto.md +++ /dev/null @@ -1,41 +0,0 @@ -# GetLayoutResponseDto - -## Example Usage - -```typescript -import { GetLayoutResponseDto } from "@novu/api/models/components"; - -let value: GetLayoutResponseDto = { - creatorId: "", - environmentId: "", - organizationId: "", - channel: "in_app", - content: "", - contentType: "", - identifier: "", - isDefault: false, - isDeleted: false, - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `creatorId` | *string* | :heavy_check_mark: | N/A | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_minus_sign: | N/A | -| `channel` | [components.GetLayoutResponseDtoChannel](../../models/components/getlayoutresponsedtochannel.md) | :heavy_check_mark: | N/A | -| `content` | *string* | :heavy_check_mark: | N/A | -| `contentType` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `isDefault` | *boolean* | :heavy_check_mark: | N/A | -| `isDeleted` | *boolean* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `updatedAt` | *string* | :heavy_minus_sign: | N/A | -| `variables` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/getlayoutresponsedtochannel.md b/docs/models/components/getlayoutresponsedtochannel.md deleted file mode 100644 index 9cd9fe20..00000000 --- a/docs/models/components/getlayoutresponsedtochannel.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetLayoutResponseDtoChannel - -## Example Usage - -```typescript -import { GetLayoutResponseDtoChannel } from "@novu/api/models/components"; - -let value: GetLayoutResponseDtoChannel = "chat"; -``` - -## Values - -```typescript -"in_app" | "email" | "sms" | "chat" | "push" -``` \ No newline at end of file diff --git a/docs/models/components/getsubscriberpreferencesresponsedto.md b/docs/models/components/getsubscriberpreferencesresponsedto.md index 4d59dd04..a79fe0e5 100644 --- a/docs/models/components/getsubscriberpreferencesresponsedto.md +++ b/docs/models/components/getsubscriberpreferencesresponsedto.md @@ -7,8 +7,8 @@ import { GetSubscriberPreferencesResponseDto } from "@novu/api/models/components let value: GetSubscriberPreferencesResponseDto = { preference: { - channels: {}, enabled: false, + channels: {}, }, }; ``` @@ -17,5 +17,5 @@ let value: GetSubscriberPreferencesResponseDto = { | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `preference` | [components.Preference](../../models/components/preference.md) | :heavy_check_mark: | The preferences of the subscriber regarding the related workflow | -| `template` | [components.TemplateResponse](../../models/components/templateresponse.md) | :heavy_minus_sign: | The workflow information and if it is critical or not | \ No newline at end of file +| `template` | [components.TemplateResponse](../../models/components/templateresponse.md) | :heavy_minus_sign: | The workflow information and if it is critical or not | +| `preference` | [components.Preference](../../models/components/preference.md) | :heavy_check_mark: | The preferences of the subscriber regarding the related workflow | \ No newline at end of file diff --git a/docs/models/components/gettenantresponsedto.md b/docs/models/components/gettenantresponsedto.md deleted file mode 100644 index e4043b00..00000000 --- a/docs/models/components/gettenantresponsedto.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetTenantResponseDto - -## Example Usage - -```typescript -import { GetTenantResponseDto } from "@novu/api/models/components"; - -let value: GetTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `data` | [components.GetTenantResponseDtoData](../../models/components/gettenantresponsedtodata.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/gettenantresponsedtodata.md b/docs/models/components/gettenantresponsedtodata.md deleted file mode 100644 index 4f7d93b8..00000000 --- a/docs/models/components/gettenantresponsedtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetTenantResponseDtoData - -## Example Usage - -```typescript -import { GetTenantResponseDtoData } from "@novu/api/models/components"; - -let value: GetTenantResponseDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/gettopicresponsedto.md b/docs/models/components/gettopicresponsedto.md index 810fe726..30950928 100644 --- a/docs/models/components/gettopicresponsedto.md +++ b/docs/models/components/gettopicresponsedto.md @@ -6,8 +6,8 @@ import { GetTopicResponseDto } from "@novu/api/models/components"; let value: GetTopicResponseDto = { - environmentId: "", - organizationId: "", + organizationId: "", + environmentId: "", key: "", name: "", subscribers: [ @@ -20,9 +20,9 @@ let value: GetTopicResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `key` | *string* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_check_mark: | N/A | | `subscribers` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationresponsedto.md b/docs/models/components/integrationresponsedto.md index 7fb511f1..6e1a89c8 100644 --- a/docs/models/components/integrationresponsedto.md +++ b/docs/models/components/integrationresponsedto.md @@ -6,18 +6,18 @@ import { IntegrationResponseDto } from "@novu/api/models/components"; let value: IntegrationResponseDto = { - environmentId: "", - organizationId: "", - active: false, + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", channel: "sms", credentials: {}, + active: false, deleted: false, deletedAt: "", deletedBy: "", - identifier: "", - name: "", primary: false, - providerId: "", }; ``` @@ -25,17 +25,17 @@ let value: IntegrationResponseDto = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | -| `active` | *boolean* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `identifier` | *string* | :heavy_check_mark: | N/A | +| `providerId` | *string* | :heavy_check_mark: | N/A | | `channel` | [components.IntegrationResponseDtoChannel](../../models/components/integrationresponsedtochannel.md) | :heavy_check_mark: | N/A | -| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | | `credentials` | [components.CredentialsDto](../../models/components/credentialsdto.md) | :heavy_check_mark: | N/A | +| `active` | *boolean* | :heavy_check_mark: | N/A | | `deleted` | *boolean* | :heavy_check_mark: | N/A | | `deletedAt` | *string* | :heavy_check_mark: | N/A | | `deletedBy` | *string* | :heavy_check_mark: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | | `primary` | *boolean* | :heavy_check_mark: | N/A | -| `providerId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationresponsedtochannel.md b/docs/models/components/integrationresponsedtochannel.md index d25ca805..57607f6e 100644 --- a/docs/models/components/integrationresponsedtochannel.md +++ b/docs/models/components/integrationresponsedtochannel.md @@ -5,7 +5,7 @@ ```typescript import { IntegrationResponseDtoChannel } from "@novu/api/models/components"; -let value: IntegrationResponseDtoChannel = "sms"; +let value: IntegrationResponseDtoChannel = "email"; ``` ## Values diff --git a/docs/models/components/markallmessageasrequestdto.md b/docs/models/components/markallmessageasrequestdto.md index 3af1c1ba..c4b5ef09 100644 --- a/docs/models/components/markallmessageasrequestdto.md +++ b/docs/models/components/markallmessageasrequestdto.md @@ -12,7 +12,7 @@ let value: MarkAllMessageAsRequestDto = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `feedIdentifier` | *components.FeedIdentifier* | :heavy_minus_sign: | Optional feed identifier or array of feed identifiers | -| `markAs` | [components.MarkAs](../../models/components/markas.md) | :heavy_check_mark: | Mark all subscriber messages as read, unread, seen or unseen | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `feedIdentifier` | *components.FeedIdentifier* | :heavy_minus_sign: | Optional feed identifier or array of feed identifiers | +| `markAs` | [components.MarkAllMessageAsRequestDtoMarkAs](../../models/components/markallmessageasrequestdtomarkas.md) | :heavy_check_mark: | Mark all subscriber messages as read, unread, seen or unseen | \ No newline at end of file diff --git a/docs/models/components/markallmessageasrequestdtomarkas.md b/docs/models/components/markallmessageasrequestdtomarkas.md new file mode 100644 index 00000000..e6c8a0f7 --- /dev/null +++ b/docs/models/components/markallmessageasrequestdtomarkas.md @@ -0,0 +1,17 @@ +# MarkAllMessageAsRequestDtoMarkAs + +Mark all subscriber messages as read, unread, seen or unseen + +## Example Usage + +```typescript +import { MarkAllMessageAsRequestDtoMarkAs } from "@novu/api/models/components"; + +let value: MarkAllMessageAsRequestDtoMarkAs = "unseen"; +``` + +## Values + +```typescript +"read" | "seen" | "unread" | "unseen" +``` \ No newline at end of file diff --git a/docs/models/components/markas.md b/docs/models/components/markas.md index ba69869f..63197c56 100644 --- a/docs/models/components/markas.md +++ b/docs/models/components/markas.md @@ -1,13 +1,11 @@ # MarkAs -Mark all subscriber messages as read, unread, seen or unseen - ## Example Usage ```typescript import { MarkAs } from "@novu/api/models/components"; -let value: MarkAs = "unseen"; +let value: MarkAs = "seen"; ``` ## Values diff --git a/docs/models/components/markmessageactionasseendto.md b/docs/models/components/markmessageactionasseendto.md index 9e60e4cf..862a243c 100644 --- a/docs/models/components/markmessageactionasseendto.md +++ b/docs/models/components/markmessageactionasseendto.md @@ -12,7 +12,7 @@ let value: MarkMessageActionAsSeenDto = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `payload` | [components.Payload](../../models/components/payload.md) | :heavy_minus_sign: | Message action payload | -| `status` | [components.MarkMessageActionAsSeenDtoStatus](../../models/components/markmessageactionasseendtostatus.md) | :heavy_check_mark: | Message action status | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `status` | [components.MarkMessageActionAsSeenDtoStatus](../../models/components/markmessageactionasseendtostatus.md) | :heavy_check_mark: | Message action status | +| `payload` | [components.MarkMessageActionAsSeenDtoPayload](../../models/components/markmessageactionasseendtopayload.md) | :heavy_minus_sign: | Message action payload | \ No newline at end of file diff --git a/docs/models/components/markmessageactionasseendtopayload.md b/docs/models/components/markmessageactionasseendtopayload.md new file mode 100644 index 00000000..f176f4e9 --- /dev/null +++ b/docs/models/components/markmessageactionasseendtopayload.md @@ -0,0 +1,16 @@ +# MarkMessageActionAsSeenDtoPayload + +Message action payload + +## Example Usage + +```typescript +import { MarkMessageActionAsSeenDtoPayload } from "@novu/api/models/components"; + +let value: MarkMessageActionAsSeenDtoPayload = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/messageaction.md b/docs/models/components/messageaction.md index 7c40fbe8..33317d1d 100644 --- a/docs/models/components/messageaction.md +++ b/docs/models/components/messageaction.md @@ -12,6 +12,6 @@ let value: MessageAction = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `status` | [components.MessageActionStatus](../../models/components/messageactionstatus.md) | :heavy_minus_sign: | N/A | | `buttons` | [components.MessageButton](../../models/components/messagebutton.md)[] | :heavy_minus_sign: | N/A | -| `result` | [components.MessageActionResult](../../models/components/messageactionresult.md) | :heavy_minus_sign: | N/A | -| `status` | [components.MessageActionStatus](../../models/components/messageactionstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `result` | [components.MessageActionResult](../../models/components/messageactionresult.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/messagebutton.md b/docs/models/components/messagebutton.md index eabd38d1..f51b4781 100644 --- a/docs/models/components/messagebutton.md +++ b/docs/models/components/messagebutton.md @@ -6,8 +6,8 @@ import { MessageButton } from "@novu/api/models/components"; let value: MessageButton = { + type: "primary", content: "", - type: "secondary", }; ``` @@ -15,6 +15,6 @@ let value: MessageButton = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | [components.MessageButtonType](../../models/components/messagebuttontype.md) | :heavy_check_mark: | N/A | | `content` | *string* | :heavy_check_mark: | N/A | -| `resultContent` | *string* | :heavy_minus_sign: | N/A | -| `type` | [components.MessageButtonType](../../models/components/messagebuttontype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `resultContent` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/messagecta.md b/docs/models/components/messagecta.md index ee13a74d..3b30fef1 100644 --- a/docs/models/components/messagecta.md +++ b/docs/models/components/messagecta.md @@ -14,6 +14,6 @@ let value: MessageCTA = { | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `action` | [components.MessageAction](../../models/components/messageaction.md) | :heavy_minus_sign: | N/A | +| `type` | [components.MessageCTAType](../../models/components/messagectatype.md) | :heavy_minus_sign: | N/A | | `data` | [components.MessageCTAData](../../models/components/messagectadata.md) | :heavy_check_mark: | N/A | -| `type` | [components.MessageCTAType](../../models/components/messagectatype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `action` | [components.MessageAction](../../models/components/messageaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/messageid.md b/docs/models/components/messageid.md index 69188376..46eeb36d 100644 --- a/docs/models/components/messageid.md +++ b/docs/models/components/messageid.md @@ -1,24 +1,19 @@ # MessageId -## Example Usage - -```typescript -import { MessageId } from "@novu/api/models/components"; - -let value: MessageId = ""; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `string[]` ```typescript -const value: string[] = /* values here */ +const value: string[] = [ + "", +]; ``` diff --git a/docs/models/components/messagemarkasrequestdto.md b/docs/models/components/messagemarkasrequestdto.md index b4255e6a..7a8a3575 100644 --- a/docs/models/components/messagemarkasrequestdto.md +++ b/docs/models/components/messagemarkasrequestdto.md @@ -6,14 +6,16 @@ import { MessageMarkAsRequestDto } from "@novu/api/models/components"; let value: MessageMarkAsRequestDto = { - markAs: "seen", - messageId: "", + messageId: [ + "", + ], + markAs: "unread", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `markAs` | [components.MessageMarkAsRequestDtoMarkAs](../../models/components/messagemarkasrequestdtomarkas.md) | :heavy_check_mark: | N/A | -| `messageId` | *components.MessageId* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `messageId` | *components.MessageId* | :heavy_check_mark: | N/A | +| `markAs` | [components.MarkAs](../../models/components/markas.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/messagemarkasrequestdtomarkas.md b/docs/models/components/messagemarkasrequestdtomarkas.md deleted file mode 100644 index 9bdd3edb..00000000 --- a/docs/models/components/messagemarkasrequestdtomarkas.md +++ /dev/null @@ -1,15 +0,0 @@ -# MessageMarkAsRequestDtoMarkAs - -## Example Usage - -```typescript -import { MessageMarkAsRequestDtoMarkAs } from "@novu/api/models/components"; - -let value: MessageMarkAsRequestDtoMarkAs = "read"; -``` - -## Values - -```typescript -"read" | "seen" | "unread" | "unseen" -``` \ No newline at end of file diff --git a/docs/models/components/messageresponsedto.md b/docs/models/components/messageresponsedto.md index 2dc6d12c..544b5ad3 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -6,65 +6,62 @@ import { MessageResponseDto } from "@novu/api/models/components"; let value: MessageResponseDto = { - environmentId: "", - messageTemplateId: "", - notificationId: "", - organizationId: "", - subscriberId: "", - templateId: "", - channel: "sms", - content: { - content: "", - type: "text", - }, + templateId: "", + environmentId: "", + messageTemplateId: "", + organizationId: "", + notificationId: "", + subscriberId: "", createdAt: "", + content: "", + transactionId: "", + channel: "sms", + read: false, + seen: false, cta: { data: {}, }, - errorId: "", + status: "error", + errorId: "", errorText: "", - overrides: {}, payload: {}, - read: false, - seen: false, - status: "sent", - transactionId: "", + overrides: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `feedId` | [components.FeedId](../../models/components/feedid.md) | :heavy_minus_sign: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `messageTemplateId` | *string* | :heavy_check_mark: | N/A | -| `notificationId` | *string* | :heavy_check_mark: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `templateId` | *string* | :heavy_check_mark: | N/A | -| `channel` | [components.MessageResponseDtoChannel](../../models/components/messageresponsedtochannel.md) | :heavy_check_mark: | N/A | -| `content` | *components.Content* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `cta` | [components.MessageCTA](../../models/components/messagecta.md) | :heavy_check_mark: | N/A | -| `deviceTokens` | *string*[] | :heavy_minus_sign: | N/A | -| `directWebhookUrl` | *string* | :heavy_minus_sign: | N/A | -| `email` | *string* | :heavy_minus_sign: | N/A | -| `errorId` | *string* | :heavy_check_mark: | N/A | -| `errorText` | *string* | :heavy_check_mark: | N/A | -| `lastReadDate` | *string* | :heavy_minus_sign: | N/A | -| `lastSeenDate` | *string* | :heavy_minus_sign: | N/A | -| `overrides` | [components.Overrides](../../models/components/overrides.md) | :heavy_check_mark: | Provider specific overrides used when triggering the notification | -| `payload` | [components.MessageResponseDtoPayload](../../models/components/messageresponsedtopayload.md) | :heavy_check_mark: | The payload that was used to send the notification trigger | -| `phone` | *string* | :heavy_minus_sign: | N/A | -| `providerId` | *string* | :heavy_minus_sign: | N/A | -| `read` | *boolean* | :heavy_check_mark: | N/A | -| `seen` | *boolean* | :heavy_check_mark: | N/A | -| `status` | [components.MessageResponseDtoStatus](../../models/components/messageresponsedtostatus.md) | :heavy_check_mark: | N/A | -| `subject` | *string* | :heavy_minus_sign: | N/A | -| `subscriber` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_minus_sign: | N/A | -| `template` | [components.WorkflowResponse](../../models/components/workflowresponse.md) | :heavy_minus_sign: | N/A | -| `templateIdentifier` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `transactionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `templateId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | +| `messageTemplateId` | *string* | :heavy_check_mark: | N/A | +| `organizationId` | *string* | :heavy_check_mark: | N/A | +| `notificationId` | *string* | :heavy_check_mark: | N/A | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `subscriber` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_minus_sign: | N/A | +| `template` | [components.WorkflowResponse](../../models/components/workflowresponse.md) | :heavy_minus_sign: | N/A | +| `templateIdentifier` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `lastSeenDate` | *string* | :heavy_minus_sign: | N/A | +| `lastReadDate` | *string* | :heavy_minus_sign: | N/A | +| `content` | *components.Content* | :heavy_check_mark: | N/A | +| `transactionId` | *string* | :heavy_check_mark: | N/A | +| `subject` | *string* | :heavy_minus_sign: | N/A | +| `channel` | [components.MessageResponseDtoChannel](../../models/components/messageresponsedtochannel.md) | :heavy_check_mark: | N/A | +| `read` | *boolean* | :heavy_check_mark: | N/A | +| `seen` | *boolean* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | +| `phone` | *string* | :heavy_minus_sign: | N/A | +| `directWebhookUrl` | *string* | :heavy_minus_sign: | N/A | +| `providerId` | *string* | :heavy_minus_sign: | N/A | +| `deviceTokens` | *string*[] | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `cta` | [components.MessageCTA](../../models/components/messagecta.md) | :heavy_check_mark: | N/A | +| `feedId` | [components.FeedId](../../models/components/feedid.md) | :heavy_minus_sign: | N/A | +| `status` | [components.MessageResponseDtoStatus](../../models/components/messageresponsedtostatus.md) | :heavy_check_mark: | N/A | +| `errorId` | *string* | :heavy_check_mark: | N/A | +| `errorText` | *string* | :heavy_check_mark: | N/A | +| `payload` | [components.MessageResponseDtoPayload](../../models/components/messageresponsedtopayload.md) | :heavy_check_mark: | The payload that was used to send the notification trigger | +| `overrides` | [components.MessageResponseDtoOverrides](../../models/components/messageresponsedtooverrides.md) | :heavy_check_mark: | Provider specific overrides used when triggering the notification | \ No newline at end of file diff --git a/docs/models/components/messageresponsedtochannel.md b/docs/models/components/messageresponsedtochannel.md index 4d80ce7c..1e367bec 100644 --- a/docs/models/components/messageresponsedtochannel.md +++ b/docs/models/components/messageresponsedtochannel.md @@ -5,7 +5,7 @@ ```typescript import { MessageResponseDtoChannel } from "@novu/api/models/components"; -let value: MessageResponseDtoChannel = "in_app"; +let value: MessageResponseDtoChannel = "sms"; ``` ## Values diff --git a/docs/models/components/messageresponsedtooverrides.md b/docs/models/components/messageresponsedtooverrides.md new file mode 100644 index 00000000..f8131ed8 --- /dev/null +++ b/docs/models/components/messageresponsedtooverrides.md @@ -0,0 +1,16 @@ +# MessageResponseDtoOverrides + +Provider specific overrides used when triggering the notification + +## Example Usage + +```typescript +import { MessageResponseDtoOverrides } from "@novu/api/models/components"; + +let value: MessageResponseDtoOverrides = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/metadata.md b/docs/models/components/metadata.md index 6d143455..d4991d52 100644 --- a/docs/models/components/metadata.md +++ b/docs/models/components/metadata.md @@ -1,38 +1,38 @@ # Metadata -## Example Usage - -```typescript -import { Metadata } from "@novu/api/models/components"; - -let value: Metadata = { - type: "backoff", -}; -``` ## Supported Types ### `components.DigestRegularMetadata` ```typescript -const value: components.DigestRegularMetadata = /* values here */ +const value: components.DigestRegularMetadata = { + type: "backoff", +}; ``` ### `components.DigestTimedMetadata` ```typescript -const value: components.DigestTimedMetadata = /* values here */ +const value: components.DigestTimedMetadata = { + type: "timed", +}; ``` ### `components.DelayRegularMetadata` ```typescript -const value: components.DelayRegularMetadata = /* values here */ +const value: components.DelayRegularMetadata = { + type: "regular", +}; ``` ### `components.DelayScheduledMetadata` ```typescript -const value: components.DelayScheduledMetadata = /* values here */ +const value: components.DelayScheduledMetadata = { + type: "scheduled", + delayPath: "", +}; ``` diff --git a/docs/models/components/monthlytype.md b/docs/models/components/monthlytype.md index 3113ba7f..8b6ac551 100644 --- a/docs/models/components/monthlytype.md +++ b/docs/models/components/monthlytype.md @@ -5,7 +5,7 @@ ```typescript import { MonthlyType } from "@novu/api/models/components"; -let value: MonthlyType = "each"; +let value: MonthlyType = "on"; ``` ## Values diff --git a/docs/models/components/notificationgroup.md b/docs/models/components/notificationgroup.md index 1af391ed..da0294bb 100644 --- a/docs/models/components/notificationgroup.md +++ b/docs/models/components/notificationgroup.md @@ -6,9 +6,9 @@ import { NotificationGroup } from "@novu/api/models/components"; let value: NotificationGroup = { - environmentId: "", - organizationId: "", name: "", + environmentId: "", + organizationId: "", }; ``` @@ -16,8 +16,8 @@ let value: NotificationGroup = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `parentId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/notificationgroupresponsedto.md b/docs/models/components/notificationgroupresponsedto.md index 78a24be3..55741489 100644 --- a/docs/models/components/notificationgroupresponsedto.md +++ b/docs/models/components/notificationgroupresponsedto.md @@ -6,9 +6,9 @@ import { NotificationGroupResponseDto } from "@novu/api/models/components"; let value: NotificationGroupResponseDto = { - environmentId: "", - organizationId: "", name: "", + environmentId: "", + organizationId: "", }; ``` @@ -16,8 +16,8 @@ let value: NotificationGroupResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `parentId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/notificationstep.md b/docs/models/components/notificationstep.md index a176ef65..5cab470b 100644 --- a/docs/models/components/notificationstep.md +++ b/docs/models/components/notificationstep.md @@ -13,14 +13,14 @@ let value: NotificationStep = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_minus_sign: | N/A | -| `parentId` | [components.ParentId](../../models/components/parentid.md) | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | | `templateId` | *string* | :heavy_minus_sign: | N/A | | `active` | *boolean* | :heavy_minus_sign: | N/A | +| `shouldStopOnFail` | *boolean* | :heavy_minus_sign: | N/A | +| `template` | [components.MessageTemplate](../../models/components/messagetemplate.md) | :heavy_minus_sign: | N/A | | `filters` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | +| `parentId` | [components.ParentId](../../models/components/parentid.md) | :heavy_minus_sign: | N/A | | `metadata` | *components.Metadata* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | | `replyCallback` | [components.ReplyCallback](../../models/components/replycallback.md) | :heavy_minus_sign: | N/A | -| `shouldStopOnFail` | *boolean* | :heavy_minus_sign: | N/A | -| `template` | [components.MessageTemplate](../../models/components/messagetemplate.md) | :heavy_minus_sign: | N/A | -| `uuid` | *string* | :heavy_minus_sign: | N/A | | `variants` | [components.NotificationStepVariant](../../models/components/notificationstepvariant.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/notificationstepvariant.md b/docs/models/components/notificationstepvariant.md index dac12272..cfb4d749 100644 --- a/docs/models/components/notificationstepvariant.md +++ b/docs/models/components/notificationstepvariant.md @@ -13,13 +13,13 @@ let value: NotificationStepVariant = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `id` | *string* | :heavy_minus_sign: | N/A | -| `parentId` | [components.NotificationStepVariantParentId](../../models/components/notificationstepvariantparentid.md) | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | | `templateId` | *string* | :heavy_minus_sign: | N/A | | `active` | *boolean* | :heavy_minus_sign: | N/A | -| `filters` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | -| `metadata` | *components.NotificationStepVariantMetadata* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `replyCallback` | [components.NotificationStepVariantReplyCallback](../../models/components/notificationstepvariantreplycallback.md) | :heavy_minus_sign: | N/A | | `shouldStopOnFail` | *boolean* | :heavy_minus_sign: | N/A | | `template` | [components.MessageTemplate](../../models/components/messagetemplate.md) | :heavy_minus_sign: | N/A | -| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `filters` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | +| `parentId` | [components.NotificationStepVariantParentId](../../models/components/notificationstepvariantparentid.md) | :heavy_minus_sign: | N/A | +| `metadata` | *components.NotificationStepVariantMetadata* | :heavy_minus_sign: | N/A | +| `replyCallback` | [components.NotificationStepVariantReplyCallback](../../models/components/notificationstepvariantreplycallback.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/notificationstepvariantmetadata.md b/docs/models/components/notificationstepvariantmetadata.md index ec02b532..bcea460c 100644 --- a/docs/models/components/notificationstepvariantmetadata.md +++ b/docs/models/components/notificationstepvariantmetadata.md @@ -1,38 +1,38 @@ # NotificationStepVariantMetadata -## Example Usage - -```typescript -import { NotificationStepVariantMetadata } from "@novu/api/models/components"; - -let value: NotificationStepVariantMetadata = { - type: "backoff", -}; -``` ## Supported Types ### `components.DigestRegularMetadata` ```typescript -const value: components.DigestRegularMetadata = /* values here */ +const value: components.DigestRegularMetadata = { + type: "backoff", +}; ``` ### `components.DigestTimedMetadata` ```typescript -const value: components.DigestTimedMetadata = /* values here */ +const value: components.DigestTimedMetadata = { + type: "timed", +}; ``` ### `components.DelayRegularMetadata` ```typescript -const value: components.DelayRegularMetadata = /* values here */ +const value: components.DelayRegularMetadata = { + type: "regular", +}; ``` ### `components.DelayScheduledMetadata` ```typescript -const value: components.DelayScheduledMetadata = /* values here */ +const value: components.DelayScheduledMetadata = { + type: "scheduled", + delayPath: "", +}; ``` diff --git a/docs/models/components/notificationtrigger.md b/docs/models/components/notificationtrigger.md index 259a8d41..d15253f7 100644 --- a/docs/models/components/notificationtrigger.md +++ b/docs/models/components/notificationtrigger.md @@ -6,8 +6,8 @@ import { NotificationTrigger } from "@novu/api/models/components"; let value: NotificationTrigger = { - identifier: "", type: "event", + identifier: "", variables: [ { name: "", @@ -20,7 +20,7 @@ let value: NotificationTrigger = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `subscriberVariables` | [components.NotificationTriggerVariable](../../models/components/notificationtriggervariable.md)[] | :heavy_minus_sign: | N/A | | `type` | [components.NotificationTriggerType](../../models/components/notificationtriggertype.md) | :heavy_check_mark: | N/A | -| `variables` | [components.NotificationTriggerVariable](../../models/components/notificationtriggervariable.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| `identifier` | *string* | :heavy_check_mark: | N/A | +| `variables` | [components.NotificationTriggerVariable](../../models/components/notificationtriggervariable.md)[] | :heavy_check_mark: | N/A | +| `subscriberVariables` | [components.NotificationTriggerVariable](../../models/components/notificationtriggervariable.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/on.md b/docs/models/components/on.md index 26cb236e..3f67d3c1 100644 --- a/docs/models/components/on.md +++ b/docs/models/components/on.md @@ -5,7 +5,7 @@ ```typescript import { On } from "@novu/api/models/components"; -let value: On = "subscriber"; +let value: On = "payload"; ``` ## Values diff --git a/docs/models/components/operator.md b/docs/models/components/operator.md index 52245c05..4d9a5b40 100644 --- a/docs/models/components/operator.md +++ b/docs/models/components/operator.md @@ -5,7 +5,7 @@ ```typescript import { Operator } from "@novu/api/models/components"; -let value: Operator = "BETWEEN"; +let value: Operator = "NOT_IN"; ``` ## Values diff --git a/docs/models/components/ordinal.md b/docs/models/components/ordinal.md index e09e7bd5..d30ab30d 100644 --- a/docs/models/components/ordinal.md +++ b/docs/models/components/ordinal.md @@ -5,7 +5,7 @@ ```typescript import { Ordinal } from "@novu/api/models/components"; -let value: Ordinal = "4"; +let value: Ordinal = "2"; ``` ## Values diff --git a/docs/models/components/ordinalvalue.md b/docs/models/components/ordinalvalue.md index 1d189ed0..31c73e0b 100644 --- a/docs/models/components/ordinalvalue.md +++ b/docs/models/components/ordinalvalue.md @@ -5,7 +5,7 @@ ```typescript import { OrdinalValue } from "@novu/api/models/components"; -let value: OrdinalValue = "monday"; +let value: OrdinalValue = "saturday"; ``` ## Values diff --git a/docs/models/components/organizationbrandingresponsedto.md b/docs/models/components/organizationbrandingresponsedto.md deleted file mode 100644 index 90d54994..00000000 --- a/docs/models/components/organizationbrandingresponsedto.md +++ /dev/null @@ -1,25 +0,0 @@ -# OrganizationBrandingResponseDto - -## Example Usage - -```typescript -import { OrganizationBrandingResponseDto } from "@novu/api/models/components"; - -let value: OrganizationBrandingResponseDto = { - color: "orchid", - contentBackground: "", - fontColor: "", - logo: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `color` | *string* | :heavy_check_mark: | N/A | -| `contentBackground` | *string* | :heavy_check_mark: | N/A | -| `direction` | [components.Direction](../../models/components/direction.md) | :heavy_minus_sign: | N/A | -| `fontColor` | *string* | :heavy_check_mark: | N/A | -| `fontFamily` | *string* | :heavy_minus_sign: | N/A | -| `logo` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/organizationresponsedto.md b/docs/models/components/organizationresponsedto.md deleted file mode 100644 index d2304ea1..00000000 --- a/docs/models/components/organizationresponsedto.md +++ /dev/null @@ -1,26 +0,0 @@ -# OrganizationResponseDto - -## Example Usage - -```typescript -import { OrganizationResponseDto } from "@novu/api/models/components"; - -let value: OrganizationResponseDto = { - branding: { - color: "yellow", - contentBackground: "", - fontColor: "", - logo: "", - }, - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `branding` | [components.OrganizationBrandingResponseDto](../../models/components/organizationbrandingresponsedto.md) | :heavy_check_mark: | N/A | -| `logo` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `partnerConfigurations` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/overrides.md b/docs/models/components/overrides.md index cafd1649..99d8c8be 100644 --- a/docs/models/components/overrides.md +++ b/docs/models/components/overrides.md @@ -1,6 +1,6 @@ # Overrides -Provider specific overrides used when triggering the notification +This could be used to override provider specific configurations ## Example Usage diff --git a/docs/models/components/payload.md b/docs/models/components/payload.md index 02241ce7..0d201d57 100644 --- a/docs/models/components/payload.md +++ b/docs/models/components/payload.md @@ -1,6 +1,7 @@ # Payload -Message action payload +The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. + This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. ## Example Usage diff --git a/docs/models/components/preference.md b/docs/models/components/preference.md index c2da69be..3d3470b3 100644 --- a/docs/models/components/preference.md +++ b/docs/models/components/preference.md @@ -6,8 +6,8 @@ import { Preference } from "@novu/api/models/components"; let value: Preference = { - channels: {}, enabled: false, + channels: {}, }; ``` @@ -15,5 +15,5 @@ let value: Preference = { | Field | Type | Required | Description | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `channels` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_check_mark: | Subscriber preferences for the different channels regarding this workflow | -| `enabled` | *boolean* | :heavy_check_mark: | Sets if the workflow is fully enabled for all channels or not for the subscriber. | \ No newline at end of file +| `enabled` | *boolean* | :heavy_check_mark: | Sets if the workflow is fully enabled for all channels or not for the subscriber. | +| `channels` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_check_mark: | Subscriber preferences for the different channels regarding this workflow | \ No newline at end of file diff --git a/docs/models/components/preferencechannels.md b/docs/models/components/preferencechannels.md index 17ab2010..f6df176a 100644 --- a/docs/models/components/preferencechannels.md +++ b/docs/models/components/preferencechannels.md @@ -12,8 +12,8 @@ let value: PreferenceChannels = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `chat` | *boolean* | :heavy_minus_sign: | N/A | | `email` | *boolean* | :heavy_minus_sign: | N/A | +| `sms` | *boolean* | :heavy_minus_sign: | N/A | | `inApp` | *boolean* | :heavy_minus_sign: | N/A | -| `push` | *boolean* | :heavy_minus_sign: | N/A | -| `sms` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `chat` | *boolean* | :heavy_minus_sign: | N/A | +| `push` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/providerid.md b/docs/models/components/providerid.md new file mode 100644 index 00000000..d9bbdbd0 --- /dev/null +++ b/docs/models/components/providerid.md @@ -0,0 +1,17 @@ +# ProviderId + +The provider identifier for the credentials + +## Example Usage + +```typescript +import { ProviderId } from "@novu/api/models/components"; + +let value: ProviderId = "ryver"; +``` + +## Values + +```typescript +"slack" | "discord" | "msteams" | "mattermost" | "ryver" | "zulip" | "grafana-on-call" | "getstream" | "rocket-chat" | "whatsapp-business" | "fcm" | "apns" | "expo" | "one-signal" | "pushpad" | "push-webhook" | "pusher-beams" +``` \ No newline at end of file diff --git a/docs/models/components/renameorganizationdto.md b/docs/models/components/renameorganizationdto.md deleted file mode 100644 index 30bd019a..00000000 --- a/docs/models/components/renameorganizationdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# RenameOrganizationDto - -## Example Usage - -```typescript -import { RenameOrganizationDto } from "@novu/api/models/components"; - -let value: RenameOrganizationDto = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/renametopicresponsedto.md b/docs/models/components/renametopicresponsedto.md index a512fd9e..2e200baf 100644 --- a/docs/models/components/renametopicresponsedto.md +++ b/docs/models/components/renametopicresponsedto.md @@ -6,8 +6,8 @@ import { RenameTopicResponseDto } from "@novu/api/models/components"; let value: RenameTopicResponseDto = { - environmentId: "", - organizationId: "", + organizationId: "", + environmentId: "", key: "", name: "", subscribers: [ @@ -20,9 +20,9 @@ let value: RenameTopicResponseDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `key` | *string* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_check_mark: | N/A | | `subscribers` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/status.md b/docs/models/components/status.md index 09ea6e27..37cc848a 100644 --- a/docs/models/components/status.md +++ b/docs/models/components/status.md @@ -1,17 +1,15 @@ # Status -The status enum for the performed action - ## Example Usage ```typescript import { Status } from "@novu/api/models/components"; -let value: Status = "deleted"; +let value: Status = "ReadConfirmation"; ``` ## Values ```typescript -"deleted" +"Success" | "Warning" | "Failed" | "Pending" | "Queued" | "ReadConfirmation" ``` \ No newline at end of file diff --git a/docs/models/components/stepfilter.md b/docs/models/components/stepfilter.md index 86f42673..92ed9d29 100644 --- a/docs/models/components/stepfilter.md +++ b/docs/models/components/stepfilter.md @@ -6,17 +6,17 @@ import { StepFilter } from "@novu/api/models/components"; let value: StepFilter = { + isNegated: false, + type: "STATEMENT", + value: "AND", children: [ { field: "", - on: "payload", - operator: "LIKE", value: "", + operator: "ANY_IN", + on: "subscriber", }, ], - isNegated: false, - type: "BOOLEAN", - value: "AND", }; ``` @@ -24,7 +24,7 @@ let value: StepFilter = { | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `children` | [components.FieldFilterPart](../../models/components/fieldfilterpart.md)[] | :heavy_check_mark: | N/A | | `isNegated` | *boolean* | :heavy_check_mark: | N/A | | `type` | [components.StepFilterType](../../models/components/stepfiltertype.md) | :heavy_check_mark: | N/A | -| `value` | [components.Value](../../models/components/value.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `value` | [components.Value](../../models/components/value.md) | :heavy_check_mark: | N/A | +| `children` | [components.FieldFilterPart](../../models/components/fieldfilterpart.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/stepfiltertype.md b/docs/models/components/stepfiltertype.md index f8bc6288..ace94e10 100644 --- a/docs/models/components/stepfiltertype.md +++ b/docs/models/components/stepfiltertype.md @@ -5,7 +5,7 @@ ```typescript import { StepFilterType } from "@novu/api/models/components"; -let value: StepFilterType = "STATEMENT"; +let value: StepFilterType = "BOOLEAN"; ``` ## Values diff --git a/docs/models/components/subscriberpayloaddto.md b/docs/models/components/subscriberpayloaddto.md index 3ff650c3..d8af3779 100644 --- a/docs/models/components/subscriberpayloaddto.md +++ b/docs/models/components/subscriberpayloaddto.md @@ -6,7 +6,7 @@ import { SubscriberPayloadDto } from "@novu/api/models/components"; let value: SubscriberPayloadDto = { - subscriberId: "", + subscriberId: "", }; ``` @@ -14,12 +14,12 @@ let value: SubscriberPayloadDto = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | -| `channels` | *string*[] | :heavy_minus_sign: | N/A | -| `data` | [components.SubscriberPayloadDtoData](../../models/components/subscriberpayloaddtodata.md) | :heavy_minus_sign: | N/A | +| `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | | `email` | *string* | :heavy_minus_sign: | N/A | | `firstName` | *string* | :heavy_minus_sign: | N/A | | `lastName` | *string* | :heavy_minus_sign: | N/A | -| `locale` | *string* | :heavy_minus_sign: | N/A | | `phone` | *string* | :heavy_minus_sign: | N/A | -| `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | \ No newline at end of file +| `avatar` | *string* | :heavy_minus_sign: | An http url to the profile image of your subscriber | +| `locale` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.Data](../../models/components/data.md) | :heavy_minus_sign: | N/A | +| `channels` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/subscriberpayloaddtodata.md b/docs/models/components/subscriberpayloaddtodata.md deleted file mode 100644 index ccfe7896..00000000 --- a/docs/models/components/subscriberpayloaddtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# SubscriberPayloadDtoData - -## Example Usage - -```typescript -import { SubscriberPayloadDtoData } from "@novu/api/models/components"; - -let value: SubscriberPayloadDtoData = {}; -``` - -## 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 dd59905f..c42f918e 100644 --- a/docs/models/components/subscriberresponsedto.md +++ b/docs/models/components/subscriberresponsedto.md @@ -6,11 +6,11 @@ import { SubscriberResponseDto } from "@novu/api/models/components"; let value: SubscriberResponseDto = { - environmentId: "", - organizationId: "", - createdAt: "", + subscriberId: "", + organizationId: "", + environmentId: "", deleted: false, - subscriberId: "", + createdAt: "", updatedAt: "", }; ``` @@ -19,20 +19,21 @@ let value: SubscriberResponseDto = { | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `v` | *number* | :heavy_minus_sign: | N/A | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `avatar` | *string* | :heavy_minus_sign: | N/A | -| `channels` | [components.ChannelSettings](../../models/components/channelsettings.md)[] | :heavy_minus_sign: | Channels settings for subscriber | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `deleted` | *boolean* | :heavy_check_mark: | N/A | -| `email` | *string* | :heavy_minus_sign: | N/A | | `firstName` | *string* | :heavy_minus_sign: | N/A | -| `isOnline` | *boolean* | :heavy_minus_sign: | N/A | | `lastName` | *string* | :heavy_minus_sign: | N/A | -| `lastOnlineAt` | *string* | :heavy_minus_sign: | N/A | -| `locale` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | | `phone` | *string* | :heavy_minus_sign: | N/A | +| `avatar` | *string* | :heavy_minus_sign: | N/A | +| `locale` | *string* | :heavy_minus_sign: | N/A | | `subscriberId` | *string* | :heavy_check_mark: | The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems | -| `updatedAt` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `channels` | [components.ChannelSettings](../../models/components/channelsettings.md)[] | :heavy_minus_sign: | Channels settings for subscriber | +| `topics` | *string*[] | :heavy_minus_sign: | Topics that subscriber belongs to | +| `isOnline` | *boolean* | :heavy_minus_sign: | N/A | +| `lastOnlineAt` | *string* | :heavy_minus_sign: | N/A | +| `organizationId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | +| `deleted` | *boolean* | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `updatedAt` | *string* | :heavy_check_mark: | N/A | +| `v` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/system.md b/docs/models/components/system.md deleted file mode 100644 index dfc5ec71..00000000 --- a/docs/models/components/system.md +++ /dev/null @@ -1,14 +0,0 @@ -# System - -## Example Usage - -```typescript -import { System } from "@novu/api/models/components"; - -let value: System = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/templateresponse.md b/docs/models/components/templateresponse.md index 47ba212f..b7db0638 100644 --- a/docs/models/components/templateresponse.md +++ b/docs/models/components/templateresponse.md @@ -7,8 +7,8 @@ import { TemplateResponse } from "@novu/api/models/components"; let value: TemplateResponse = { id: "", - critical: false, name: "", + critical: false, triggers: [ "", ], @@ -20,6 +20,6 @@ let value: TemplateResponse = { | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | Unique identifier of the workflow | -| `critical` | *boolean* | :heavy_check_mark: | Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen | | `name` | *string* | :heavy_check_mark: | Name of the workflow | +| `critical` | *boolean* | :heavy_check_mark: | Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen | | `triggers` | *string*[] | :heavy_check_mark: | Triggers are the events that will trigger the workflow. | \ No newline at end of file diff --git a/docs/models/components/tenant.md b/docs/models/components/tenant.md index 5d4ea854..41d67814 100644 --- a/docs/models/components/tenant.md +++ b/docs/models/components/tenant.md @@ -4,25 +4,18 @@ It is used to specify a tenant context during trigger event. Existing tenants will be updated with the provided details. -## Example Usage - -```typescript -import { Tenant } from "@novu/api/models/components"; - -let value: Tenant = {}; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `components.TenantPayloadDto` ```typescript -const value: components.TenantPayloadDto = /* values here */ +const value: components.TenantPayloadDto = {}; ``` diff --git a/docs/models/components/tenantpayloaddto.md b/docs/models/components/tenantpayloaddto.md index 41a3fbb3..661d9a83 100644 --- a/docs/models/components/tenantpayloaddto.md +++ b/docs/models/components/tenantpayloaddto.md @@ -12,6 +12,6 @@ let value: TenantPayloadDto = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `data` | [components.TenantPayloadDtoData](../../models/components/tenantpayloaddtodata.md) | :heavy_minus_sign: | N/A | | `identifier` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `name` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.TenantPayloadDtoData](../../models/components/tenantpayloaddtodata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/timedconfig.md b/docs/models/components/timedconfig.md index c2882edb..201d9d7e 100644 --- a/docs/models/components/timedconfig.md +++ b/docs/models/components/timedconfig.md @@ -13,8 +13,8 @@ let value: TimedConfig = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `atTime` | *string* | :heavy_minus_sign: | N/A | +| `weekDays` | [components.WeekDays](../../models/components/weekdays.md)[] | :heavy_minus_sign: | N/A | | `monthDays` | *string*[] | :heavy_minus_sign: | N/A | -| `monthlyType` | [components.MonthlyType](../../models/components/monthlytype.md) | :heavy_minus_sign: | N/A | | `ordinal` | [components.Ordinal](../../models/components/ordinal.md) | :heavy_minus_sign: | N/A | | `ordinalValue` | [components.OrdinalValue](../../models/components/ordinalvalue.md) | :heavy_minus_sign: | N/A | -| `weekDays` | [components.WeekDays](../../models/components/weekdays.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `monthlyType` | [components.MonthlyType](../../models/components/monthlytype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/to.md b/docs/models/components/to.md index 7dfeee10..6a16d8b4 100644 --- a/docs/models/components/to.md +++ b/docs/models/components/to.md @@ -1,30 +1,28 @@ # To -## Example Usage - -```typescript -import { To } from "@novu/api/models/components"; - -let value: To = "SUBSCRIBER_ID"; -``` ## Supported Types ### `components.SubscriberPayloadDto` ```typescript -const value: components.SubscriberPayloadDto = /* values here */ +const value: components.SubscriberPayloadDto = { + subscriberId: "", +}; ``` ### `string` ```typescript -const value: string = /* values here */ +const value: string = "SUBSCRIBER_ID"; ``` ### `components.TopicPayloadDto` ```typescript -const value: components.TopicPayloadDto = /* values here */ +const value: components.TopicPayloadDto = { + topicKey: "", + type: "Topic", +}; ``` diff --git a/docs/models/components/topicdto.md b/docs/models/components/topicdto.md index b91cff17..5bfda316 100644 --- a/docs/models/components/topicdto.md +++ b/docs/models/components/topicdto.md @@ -6,8 +6,8 @@ import { TopicDto } from "@novu/api/models/components"; let value: TopicDto = { - environmentId: "", - organizationId: "", + organizationId: "", + environmentId: "", key: "", name: "", subscribers: [ @@ -20,9 +20,9 @@ let value: TopicDto = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `key` | *string* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_check_mark: | N/A | | `subscribers` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/topicpayloaddto.md b/docs/models/components/topicpayloaddto.md index 28bc3522..030a93e5 100644 --- a/docs/models/components/topicpayloaddto.md +++ b/docs/models/components/topicpayloaddto.md @@ -13,7 +13,7 @@ let value: TopicPayloadDto = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `topicKey` | *string* | :heavy_check_mark: | N/A | | -| `type` | [components.TopicPayloadDtoType](../../models/components/topicpayloaddtotype.md) | :heavy_check_mark: | N/A | Topic | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `topicKey` | *string* | :heavy_check_mark: | N/A | | +| `type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | N/A | Topic | \ No newline at end of file diff --git a/docs/models/components/topicpayloaddtotype.md b/docs/models/components/topicpayloaddtotype.md deleted file mode 100644 index ab949005..00000000 --- a/docs/models/components/topicpayloaddtotype.md +++ /dev/null @@ -1,15 +0,0 @@ -# TopicPayloadDtoType - -## Example Usage - -```typescript -import { TopicPayloadDtoType } from "@novu/api/models/components"; - -let value: TopicPayloadDtoType = "Topic"; -``` - -## Values - -```typescript -"Subscriber" | "Topic" -``` \ No newline at end of file diff --git a/docs/models/components/topicsubscriberdto.md b/docs/models/components/topicsubscriberdto.md index 716a8e71..99c8f9b0 100644 --- a/docs/models/components/topicsubscriberdto.md +++ b/docs/models/components/topicsubscriberdto.md @@ -6,12 +6,12 @@ import { TopicSubscriberDto } from "@novu/api/models/components"; let value: TopicSubscriberDto = { - environmentId: "", - organizationId: "", - subscriberId: "", - topicId: "", - externalSubscriberId: "", + organizationId: "", + environmentId: "", + subscriberId: "", + topicId: "", topicKey: "", + externalSubscriberId: "", }; ``` @@ -19,9 +19,9 @@ let value: TopicSubscriberDto = { | Field | Type | Required | Description | | ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `environmentId` | *string* | :heavy_check_mark: | N/A | | `organizationId` | *string* | :heavy_check_mark: | N/A | +| `environmentId` | *string* | :heavy_check_mark: | N/A | | `subscriberId` | *string* | :heavy_check_mark: | N/A | | `topicId` | *string* | :heavy_check_mark: | N/A | -| `externalSubscriberId` | *string* | :heavy_check_mark: | N/A | -| `topicKey` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `topicKey` | *string* | :heavy_check_mark: | N/A | +| `externalSubscriberId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/translations.md b/docs/models/components/translations.md deleted file mode 100644 index 21622673..00000000 --- a/docs/models/components/translations.md +++ /dev/null @@ -1,14 +0,0 @@ -# Translations - -## Example Usage - -```typescript -import { Translations } from "@novu/api/models/components"; - -let value: Translations = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/triggereventrequestdto.md b/docs/models/components/triggereventrequestdto.md index 1ce1aed0..f852e4c2 100644 --- a/docs/models/components/triggereventrequestdto.md +++ b/docs/models/components/triggereventrequestdto.md @@ -7,12 +7,11 @@ import { TriggerEventRequestDto } from "@novu/api/models/components"; let value: TriggerEventRequestDto = { name: "workflow_identifier", - overrides: {}, payload: {}, + overrides: {}, to: [ { - topicKey: "", - type: "Topic", + subscriberId: "", }, ], }; @@ -22,12 +21,12 @@ let value: TriggerEventRequestDto = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `actor` | *components.Actor* | :heavy_minus_sign: | It is used to display the Avatar of the provided actor's subscriber id or actor object.
If a new actor object is provided, we will create a new subscriber in our system
| | -| `bridgeUrl` | *string* | :heavy_minus_sign: | N/A | | -| `controls` | [components.Controls](../../models/components/controls.md) | :heavy_minus_sign: | N/A | | | `name` | *string* | :heavy_check_mark: | The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page. | workflow_identifier | -| `overrides` | [components.TriggerEventRequestDtoOverrides](../../models/components/triggereventrequestdtooverrides.md) | :heavy_minus_sign: | This could be used to override provider specific configurations | {
"fcm": {
"data": {
"key": "value"
}
}
} | -| `payload` | [components.TriggerEventRequestDtoPayload](../../models/components/triggereventrequestdtopayload.md) | :heavy_minus_sign: | The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it.
This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. | {
"comment_id": "string",
"post": {
"text": "string"
}
} | -| `tenant` | *components.Tenant* | :heavy_minus_sign: | It is used to specify a tenant context during trigger event.
Existing tenants will be updated with the provided details.
| | +| `payload` | [components.Payload](../../models/components/payload.md) | :heavy_minus_sign: | The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it.
This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. | {
"comment_id": "string",
"post": {
"text": "string"
}
} | +| `overrides` | [components.Overrides](../../models/components/overrides.md) | :heavy_minus_sign: | This could be used to override provider specific configurations | {
"fcm": {
"data": {
"key": "value"
}
}
} | | `to` | *components.To*[] | :heavy_check_mark: | The recipients list of people who will receive the notification. | | -| `transactionId` | *string* | :heavy_minus_sign: | A unique identifier for this transaction, we will generated a UUID if not provided. | | \ No newline at end of file +| `transactionId` | *string* | :heavy_minus_sign: | A unique identifier for this transaction, we will generated a UUID if not provided. | | +| `actor` | *components.Actor* | :heavy_minus_sign: | It is used to display the Avatar of the provided actor's subscriber id or actor object.
If a new actor object is provided, we will create a new subscriber in our system
| | +| `tenant` | *components.Tenant* | :heavy_minus_sign: | It is used to specify a tenant context during trigger event.
Existing tenants will be updated with the provided details.
| | +| `bridgeUrl` | *string* | :heavy_minus_sign: | N/A | | +| `controls` | [components.Controls](../../models/components/controls.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/triggereventrequestdtooverrides.md b/docs/models/components/triggereventrequestdtooverrides.md deleted file mode 100644 index 73f84a08..00000000 --- a/docs/models/components/triggereventrequestdtooverrides.md +++ /dev/null @@ -1,16 +0,0 @@ -# TriggerEventRequestDtoOverrides - -This could be used to override provider specific configurations - -## Example Usage - -```typescript -import { TriggerEventRequestDtoOverrides } from "@novu/api/models/components"; - -let value: TriggerEventRequestDtoOverrides = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/triggereventrequestdtopayload.md b/docs/models/components/triggereventrequestdtopayload.md deleted file mode 100644 index 8a1b98ca..00000000 --- a/docs/models/components/triggereventrequestdtopayload.md +++ /dev/null @@ -1,17 +0,0 @@ -# TriggerEventRequestDtoPayload - -The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. - This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. - -## Example Usage - -```typescript -import { TriggerEventRequestDtoPayload } from "@novu/api/models/components"; - -let value: TriggerEventRequestDtoPayload = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/triggereventresponsedto.md b/docs/models/components/triggereventresponsedto.md index 49fbc392..89c9af1b 100644 --- a/docs/models/components/triggereventresponsedto.md +++ b/docs/models/components/triggereventresponsedto.md @@ -7,7 +7,7 @@ import { TriggerEventResponseDto } from "@novu/api/models/components"; let value: TriggerEventResponseDto = { acknowledged: false, - status: "processed", + status: "error", }; ``` @@ -16,6 +16,6 @@ let value: TriggerEventResponseDto = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `acknowledged` | *boolean* | :heavy_check_mark: | If trigger was acknowledged or not | -| `error` | *string*[] | :heavy_minus_sign: | In case of an error, this field will contain the error message | | `status` | [components.TriggerEventResponseDtoStatus](../../models/components/triggereventresponsedtostatus.md) | :heavy_check_mark: | Status for trigger | +| `error` | *string*[] | :heavy_minus_sign: | In case of an error, this field will contain the error message | | `transactionId` | *string* | :heavy_minus_sign: | Transaction id for trigger | \ No newline at end of file diff --git a/docs/models/components/triggereventresponsedtostatus.md b/docs/models/components/triggereventresponsedtostatus.md index 77d749b0..548b3edd 100644 --- a/docs/models/components/triggereventresponsedtostatus.md +++ b/docs/models/components/triggereventresponsedtostatus.md @@ -7,7 +7,7 @@ Status for trigger ```typescript import { TriggerEventResponseDtoStatus } from "@novu/api/models/components"; -let value: TriggerEventResponseDtoStatus = "no_workflow_steps_defined"; +let value: TriggerEventResponseDtoStatus = "processed"; ``` ## Values diff --git a/docs/models/components/triggereventtoallrequestdto.md b/docs/models/components/triggereventtoallrequestdto.md index fec71ca3..393033e9 100644 --- a/docs/models/components/triggereventtoallrequestdto.md +++ b/docs/models/components/triggereventtoallrequestdto.md @@ -7,8 +7,8 @@ import { TriggerEventToAllRequestDto } from "@novu/api/models/components"; let value: TriggerEventToAllRequestDto = { name: "", - overrides: {}, payload: {}, + overrides: {}, }; ``` @@ -16,9 +16,9 @@ let value: TriggerEventToAllRequestDto = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `actor` | *components.TriggerEventToAllRequestDtoActor* | :heavy_minus_sign: | It is used to display the Avatar of the provided actor's subscriber id or actor object.
If a new actor object is provided, we will create a new subscriber in our system
| | | `name` | *string* | :heavy_check_mark: | The trigger identifier associated for the template you wish to send. This identifier can be found on the template page. | | -| `overrides` | [components.TriggerEventToAllRequestDtoOverrides](../../models/components/triggereventtoallrequestdtooverrides.md) | :heavy_minus_sign: | This could be used to override provider specific configurations | {
"fcm": {
"data": {
"key": "value"
}
}
} | | `payload` | [components.TriggerEventToAllRequestDtoPayload](../../models/components/triggereventtoallrequestdtopayload.md) | :heavy_check_mark: | The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it.
This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. | {
"comment_id": "string",
"post": {
"text": "string"
}
} | -| `tenant` | *components.TriggerEventToAllRequestDtoTenant* | :heavy_minus_sign: | It is used to specify a tenant context during trigger event.
If a new tenant object is provided, we will create a new tenant.
| | -| `transactionId` | *string* | :heavy_minus_sign: | A unique identifier for this transaction, we will generated a UUID if not provided. | | \ No newline at end of file +| `overrides` | [components.TriggerEventToAllRequestDtoOverrides](../../models/components/triggereventtoallrequestdtooverrides.md) | :heavy_minus_sign: | This could be used to override provider specific configurations | {
"fcm": {
"data": {
"key": "value"
}
}
} | +| `transactionId` | *string* | :heavy_minus_sign: | A unique identifier for this transaction, we will generated a UUID if not provided. | | +| `actor` | *components.TriggerEventToAllRequestDtoActor* | :heavy_minus_sign: | It is used to display the Avatar of the provided actor's subscriber id or actor object.
If a new actor object is provided, we will create a new subscriber in our system
| | +| `tenant` | *components.TriggerEventToAllRequestDtoTenant* | :heavy_minus_sign: | It is used to specify a tenant context during trigger event.
If a new tenant object is provided, we will create a new tenant.
| | \ No newline at end of file diff --git a/docs/models/components/triggereventtoallrequestdtoactor.md b/docs/models/components/triggereventtoallrequestdtoactor.md index f40e47dd..8eb237df 100644 --- a/docs/models/components/triggereventtoallrequestdtoactor.md +++ b/docs/models/components/triggereventtoallrequestdtoactor.md @@ -4,27 +4,20 @@ It is used to display the Avatar of the provided actor's subscriber id or actor If a new actor object is provided, we will create a new subscriber in our system -## Example Usage - -```typescript -import { TriggerEventToAllRequestDtoActor } from "@novu/api/models/components"; - -let value: TriggerEventToAllRequestDtoActor = { - subscriberId: "", -}; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `components.SubscriberPayloadDto` ```typescript -const value: components.SubscriberPayloadDto = /* values here */ +const value: components.SubscriberPayloadDto = { + subscriberId: "", +}; ``` diff --git a/docs/models/components/triggereventtoallrequestdtotenant.md b/docs/models/components/triggereventtoallrequestdtotenant.md index ec8b0b47..c7d3d28b 100644 --- a/docs/models/components/triggereventtoallrequestdtotenant.md +++ b/docs/models/components/triggereventtoallrequestdtotenant.md @@ -4,25 +4,18 @@ It is used to specify a tenant context during trigger event. If a new tenant object is provided, we will create a new tenant. -## Example Usage - -```typescript -import { TriggerEventToAllRequestDtoTenant } from "@novu/api/models/components"; - -let value: TriggerEventToAllRequestDtoTenant = {}; -``` ## Supported Types ### `string` ```typescript -const value: string = /* values here */ +const value: string = ""; ``` ### `components.TenantPayloadDto` ```typescript -const value: components.TenantPayloadDto = /* values here */ +const value: components.TenantPayloadDto = {}; ``` diff --git a/docs/models/components/type.md b/docs/models/components/type.md index d80a2295..ffc431f7 100644 --- a/docs/models/components/type.md +++ b/docs/models/components/type.md @@ -5,11 +5,11 @@ ```typescript import { Type } from "@novu/api/models/components"; -let value: Type = "DefaultLayout"; +let value: Type = "Topic"; ``` ## Values ```typescript -"Feed" | "MessageTemplate" | "Layout" | "DefaultLayout" | "NotificationTemplate" | "NotificationGroup" | "TranslationGroup" | "Translation" +"Subscriber" | "Topic" ``` \ No newline at end of file diff --git a/docs/models/components/unit.md b/docs/models/components/unit.md index c493c406..2d1fae4a 100644 --- a/docs/models/components/unit.md +++ b/docs/models/components/unit.md @@ -5,7 +5,7 @@ ```typescript import { Unit } from "@novu/api/models/components"; -let value: Unit = "weeks"; +let value: Unit = "days"; ``` ## Values diff --git a/docs/models/components/unseencountresponse.md b/docs/models/components/unseencountresponse.md index 2594614d..0c18cc03 100644 --- a/docs/models/components/unseencountresponse.md +++ b/docs/models/components/unseencountresponse.md @@ -6,7 +6,7 @@ import { UnseenCountResponse } from "@novu/api/models/components"; let value: UnseenCountResponse = { - count: 7506.86, + count: 8137.98, }; ``` diff --git a/docs/models/components/updatebrandingdetailsdto.md b/docs/models/components/updatebrandingdetailsdto.md deleted file mode 100644 index cfdd42a4..00000000 --- a/docs/models/components/updatebrandingdetailsdto.md +++ /dev/null @@ -1,24 +0,0 @@ -# UpdateBrandingDetailsDto - -## Example Usage - -```typescript -import { UpdateBrandingDetailsDto } from "@novu/api/models/components"; - -let value: UpdateBrandingDetailsDto = { - color: "plum", - contentBackground: "", - fontColor: "", - logo: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `color` | *string* | :heavy_check_mark: | N/A | -| `contentBackground` | *string* | :heavy_check_mark: | N/A | -| `fontColor` | *string* | :heavy_check_mark: | N/A | -| `fontFamily` | *string* | :heavy_minus_sign: | N/A | -| `logo` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateintegrationrequestdto.md b/docs/models/components/updateintegrationrequestdto.md index 87df9622..a5db2b51 100644 --- a/docs/models/components/updateintegrationrequestdto.md +++ b/docs/models/components/updateintegrationrequestdto.md @@ -12,11 +12,11 @@ let value: UpdateIntegrationRequestDto = {}; | Field | Type | Required | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `identifier` | *string* | :heavy_minus_sign: | N/A | | `environmentId` | *string* | :heavy_minus_sign: | N/A | | `active` | *boolean* | :heavy_minus_sign: | If the integration is active the validation on the credentials field will run | -| `check` | *boolean* | :heavy_minus_sign: | N/A | -| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | | `credentials` | [components.CredentialsDto](../../models/components/credentialsdto.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `removeNovuBranding` | *boolean* | :heavy_minus_sign: | If true, the Novu branding will be removed from the Inbox component | \ No newline at end of file +| `removeNovuBranding` | *boolean* | :heavy_minus_sign: | If true, the Novu branding will be removed from the Inbox component | +| `check` | *boolean* | :heavy_minus_sign: | N/A | +| `conditions` | [components.StepFilter](../../models/components/stepfilter.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatelayoutrequestdto.md b/docs/models/components/updatelayoutrequestdto.md deleted file mode 100644 index 192e97af..00000000 --- a/docs/models/components/updatelayoutrequestdto.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateLayoutRequestDto - -## Example Usage - -```typescript -import { UpdateLayoutRequestDto } from "@novu/api/models/components"; - -let value: UpdateLayoutRequestDto = { - identifier: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `content` | *string* | :heavy_minus_sign: | User defined content for the layout. | -| `description` | *string* | :heavy_minus_sign: | User defined description of the layout | -| `identifier` | *string* | :heavy_check_mark: | User defined custom key that will be a unique identifier for the Layout updated. | -| `isDefault` | *boolean* | :heavy_minus_sign: | Variable that defines if the layout is chosen as default when creating a layout. | -| `name` | *string* | :heavy_minus_sign: | User defined custom name and provided by the user that will name the Layout updated. | -| `variables` | [components.Variables](../../models/components/variables.md) | :heavy_minus_sign: | User defined variables to render in the layout placeholders. | \ No newline at end of file diff --git a/docs/models/components/updatelayoutresponsedto.md b/docs/models/components/updatelayoutresponsedto.md deleted file mode 100644 index 3ae0539e..00000000 --- a/docs/models/components/updatelayoutresponsedto.md +++ /dev/null @@ -1,41 +0,0 @@ -# UpdateLayoutResponseDto - -## Example Usage - -```typescript -import { UpdateLayoutResponseDto } from "@novu/api/models/components"; - -let value: UpdateLayoutResponseDto = { - creatorId: "", - environmentId: "", - organizationId: "", - channel: "push", - content: "", - contentType: "", - identifier: "", - isDefault: false, - isDeleted: false, - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `creatorId` | *string* | :heavy_check_mark: | N/A | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | -| `parentId` | *string* | :heavy_minus_sign: | N/A | -| `channel` | [components.UpdateLayoutResponseDtoChannel](../../models/components/updatelayoutresponsedtochannel.md) | :heavy_check_mark: | N/A | -| `content` | *string* | :heavy_check_mark: | N/A | -| `contentType` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `isDefault` | *boolean* | :heavy_check_mark: | N/A | -| `isDeleted` | *boolean* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `updatedAt` | *string* | :heavy_minus_sign: | N/A | -| `variables` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatelayoutresponsedtochannel.md b/docs/models/components/updatelayoutresponsedtochannel.md deleted file mode 100644 index e4c37839..00000000 --- a/docs/models/components/updatelayoutresponsedtochannel.md +++ /dev/null @@ -1,15 +0,0 @@ -# UpdateLayoutResponseDtoChannel - -## Example Usage - -```typescript -import { UpdateLayoutResponseDtoChannel } from "@novu/api/models/components"; - -let value: UpdateLayoutResponseDtoChannel = "push"; -``` - -## Values - -```typescript -"in_app" | "email" | "sms" | "chat" | "push" -``` \ No newline at end of file diff --git a/docs/models/components/updatesubscriberchannelrequestdto.md b/docs/models/components/updatesubscriberchannelrequestdto.md index 0c0c628c..45d6f666 100644 --- a/docs/models/components/updatesubscriberchannelrequestdto.md +++ b/docs/models/components/updatesubscriberchannelrequestdto.md @@ -6,17 +6,17 @@ import { UpdateSubscriberChannelRequestDto } from "@novu/api/models/components"; let value: UpdateSubscriberChannelRequestDto = { + providerId: "whatsapp-business", credentials: { - webhookUrl: "", + webhookUrl: "https://old-fashioned-deck.org", }, - providerId: 5373.73, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | -| `integrationIdentifier` | *string* | :heavy_minus_sign: | The integration identifier | -| `providerId` | *number* | :heavy_check_mark: | The provider identifier for the credentials | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `providerId` | [components.UpdateSubscriberChannelRequestDtoProviderId](../../models/components/updatesubscriberchannelrequestdtoproviderid.md) | :heavy_check_mark: | The provider identifier for the credentials | +| `integrationIdentifier` | *string* | :heavy_minus_sign: | The integration identifier | +| `credentials` | [components.ChannelCredentials](../../models/components/channelcredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | \ No newline at end of file diff --git a/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md new file mode 100644 index 00000000..78e8a2e8 --- /dev/null +++ b/docs/models/components/updatesubscriberchannelrequestdtoproviderid.md @@ -0,0 +1,17 @@ +# UpdateSubscriberChannelRequestDtoProviderId + +The provider identifier for the credentials + +## Example Usage + +```typescript +import { UpdateSubscriberChannelRequestDtoProviderId } from "@novu/api/models/components"; + +let value: UpdateSubscriberChannelRequestDtoProviderId = "ryver"; +``` + +## Values + +```typescript +"slack" | "discord" | "msteams" | "mattermost" | "ryver" | "zulip" | "grafana-on-call" | "getstream" | "rocket-chat" | "whatsapp-business" | "fcm" | "apns" | "expo" | "one-signal" | "pushpad" | "push-webhook" | "pusher-beams" +``` \ No newline at end of file diff --git a/docs/models/components/updatesubscriberpreferenceresponsedto.md b/docs/models/components/updatesubscriberpreferenceresponsedto.md index 5f0733f0..1d52bc61 100644 --- a/docs/models/components/updatesubscriberpreferenceresponsedto.md +++ b/docs/models/components/updatesubscriberpreferenceresponsedto.md @@ -6,18 +6,18 @@ import { UpdateSubscriberPreferenceResponseDto } from "@novu/api/models/components"; let value: UpdateSubscriberPreferenceResponseDto = { - preference: { - channels: {}, - enabled: false, - }, template: { id: "", - critical: false, name: "", + critical: false, triggers: [ "", ], }, + preference: { + enabled: false, + channels: {}, + }, }; ``` @@ -25,5 +25,5 @@ let value: UpdateSubscriberPreferenceResponseDto = { | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `preference` | [components.Preference](../../models/components/preference.md) | :heavy_check_mark: | The preferences of the subscriber regarding the related workflow | -| `template` | [components.TemplateResponse](../../models/components/templateresponse.md) | :heavy_check_mark: | The workflow information and if it is critical or not | \ No newline at end of file +| `template` | [components.TemplateResponse](../../models/components/templateresponse.md) | :heavy_check_mark: | The workflow information and if it is critical or not | +| `preference` | [components.Preference](../../models/components/preference.md) | :heavy_check_mark: | The preferences of the subscriber regarding the related workflow | \ No newline at end of file diff --git a/docs/models/components/updatesubscriberrequestdto.md b/docs/models/components/updatesubscriberrequestdto.md index e50179cf..abfd3ec6 100644 --- a/docs/models/components/updatesubscriberrequestdto.md +++ b/docs/models/components/updatesubscriberrequestdto.md @@ -12,10 +12,11 @@ let value: UpdateSubscriberRequestDto = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `avatar` | *string* | :heavy_minus_sign: | N/A | -| `data` | [components.UpdateSubscriberRequestDtoData](../../models/components/updatesubscriberrequestdtodata.md) | :heavy_minus_sign: | N/A | | `email` | *string* | :heavy_minus_sign: | N/A | | `firstName` | *string* | :heavy_minus_sign: | N/A | | `lastName` | *string* | :heavy_minus_sign: | N/A | +| `phone` | *string* | :heavy_minus_sign: | N/A | +| `avatar` | *string* | :heavy_minus_sign: | N/A | | `locale` | *string* | :heavy_minus_sign: | N/A | -| `phone` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `data` | [components.UpdateSubscriberRequestDtoData](../../models/components/updatesubscriberrequestdtodata.md) | :heavy_minus_sign: | N/A | +| `channels` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatetenantrequestdto.md b/docs/models/components/updatetenantrequestdto.md deleted file mode 100644 index ac3be0e2..00000000 --- a/docs/models/components/updatetenantrequestdto.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateTenantRequestDto - -## Example Usage - -```typescript -import { UpdateTenantRequestDto } from "@novu/api/models/components"; - -let value: UpdateTenantRequestDto = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [components.UpdateTenantRequestDtoData](../../models/components/updatetenantrequestdtodata.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatetenantrequestdtodata.md b/docs/models/components/updatetenantrequestdtodata.md deleted file mode 100644 index c9468b09..00000000 --- a/docs/models/components/updatetenantrequestdtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateTenantRequestDtoData - -## Example Usage - -```typescript -import { UpdateTenantRequestDtoData } from "@novu/api/models/components"; - -let value: UpdateTenantRequestDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/updatetenantresponsedto.md b/docs/models/components/updatetenantresponsedto.md deleted file mode 100644 index 5ff64e3c..00000000 --- a/docs/models/components/updatetenantresponsedto.md +++ /dev/null @@ -1,27 +0,0 @@ -# UpdateTenantResponseDto - -## Example Usage - -```typescript -import { UpdateTenantResponseDto } from "@novu/api/models/components"; - -let value: UpdateTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `data` | [components.UpdateTenantResponseDtoData](../../models/components/updatetenantresponsedtodata.md) | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatetenantresponsedtodata.md b/docs/models/components/updatetenantresponsedtodata.md deleted file mode 100644 index bd961272..00000000 --- a/docs/models/components/updatetenantresponsedtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateTenantResponseDtoData - -## Example Usage - -```typescript -import { UpdateTenantResponseDtoData } from "@novu/api/models/components"; - -let value: UpdateTenantResponseDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/updateworkflowrequestdto.md b/docs/models/components/updateworkflowrequestdto.md deleted file mode 100644 index ddfbb2d4..00000000 --- a/docs/models/components/updateworkflowrequestdto.md +++ /dev/null @@ -1,26 +0,0 @@ -# UpdateWorkflowRequestDto - -## Example Usage - -```typescript -import { UpdateWorkflowRequestDto } from "@novu/api/models/components"; - -let value: UpdateWorkflowRequestDto = { - name: "", - notificationGroupId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `critical` | *boolean* | :heavy_minus_sign: | N/A | -| `data` | [components.UpdateWorkflowRequestDtoData](../../models/components/updateworkflowrequestdtodata.md) | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `identifier` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `notificationGroupId` | *string* | :heavy_check_mark: | N/A | -| `preferenceSettings` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_minus_sign: | N/A | -| `steps` | *string*[] | :heavy_minus_sign: | N/A | -| `tags` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateworkflowrequestdtodata.md b/docs/models/components/updateworkflowrequestdtodata.md deleted file mode 100644 index 0ea57b03..00000000 --- a/docs/models/components/updateworkflowrequestdtodata.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateWorkflowRequestDtoData - -## Example Usage - -```typescript -import { UpdateWorkflowRequestDtoData } from "@novu/api/models/components"; - -let value: UpdateWorkflowRequestDtoData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/value.md b/docs/models/components/value.md index b49c292d..b9f79c7e 100644 --- a/docs/models/components/value.md +++ b/docs/models/components/value.md @@ -5,7 +5,7 @@ ```typescript import { Value } from "@novu/api/models/components"; -let value: Value = "AND"; +let value: Value = "OR"; ``` ## Values diff --git a/docs/models/components/variables.md b/docs/models/components/variables.md deleted file mode 100644 index 2f3af845..00000000 --- a/docs/models/components/variables.md +++ /dev/null @@ -1,16 +0,0 @@ -# Variables - -User defined variables to render in the layout placeholders. - -## Example Usage - -```typescript -import { Variables } from "@novu/api/models/components"; - -let value: Variables = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/variablesresponsedto.md b/docs/models/components/variablesresponsedto.md deleted file mode 100644 index d76878fb..00000000 --- a/docs/models/components/variablesresponsedto.md +++ /dev/null @@ -1,19 +0,0 @@ -# VariablesResponseDto - -## Example Usage - -```typescript -import { VariablesResponseDto } from "@novu/api/models/components"; - -let value: VariablesResponseDto = { - system: {}, - translations: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `system` | [components.System](../../models/components/system.md) | :heavy_check_mark: | N/A | -| `translations` | [components.Translations](../../models/components/translations.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/weekdays.md b/docs/models/components/weekdays.md index 91b6e4d9..4a73d079 100644 --- a/docs/models/components/weekdays.md +++ b/docs/models/components/weekdays.md @@ -5,7 +5,7 @@ ```typescript import { WeekDays } from "@novu/api/models/components"; -let value: WeekDays = "sunday"; +let value: WeekDays = "tuesday"; ``` ## Values diff --git a/docs/models/components/workflowresponse.md b/docs/models/components/workflowresponse.md index 582f80c6..a0bbc1bd 100644 --- a/docs/models/components/workflowresponse.md +++ b/docs/models/components/workflowresponse.md @@ -6,24 +6,36 @@ import { WorkflowResponse } from "@novu/api/models/components"; let value: WorkflowResponse = { - creatorId: "", - environmentId: "", - notificationGroupId: "", - organizationId: "", + name: "", + description: "hidden remand whether seriously huzzah immediately geez", active: false, - critical: false, - deleted: false, - deletedAt: "", - deletedBy: "", - description: "Advanced eco-centric middleware", draft: false, - name: "", preferenceSettings: {}, - steps: [], + critical: false, tags: [ "", ], - triggers: [], + steps: [ + {}, + ], + organizationId: "", + creatorId: "", + environmentId: "", + triggers: [ + { + type: "event", + identifier: "", + variables: [ + { + name: "", + }, + ], + }, + ], + notificationGroupId: "", + deleted: false, + deletedAt: "", + deletedBy: "", }; ``` @@ -31,24 +43,24 @@ let value: WorkflowResponse = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_check_mark: | N/A | +| `active` | *boolean* | :heavy_check_mark: | N/A | +| `draft` | *boolean* | :heavy_check_mark: | N/A | +| `preferenceSettings` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_check_mark: | N/A | +| `critical` | *boolean* | :heavy_check_mark: | N/A | +| `tags` | *string*[] | :heavy_check_mark: | N/A | +| `steps` | [components.NotificationStep](../../models/components/notificationstep.md)[] | :heavy_check_mark: | N/A | +| `organizationId` | *string* | :heavy_check_mark: | N/A | | `creatorId` | *string* | :heavy_check_mark: | N/A | | `environmentId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | +| `triggers` | [components.NotificationTrigger](../../models/components/notificationtrigger.md)[] | :heavy_check_mark: | N/A | | `notificationGroupId` | *string* | :heavy_check_mark: | N/A | -| `organizationId` | *string* | :heavy_check_mark: | N/A | | `parentId` | *string* | :heavy_minus_sign: | N/A | -| `active` | *boolean* | :heavy_check_mark: | N/A | -| `critical` | *boolean* | :heavy_check_mark: | N/A | -| `data` | [components.WorkflowResponseData](../../models/components/workflowresponsedata.md) | :heavy_minus_sign: | N/A | | `deleted` | *boolean* | :heavy_check_mark: | N/A | | `deletedAt` | *string* | :heavy_check_mark: | N/A | | `deletedBy` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_check_mark: | N/A | -| `draft` | *boolean* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | | `notificationGroup` | [components.NotificationGroup](../../models/components/notificationgroup.md) | :heavy_minus_sign: | N/A | -| `preferenceSettings` | [components.PreferenceChannels](../../models/components/preferencechannels.md) | :heavy_check_mark: | N/A | -| `steps` | [components.NotificationStep](../../models/components/notificationstep.md)[] | :heavy_check_mark: | N/A | -| `tags` | *string*[] | :heavy_check_mark: | N/A | -| `triggers` | [components.NotificationTrigger](../../models/components/notificationtrigger.md)[] | :heavy_check_mark: | N/A | +| `data` | [components.WorkflowResponseData](../../models/components/workflowresponsedata.md) | :heavy_minus_sign: | N/A | | `workflowIntegrationStatus` | [components.WorkflowIntegrationStatus](../../models/components/workflowintegrationstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/workflowsresponsedto.md b/docs/models/components/workflowsresponsedto.md deleted file mode 100644 index e3be277c..00000000 --- a/docs/models/components/workflowsresponsedto.md +++ /dev/null @@ -1,25 +0,0 @@ -# WorkflowsResponseDto - -## Example Usage - -```typescript -import { WorkflowsResponseDto } from "@novu/api/models/components"; - -let value: WorkflowsResponseDto = { - data: [ - "", - ], - page: 384.25, - pageSize: 4386.01, - totalCount: 6342.74, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `data` | *string*[] | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_check_mark: | N/A | -| `pageSize` | *number* | :heavy_check_mark: | N/A | -| `totalCount` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/changescontrollerapplydiffrequest.md b/docs/models/operations/changescontrollerapplydiffrequest.md deleted file mode 100644 index 96156aad..00000000 --- a/docs/models/operations/changescontrollerapplydiffrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChangesControllerApplyDiffRequest - -## Example Usage - -```typescript -import { ChangesControllerApplyDiffRequest } from "@novu/api/models/operations"; - -let value: ChangesControllerApplyDiffRequest = { - changeId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `changeId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/changescontrollergetchangesrequest.md b/docs/models/operations/changescontrollergetchangesrequest.md deleted file mode 100644 index 6c032e39..00000000 --- a/docs/models/operations/changescontrollergetchangesrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChangesControllerGetChangesRequest - -## Example Usage - -```typescript -import { ChangesControllerGetChangesRequest } from "@novu/api/models/operations"; - -let value: ChangesControllerGetChangesRequest = { - promoted: "false", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | -| `promoted` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/channel.md b/docs/models/operations/channel.md index 5b0da9e5..e7ab724b 100644 --- a/docs/models/operations/channel.md +++ b/docs/models/operations/channel.md @@ -1,13 +1,11 @@ # Channel -The channel of the message to be deleted - ## Example Usage ```typescript import { Channel } from "@novu/api/models/operations"; -let value: Channel = "push"; +let value: Channel = "in_app"; ``` ## Values diff --git a/docs/models/operations/channels.md b/docs/models/operations/channels.md index 08b00444..a38b610c 100644 --- a/docs/models/operations/channels.md +++ b/docs/models/operations/channels.md @@ -5,7 +5,7 @@ ```typescript import { Channels } from "@novu/api/models/operations"; -let value: Channels = "chat"; +let value: Channels = "sms"; ``` ## Values diff --git a/docs/models/operations/layoutscontrollerupdatelayoutrequest.md b/docs/models/operations/environmentscontrollerv1getcurrentenvironmentresponse.md similarity index 60% rename from docs/models/operations/layoutscontrollerupdatelayoutrequest.md rename to docs/models/operations/environmentscontrollerv1getcurrentenvironmentresponse.md index cb9215a1..57876028 100644 --- a/docs/models/operations/layoutscontrollerupdatelayoutrequest.md +++ b/docs/models/operations/environmentscontrollerv1getcurrentenvironmentresponse.md @@ -1,14 +1,21 @@ -# LayoutsControllerUpdateLayoutRequest +# EnvironmentsControllerV1GetCurrentEnvironmentResponse ## Example Usage ```typescript -import { LayoutsControllerUpdateLayoutRequest } from "@novu/api/models/operations"; +import { EnvironmentsControllerV1GetCurrentEnvironmentResponse } from "@novu/api/models/operations"; -let value: LayoutsControllerUpdateLayoutRequest = { - layoutId: "", - updateLayoutRequestDto: { +let value: EnvironmentsControllerV1GetCurrentEnvironmentResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + name: "", + organizationId: "", identifier: "", + parentId: "", }, }; ``` @@ -17,5 +24,5 @@ let value: LayoutsControllerUpdateLayoutRequest = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | -| `updateLayoutRequestDto` | [components.UpdateLayoutRequestDto](../../models/components/updatelayoutrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.EnvironmentResponseDto](../../models/components/environmentresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/environmentscontrollerv1listmyenvironmentsresponse.md b/docs/models/operations/environmentscontrollerv1listmyenvironmentsresponse.md new file mode 100644 index 00000000..b91cef1e --- /dev/null +++ b/docs/models/operations/environmentscontrollerv1listmyenvironmentsresponse.md @@ -0,0 +1,30 @@ +# EnvironmentsControllerV1ListMyEnvironmentsResponse + +## Example Usage + +```typescript +import { EnvironmentsControllerV1ListMyEnvironmentsResponse } from "@novu/api/models/operations"; + +let value: EnvironmentsControllerV1ListMyEnvironmentsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + name: "", + organizationId: "", + identifier: "", + parentId: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.EnvironmentResponseDto](../../models/components/environmentresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/environmentscontrollerv1listorganizationapikeysresponse.md b/docs/models/operations/environmentscontrollerv1listorganizationapikeysresponse.md new file mode 100644 index 00000000..fb55d9a1 --- /dev/null +++ b/docs/models/operations/environmentscontrollerv1listorganizationapikeysresponse.md @@ -0,0 +1,28 @@ +# EnvironmentsControllerV1ListOrganizationApiKeysResponse + +## Example Usage + +```typescript +import { EnvironmentsControllerV1ListOrganizationApiKeysResponse } from "@novu/api/models/operations"; + +let value: EnvironmentsControllerV1ListOrganizationApiKeysResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + key: "", + userId: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ApiKey](../../models/components/apikey.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md b/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md new file mode 100644 index 00000000..27d634f0 --- /dev/null +++ b/docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md @@ -0,0 +1,26 @@ +# EventsControllerBroadcastEventToAllResponse + +## Example Usage + +```typescript +import { EventsControllerBroadcastEventToAllResponse } from "@novu/api/models/operations"; + +let value: EventsControllerBroadcastEventToAllResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + acknowledged: false, + status: "processed", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.TriggerEventResponseDto](../../models/components/triggereventresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/eventscontrollercancelrequest.md b/docs/models/operations/eventscontrollercancelrequest.md index e66845f7..72bf067b 100644 --- a/docs/models/operations/eventscontrollercancelrequest.md +++ b/docs/models/operations/eventscontrollercancelrequest.md @@ -6,7 +6,7 @@ import { EventsControllerCancelRequest } from "@novu/api/models/operations"; let value: EventsControllerCancelRequest = { - transactionId: "", + transactionId: "", }; ``` diff --git a/docs/models/operations/eventscontrollercancelresponse.md b/docs/models/operations/eventscontrollercancelresponse.md new file mode 100644 index 00000000..54202b4f --- /dev/null +++ b/docs/models/operations/eventscontrollercancelresponse.md @@ -0,0 +1,25 @@ +# EventsControllerCancelResponse + +## Example Usage + +```typescript +import { EventsControllerCancelResponse } from "@novu/api/models/operations"; + +let value: EventsControllerCancelResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + data: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.DataBooleanDto](../../models/components/databooleandto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/eventscontrollertriggerbulkresponse.md b/docs/models/operations/eventscontrollertriggerbulkresponse.md new file mode 100644 index 00000000..774620e9 --- /dev/null +++ b/docs/models/operations/eventscontrollertriggerbulkresponse.md @@ -0,0 +1,28 @@ +# EventsControllerTriggerBulkResponse + +## Example Usage + +```typescript +import { EventsControllerTriggerBulkResponse } from "@novu/api/models/operations"; + +let value: EventsControllerTriggerBulkResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + acknowledged: false, + status: "subscriber_id_missing", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.TriggerEventResponseDto](../../models/components/triggereventresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/eventscontrollertriggerresponse.md b/docs/models/operations/eventscontrollertriggerresponse.md new file mode 100644 index 00000000..0fd91b3a --- /dev/null +++ b/docs/models/operations/eventscontrollertriggerresponse.md @@ -0,0 +1,26 @@ +# EventsControllerTriggerResponse + +## Example Usage + +```typescript +import { EventsControllerTriggerResponse } from "@novu/api/models/operations"; + +let value: EventsControllerTriggerResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + acknowledged: false, + status: "no_workflow_steps_defined", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.TriggerEventResponseDto](../../models/components/triggereventresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md index 9e5fbef5..edd1a2ca 100644 --- a/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md +++ b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md @@ -7,8 +7,8 @@ import { ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest } f let value: ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { - notificationId: "", - subscriberId: "", + notificationId: "", + subscriberId: "", }; ``` diff --git a/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationresponse.md b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationresponse.md new file mode 100644 index 00000000..161f7486 --- /dev/null +++ b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationresponse.md @@ -0,0 +1,40 @@ +# ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse + +## Example Usage + +```typescript +import { ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse } from "@novu/api/models/operations"; + +let value: + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + organizationId: "", + jobId: "", + environmentId: "", + notificationId: "", + notificationTemplateId: "", + subscriberId: "", + transactionId: "", + channel: "push", + detail: "", + source: "Internal", + status: "Pending", + isTest: false, + isRetry: false, + }, + ], + }; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ExecutionDetailsResponseDto](../../models/components/executiondetailsresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md b/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md deleted file mode 100644 index 179af31c..00000000 --- a/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# FeedsControllerDeleteFeedByIdRequest - -## Example Usage - -```typescript -import { FeedsControllerDeleteFeedByIdRequest } from "@novu/api/models/operations"; - -let value: FeedsControllerDeleteFeedByIdRequest = { - feedId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `feedId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollercreateintegrationresponse.md b/docs/models/operations/integrationscontrollercreateintegrationresponse.md new file mode 100644 index 00000000..5a964ab9 --- /dev/null +++ b/docs/models/operations/integrationscontrollercreateintegrationresponse.md @@ -0,0 +1,36 @@ +# IntegrationsControllerCreateIntegrationResponse + +## Example Usage + +```typescript +import { IntegrationsControllerCreateIntegrationResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerCreateIntegrationResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "in_app", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollergetactiveintegrationsresponse.md b/docs/models/operations/integrationscontrollergetactiveintegrationsresponse.md new file mode 100644 index 00000000..4b4c3e30 --- /dev/null +++ b/docs/models/operations/integrationscontrollergetactiveintegrationsresponse.md @@ -0,0 +1,38 @@ +# IntegrationsControllerGetActiveIntegrationsResponse + +## Example Usage + +```typescript +import { IntegrationsControllerGetActiveIntegrationsResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerGetActiveIntegrationsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "in_app", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md b/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md index 3495cb1c..a3439ab3 100644 --- a/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md +++ b/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md @@ -6,7 +6,7 @@ import { IntegrationsControllerGetWebhookSupportStatusRequest } from "@novu/api/models/operations"; let value: IntegrationsControllerGetWebhookSupportStatusRequest = { - providerOrIntegrationId: "", + providerOrIntegrationId: "", }; ``` diff --git a/docs/models/operations/integrationscontrollergetwebhooksupportstatusresponse.md b/docs/models/operations/integrationscontrollergetwebhooksupportstatusresponse.md new file mode 100644 index 00000000..e68cdb44 --- /dev/null +++ b/docs/models/operations/integrationscontrollergetwebhooksupportstatusresponse.md @@ -0,0 +1,23 @@ +# IntegrationsControllerGetWebhookSupportStatusResponse + +## Example Usage + +```typescript +import { IntegrationsControllerGetWebhookSupportStatusResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerGetWebhookSupportStatusResponse = { + headers: { + "key": [ + "", + ], + }, + result: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollerlistintegrationsresponse.md b/docs/models/operations/integrationscontrollerlistintegrationsresponse.md new file mode 100644 index 00000000..40dd8daa --- /dev/null +++ b/docs/models/operations/integrationscontrollerlistintegrationsresponse.md @@ -0,0 +1,38 @@ +# IntegrationsControllerListIntegrationsResponse + +## Example Usage + +```typescript +import { IntegrationsControllerListIntegrationsResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerListIntegrationsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "in_app", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollerremoveintegrationrequest.md b/docs/models/operations/integrationscontrollerremoveintegrationrequest.md index 6dfbb687..0c1c7606 100644 --- a/docs/models/operations/integrationscontrollerremoveintegrationrequest.md +++ b/docs/models/operations/integrationscontrollerremoveintegrationrequest.md @@ -6,7 +6,7 @@ import { IntegrationsControllerRemoveIntegrationRequest } from "@novu/api/models/operations"; let value: IntegrationsControllerRemoveIntegrationRequest = { - integrationId: "", + integrationId: "", }; ``` diff --git a/docs/models/operations/integrationscontrollerremoveintegrationresponse.md b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md new file mode 100644 index 00000000..61c6a362 --- /dev/null +++ b/docs/models/operations/integrationscontrollerremoveintegrationresponse.md @@ -0,0 +1,38 @@ +# IntegrationsControllerRemoveIntegrationResponse + +## Example Usage + +```typescript +import { IntegrationsControllerRemoveIntegrationResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerRemoveIntegrationResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "chat", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md b/docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md index bca2b6c6..facc8217 100644 --- a/docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md +++ b/docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md @@ -6,7 +6,7 @@ import { IntegrationsControllerSetIntegrationAsPrimaryRequest } from "@novu/api/models/operations"; let value: IntegrationsControllerSetIntegrationAsPrimaryRequest = { - integrationId: "", + integrationId: "", }; ``` diff --git a/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md new file mode 100644 index 00000000..57678ea8 --- /dev/null +++ b/docs/models/operations/integrationscontrollersetintegrationasprimaryresponse.md @@ -0,0 +1,36 @@ +# IntegrationsControllerSetIntegrationAsPrimaryResponse + +## Example Usage + +```typescript +import { IntegrationsControllerSetIntegrationAsPrimaryResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerSetIntegrationAsPrimaryResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "push", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md b/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md index d277b527..cb43386a 100644 --- a/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md +++ b/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md @@ -6,7 +6,7 @@ import { IntegrationsControllerUpdateIntegrationByIdRequest } from "@novu/api/models/operations"; let value: IntegrationsControllerUpdateIntegrationByIdRequest = { - integrationId: "", + integrationId: "", updateIntegrationRequestDto: {}, }; ``` diff --git a/docs/models/operations/integrationscontrollerupdateintegrationbyidresponse.md b/docs/models/operations/integrationscontrollerupdateintegrationbyidresponse.md new file mode 100644 index 00000000..01b31772 --- /dev/null +++ b/docs/models/operations/integrationscontrollerupdateintegrationbyidresponse.md @@ -0,0 +1,36 @@ +# IntegrationsControllerUpdateIntegrationByIdResponse + +## Example Usage + +```typescript +import { IntegrationsControllerUpdateIntegrationByIdResponse } from "@novu/api/models/operations"; + +let value: IntegrationsControllerUpdateIntegrationByIdResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + environmentId: "", + organizationId: "", + name: "", + identifier: "", + providerId: "", + channel: "push", + credentials: {}, + active: false, + deleted: false, + deletedAt: "", + deletedBy: "", + primary: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.IntegrationResponseDto](../../models/components/integrationresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/layoutscontrollerdeletelayoutrequest.md b/docs/models/operations/layoutscontrollerdeletelayoutrequest.md deleted file mode 100644 index 27ca6443..00000000 --- a/docs/models/operations/layoutscontrollerdeletelayoutrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# LayoutsControllerDeleteLayoutRequest - -## Example Usage - -```typescript -import { LayoutsControllerDeleteLayoutRequest } from "@novu/api/models/operations"; - -let value: LayoutsControllerDeleteLayoutRequest = { - layoutId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | \ No newline at end of file diff --git a/docs/models/operations/layoutscontrollergetlayoutrequest.md b/docs/models/operations/layoutscontrollergetlayoutrequest.md deleted file mode 100644 index 4bf3c2c1..00000000 --- a/docs/models/operations/layoutscontrollergetlayoutrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# LayoutsControllerGetLayoutRequest - -## Example Usage - -```typescript -import { LayoutsControllerGetLayoutRequest } from "@novu/api/models/operations"; - -let value: LayoutsControllerGetLayoutRequest = { - layoutId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | \ No newline at end of file diff --git a/docs/models/operations/layoutscontrollerlistlayoutsrequest.md b/docs/models/operations/layoutscontrollerlistlayoutsrequest.md deleted file mode 100644 index eca0fbff..00000000 --- a/docs/models/operations/layoutscontrollerlistlayoutsrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# LayoutsControllerListLayoutsRequest - -## Example Usage - -```typescript -import { LayoutsControllerListLayoutsRequest } from "@novu/api/models/operations"; - -let value: LayoutsControllerListLayoutsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | Number of page for pagination | -| `pageSize` | *number* | :heavy_minus_sign: | Size of page for pagination | -| `sortBy` | *string* | :heavy_minus_sign: | Sort field. Currently only supported `createdAt` | -| `orderBy` | [operations.OrderBy](../../models/operations/orderby.md) | :heavy_minus_sign: | Direction of the sorting query param | \ No newline at end of file diff --git a/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md b/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md deleted file mode 100644 index b71765e0..00000000 --- a/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# LayoutsControllerSetDefaultLayoutRequest - -## Example Usage - -```typescript -import { LayoutsControllerSetDefaultLayoutRequest } from "@novu/api/models/operations"; - -let value: LayoutsControllerSetDefaultLayoutRequest = { - layoutId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | \ No newline at end of file diff --git a/docs/models/operations/messagescontrollerdeletemessagerequest.md b/docs/models/operations/messagescontrollerdeletemessagerequest.md index a1bbbf03..bd9b94de 100644 --- a/docs/models/operations/messagescontrollerdeletemessagerequest.md +++ b/docs/models/operations/messagescontrollerdeletemessagerequest.md @@ -6,7 +6,7 @@ import { MessagesControllerDeleteMessageRequest } from "@novu/api/models/operations"; let value: MessagesControllerDeleteMessageRequest = { - messageId: "", + messageId: "", }; ``` diff --git a/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md b/docs/models/operations/messagescontrollerdeletemessageresponse.md similarity index 66% rename from docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md rename to docs/models/operations/messagescontrollerdeletemessageresponse.md index 6aeea8aa..f54d9dec 100644 --- a/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md +++ b/docs/models/operations/messagescontrollerdeletemessageresponse.md @@ -1,15 +1,19 @@ -# WorkflowControllerUpdateWorkflowByIdRequest +# MessagesControllerDeleteMessageResponse ## Example Usage ```typescript -import { WorkflowControllerUpdateWorkflowByIdRequest } from "@novu/api/models/operations"; +import { MessagesControllerDeleteMessageResponse } from "@novu/api/models/operations"; -let value: WorkflowControllerUpdateWorkflowByIdRequest = { - workflowId: "", - updateWorkflowRequestDto: { - name: "", - notificationGroupId: "", +let value: MessagesControllerDeleteMessageResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + acknowledged: false, + status: "deleted", }, }; ``` @@ -18,5 +22,5 @@ let value: WorkflowControllerUpdateWorkflowByIdRequest = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `updateWorkflowRequestDto` | [components.UpdateWorkflowRequestDto](../../models/components/updateworkflowrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.DeleteMessageResponseDto](../../models/components/deletemessageresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md index c0dd0db8..5bea039e 100644 --- a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md +++ b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md @@ -6,13 +6,13 @@ import { MessagesControllerDeleteMessagesByTransactionIdRequest } from "@novu/api/models/operations"; let value: MessagesControllerDeleteMessagesByTransactionIdRequest = { - transactionId: "", + transactionId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `channel` | [operations.Channel](../../models/operations/channel.md) | :heavy_minus_sign: | The channel of the message to be deleted | -| `transactionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `channel` | [operations.QueryParamChannel](../../models/operations/queryparamchannel.md) | :heavy_minus_sign: | The channel of the message to be deleted | +| `transactionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md new file mode 100644 index 00000000..eb117477 --- /dev/null +++ b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md @@ -0,0 +1,21 @@ +# MessagesControllerDeleteMessagesByTransactionIdResponse + +## Example Usage + +```typescript +import { MessagesControllerDeleteMessagesByTransactionIdResponse } from "@novu/api/models/operations"; + +let value: MessagesControllerDeleteMessagesByTransactionIdResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/messagescontrollergetmessagesrequest.md b/docs/models/operations/messagescontrollergetmessagesrequest.md index c8242345..1a23c80a 100644 --- a/docs/models/operations/messagescontrollergetmessagesrequest.md +++ b/docs/models/operations/messagescontrollergetmessagesrequest.md @@ -10,10 +10,10 @@ let value: MessagesControllerGetMessagesRequest = {}; ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `channel` | [operations.QueryParamChannel](../../models/operations/queryparamchannel.md) | :heavy_minus_sign: | N/A | -| `subscriberId` | *string* | :heavy_minus_sign: | N/A | -| `transactionId` | *string*[] | :heavy_minus_sign: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `channel` | [operations.Channel](../../models/operations/channel.md) | :heavy_minus_sign: | N/A | +| `subscriberId` | *string* | :heavy_minus_sign: | N/A | +| `transactionId` | *string*[] | :heavy_minus_sign: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/messagescontrollergetmessagesresponse.md b/docs/models/operations/messagescontrollergetmessagesresponse.md new file mode 100644 index 00000000..e3444aa3 --- /dev/null +++ b/docs/models/operations/messagescontrollergetmessagesresponse.md @@ -0,0 +1,30 @@ +# MessagesControllerGetMessagesResponse + +## Example Usage + +```typescript +import { MessagesControllerGetMessagesResponse } from "@novu/api/models/operations"; + +let value: MessagesControllerGetMessagesResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + hasMore: false, + data: [ + "", + ], + pageSize: 6531.08, + page: 2532.92, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ActivitiesResponseDto](../../models/components/activitiesresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationgroupscontrollercreatenotificationgroupresponse.md b/docs/models/operations/notificationgroupscontrollercreatenotificationgroupresponse.md new file mode 100644 index 00000000..30dd544a --- /dev/null +++ b/docs/models/operations/notificationgroupscontrollercreatenotificationgroupresponse.md @@ -0,0 +1,27 @@ +# NotificationGroupsControllerCreateNotificationGroupResponse + +## Example Usage + +```typescript +import { NotificationGroupsControllerCreateNotificationGroupResponse } from "@novu/api/models/operations"; + +let value: NotificationGroupsControllerCreateNotificationGroupResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + name: "", + environmentId: "", + organizationId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationgroupscontrollerdeletenotificationgroupresponse.md b/docs/models/operations/notificationgroupscontrollerdeletenotificationgroupresponse.md new file mode 100644 index 00000000..9d4b3783 --- /dev/null +++ b/docs/models/operations/notificationgroupscontrollerdeletenotificationgroupresponse.md @@ -0,0 +1,26 @@ +# NotificationGroupsControllerDeleteNotificationGroupResponse + +## Example Usage + +```typescript +import { NotificationGroupsControllerDeleteNotificationGroupResponse } from "@novu/api/models/operations"; + +let value: NotificationGroupsControllerDeleteNotificationGroupResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + acknowledged: false, + status: "deleted", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.DeleteNotificationGroupResponseDto](../../models/components/deletenotificationgroupresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationgroupscontrollergetnotificationgroupresponse.md b/docs/models/operations/notificationgroupscontrollergetnotificationgroupresponse.md new file mode 100644 index 00000000..0a5962b8 --- /dev/null +++ b/docs/models/operations/notificationgroupscontrollergetnotificationgroupresponse.md @@ -0,0 +1,27 @@ +# NotificationGroupsControllerGetNotificationGroupResponse + +## Example Usage + +```typescript +import { NotificationGroupsControllerGetNotificationGroupResponse } from "@novu/api/models/operations"; + +let value: NotificationGroupsControllerGetNotificationGroupResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + name: "", + environmentId: "", + organizationId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationgroupscontrollerlistnotificationgroupsresponse.md b/docs/models/operations/notificationgroupscontrollerlistnotificationgroupsresponse.md new file mode 100644 index 00000000..bfc3148c --- /dev/null +++ b/docs/models/operations/notificationgroupscontrollerlistnotificationgroupsresponse.md @@ -0,0 +1,29 @@ +# NotificationGroupsControllerListNotificationGroupsResponse + +## Example Usage + +```typescript +import { NotificationGroupsControllerListNotificationGroupsResponse } from "@novu/api/models/operations"; + +let value: NotificationGroupsControllerListNotificationGroupsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + name: "", + environmentId: "", + organizationId: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationgroupscontrollerupdatenotificationgroupresponse.md b/docs/models/operations/notificationgroupscontrollerupdatenotificationgroupresponse.md new file mode 100644 index 00000000..257ac529 --- /dev/null +++ b/docs/models/operations/notificationgroupscontrollerupdatenotificationgroupresponse.md @@ -0,0 +1,27 @@ +# NotificationGroupsControllerUpdateNotificationGroupResponse + +## Example Usage + +```typescript +import { NotificationGroupsControllerUpdateNotificationGroupResponse } from "@novu/api/models/operations"; + +let value: NotificationGroupsControllerUpdateNotificationGroupResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + name: "", + environmentId: "", + organizationId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md new file mode 100644 index 00000000..f8de7850 --- /dev/null +++ b/docs/models/operations/notificationscontrollergetactivitygraphstatsresponse.md @@ -0,0 +1,34 @@ +# NotificationsControllerGetActivityGraphStatsResponse + +## Example Usage + +```typescript +import { NotificationsControllerGetActivityGraphStatsResponse } from "@novu/api/models/operations"; + +let value: NotificationsControllerGetActivityGraphStatsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + id: "", + count: 5680.45, + templates: [ + "", + ], + channels: [ + "push", + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ActivityGraphStatesResponse](../../models/components/activitygraphstatesresponse.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationscontrollergetactivitystatsresponse.md b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md new file mode 100644 index 00000000..0b4e27c4 --- /dev/null +++ b/docs/models/operations/notificationscontrollergetactivitystatsresponse.md @@ -0,0 +1,26 @@ +# NotificationsControllerGetActivityStatsResponse + +## Example Usage + +```typescript +import { NotificationsControllerGetActivityStatsResponse } from "@novu/api/models/operations"; + +let value: NotificationsControllerGetActivityStatsResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + weeklySent: 7917.25, + monthlySent: 5288.95, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ActivityStatsResponseDto](../../models/components/activitystatsresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationscontrollergetnotificationrequest.md b/docs/models/operations/notificationscontrollergetnotificationrequest.md index c65e4ea7..41341f5c 100644 --- a/docs/models/operations/notificationscontrollergetnotificationrequest.md +++ b/docs/models/operations/notificationscontrollergetnotificationrequest.md @@ -6,7 +6,7 @@ import { NotificationsControllerGetNotificationRequest } from "@novu/api/models/operations"; let value: NotificationsControllerGetNotificationRequest = { - notificationId: "", + notificationId: "", }; ``` diff --git a/docs/models/operations/notificationscontrollergetnotificationresponse.md b/docs/models/operations/notificationscontrollergetnotificationresponse.md new file mode 100644 index 00000000..b8b29c82 --- /dev/null +++ b/docs/models/operations/notificationscontrollergetnotificationresponse.md @@ -0,0 +1,27 @@ +# NotificationsControllerGetNotificationResponse + +## Example Usage + +```typescript +import { NotificationsControllerGetNotificationResponse } from "@novu/api/models/operations"; + +let value: NotificationsControllerGetNotificationResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + environmentId: "", + organizationId: "", + transactionId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ActivityNotificationResponseDto](../../models/components/activitynotificationresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/notificationscontrollerlistnotificationsrequest.md b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md index 8e364fe7..052e45b8 100644 --- a/docs/models/operations/notificationscontrollerlistnotificationsrequest.md +++ b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md @@ -7,7 +7,7 @@ import { NotificationsControllerListNotificationsRequest } from "@novu/api/model let value: NotificationsControllerListNotificationsRequest = { channels: [ - "email", + "push", ], templates: [ "", diff --git a/docs/models/operations/notificationscontrollerlistnotificationsresponse.md b/docs/models/operations/notificationscontrollerlistnotificationsresponse.md new file mode 100644 index 00000000..220f95f4 --- /dev/null +++ b/docs/models/operations/notificationscontrollerlistnotificationsresponse.md @@ -0,0 +1,30 @@ +# NotificationsControllerListNotificationsResponse + +## Example Usage + +```typescript +import { NotificationsControllerListNotificationsResponse } from "@novu/api/models/operations"; + +let value: NotificationsControllerListNotificationsResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + hasMore: false, + data: [ + "", + ], + pageSize: 9636.63, + page: 3834.42, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.ActivitiesResponseDto](../../models/components/activitiesresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/orderby.md b/docs/models/operations/orderby.md deleted file mode 100644 index 2b380e52..00000000 --- a/docs/models/operations/orderby.md +++ /dev/null @@ -1,17 +0,0 @@ -# OrderBy - -Direction of the sorting query param - -## Example Usage - -```typescript -import { OrderBy } from "@novu/api/models/operations"; - -let value: OrderBy = "DESC"; -``` - -## Values - -```typescript -"ASC" | "DESC" -``` \ No newline at end of file diff --git a/docs/models/operations/parameter.md b/docs/models/operations/parameter.md index b05e3f36..db1b216b 100644 --- a/docs/models/operations/parameter.md +++ b/docs/models/operations/parameter.md @@ -1,17 +1,17 @@ # Parameter -the preferences level to be retrieved( Subscriber / Topic) +the preferences level to be retrieved (template / global) ## Example Usage ```typescript import { Parameter } from "@novu/api/models/operations"; -let value: Parameter = "Topic"; +let value: Parameter = "global"; ``` ## Values ```typescript -"Subscriber" | "Topic" +"global" | "template" ``` \ No newline at end of file diff --git a/docs/models/operations/queryparamchannel.md b/docs/models/operations/queryparamchannel.md index 9aefd8c7..a9acdf68 100644 --- a/docs/models/operations/queryparamchannel.md +++ b/docs/models/operations/queryparamchannel.md @@ -1,11 +1,13 @@ # QueryParamChannel +The channel of the message to be deleted + ## Example Usage ```typescript import { QueryParamChannel } from "@novu/api/models/operations"; -let value: QueryParamChannel = "in_app"; +let value: QueryParamChannel = "sms"; ``` ## Values diff --git a/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md b/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md new file mode 100644 index 00000000..c03b7c54 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md @@ -0,0 +1,21 @@ +# SubscribersControllerBulkCreateSubscribersResponse + +## Example Usage + +```typescript +import { SubscribersControllerBulkCreateSubscribersResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerBulkCreateSubscribersResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md b/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md index 3e083540..e1a3c7a7 100644 --- a/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md +++ b/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md @@ -6,10 +6,10 @@ import { SubscribersControllerChatAccessOauthRequest } from "@novu/api/models/operations"; let value: SubscribersControllerChatAccessOauthRequest = { - subscriberId: "", + subscriberId: "", providerId: "", hmacHash: "", - environmentId: "", + environmentId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerchataccessoauthresponse.md b/docs/models/operations/subscriberscontrollerchataccessoauthresponse.md new file mode 100644 index 00000000..45085487 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerchataccessoauthresponse.md @@ -0,0 +1,21 @@ +# SubscribersControllerChatAccessOauthResponse + +## Example Usage + +```typescript +import { SubscribersControllerChatAccessOauthResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerChatAccessOauthResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md b/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md index 4c06450b..115eb8c6 100644 --- a/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md +++ b/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md @@ -6,11 +6,11 @@ import { SubscribersControllerChatOauthCallbackRequest } from "@novu/api/models/operations"; let value: SubscribersControllerChatOauthCallbackRequest = { - subscriberId: "", + subscriberId: "", providerId: "", code: "", hmacHash: "", - environmentId: "", + environmentId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerchatoauthcallbackresponse.md b/docs/models/operations/subscriberscontrollerchatoauthcallbackresponse.md new file mode 100644 index 00000000..1f17ff94 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerchatoauthcallbackresponse.md @@ -0,0 +1,23 @@ +# SubscribersControllerChatOauthCallbackResponse + +## Example Usage + +```typescript +import { SubscribersControllerChatOauthCallbackResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerChatOauthCallbackResponse = { + headers: { + "key": [ + "", + ], + }, + result: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [operations.SubscribersControllerChatOauthCallbackResponseBody](../../models/operations/subscriberscontrollerchatoauthcallbackresponsebody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md new file mode 100644 index 00000000..12c5d2d3 --- /dev/null +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerCreateSubscriberResponse + +## Example Usage + +```typescript +import { SubscribersControllerCreateSubscriberResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerCreateSubscriberResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md index 5f7ab572..6f2cf92f 100644 --- a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md +++ b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md @@ -6,8 +6,8 @@ import { SubscribersControllerDeleteSubscriberCredentialsRequest } from "@novu/api/models/operations"; let value: SubscribersControllerDeleteSubscriberCredentialsRequest = { - subscriberId: "", - providerId: "", + subscriberId: "", + providerId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md new file mode 100644 index 00000000..96b2334f --- /dev/null +++ b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md @@ -0,0 +1,21 @@ +# SubscribersControllerDeleteSubscriberCredentialsResponse + +## Example Usage + +```typescript +import { SubscribersControllerDeleteSubscriberCredentialsResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerDeleteSubscriberCredentialsResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md index bbc86de6..59ad8e16 100644 --- a/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerGetNotificationsFeedRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetNotificationsFeedRequest = { - subscriberId: "", + subscriberId: "", payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }; diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md new file mode 100644 index 00000000..8941f043 --- /dev/null +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponse.md @@ -0,0 +1,37 @@ +# SubscribersControllerGetNotificationsFeedResponse + +## Example Usage + +```typescript +import { SubscribersControllerGetNotificationsFeedResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerGetNotificationsFeedResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + page: 3595.08, + hasMore: false, + pageSize: 4370.32, + data: [ + { + hasMore: false, + data: [ + "", + ], + pageSize: 6976.31, + page: 602.25, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [operations.SubscribersControllerGetNotificationsFeedResponseBody](../../models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md index 60ad4334..a612bdac 100644 --- a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md @@ -6,19 +6,19 @@ import { SubscribersControllerGetNotificationsFeedResponseBody } from "@novu/api/models/operations"; let value: SubscribersControllerGetNotificationsFeedResponseBody = { + page: 6120.96, + hasMore: false, + pageSize: 6169.34, data: [ { + hasMore: false, data: [ "", ], - hasMore: false, - page: 6235.1, - pageSize: 1589.69, + pageSize: 9437.48, + page: 6818.20, }, ], - hasMore: false, - page: 3380.07, - pageSize: 1103.75, }; ``` @@ -26,7 +26,7 @@ let value: SubscribersControllerGetNotificationsFeedResponseBody = { | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.FeedResponseDto](../../models/components/feedresponsedto.md)[] | :heavy_check_mark: | N/A | -| `hasMore` | *boolean* | :heavy_check_mark: | Does the list have more items to fetch | | `page` | *number* | :heavy_check_mark: | The current page of the paginated response | -| `pageSize` | *number* | :heavy_check_mark: | Number of items on each page | \ No newline at end of file +| `hasMore` | *boolean* | :heavy_check_mark: | Does the list have more items to fetch | +| `pageSize` | *number* | :heavy_check_mark: | Number of items on each page | +| `data` | [components.FeedResponseDto](../../models/components/feedresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md index ae47e412..e8279689 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md @@ -6,14 +6,15 @@ import { SubscribersControllerGetSubscriberPreferenceByLevelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - parameter: "Subscriber", - subscriberId: "", + parameter: "template", + subscriberId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `parameter` | [operations.Parameter](../../models/operations/parameter.md) | :heavy_check_mark: | the preferences level to be retrieved( Subscriber / Topic) | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `includeInactiveChannels` | *boolean* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | +| `parameter` | [operations.Parameter](../../models/operations/parameter.md) | :heavy_check_mark: | the preferences level to be retrieved (template / global) | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelresponse.md b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelresponse.md new file mode 100644 index 00000000..4c8c5595 --- /dev/null +++ b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerGetSubscriberPreferenceByLevelResponse + +## Example Usage + +```typescript +import { SubscribersControllerGetSubscriberPreferenceByLevelResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerGetSubscriberPreferenceByLevelResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + preference: { + enabled: false, + channels: {}, + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.GetSubscriberPreferencesResponseDto](../../models/components/getsubscriberpreferencesresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetsubscriberrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberrequest.md index 50c764a3..e7ad3e9f 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberrequest.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberrequest.md @@ -6,12 +6,13 @@ import { SubscribersControllerGetSubscriberRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetSubscriberRequest = { - subscriberId: "", + subscriberId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `includeTopics` | *string* | :heavy_minus_sign: | Includes the topics associated with the subscriber | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md new file mode 100644 index 00000000..1b9b405e --- /dev/null +++ b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerGetSubscriberResponse + +## Example Usage + +```typescript +import { SubscribersControllerGetSubscriberResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerGetSubscriberResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollergetunseencountrequest.md b/docs/models/operations/subscriberscontrollergetunseencountrequest.md index 4d295f52..be7f9ad7 100644 --- a/docs/models/operations/subscriberscontrollergetunseencountrequest.md +++ b/docs/models/operations/subscriberscontrollergetunseencountrequest.md @@ -7,8 +7,8 @@ import { SubscribersControllerGetUnseenCountRequest } from "@novu/api/models/ope let value: SubscribersControllerGetUnseenCountRequest = { seen: false, - subscriberId: "", - limit: 6747.52, + subscriberId: "", + limit: 6667.67, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetunseencountresponse.md b/docs/models/operations/subscriberscontrollergetunseencountresponse.md new file mode 100644 index 00000000..5f1db382 --- /dev/null +++ b/docs/models/operations/subscriberscontrollergetunseencountresponse.md @@ -0,0 +1,25 @@ +# SubscribersControllerGetUnseenCountResponse + +## Example Usage + +```typescript +import { SubscribersControllerGetUnseenCountResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerGetUnseenCountResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + count: 6706.38, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.UnseenCountResponse](../../models/components/unseencountresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md index d1d6edce..fdc52a3e 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md +++ b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md @@ -6,12 +6,13 @@ import { SubscribersControllerListSubscriberPreferencesRequest } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscriberPreferencesRequest = { - subscriberId: "", + subscriberId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `includeInactiveChannels` | *boolean* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesresponse.md b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesresponse.md new file mode 100644 index 00000000..bddcc179 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesresponse.md @@ -0,0 +1,38 @@ +# SubscribersControllerListSubscriberPreferencesResponse + +## Example Usage + +```typescript +import { SubscribersControllerListSubscriberPreferencesResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerListSubscriberPreferencesResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + { + template: { + id: "", + name: "", + critical: false, + triggers: [ + "", + ], + }, + preference: { + enabled: false, + channels: {}, + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.UpdateSubscriberPreferenceResponseDto](../../models/components/updatesubscriberpreferenceresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md index 10955de5..0e8e1a77 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md @@ -6,20 +6,25 @@ import { SubscribersControllerListSubscribersResponse } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscribersResponse = { + headers: { + "key": [ + "", + ], + }, result: { + page: 4614.79, + hasMore: false, + pageSize: 7805.29, data: [ { - environmentId: "", - organizationId: "", - createdAt: "", + subscriberId: "", + organizationId: "", + environmentId: "", deleted: false, - subscriberId: "", + createdAt: "", updatedAt: "", }, ], - hasMore: false, - page: 9953, - pageSize: 6531.08, }, }; ``` @@ -28,4 +33,5 @@ let value: SubscribersControllerListSubscribersResponse = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | | `result` | [operations.SubscribersControllerListSubscribersResponseBody](../../models/operations/subscriberscontrollerlistsubscribersresponsebody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md index 6a1b7857..d52b116f 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md @@ -6,19 +6,19 @@ import { SubscribersControllerListSubscribersResponseBody } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscribersResponseBody = { + page: 9786.18, + hasMore: false, + pageSize: 7991.59, data: [ { - environmentId: "", - organizationId: "", - createdAt: "", + subscriberId: "", + organizationId: "", + environmentId: "", deleted: false, - subscriberId: "", + createdAt: "", updatedAt: "", }, ], - hasMore: false, - page: 6350.59, - pageSize: 1613.09, }; ``` @@ -26,7 +26,7 @@ let value: SubscribersControllerListSubscribersResponseBody = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `data` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)[] | :heavy_check_mark: | N/A | -| `hasMore` | *boolean* | :heavy_check_mark: | Does the list have more items to fetch | | `page` | *number* | :heavy_check_mark: | The current page of the paginated response | -| `pageSize` | *number* | :heavy_check_mark: | Number of items on each page | \ No newline at end of file +| `hasMore` | *boolean* | :heavy_check_mark: | Does the list have more items to fetch | +| `pageSize` | *number* | :heavy_check_mark: | Number of items on each page | +| `data` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md index 6f55f530..9437042b 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md @@ -6,11 +6,11 @@ import { SubscribersControllerMarkActionAsSeenRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkActionAsSeenRequest = { - messageId: "", + messageId: "", type: "", - subscriberId: "", + subscriberId: "", markMessageActionAsSeenDto: { - status: "pending", + status: "done", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md new file mode 100644 index 00000000..8880a20d --- /dev/null +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md @@ -0,0 +1,47 @@ +# SubscribersControllerMarkActionAsSeenResponse + +## Example Usage + +```typescript +import { SubscribersControllerMarkActionAsSeenResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerMarkActionAsSeenResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + templateId: "", + environmentId: "", + messageTemplateId: "", + organizationId: "", + notificationId: "", + subscriberId: "", + createdAt: "", + content: { + type: "text", + content: "", + }, + transactionId: "", + channel: "in_app", + read: false, + seen: false, + cta: { + data: {}, + }, + status: "sent", + errorId: "", + errorText: "", + payload: {}, + overrides: {}, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.MessageResponseDto](../../models/components/messageresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md index 1955d33c..201ffad6 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerMarkAllUnreadAsReadRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkAllUnreadAsReadRequest = { - subscriberId: "", + subscriberId: "", markAllMessageAsRequestDto: { markAs: "seen", }, diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md new file mode 100644 index 00000000..a8d15823 --- /dev/null +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadresponse.md @@ -0,0 +1,23 @@ +# SubscribersControllerMarkAllUnreadAsReadResponse + +## Example Usage + +```typescript +import { SubscribersControllerMarkAllUnreadAsReadResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerMarkAllUnreadAsReadResponse = { + headers: { + "key": [ + "", + ], + }, + result: 3637.11, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md b/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md index 31fcbb18..6869e508 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md @@ -6,10 +6,10 @@ import { SubscribersControllerMarkMessagesAsRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkMessagesAsRequest = { - subscriberId: "", + subscriberId: "", messageMarkAsRequestDto: { - markAs: "seen", - messageId: "", + messageId: "", + markAs: "read", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md new file mode 100644 index 00000000..080c2291 --- /dev/null +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md @@ -0,0 +1,25 @@ +# SubscribersControllerMarkMessagesAsResponse + +## Example Usage + +```typescript +import { SubscribersControllerMarkMessagesAsResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerMarkMessagesAsResponse = { + headers: { + "key": [ + "", + ], + }, + result: [ + {}, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.MessageEntity](../../models/components/messageentity.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md index 64cf6ce6..9d4fa810 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md @@ -6,12 +6,12 @@ import { SubscribersControllerModifySubscriberChannelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerModifySubscriberChannelRequest = { - subscriberId: "", + subscriberId: "", updateSubscriberChannelRequestDto: { + providerId: "getstream", credentials: { - webhookUrl: "", + webhookUrl: "https://sorrowful-import.name/", }, - providerId: 5818.5, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md new file mode 100644 index 00000000..8c1d1364 --- /dev/null +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerModifySubscriberChannelResponse + +## Example Usage + +```typescript +import { SubscribersControllerModifySubscriberChannelResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerModifySubscriberChannelResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md b/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md index 58779388..3f3a9ccb 100644 --- a/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md +++ b/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerRemoveSubscriberRequest } from "@novu/api/models/operations"; let value: SubscribersControllerRemoveSubscriberRequest = { - subscriberId: "", + subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerremovesubscriberresponse.md b/docs/models/operations/subscriberscontrollerremovesubscriberresponse.md new file mode 100644 index 00000000..6b3a99da --- /dev/null +++ b/docs/models/operations/subscriberscontrollerremovesubscriberresponse.md @@ -0,0 +1,26 @@ +# SubscribersControllerRemoveSubscriberResponse + +## Example Usage + +```typescript +import { SubscribersControllerRemoveSubscriberResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerRemoveSubscriberResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + acknowledged: false, + status: "deleted", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.DeleteSubscriberResponseDto](../../models/components/deletesubscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md index dad1f5c9..dd51367f 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md @@ -6,12 +6,12 @@ import { SubscribersControllerUpdateSubscriberChannelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberChannelRequest = { - subscriberId: "", + subscriberId: "", updateSubscriberChannelRequestDto: { + providerId: "msteams", credentials: { - webhookUrl: "", + webhookUrl: "https://corrupt-unblinking.name", }, - providerId: 2532.91, }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md new file mode 100644 index 00000000..bf20d9c1 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerUpdateSubscriberChannelResponse + +## Example Usage + +```typescript +import { SubscribersControllerUpdateSubscriberChannelResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerUpdateSubscriberChannelResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md index 67141d4b..ddcd4cda 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerUpdateSubscriberGlobalPreferencesRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { - subscriberId: "", + subscriberId: "", updateSubscriberGlobalPreferencesRequestDto: {}, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesresponse.md new file mode 100644 index 00000000..48ccd5a7 --- /dev/null +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesresponse.md @@ -0,0 +1,36 @@ +# SubscribersControllerUpdateSubscriberGlobalPreferencesResponse + +## Example Usage + +```typescript +import { SubscribersControllerUpdateSubscriberGlobalPreferencesResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerUpdateSubscriberGlobalPreferencesResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + template: { + id: "", + name: "", + critical: false, + triggers: [ + "", + ], + }, + preference: { + enabled: false, + channels: {}, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.UpdateSubscriberPreferenceResponseDto](../../models/components/updatesubscriberpreferenceresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md index 12e63c00..44b31f42 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerUpdateSubscriberOnlineFlagRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberOnlineFlagRequest = { - subscriberId: "", + subscriberId: "", updateSubscriberOnlineFlagRequestDto: { isOnline: false, }, diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md new file mode 100644 index 00000000..84bf07eb --- /dev/null +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerUpdateSubscriberOnlineFlagResponse + +## Example Usage + +```typescript +import { SubscribersControllerUpdateSubscriberOnlineFlagResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md index 2f770b13..52454602 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerUpdateSubscriberPreferenceRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberPreferenceRequest = { - subscriberId: "", + subscriberId: "", parameter: "", updateSubscriberPreferenceRequestDto: {}, }; diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md new file mode 100644 index 00000000..cf8d8d3b --- /dev/null +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md @@ -0,0 +1,36 @@ +# SubscribersControllerUpdateSubscriberPreferenceResponse + +## Example Usage + +```typescript +import { SubscribersControllerUpdateSubscriberPreferenceResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerUpdateSubscriberPreferenceResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + template: { + id: "", + name: "", + critical: false, + triggers: [ + "", + ], + }, + preference: { + enabled: false, + channels: {}, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.UpdateSubscriberPreferenceResponseDto](../../models/components/updatesubscriberpreferenceresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md index 99bcdc5e..6e11a5eb 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerUpdateSubscriberRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberRequest = { - subscriberId: "", + subscriberId: "", updateSubscriberRequestDto: {}, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md new file mode 100644 index 00000000..096c2fed --- /dev/null +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md @@ -0,0 +1,30 @@ +# SubscribersControllerUpdateSubscriberResponse + +## Example Usage + +```typescript +import { SubscribersControllerUpdateSubscriberResponse } from "@novu/api/models/operations"; + +let value: SubscribersControllerUpdateSubscriberResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + subscriberId: "", + organizationId: "", + environmentId: "", + deleted: false, + createdAt: "", + updatedAt: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollergettenantbyidrequest.md b/docs/models/operations/tenantcontrollergettenantbyidrequest.md deleted file mode 100644 index a933feac..00000000 --- a/docs/models/operations/tenantcontrollergettenantbyidrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# TenantControllerGetTenantByIdRequest - -## Example Usage - -```typescript -import { TenantControllerGetTenantByIdRequest } from "@novu/api/models/operations"; - -let value: TenantControllerGetTenantByIdRequest = { - identifier: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `identifier` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollerlisttenantsrequest.md b/docs/models/operations/tenantcontrollerlisttenantsrequest.md deleted file mode 100644 index bdd36c71..00000000 --- a/docs/models/operations/tenantcontrollerlisttenantsrequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# TenantControllerListTenantsRequest - -## Example Usage - -```typescript -import { TenantControllerListTenantsRequest } from "@novu/api/models/operations"; - -let value: TenantControllerListTenantsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollerlisttenantsresponse.md b/docs/models/operations/tenantcontrollerlisttenantsresponse.md deleted file mode 100644 index f9ea5e5f..00000000 --- a/docs/models/operations/tenantcontrollerlisttenantsresponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# TenantControllerListTenantsResponse - -## Example Usage - -```typescript -import { TenantControllerListTenantsResponse } from "@novu/api/models/operations"; - -let value: TenantControllerListTenantsResponse = { - result: { - data: [ - { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", - }, - ], - hasMore: false, - page: 1965.82, - pageSize: 9495.72, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `result` | [operations.TenantControllerListTenantsResponseBody](../../models/operations/tenantcontrollerlisttenantsresponsebody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md b/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md deleted file mode 100644 index a6ca341e..00000000 --- a/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md +++ /dev/null @@ -1,31 +0,0 @@ -# TenantControllerListTenantsResponseBody - -## Example Usage - -```typescript -import { TenantControllerListTenantsResponseBody } from "@novu/api/models/operations"; - -let value: TenantControllerListTenantsResponseBody = { - data: [ - { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", - }, - ], - hasMore: false, - page: 1381.83, - pageSize: 7783.46, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `data` | [components.GetTenantResponseDto](../../models/components/gettenantresponsedto.md)[] | :heavy_check_mark: | N/A | -| `hasMore` | *boolean* | :heavy_check_mark: | Does the list have more items to fetch | -| `page` | *number* | :heavy_check_mark: | The current page of the paginated response | -| `pageSize` | *number* | :heavy_check_mark: | Number of items on each page | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollerremovetenantrequest.md b/docs/models/operations/tenantcontrollerremovetenantrequest.md deleted file mode 100644 index 481cd4ba..00000000 --- a/docs/models/operations/tenantcontrollerremovetenantrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# TenantControllerRemoveTenantRequest - -## Example Usage - -```typescript -import { TenantControllerRemoveTenantRequest } from "@novu/api/models/operations"; - -let value: TenantControllerRemoveTenantRequest = { - identifier: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `identifier` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrolleraddsubscribersresponse.md b/docs/models/operations/topicscontrolleraddsubscribersresponse.md new file mode 100644 index 00000000..29fa2cf2 --- /dev/null +++ b/docs/models/operations/topicscontrolleraddsubscribersresponse.md @@ -0,0 +1,21 @@ +# TopicsControllerAddSubscribersResponse + +## Example Usage + +```typescript +import { TopicsControllerAddSubscribersResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerAddSubscribersResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tenantcontrollerupdatetenantrequest.md b/docs/models/operations/topicscontrollercreatetopicresponse.md similarity index 67% rename from docs/models/operations/tenantcontrollerupdatetenantrequest.md rename to docs/models/operations/topicscontrollercreatetopicresponse.md index 478d5d89..a4d12ed3 100644 --- a/docs/models/operations/tenantcontrollerupdatetenantrequest.md +++ b/docs/models/operations/topicscontrollercreatetopicresponse.md @@ -1,13 +1,19 @@ -# TenantControllerUpdateTenantRequest +# TopicsControllerCreateTopicResponse ## Example Usage ```typescript -import { TenantControllerUpdateTenantRequest } from "@novu/api/models/operations"; +import { TopicsControllerCreateTopicResponse } from "@novu/api/models/operations"; -let value: TenantControllerUpdateTenantRequest = { - identifier: "", - updateTenantRequestDto: {}, +let value: TopicsControllerCreateTopicResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + key: "", + }, }; ``` @@ -15,5 +21,5 @@ let value: TenantControllerUpdateTenantRequest = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `updateTenantRequestDto` | [components.UpdateTenantRequestDto](../../models/components/updatetenantrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.CreateTopicResponseDto](../../models/components/createtopicresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollerdeletetopicresponse.md b/docs/models/operations/topicscontrollerdeletetopicresponse.md new file mode 100644 index 00000000..0016e20e --- /dev/null +++ b/docs/models/operations/topicscontrollerdeletetopicresponse.md @@ -0,0 +1,21 @@ +# TopicsControllerDeleteTopicResponse + +## Example Usage + +```typescript +import { TopicsControllerDeleteTopicResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerDeleteTopicResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollergettopicresponse.md b/docs/models/operations/topicscontrollergettopicresponse.md new file mode 100644 index 00000000..44458224 --- /dev/null +++ b/docs/models/operations/topicscontrollergettopicresponse.md @@ -0,0 +1,31 @@ +# TopicsControllerGetTopicResponse + +## Example Usage + +```typescript +import { TopicsControllerGetTopicResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerGetTopicResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + organizationId: "", + environmentId: "", + key: "", + name: "", + subscribers: [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.GetTopicResponseDto](../../models/components/gettopicresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollergettopicsubscriberrequest.md b/docs/models/operations/topicscontrollergettopicsubscriberrequest.md index 98b9f2d6..5037dd89 100644 --- a/docs/models/operations/topicscontrollergettopicsubscriberrequest.md +++ b/docs/models/operations/topicscontrollergettopicsubscriberrequest.md @@ -6,7 +6,7 @@ import { TopicsControllerGetTopicSubscriberRequest } from "@novu/api/models/operations"; let value: TopicsControllerGetTopicSubscriberRequest = { - externalSubscriberId: "", + externalSubscriberId: "", topicKey: "", }; ``` diff --git a/docs/models/operations/topicscontrollergettopicsubscriberresponse.md b/docs/models/operations/topicscontrollergettopicsubscriberresponse.md new file mode 100644 index 00000000..774ef9c1 --- /dev/null +++ b/docs/models/operations/topicscontrollergettopicsubscriberresponse.md @@ -0,0 +1,30 @@ +# TopicsControllerGetTopicSubscriberResponse + +## Example Usage + +```typescript +import { TopicsControllerGetTopicSubscriberResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerGetTopicSubscriberResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + organizationId: "", + environmentId: "", + subscriberId: "", + topicId: "", + topicKey: "", + externalSubscriberId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.TopicSubscriberDto](../../models/components/topicsubscriberdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollerlisttopicsresponse.md b/docs/models/operations/topicscontrollerlisttopicsresponse.md new file mode 100644 index 00000000..5e2081d1 --- /dev/null +++ b/docs/models/operations/topicscontrollerlisttopicsresponse.md @@ -0,0 +1,38 @@ +# TopicsControllerListTopicsResponse + +## Example Usage + +```typescript +import { TopicsControllerListTopicsResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerListTopicsResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + data: [ + { + organizationId: "", + environmentId: "", + key: "", + name: "", + subscribers: [ + "", + ], + }, + ], + page: 2444.26, + pageSize: 1589.70, + totalCount: 1103.75, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.FilterTopicsResponseDto](../../models/components/filtertopicsresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollerremovesubscribersresponse.md b/docs/models/operations/topicscontrollerremovesubscribersresponse.md new file mode 100644 index 00000000..bca5e233 --- /dev/null +++ b/docs/models/operations/topicscontrollerremovesubscribersresponse.md @@ -0,0 +1,21 @@ +# TopicsControllerRemoveSubscribersResponse + +## Example Usage + +```typescript +import { TopicsControllerRemoveSubscribersResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerRemoveSubscribersResponse = { + headers: { + "key": [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/topicscontrollerrenametopicresponse.md b/docs/models/operations/topicscontrollerrenametopicresponse.md new file mode 100644 index 00000000..2977f8cc --- /dev/null +++ b/docs/models/operations/topicscontrollerrenametopicresponse.md @@ -0,0 +1,31 @@ +# TopicsControllerRenameTopicResponse + +## Example Usage + +```typescript +import { TopicsControllerRenameTopicResponse } from "@novu/api/models/operations"; + +let value: TopicsControllerRenameTopicResponse = { + headers: { + "key": [ + "", + ], + }, + result: { + organizationId: "", + environmentId: "", + key: "", + name: "", + subscribers: [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.RenameTopicResponseDto](../../models/components/renametopicresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md b/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md deleted file mode 100644 index a433199c..00000000 --- a/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# WorkflowControllerDeleteWorkflowByIdRequest - -## Example Usage - -```typescript -import { WorkflowControllerDeleteWorkflowByIdRequest } from "@novu/api/models/operations"; - -let value: WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md b/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md deleted file mode 100644 index dc02856f..00000000 --- a/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# WorkflowControllerGetWorkflowByIdRequest - -## Example Usage - -```typescript -import { WorkflowControllerGetWorkflowByIdRequest } from "@novu/api/models/operations"; - -let value: WorkflowControllerGetWorkflowByIdRequest = { - workflowId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/workflowcontrollerlistworkflowsrequest.md b/docs/models/operations/workflowcontrollerlistworkflowsrequest.md deleted file mode 100644 index 92891755..00000000 --- a/docs/models/operations/workflowcontrollerlistworkflowsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# WorkflowControllerListWorkflowsRequest - -## Example Usage - -```typescript -import { WorkflowControllerListWorkflowsRequest } from "@novu/api/models/operations"; - -let value: WorkflowControllerListWorkflowsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | -| `query` | *string* | :heavy_minus_sign: | A query string to filter the results. It allows filtering based on either the name or trigger identifier of the workflow items. | \ No newline at end of file diff --git a/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md b/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md deleted file mode 100644 index 20487685..00000000 --- a/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# WorkflowControllerUpdateActiveStatusRequest - -## Example Usage - -```typescript -import { WorkflowControllerUpdateActiveStatusRequest } from "@novu/api/models/operations"; - -let value: WorkflowControllerUpdateActiveStatusRequest = { - workflowId: "", - changeWorkflowStatusRequestDto: { - active: false, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `changeWorkflowStatusRequestDto` | [components.ChangeWorkflowStatusRequestDto](../../models/components/changeworkflowstatusrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index 65113f9f..166c1cb5 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -22,9 +22,9 @@ const novu = new Novu({ async function run() { const result = await novu.environments.apiKeys.list(); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -54,7 +54,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -70,10 +70,10 @@ run(); ### Response -**Promise\<[components.ApiKey[]](../../models/.md)\>** +**Promise\<[operations.EnvironmentsControllerV1ListOrganizationApiKeysResponse](../../models/operations/environmentscontrollerv1listorganizationapikeysresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 0dc8b9a7..879f43a1 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -5,12 +5,12 @@ ### Available Operations -* [chatAccessOauth](#chataccessoauth) - Handle chat oauth * [chatAccessOauthCallBack](#chataccessoauthcallback) - Handle providers oauth redirect +* [chatAccessOauth](#chataccessoauth) - Handle chat oauth -## chatAccessOauth +## chatAccessOauthCallBack -Handle chat oauth +Handle providers oauth redirect ### Example Usage @@ -22,12 +22,16 @@ const novu = new Novu({ }); async function run() { - await novu.subscribers.authentication.chatAccessOauth({ - subscriberId: "", - providerId: "", + const result = await novu.subscribers.authentication.chatAccessOauthCallBack({ + subscriberId: "", + providerId: "", + code: "", hmacHash: "", - environmentId: "", + environmentId: "", }); + + // Handle the result + console.log(result); } run(); @@ -39,7 +43,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersAuthenticationChatAccessOauth } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauth.js"; +import { subscribersAuthenticationChatAccessOauthCallBack } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauthCallBack.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -48,11 +52,12 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersAuthenticationChatAccessOauth(novu, { - subscriberId: "", - providerId: "", + const res = await subscribersAuthenticationChatAccessOauthCallBack(novu, { + subscriberId: "", + providerId: "", + code: "", hmacHash: "", - environmentId: "", + environmentId: "", }); if (!res.ok) { @@ -61,7 +66,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -71,25 +77,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SubscribersControllerChatAccessOauthRequest](../../models/operations/subscriberscontrollerchataccessoauthrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.SubscribersControllerChatOauthCallbackRequest](../../models/operations/subscriberscontrollerchatoauthcallbackrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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\** +**Promise\<[operations.SubscribersControllerChatOauthCallbackResponse](../../models/operations/subscriberscontrollerchatoauthcallbackresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## chatAccessOauthCallBack +## chatAccessOauth -Handle providers oauth redirect +Handle chat oauth ### Example Usage @@ -101,16 +106,15 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.authentication.chatAccessOauthCallBack({ - subscriberId: "", - providerId: "", - code: "", + const result = await novu.subscribers.authentication.chatAccessOauth({ + subscriberId: "", + providerId: "", hmacHash: "", - environmentId: "", + environmentId: "", }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -122,7 +126,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersAuthenticationChatAccessOauthCallBack } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauthCallBack.js"; +import { subscribersAuthenticationChatAccessOauth } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauth.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -131,12 +135,11 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersAuthenticationChatAccessOauthCallBack(novu, { - subscriberId: "", - providerId: "", - code: "", + const res = await subscribersAuthenticationChatAccessOauth(novu, { + subscriberId: "", + providerId: "", hmacHash: "", - environmentId: "", + environmentId: "", }); if (!res.ok) { @@ -146,7 +149,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -156,17 +159,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SubscribersControllerChatOauthCallbackRequest](../../models/operations/subscriberscontrollerchatoauthcallbackrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.SubscribersControllerChatAccessOauthRequest](../../models/operations/subscriberscontrollerchataccessoauthrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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.SubscribersControllerChatOauthCallbackResponseBody](../../models/operations/subscriberscontrollerchatoauthcallbackresponsebody.md)\>** +**Promise\<[operations.SubscribersControllerChatAccessOauthResponse](../../models/operations/subscriberscontrollerchataccessoauthresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/changes/README.md b/docs/sdks/changes/README.md deleted file mode 100644 index f7fb7a41..00000000 --- a/docs/sdks/changes/README.md +++ /dev/null @@ -1,316 +0,0 @@ -# Changes -(*changes*) - -## Overview - -Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready. - - -### Available Operations - -* [apply](#apply) - Apply change -* [applyBulk](#applybulk) - Apply changes -* [count](#count) - Get changes count -* [retrieve](#retrieve) - Get changes - -## apply - -Apply change - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.changes.apply(""); - - // 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 { changesApply } from "@novu/api/funcs/changesApply.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 changesApply(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `changeId` | *string* | :heavy_check_mark: | N/A | -| `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\<[components.ChangeResponseDto[]](../../models/.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## applyBulk - -Apply changes - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.changes.applyBulk({ - changeIds: [ - "", - ], - }); - - // 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 { changesApplyBulk } from "@novu/api/funcs/changesApplyBulk.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 changesApplyBulk(novu, { - changeIds: [ - "", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.BulkApplyChangeDto](../../models/components/bulkapplychangedto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.ChangeResponseDto[]](../../models/.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## count - -Get changes count - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.changes.count(); - - // 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 { changesCount } from "@novu/api/funcs/changesCount.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 changesCount(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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\<[components.DataNumberDto](../../models/components/datanumberdto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Get changes - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.changes.retrieve({ - promoted: "false", - }); - - // 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 { changesRetrieve } from "@novu/api/funcs/changesRetrieve.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 changesRetrieve(novu, { - promoted: "false", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ChangesControllerGetChangesRequest](../../models/operations/changescontrollergetchangesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.ChangesResponseDto](../../models/components/changesresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/credentials/README.md b/docs/sdks/credentials/README.md index 317edc59..9d6d880f 100644 --- a/docs/sdks/credentials/README.md +++ b/docs/sdks/credentials/README.md @@ -5,14 +5,13 @@ ### Available Operations +* [update](#update) - Update subscriber credentials * [append](#append) - Modify subscriber credentials * [delete](#delete) - Delete subscriber credentials by providerId -* [update](#update) - Update subscriber credentials -## append +## update Subscriber credentials associated to the delivery methods such as slack and push tokens. - This endpoint appends provided credentials and deviceTokens to the existing ones. ### Example Usage @@ -24,15 +23,15 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.credentials.append("", { + const result = await novu.subscribers.credentials.update({ + providerId: "pushpad", credentials: { - webhookUrl: "", + webhookUrl: "https://grown-worth.name", }, - providerId: 3462.44, - }); - + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -44,7 +43,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersCredentialsAppend } from "@novu/api/funcs/subscribersCredentialsAppend.js"; +import { subscribersCredentialsUpdate } from "@novu/api/funcs/subscribersCredentialsUpdate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -53,12 +52,12 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersCredentialsAppend(novu, "", { + const res = await subscribersCredentialsUpdate(novu, { + providerId: "pushpad", credentials: { - webhookUrl: "", + webhookUrl: "https://grown-worth.name", }, - providerId: 3462.44, - }); + }, ""); if (!res.ok) { throw res.error; @@ -67,7 +66,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -85,18 +84,19 @@ run(); ### Response -**Promise\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerUpdateSubscriberChannelResponse](../../models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## append -## delete +Subscriber credentials associated to the delivery methods such as slack and push tokens. -Delete subscriber credentials such as slack and expo tokens. + This endpoint appends provided credentials and deviceTokens to the existing ones. ### Example Usage @@ -108,7 +108,15 @@ const novu = new Novu({ }); async function run() { - await novu.subscribers.credentials.delete("", ""); + const result = await novu.subscribers.credentials.append({ + providerId: "zulip", + credentials: { + webhookUrl: "https://talkative-pop.org", + }, + }, ""); + + // Handle the result + console.log(result); } run(); @@ -120,7 +128,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersCredentialsDelete } from "@novu/api/funcs/subscribersCredentialsDelete.js"; +import { subscribersCredentialsAppend } from "@novu/api/funcs/subscribersCredentialsAppend.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -129,7 +137,12 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersCredentialsDelete(novu, "", ""); + const res = await subscribersCredentialsAppend(novu, { + providerId: "zulip", + credentials: { + webhookUrl: "https://talkative-pop.org", + }, + }, ""); if (!res.ok) { throw res.error; @@ -137,7 +150,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -148,25 +162,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `providerId` | *string* | :heavy_check_mark: | N/A | +| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A | | `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\** +**Promise\<[operations.SubscribersControllerModifySubscriberChannelResponse](../../models/operations/subscriberscontrollermodifysubscriberchannelresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## delete -## update - -Subscriber credentials associated to the delivery methods such as slack and push tokens. +Delete subscriber credentials such as slack and expo tokens. ### Example Usage @@ -178,15 +191,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.credentials.update("", { - credentials: { - webhookUrl: "", - }, - providerId: 8574.78, - }); - + const result = await novu.subscribers.credentials.delete("", ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -198,7 +206,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersCredentialsUpdate } from "@novu/api/funcs/subscribersCredentialsUpdate.js"; +import { subscribersCredentialsDelete } from "@novu/api/funcs/subscribersCredentialsDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -207,12 +215,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersCredentialsUpdate(novu, "", { - credentials: { - webhookUrl: "", - }, - providerId: 8574.78, - }); + const res = await subscribersCredentialsDelete(novu, "", ""); if (!res.ok) { throw res.error; @@ -221,7 +224,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -232,17 +235,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A | +| `providerId` | *string* | :heavy_check_mark: | N/A | | `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\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerDeleteSubscriberCredentialsResponse](../../models/operations/subscriberscontrollerdeletesubscribercredentialsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/environments/README.md b/docs/sdks/environments/README.md index 172b211b..90933a53 100644 --- a/docs/sdks/environments/README.md +++ b/docs/sdks/environments/README.md @@ -8,12 +8,12 @@ Novu uses the concept of environments to ensure logical separation of your data ### Available Operations -* [list](#list) - Get environments * [retrieve](#retrieve) - Get current environment +* [list](#list) - Get environments -## list +## retrieve -Get environments +Get current environment ### Example Usage @@ -25,10 +25,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.environments.list(); - + const result = await novu.environments.retrieve(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -40,7 +40,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { environmentsList } from "@novu/api/funcs/environmentsList.js"; +import { environmentsRetrieve } from "@novu/api/funcs/environmentsRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -49,7 +49,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await environmentsList(novu); + const res = await environmentsRetrieve(novu); if (!res.ok) { throw res.error; @@ -58,7 +58,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -74,18 +74,17 @@ run(); ### Response -**Promise\<[components.EnvironmentResponseDto[]](../../models/.md)\>** +**Promise\<[operations.EnvironmentsControllerV1GetCurrentEnvironmentResponse](../../models/operations/environmentscontrollerv1getcurrentenvironmentresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## list -## retrieve - -Get current environment +Get environments ### Example Usage @@ -97,10 +96,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.environments.retrieve(); - + const result = await novu.environments.list(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -112,7 +111,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { environmentsRetrieve } from "@novu/api/funcs/environmentsRetrieve.js"; +import { environmentsList } from "@novu/api/funcs/environmentsList.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -121,7 +120,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await environmentsRetrieve(novu); + const res = await environmentsList(novu); if (!res.ok) { throw res.error; @@ -130,7 +129,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -146,10 +145,10 @@ run(); ### Response -**Promise\<[components.EnvironmentResponseDto](../../models/components/environmentresponsedto.md)\>** +**Promise\<[operations.EnvironmentsControllerV1ListMyEnvironmentsResponse](../../models/operations/environmentscontrollerv1listmyenvironmentsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/executiondetails/README.md b/docs/sdks/executiondetails/README.md index 6697b90a..150d009c 100644 --- a/docs/sdks/executiondetails/README.md +++ b/docs/sdks/executiondetails/README.md @@ -24,10 +24,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.executionDetails.retrieve("", ""); - + const result = await novu.executionDetails.retrieve("", ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -48,7 +48,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await executionDetailsRetrieve(novu, "", ""); + const res = await executionDetailsRetrieve(novu, "", ""); if (!res.ok) { throw res.error; @@ -57,7 +57,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -75,10 +75,10 @@ run(); ### Response -**Promise\<[components.ExecutionDetailsResponseDto[]](../../models/.md)\>** +**Promise\<[operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse](../../models/operations/executiondetailscontrollergetexecutiondetailsfornotificationresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/feeds/README.md b/docs/sdks/feeds/README.md deleted file mode 100644 index 34e12f2b..00000000 --- a/docs/sdks/feeds/README.md +++ /dev/null @@ -1,234 +0,0 @@ -# Feeds -(*feeds*) - -## Overview - -Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type. - - -### Available Operations - -* [create](#create) - Create feed -* [delete](#delete) - Delete feed -* [retrieve](#retrieve) - Get feeds - -## create - -Create feed - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.feeds.create({ - name: "", - }); - - // 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 { feedsCreate } from "@novu/api/funcs/feedsCreate.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 feedsCreate(novu, { - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateFeedRequestDto](../../models/components/createfeedrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.FeedResponseDto](../../models/components/feedresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## delete - -Delete feed - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.feeds.delete(""); - - // 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 { feedsDelete } from "@novu/api/funcs/feedsDelete.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 feedsDelete(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `feedId` | *string* | :heavy_check_mark: | N/A | -| `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\<[components.FeedResponseDto[]](../../models/.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Get feeds - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.feeds.retrieve(); - - // 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 { feedsRetrieve } from "@novu/api/funcs/feedsRetrieve.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 feedsRetrieve(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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\<[components.FeedResponseDto[]](../../models/.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index 07d5f7c9..e54c9f26 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -8,16 +8,16 @@ With the help of the Integration Store, you can easily integrate your favorite d ### Available Operations -* [create](#create) - Create integration -* [delete](#delete) - Delete integration * [list](#list) - Get integrations +* [create](#create) - Create integration * [listActive](#listactive) - Get active integrations -* [setAsPrimary](#setasprimary) - Set integration as primary * [update](#update) - Update integration +* [delete](#delete) - Delete integration +* [setAsPrimary](#setasprimary) - Set integration as primary -## create +## list -Create an integration for the current environment the user is based on the API key provided +Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change ### Example Usage @@ -29,13 +29,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.create({ - channel: "sms", - providerId: "", - }); - + const result = await novu.integrations.list(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -47,7 +44,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsCreate } from "@novu/api/funcs/integrationsCreate.js"; +import { integrationsList } from "@novu/api/funcs/integrationsList.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -56,10 +53,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsCreate(novu, { - channel: "sms", - providerId: "", - }); + const res = await integrationsList(novu); if (!res.ok) { throw res.error; @@ -68,7 +62,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -78,25 +72,23 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateIntegrationRequestDto](../../models/components/createintegrationrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)\>** +**Promise\<[operations.IntegrationsControllerListIntegrationsResponse](../../models/operations/integrationscontrollerlistintegrationsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## delete +## create -Delete integration +Create an integration for the current environment the user is based on the API key provided ### Example Usage @@ -108,10 +100,13 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.delete(""); - + const result = await novu.integrations.create({ + providerId: "", + channel: "sms", + }); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -123,7 +118,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsDelete } from "@novu/api/funcs/integrationsDelete.js"; +import { integrationsCreate } from "@novu/api/funcs/integrationsCreate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -132,7 +127,10 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsDelete(novu, ""); + const res = await integrationsCreate(novu, { + providerId: "", + channel: "sms", + }); if (!res.ok) { throw res.error; @@ -141,7 +139,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -151,25 +149,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `integrationId` | *string* | :heavy_check_mark: | N/A | +| `request` | [components.CreateIntegrationRequestDto](../../models/components/createintegrationrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.IntegrationResponseDto[]](../../models/.md)\>** +**Promise\<[operations.IntegrationsControllerCreateIntegrationResponse](../../models/operations/integrationscontrollercreateintegrationresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## listActive -## list - -Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change +Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change ### Example Usage @@ -181,10 +178,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.list(); - + const result = await novu.integrations.listActive(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -196,7 +193,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsList } from "@novu/api/funcs/integrationsList.js"; +import { integrationsListActive } from "@novu/api/funcs/integrationsListActive.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -205,7 +202,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsList(novu); + const res = await integrationsListActive(novu); if (!res.ok) { throw res.error; @@ -214,7 +211,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -230,18 +227,17 @@ run(); ### Response -**Promise\<[components.IntegrationResponseDto[]](../../models/.md)\>** +**Promise\<[operations.IntegrationsControllerGetActiveIntegrationsResponse](../../models/operations/integrationscontrollergetactiveintegrationsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## update -## listActive - -Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change +Update integration ### Example Usage @@ -253,10 +249,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.listActive(); - + const result = await novu.integrations.update({}, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -268,7 +264,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsListActive } from "@novu/api/funcs/integrationsListActive.js"; +import { integrationsUpdate } from "@novu/api/funcs/integrationsUpdate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -277,7 +273,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsListActive(novu); + const res = await integrationsUpdate(novu, {}, ""); if (!res.ok) { throw res.error; @@ -286,7 +282,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -296,24 +292,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `integrationId` | *string* | :heavy_check_mark: | N/A | +| `updateIntegrationRequestDto` | [components.UpdateIntegrationRequestDto](../../models/components/updateintegrationrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.IntegrationResponseDto[]](../../models/.md)\>** +**Promise\<[operations.IntegrationsControllerUpdateIntegrationByIdResponse](../../models/operations/integrationscontrollerupdateintegrationbyidresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## setAsPrimary +## delete -Set integration as primary +Delete integration ### Example Usage @@ -325,10 +322,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.setAsPrimary(""); - + const result = await novu.integrations.delete(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -340,7 +337,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsSetAsPrimary } from "@novu/api/funcs/integrationsSetAsPrimary.js"; +import { integrationsDelete } from "@novu/api/funcs/integrationsDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -349,7 +346,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsSetAsPrimary(novu, ""); + const res = await integrationsDelete(novu, ""); if (!res.ok) { throw res.error; @@ -358,7 +355,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -375,18 +372,17 @@ run(); ### Response -**Promise\<[components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)\>** +**Promise\<[operations.IntegrationsControllerRemoveIntegrationResponse](../../models/operations/integrationscontrollerremoveintegrationresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## setAsPrimary -## update - -Update integration +Set integration as primary ### Example Usage @@ -398,10 +394,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.update("", {}); - + const result = await novu.integrations.setAsPrimary(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -413,7 +409,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { integrationsUpdate } from "@novu/api/funcs/integrationsUpdate.js"; +import { integrationsSetAsPrimary } from "@novu/api/funcs/integrationsSetAsPrimary.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -422,7 +418,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsUpdate(novu, "", {}); + const res = await integrationsSetAsPrimary(novu, ""); if (!res.ok) { throw res.error; @@ -431,7 +427,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -442,17 +438,16 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `integrationId` | *string* | :heavy_check_mark: | N/A | -| `updateIntegrationRequestDto` | [components.UpdateIntegrationRequestDto](../../models/components/updateintegrationrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.IntegrationResponseDto](../../models/components/integrationresponsedto.md)\>** +**Promise\<[operations.IntegrationsControllerSetIntegrationAsPrimaryResponse](../../models/operations/integrationscontrollersetintegrationasprimaryresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/layouts/README.md b/docs/sdks/layouts/README.md deleted file mode 100644 index 5dc0ea87..00000000 --- a/docs/sdks/layouts/README.md +++ /dev/null @@ -1,445 +0,0 @@ -# Layouts -(*layouts*) - -## Overview - -Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform. - - -### Available Operations - -* [create](#create) - Layout creation -* [delete](#delete) - Delete layout -* [list](#list) - Filter layouts -* [retrieve](#retrieve) - Get layout -* [setAsDefault](#setasdefault) - Set default layout -* [update](#update) - Update a layout - -## create - -Create a layout - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.layouts.create(); - - // 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 { layoutsCreate } from "@novu/api/funcs/layoutsCreate.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 layoutsCreate(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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\<[components.CreateLayoutResponseDto](../../models/components/createlayoutresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## delete - -Execute a soft delete of a layout given a certain ID. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - await novu.layouts.delete(""); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { layoutsDelete } from "@novu/api/funcs/layoutsDelete.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 layoutsDelete(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | -| `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 Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## list - -Returns a list of layouts that can be paginated using the `page` query parameter and filtered by the environment where it is executed from the organization the user belongs to. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - await novu.layouts.list({}); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { layoutsList } from "@novu/api/funcs/layoutsList.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 layoutsList(novu, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.LayoutsControllerListLayoutsRequest](../../models/operations/layoutscontrollerlistlayoutsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `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 Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Get a layout by its ID - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.layouts.retrieve(""); - - // 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 { layoutsRetrieve } from "@novu/api/funcs/layoutsRetrieve.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 layoutsRetrieve(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | -| `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\<[components.GetLayoutResponseDto](../../models/components/getlayoutresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## setAsDefault - -Sets the default layout for the environment and updates to non default to the existing default layout (if any). - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - await novu.layouts.setAsDefault(""); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { layoutsSetAsDefault } from "@novu/api/funcs/layoutsSetAsDefault.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 layoutsSetAsDefault(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | -| `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 Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## update - -Update the name, content and variables of a layout. Also change it to be default or no. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.layouts.update("", { - identifier: "", - }); - - // 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 { layoutsUpdate } from "@novu/api/funcs/layoutsUpdate.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 layoutsUpdate(novu, "", { - identifier: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `layoutId` | *string* | :heavy_check_mark: | The layout id | -| `updateLayoutRequestDto` | [components.UpdateLayoutRequestDto](../../models/components/updatelayoutrequestdto.md) | :heavy_check_mark: | N/A | -| `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\<[components.UpdateLayoutResponseDto](../../models/components/updatelayoutresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index 25aea245..3821db0c 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -8,13 +8,13 @@ A message in Novu represents a notification delivered to a recipient on a partic ### Available Operations +* [retrieve](#retrieve) - Get messages * [delete](#delete) - Delete message * [deleteByTransactionId](#deletebytransactionid) - Delete messages by transactionId -* [retrieve](#retrieve) - Get messages -## delete +## retrieve -Deletes a message entity from the Novu platform +Returns a list of messages, could paginate using the `page` query parameter ### Example Usage @@ -26,10 +26,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.messages.delete(""); - + const result = await novu.messages.retrieve({}); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -41,7 +41,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { messagesDelete } from "@novu/api/funcs/messagesDelete.js"; +import { messagesRetrieve } from "@novu/api/funcs/messagesRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -50,7 +50,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await messagesDelete(novu, ""); + const res = await messagesRetrieve(novu, {}); if (!res.ok) { throw res.error; @@ -59,7 +59,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -69,25 +69,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `messageId` | *string* | :heavy_check_mark: | N/A | +| `request` | [operations.MessagesControllerGetMessagesRequest](../../models/operations/messagescontrollergetmessagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.DeleteMessageResponseDto](../../models/components/deletemessageresponsedto.md)\>** +**Promise\<[operations.MessagesControllerGetMessagesResponse](../../models/operations/messagescontrollergetmessagesresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## delete -## deleteByTransactionId - -Deletes messages entity from the Novu platform using TransactionId of message +Deletes a message entity from the Novu platform ### Example Usage @@ -99,7 +98,10 @@ const novu = new Novu({ }); async function run() { - await novu.messages.deleteByTransactionId(""); + const result = await novu.messages.delete(""); + + // Handle the result + console.log(result); } run(); @@ -111,7 +113,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { messagesDeleteByTransactionId } from "@novu/api/funcs/messagesDeleteByTransactionId.js"; +import { messagesDelete } from "@novu/api/funcs/messagesDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -120,7 +122,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await messagesDeleteByTransactionId(novu, ""); + const res = await messagesDelete(novu, ""); if (!res.ok) { throw res.error; @@ -128,7 +130,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -138,26 +141,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `transactionId` | *string* | :heavy_check_mark: | N/A | -| `channel` | [operations.Channel](../../models/operations/channel.md) | :heavy_minus_sign: | The channel of the message to be deleted | +| `messageId` | *string* | :heavy_check_mark: | N/A | | `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\** +**Promise\<[operations.MessagesControllerDeleteMessageResponse](../../models/operations/messagescontrollerdeletemessageresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## retrieve +## deleteByTransactionId -Returns a list of messages, could paginate using the `page` query parameter +Deletes messages entity from the Novu platform using TransactionId of message ### Example Usage @@ -169,10 +170,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.messages.retrieve({}); - + const result = await novu.messages.deleteByTransactionId(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -184,7 +185,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { messagesRetrieve } from "@novu/api/funcs/messagesRetrieve.js"; +import { messagesDeleteByTransactionId } from "@novu/api/funcs/messagesDeleteByTransactionId.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -193,7 +194,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await messagesRetrieve(novu, {}); + const res = await messagesDeleteByTransactionId(novu, ""); if (!res.ok) { throw res.error; @@ -202,7 +203,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -212,17 +213,18 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.MessagesControllerGetMessagesRequest](../../models/operations/messagescontrollergetmessagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `transactionId` | *string* | :heavy_check_mark: | N/A | +| `channel` | [operations.QueryParamChannel](../../models/operations/queryparamchannel.md) | :heavy_minus_sign: | The channel of the message to be deleted | | `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\<[components.ActivitiesResponseDto](../../models/components/activitiesresponsedto.md)\>** +**Promise\<[operations.MessagesControllerDeleteMessagesByTransactionIdResponse](../../models/operations/messagescontrollerdeletemessagesbytransactionidresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/notifications/README.md b/docs/sdks/notifications/README.md index f8ef411c..09ed556c 100644 --- a/docs/sdks/notifications/README.md +++ b/docs/sdks/notifications/README.md @@ -24,7 +24,9 @@ const novu = new Novu({ async function run() { const result = await novu.notifications.list({ channels: [ + "sms", "chat", + "in_app", ], templates: [ "", @@ -35,11 +37,12 @@ async function run() { search: "", subscriberIds: [ "", + "", ], }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -63,6 +66,8 @@ async function run() { const res = await notificationsList(novu, { channels: [ "sms", + "chat", + "in_app", ], templates: [ "", @@ -73,6 +78,7 @@ async function run() { search: "", subscriberIds: [ "", + "", ], }); @@ -83,7 +89,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -100,14 +106,13 @@ run(); ### Response -**Promise\<[components.ActivitiesResponseDto](../../models/components/activitiesresponsedto.md)\>** +**Promise\<[operations.NotificationsControllerListNotificationsResponse](../../models/operations/notificationscontrollerlistnotificationsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## retrieve @@ -123,10 +128,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.notifications.retrieve(""); - + const result = await novu.notifications.retrieve(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -147,7 +152,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await notificationsRetrieve(novu, ""); + const res = await notificationsRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -156,7 +161,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -173,10 +178,10 @@ run(); ### Response -**Promise\<[components.ActivityNotificationResponseDto](../../models/components/activitynotificationresponsedto.md)\>** +**Promise\<[operations.NotificationsControllerGetNotificationResponse](../../models/operations/notificationscontrollergetnotificationresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index 05b13556..21a45ced 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -9,16 +9,17 @@ Novu Documentation ### Available Operations -* [cancel](#cancel) - Cancel triggered event * [trigger](#trigger) - Trigger event -* [triggerBroadcast](#triggerbroadcast) - Broadcast event to all * [triggerBulk](#triggerbulk) - Bulk trigger event +* [triggerBroadcast](#triggerbroadcast) - Broadcast event to all +* [cancel](#cancel) - Cancel triggered event -## cancel +## trigger - Using a previously generated transactionId during the event trigger, - will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... + Trigger event is the main (and only) way to send notifications to subscribers. + The trigger identifier is used to match the particular workflow associated with it. + Additional information can be passed according the body interface below. ### Example Usage @@ -31,10 +32,22 @@ const novu = new Novu({ }); async function run() { - const result = await novu.cancel(""); - + const result = await novu.trigger({ + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -46,7 +59,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { cancel } from "@novu/api/funcs/cancel.js"; +import { trigger } from "@novu/api/funcs/trigger.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -55,7 +68,19 @@ const novu = new NovuCore({ }); async function run() { - const res = await cancel(novu, ""); + const res = await trigger(novu, { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], + }); if (!res.ok) { throw res.error; @@ -64,7 +89,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -74,28 +99,26 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `transactionId` | *string* | :heavy_check_mark: | N/A | +| `request` | [components.TriggerEventRequestDto](../../models/components/triggereventrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.DataBooleanDto](../../models/components/databooleandto.md)\>** +**Promise\<[operations.EventsControllerTriggerResponse](../../models/operations/eventscontrollertriggerresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | - -## trigger +## triggerBulk - Trigger event is the main (and only) way to send notifications to subscribers. - The trigger identifier is used to match the particular workflow associated with it. - Additional information can be passed according the body interface below. + Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. + The bulk API is limited to 100 events per request. ### Example Usage @@ -108,20 +131,47 @@ const novu = new Novu({ }); async function run() { - const result = await novu.trigger({ - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ + const result = await novu.triggerBulk({ + events: [ { - topicKey: "", - type: "Topic", + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + subscriberId: "", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], }, ], }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -133,7 +183,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { trigger } from "@novu/api/funcs/trigger.js"; +import { triggerBulk } from "@novu/api/funcs/triggerBulk.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -142,14 +192,41 @@ const novu = new NovuCore({ }); async function run() { - const res = await trigger(novu, { - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ + const res = await triggerBulk(novu, { + events: [ { - topicKey: "", - type: "Topic", + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + subscriberId: "", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }, + { + name: "workflow_identifier", + to: [ + { + topicKey: "", + type: "Topic", + }, + { + topicKey: "", + type: "Topic", + }, + ], }, ], }); @@ -161,7 +238,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -171,25 +248,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.TriggerEventRequestDto](../../models/components/triggereventrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.BulkTriggerEventDto](../../models/components/bulktriggereventdto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.TriggerEventResponseDto](../../models/components/triggereventresponsedto.md)\>** +**Promise\<[operations.EventsControllerTriggerBulkResponse](../../models/operations/eventscontrollertriggerbulkresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## triggerBroadcast Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. + In the future could be used to trigger events to a subset of subscribers based on defined filters. ### Example Usage @@ -204,12 +281,11 @@ const novu = new Novu({ async function run() { const result = await novu.triggerBroadcast({ name: "", - overrides: {}, payload: {}, }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -232,7 +308,6 @@ const novu = new NovuCore({ async function run() { const res = await triggerBroadcast(novu, { name: "", - overrides: {}, payload: {}, }); @@ -243,7 +318,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -260,20 +335,19 @@ run(); ### Response -**Promise\<[components.TriggerEventResponseDto](../../models/components/triggereventresponsedto.md)\>** +**Promise\<[operations.EventsControllerBroadcastEventToAllResponse](../../models/operations/eventscontrollerbroadcasteventtoallresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## triggerBulk +## cancel - Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. - The bulk API is limited to 100 events per request. + Using a previously generated transactionId during the event trigger, + will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... ### Example Usage @@ -286,14 +360,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.triggerBulk({ - events: [ - - ], - }); - + const result = await novu.cancel(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -305,7 +375,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { triggerBulk } from "@novu/api/funcs/triggerBulk.js"; +import { cancel } from "@novu/api/funcs/cancel.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -314,11 +384,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await triggerBulk(novu, { - events: [ - - ], - }); + const res = await cancel(novu, ""); if (!res.ok) { throw res.error; @@ -327,7 +393,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -337,17 +403,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.BulkTriggerEventDto](../../models/components/bulktriggereventdto.md) | :heavy_check_mark: | The request object to use for the request. | +| `transactionId` | *string* | :heavy_check_mark: | N/A | | `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\<[components.TriggerEventResponseDto[]](../../models/.md)\>** +**Promise\<[operations.EventsControllerCancelResponse](../../models/operations/eventscontrollercancelresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| 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 a4e794a6..a48fcb6d 100644 --- a/docs/sdks/novumessages/README.md +++ b/docs/sdks/novumessages/README.md @@ -5,13 +5,13 @@ ### Available Operations -* [markAll](#markall) - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. * [markAllAs](#markallas) - Mark a subscriber messages as seen, read, unseen or unread +* [markAll](#markall) - Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. * [updateAsSeen](#updateasseen) - Mark message action as seen -## markAll +## markAllAs -Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. +Mark a subscriber messages as seen, read, unseen or unread ### Example Usage @@ -23,12 +23,13 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.messages.markAll("", { - markAs: "seen", - }); - + const result = await novu.subscribers.messages.markAllAs({ + messageId: "", + markAs: "read", + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -40,7 +41,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersMessagesMarkAll } from "@novu/api/funcs/subscribersMessagesMarkAll.js"; +import { subscribersMessagesMarkAllAs } from "@novu/api/funcs/subscribersMessagesMarkAllAs.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -49,9 +50,10 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersMessagesMarkAll(novu, "", { - markAs: "seen", - }); + const res = await subscribersMessagesMarkAllAs(novu, { + messageId: "", + markAs: "read", + }, ""); if (!res.ok) { throw res.error; @@ -60,7 +62,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -71,25 +73,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `markAllMessageAsRequestDto` | [components.MarkAllMessageAsRequestDto](../../models/components/markallmessageasrequestdto.md) | :heavy_check_mark: | N/A | +| `messageMarkAsRequestDto` | [components.MessageMarkAsRequestDto](../../models/components/messagemarkasrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[number](../../models/.md)\>** +**Promise\<[operations.SubscribersControllerMarkMessagesAsResponse](../../models/operations/subscriberscontrollermarkmessagesasresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## markAllAs +## markAll -Mark a subscriber messages as seen, read, unseen or unread +Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. ### Example Usage @@ -101,13 +102,12 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.messages.markAllAs("", { + const result = await novu.subscribers.messages.markAll({ markAs: "seen", - messageId: "", - }); - + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -119,7 +119,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersMessagesMarkAllAs } from "@novu/api/funcs/subscribersMessagesMarkAllAs.js"; +import { subscribersMessagesMarkAll } from "@novu/api/funcs/subscribersMessagesMarkAll.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -128,10 +128,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersMessagesMarkAllAs(novu, "", { + const res = await subscribersMessagesMarkAll(novu, { markAs: "seen", - messageId: "", - }); + }, ""); if (!res.ok) { throw res.error; @@ -140,7 +139,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -151,21 +150,20 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `messageMarkAsRequestDto` | [components.MessageMarkAsRequestDto](../../models/components/messagemarkasrequestdto.md) | :heavy_check_mark: | N/A | +| `markAllMessageAsRequestDto` | [components.MarkAllMessageAsRequestDto](../../models/components/markallmessageasrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.MessageEntity[]](../../models/.md)\>** +**Promise\<[operations.SubscribersControllerMarkAllUnreadAsReadResponse](../../models/operations/subscriberscontrollermarkallunreadasreadresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## updateAsSeen @@ -182,16 +180,16 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.messages.updateAsSeen({ - messageId: "", + messageId: "", type: "", - subscriberId: "", + subscriberId: "", markMessageActionAsSeenDto: { status: "done", }, }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -213,9 +211,9 @@ const novu = new NovuCore({ async function run() { const res = await subscribersMessagesUpdateAsSeen(novu, { - messageId: "", + messageId: "", type: "", - subscriberId: "", + subscriberId: "", markMessageActionAsSeenDto: { status: "done", }, @@ -228,7 +226,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -245,10 +243,10 @@ run(); ### Response -**Promise\<[components.MessageResponseDto](../../models/components/messageresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerMarkActionAsSeenResponse](../../models/operations/subscriberscontrollermarkactionasseenresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/novunotifications/README.md b/docs/sdks/novunotifications/README.md index d0d6c0a6..63357980 100644 --- a/docs/sdks/novunotifications/README.md +++ b/docs/sdks/novunotifications/README.md @@ -23,12 +23,12 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.notifications.retrieve({ - subscriberId: "", + subscriberId: "", payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -50,7 +50,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersNotificationsRetrieve(novu, { - subscriberId: "", + subscriberId: "", payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }); @@ -61,7 +61,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -78,14 +78,13 @@ run(); ### Response -**Promise\<[operations.SubscribersControllerGetNotificationsFeedResponseBody](../../models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md)\>** +**Promise\<[operations.SubscribersControllerGetNotificationsFeedResponse](../../models/operations/subscriberscontrollergetnotificationsfeedresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## unseenCount @@ -102,13 +101,13 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.notifications.unseenCount({ - seen: true, - subscriberId: "", - limit: 4322.81, + seen: false, + subscriberId: "", + limit: 2979.49, }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -130,9 +129,9 @@ const novu = new NovuCore({ async function run() { const res = await subscribersNotificationsUnseenCount(novu, { - seen: true, - subscriberId: "", - limit: 4322.81, + seen: false, + subscriberId: "", + limit: 2979.49, }); if (!res.ok) { @@ -142,7 +141,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -159,10 +158,10 @@ run(); ### Response -**Promise\<[components.UnseenCountResponse](../../models/components/unseencountresponse.md)\>** +**Promise\<[operations.SubscribersControllerGetUnseenCountResponse](../../models/operations/subscriberscontrollergetunseencountresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/novusubscribers/README.md b/docs/sdks/novusubscribers/README.md index 56b39a52..caeaf6c7 100644 --- a/docs/sdks/novusubscribers/README.md +++ b/docs/sdks/novusubscribers/README.md @@ -6,8 +6,8 @@ ### Available Operations * [assign](#assign) - Subscribers addition -* [delete](#delete) - Subscribers removal * [retrieve](#retrieve) - Check topic subscriber +* [delete](#delete) - Subscribers removal ## assign @@ -23,11 +23,15 @@ const novu = new Novu({ }); async function run() { - await novu.topics.subscribers.assign("", { + const result = await novu.topics.subscribers.assign({ subscribers: [ "", + "", ], - }); + }, ""); + + // Handle the result + console.log(result); } run(); @@ -48,11 +52,12 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsSubscribersAssign(novu, "", { + const res = await topicsSubscribersAssign(novu, { subscribers: [ "", + "", ], - }); + }, ""); if (!res.ok) { throw res.error; @@ -60,7 +65,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -78,18 +84,17 @@ run(); ### Response -**Promise\** +**Promise\<[operations.TopicsControllerAddSubscribersResponse](../../models/operations/topicscontrolleraddsubscribersresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## delete +## retrieve -Remove subscribers from a topic +Check if a subscriber belongs to a certain topic ### Example Usage @@ -101,11 +106,10 @@ const novu = new Novu({ }); async function run() { - await novu.topics.subscribers.delete("", { - subscribers: [ - "", - ], - }); + const result = await novu.topics.subscribers.retrieve("", ""); + + // Handle the result + console.log(result); } run(); @@ -117,7 +121,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsSubscribersDelete } from "@novu/api/funcs/topicsSubscribersDelete.js"; +import { topicsSubscribersRetrieve } from "@novu/api/funcs/topicsSubscribersRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -126,11 +130,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsSubscribersDelete(novu, "", { - subscribers: [ - "", - ], - }); + const res = await topicsSubscribersRetrieve(novu, "", ""); if (!res.ok) { throw res.error; @@ -138,7 +138,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -148,26 +149,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `externalSubscriberId` | *string* | :heavy_check_mark: | The external subscriber id | | `topicKey` | *string* | :heavy_check_mark: | The topic key | -| `removeSubscribersRequestDto` | [components.RemoveSubscribersRequestDto](../../models/components/removesubscribersrequestdto.md) | :heavy_check_mark: | N/A | | `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\** +**Promise\<[operations.TopicsControllerGetTopicSubscriberResponse](../../models/operations/topicscontrollergettopicsubscriberresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## delete -## retrieve - -Check if a subscriber belongs to a certain topic +Remove subscribers from a topic ### Example Usage @@ -179,10 +179,15 @@ const novu = new Novu({ }); async function run() { - const result = await novu.topics.subscribers.retrieve("", ""); - + const result = await novu.topics.subscribers.delete({ + subscribers: [ + "", + "", + ], + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -194,7 +199,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsSubscribersRetrieve } from "@novu/api/funcs/topicsSubscribersRetrieve.js"; +import { topicsSubscribersDelete } from "@novu/api/funcs/topicsSubscribersDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -203,7 +208,12 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsSubscribersRetrieve(novu, "", ""); + const res = await topicsSubscribersDelete(novu, { + subscribers: [ + "", + "", + ], + }, ""); if (!res.ok) { throw res.error; @@ -212,7 +222,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -222,18 +232,18 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `externalSubscriberId` | *string* | :heavy_check_mark: | The external subscriber id | | `topicKey` | *string* | :heavy_check_mark: | The topic key | +| `removeSubscribersRequestDto` | [components.RemoveSubscribersRequestDto](../../models/components/removesubscribersrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.TopicSubscriberDto](../../models/components/topicsubscriberdto.md)\>** +**Promise\<[operations.TopicsControllerRemoveSubscribersResponse](../../models/operations/topicscontrollerremovesubscribersresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md deleted file mode 100644 index a6a2ac8f..00000000 --- a/docs/sdks/organizations/README.md +++ /dev/null @@ -1,244 +0,0 @@ -# Organizations -(*organizations*) - -## Overview - -An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account. - - -### Available Operations - -* [eeOrganizationControllerRenameOrganization](#eeorganizationcontrollerrenameorganization) - Rename organization name -* [retrieve](#retrieve) - Fetch current organization details -* [update](#update) - Update organization branding details - -## eeOrganizationControllerRenameOrganization - -Rename organization name - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.organizations.eeOrganizationControllerRenameOrganization({ - name: "", - }); - - // 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 { organizationsEEOrganizationControllerRenameOrganization } from "@novu/api/funcs/organizationsEEOrganizationControllerRenameOrganization.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 organizationsEEOrganizationControllerRenameOrganization(novu, { - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.RenameOrganizationDto](../../models/components/renameorganizationdto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.RenameOrganizationDto](../../models/components/renameorganizationdto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Fetch current organization details - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.organizations.retrieve(); - - // 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 { organizationsRetrieve } from "@novu/api/funcs/organizationsRetrieve.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 organizationsRetrieve(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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\<[components.OrganizationResponseDto](../../models/components/organizationresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## update - -Update organization branding details - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.organizations.update({ - color: "fuchsia", - contentBackground: "", - fontColor: "", - logo: "", - }); - - // 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 { organizationsUpdate } from "@novu/api/funcs/organizationsUpdate.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 organizationsUpdate(novu, { - color: "fuchsia", - contentBackground: "", - fontColor: "", - logo: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.UpdateBrandingDetailsDto](../../models/components/updatebrandingdetailsdto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.OrganizationBrandingResponseDto](../../models/components/organizationbrandingresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md index 04f72141..a8f3b2ce 100644 --- a/docs/sdks/preferences/README.md +++ b/docs/sdks/preferences/README.md @@ -6,9 +6,9 @@ ### Available Operations * [list](#list) - Get subscriber preferences +* [updateGlobal](#updateglobal) - Update subscriber global preferences * [retrieveByLevel](#retrievebylevel) - Get subscriber preferences by level * [update](#update) - Update subscriber preference -* [updateGlobal](#updateglobal) - Update subscriber global preferences ## list @@ -24,10 +24,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.preferences.list(""); - + const result = await novu.subscribers.preferences.list(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -48,7 +48,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPreferencesList(novu, ""); + const res = await subscribersPreferencesList(novu, ""); if (!res.ok) { throw res.error; @@ -57,7 +57,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -68,24 +68,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `includeInactiveChannels` | *boolean* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | | `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\<[components.UpdateSubscriberPreferenceResponseDto[]](../../models/.md)\>** +**Promise\<[operations.SubscribersControllerListSubscriberPreferencesResponse](../../models/operations/subscriberscontrollerlistsubscriberpreferencesresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## updateGlobal -## retrieveByLevel - -Get subscriber preferences by level +Update subscriber global preferences ### Example Usage @@ -97,10 +97,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.preferences.retrieveByLevel("Topic", ""); - + const result = await novu.subscribers.preferences.updateGlobal({}, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -112,7 +112,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersPreferencesRetrieveByLevel } from "@novu/api/funcs/subscribersPreferencesRetrieveByLevel.js"; +import { subscribersPreferencesUpdateGlobal } from "@novu/api/funcs/subscribersPreferencesUpdateGlobal.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -121,7 +121,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPreferencesRetrieveByLevel(novu, "Topic", ""); + const res = await subscribersPreferencesUpdateGlobal(novu, {}, ""); if (!res.ok) { throw res.error; @@ -130,7 +130,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -140,26 +140,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `parameter` | [operations.Parameter](../../models/operations/parameter.md) | :heavy_check_mark: | the preferences level to be retrieved( Subscriber / Topic) | | `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `updateSubscriberGlobalPreferencesRequestDto` | [components.UpdateSubscriberGlobalPreferencesRequestDto](../../models/components/updatesubscriberglobalpreferencesrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.GetSubscriberPreferencesResponseDto[]](../../models/.md)\>** +**Promise\<[operations.SubscribersControllerUpdateSubscriberGlobalPreferencesResponse](../../models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## retrieveByLevel -## update - -Update subscriber preference +Get subscriber preferences by level ### Example Usage @@ -171,14 +170,13 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.preferences.update({ - subscriberId: "", - parameter: "", - updateSubscriberPreferenceRequestDto: {}, + const result = await novu.subscribers.preferences.retrieveByLevel({ + parameter: "global", + subscriberId: "", }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -190,7 +188,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersPreferencesUpdate } from "@novu/api/funcs/subscribersPreferencesUpdate.js"; +import { subscribersPreferencesRetrieveByLevel } from "@novu/api/funcs/subscribersPreferencesRetrieveByLevel.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -199,10 +197,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPreferencesUpdate(novu, { - subscriberId: "", - parameter: "", - updateSubscriberPreferenceRequestDto: {}, + const res = await subscribersPreferencesRetrieveByLevel(novu, { + parameter: "global", + subscriberId: "", }); if (!res.ok) { @@ -212,7 +209,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -222,25 +219,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SubscribersControllerUpdateSubscriberPreferenceRequest](../../models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest](../../models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.UpdateSubscriberPreferenceResponseDto](../../models/components/updatesubscriberpreferenceresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerGetSubscriberPreferenceByLevelResponse](../../models/operations/subscriberscontrollergetsubscriberpreferencebylevelresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## updateGlobal +## update -Update subscriber global preferences +Update subscriber preference ### Example Usage @@ -252,10 +248,14 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.preferences.updateGlobal("", {}); - + const result = await novu.subscribers.preferences.update({ + subscriberId: "", + parameter: "", + updateSubscriberPreferenceRequestDto: {}, + }); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -267,7 +267,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersPreferencesUpdateGlobal } from "@novu/api/funcs/subscribersPreferencesUpdateGlobal.js"; +import { subscribersPreferencesUpdate } from "@novu/api/funcs/subscribersPreferencesUpdate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -276,7 +276,11 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPreferencesUpdateGlobal(novu, "", {}); + const res = await subscribersPreferencesUpdate(novu, { + subscriberId: "", + parameter: "", + updateSubscriberPreferenceRequestDto: {}, + }); if (!res.ok) { throw res.error; @@ -285,7 +289,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -295,18 +299,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberGlobalPreferencesRequestDto` | [components.UpdateSubscriberGlobalPreferencesRequestDto](../../models/components/updatesubscriberglobalpreferencesrequestdto.md) | :heavy_check_mark: | N/A | +| `request` | [operations.SubscribersControllerUpdateSubscriberPreferenceRequest](../../models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.UpdateSubscriberPreferenceResponseDto](../../models/components/updatesubscriberpreferenceresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerUpdateSubscriberPreferenceResponse](../../models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/properties/README.md b/docs/sdks/properties/README.md index cf996e87..3d2dba0a 100644 --- a/docs/sdks/properties/README.md +++ b/docs/sdks/properties/README.md @@ -21,12 +21,12 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.properties.updateOnlineFlag("", { - isOnline: false, - }); - + const result = await novu.subscribers.properties.updateOnlineFlag({ + isOnline: true, + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -47,9 +47,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPropertiesUpdateOnlineFlag(novu, "", { - isOnline: false, - }); + const res = await subscribersPropertiesUpdateOnlineFlag(novu, { + isOnline: true, + }, ""); if (!res.ok) { throw res.error; @@ -58,7 +58,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -76,10 +76,10 @@ run(); ### Response -**Promise\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerUpdateSubscriberOnlineFlagResponse](../../models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 4fc48b3b..5cd03b19 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -5,12 +5,12 @@ ### Available Operations -* [graph](#graph) - Get notification graph statistics * [retrieve](#retrieve) - Get notification statistics +* [graph](#graph) - Get notification graph statistics -## graph +## retrieve -Get notification graph statistics +Get notification statistics ### Example Usage @@ -22,10 +22,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.notifications.stats.graph(); - + const result = await novu.notifications.stats.retrieve(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -37,7 +37,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { notificationsStatsGraph } from "@novu/api/funcs/notificationsStatsGraph.js"; +import { notificationsStatsRetrieve } from "@novu/api/funcs/notificationsStatsRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -46,7 +46,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await notificationsStatsGraph(novu); + const res = await notificationsStatsRetrieve(novu); if (!res.ok) { throw res.error; @@ -55,7 +55,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -65,25 +65,23 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `days` | *number* | :heavy_minus_sign: | N/A | | `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\<[components.ActivityGraphStatesResponse[]](../../models/.md)\>** +**Promise\<[operations.NotificationsControllerGetActivityStatsResponse](../../models/operations/notificationscontrollergetactivitystatsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## graph -## retrieve - -Get notification statistics +Get notification graph statistics ### Example Usage @@ -95,10 +93,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.notifications.stats.retrieve(); - + const result = await novu.notifications.stats.graph(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -110,7 +108,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { notificationsStatsRetrieve } from "@novu/api/funcs/notificationsStatsRetrieve.js"; +import { notificationsStatsGraph } from "@novu/api/funcs/notificationsStatsGraph.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -119,7 +117,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await notificationsStatsRetrieve(novu); + const res = await notificationsStatsGraph(novu); if (!res.ok) { throw res.error; @@ -128,7 +126,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -138,16 +136,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `days` | *number* | :heavy_minus_sign: | N/A | | `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\<[components.ActivityStatsResponseDto](../../models/components/activitystatsresponsedto.md)\>** +**Promise\<[operations.NotificationsControllerGetActivityGraphStatsResponse](../../models/operations/notificationscontrollergetactivitygraphstatsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/status/README.md b/docs/sdks/status/README.md deleted file mode 100644 index 1444bcb0..00000000 --- a/docs/sdks/status/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Status -(*workflows.status*) - -## Overview - -### Available Operations - -* [update](#update) - Update workflow status - -## update - -Workflow was previously named notification template - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.status.update("", { - active: false, - }); - - // 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 { workflowsStatusUpdate } from "@novu/api/funcs/workflowsStatusUpdate.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 workflowsStatusUpdate(novu, "", { - active: false, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `changeWorkflowStatusRequestDto` | [components.ChangeWorkflowStatusRequestDto](../../models/components/changeworkflowstatusrequestdto.md) | :heavy_check_mark: | N/A | -| `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\<[components.WorkflowResponse](../../models/components/workflowresponse.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/subscribers/README.md b/docs/sdks/subscribers/README.md index 72c03327..849106c8 100644 --- a/docs/sdks/subscribers/README.md +++ b/docs/sdks/subscribers/README.md @@ -8,16 +8,16 @@ A subscriber in Novu represents someone who should receive a message. A subscrib ### Available Operations -* [create](#create) - Create subscriber -* [createBulk](#createbulk) - Bulk create subscribers -* [delete](#delete) - Delete subscriber * [list](#list) - Get subscribers +* [create](#create) - Create subscriber * [retrieve](#retrieve) - Get subscriber * [update](#update) - Update subscriber +* [delete](#delete) - Delete subscriber +* [createBulk](#createbulk) - Bulk create subscribers -## create +## list -Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. +Returns a list of subscribers, could paginated using the `page` and `limit` query parameter ### Example Usage @@ -29,12 +29,12 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.create({ - subscriberId: "", - }); - - // Handle the result - console.log(result) + const result = await novu.subscribers.list(); + + for await (const page of result) { + // Handle the page + console.log(page); + } } run(); @@ -46,7 +46,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersCreate } from "@novu/api/funcs/subscribersCreate.js"; +import { subscribersList } from "@novu/api/funcs/subscribersList.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -55,9 +55,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersCreate(novu, { - subscriberId: "", - }); + const res = await subscribersList(novu); if (!res.ok) { throw res.error; @@ -65,8 +63,10 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result) + for await (const page of result) { + // Handle the page + console.log(page); + } } run(); @@ -76,28 +76,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateSubscriberRequestDto](../../models/components/createsubscriberrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | | `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\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerListSubscribersResponse](../../models/operations/subscriberscontrollerlistsubscribersresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## createBulk +| errors.SDKError | 4XX, 5XX | \*/\* | +## create - Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API. - The bulk API is limited to 500 subscribers per request. - +Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. ### Example Usage @@ -109,11 +106,12 @@ const novu = new Novu({ }); async function run() { - await novu.subscribers.createBulk({ - subscribers: [ - "", - ], + const result = await novu.subscribers.create({ + subscriberId: "", }); + + // Handle the result + console.log(result); } run(); @@ -125,7 +123,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersCreateBulk } from "@novu/api/funcs/subscribersCreateBulk.js"; +import { subscribersCreate } from "@novu/api/funcs/subscribersCreate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -134,10 +132,8 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersCreateBulk(novu, { - subscribers: [ - "", - ], + const res = await subscribersCreate(novu, { + subscriberId: "", }); if (!res.ok) { @@ -146,7 +142,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -156,25 +153,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.BulkSubscriberCreateDto](../../models/components/bulksubscribercreatedto.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSubscriberRequestDto](../../models/components/createsubscriberrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\** +**Promise\<[operations.SubscribersControllerCreateSubscriberResponse](../../models/operations/subscriberscontrollercreatesubscriberresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## retrieve -## delete - -Deletes a subscriber entity from the Novu platform +Get subscriber by your internal id used to identify the subscriber ### Example Usage @@ -186,10 +182,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.delete(""); - + const result = await novu.subscribers.retrieve(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -201,7 +197,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersDelete } from "@novu/api/funcs/subscribersDelete.js"; +import { subscribersRetrieve } from "@novu/api/funcs/subscribersRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -210,7 +206,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersDelete(novu, ""); + const res = await subscribersRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -219,7 +215,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -230,24 +226,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `includeTopics` | *string* | :heavy_minus_sign: | Includes the topics associated with the subscriber | | `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\<[components.DeleteSubscriberResponseDto](../../models/components/deletesubscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerGetSubscriberResponse](../../models/operations/subscriberscontrollergetsubscriberresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## list +## update -Returns a list of subscribers, could paginated using the `page` and `limit` query parameter +Used to update the subscriber entity with new information ### Example Usage @@ -259,12 +255,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.list(); - - for await (const page of result) { - // Handle the page - console.log(page); - } + const result = await novu.subscribers.update({}, ""); + + // Handle the result + console.log(result); } run(); @@ -276,7 +270,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersList } from "@novu/api/funcs/subscribersList.js"; +import { subscribersUpdate } from "@novu/api/funcs/subscribersUpdate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -285,7 +279,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersList(novu); + const res = await subscribersUpdate(novu, {}, ""); if (!res.ok) { throw res.error; @@ -293,10 +287,8 @@ async function run() { const { value: result } = res; - for await (const page of result) { - // Handle the page - console.log(page); - } + // Handle the result + console.log(result); } run(); @@ -306,26 +298,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `updateSubscriberRequestDto` | [components.UpdateSubscriberRequestDto](../../models/components/updatesubscriberrequestdto.md) | :heavy_check_mark: | N/A | | `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.SubscribersControllerListSubscribersResponse](../../models/operations/subscriberscontrollerlistsubscribersresponse.md)\>** +**Promise\<[operations.SubscribersControllerUpdateSubscriberResponse](../../models/operations/subscriberscontrollerupdatesubscriberresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## delete -## retrieve - -Get subscriber by your internal id used to identify the subscriber +Deletes a subscriber entity from the Novu platform ### Example Usage @@ -337,10 +328,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.retrieve(""); - + const result = await novu.subscribers.delete(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -352,7 +343,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersRetrieve } from "@novu/api/funcs/subscribersRetrieve.js"; +import { subscribersDelete } from "@novu/api/funcs/subscribersDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -361,7 +352,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersRetrieve(novu, ""); + const res = await subscribersDelete(novu, ""); if (!res.ok) { throw res.error; @@ -370,7 +361,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -387,18 +378,20 @@ run(); ### Response -**Promise\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerRemoveSubscriberResponse](../../models/operations/subscriberscontrollerremovesubscriberresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## createBulk -## update -Used to update the subscriber entity with new information + Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API. + The bulk API is limited to 500 subscribers per request. + ### Example Usage @@ -410,10 +403,14 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.update("", {}); - + const result = await novu.subscribers.createBulk({ + subscribers: [ + "", + ], + }); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -425,7 +422,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { subscribersUpdate } from "@novu/api/funcs/subscribersUpdate.js"; +import { subscribersCreateBulk } from "@novu/api/funcs/subscribersCreateBulk.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -434,7 +431,11 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersUpdate(novu, "", {}); + const res = await subscribersCreateBulk(novu, { + subscribers: [ + "", + ], + }); if (!res.ok) { throw res.error; @@ -443,7 +444,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -453,18 +454,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberRequestDto` | [components.UpdateSubscriberRequestDto](../../models/components/updatesubscriberrequestdto.md) | :heavy_check_mark: | N/A | +| `request` | [components.BulkSubscriberCreateDto](../../models/components/bulksubscribercreatedto.md) | :heavy_check_mark: | The request object to use for the request. | | `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\<[components.SubscriberResponseDto](../../models/components/subscriberresponsedto.md)\>** +**Promise\<[operations.SubscribersControllerBulkCreateSubscribersResponse](../../models/operations/subscriberscontrollerbulkcreatesubscribersresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/tenants/README.md b/docs/sdks/tenants/README.md deleted file mode 100644 index db8e9564..00000000 --- a/docs/sdks/tenants/README.md +++ /dev/null @@ -1,387 +0,0 @@ -# Tenants -(*tenants*) - -## Overview - -A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations. - - -### Available Operations - -* [create](#create) - Create tenant -* [delete](#delete) - Delete tenant -* [list](#list) - Get tenants -* [retrieve](#retrieve) - Get tenant -* [update](#update) - Update tenant - -## create - -Create tenant under the current environment Tenants is not supported in code first version of the API. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.tenants.create({ - identifier: "", - name: "", - }); - - // 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 { tenantsCreate } from "@novu/api/funcs/tenantsCreate.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 tenantsCreate(novu, { - identifier: "", - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateTenantRequestDto](../../models/components/createtenantrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.CreateTenantResponseDto](../../models/components/createtenantresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## delete - -Deletes a tenant entity from the Novu platform. Tenants is not supported in code first version of the API. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - await novu.tenants.delete(""); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { tenantsDelete } from "@novu/api/funcs/tenantsDelete.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 tenantsDelete(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `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 Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## list - -Returns a list of tenants, could paginated using the `page` and `limit` query parameter. Tenants is not supported in code first version of the API. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.tenants.list(); - - for await (const page of result) { - // Handle the page - console.log(page); - } -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { NovuCore } from "@novu/api/core.js"; -import { tenantsList } from "@novu/api/funcs/tenantsList.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 tenantsList(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page - console.log(page); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | -| `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.TenantControllerListTenantsResponse](../../models/operations/tenantcontrollerlisttenantsresponse.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Get tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.tenants.retrieve(""); - - // 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 { tenantsRetrieve } from "@novu/api/funcs/tenantsRetrieve.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 tenantsRetrieve(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `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\<[components.GetTenantResponseDto](../../models/components/gettenantresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## update - -Update tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.tenants.update("", {}); - - // 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 { tenantsUpdate } from "@novu/api/funcs/tenantsUpdate.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 tenantsUpdate(novu, "", {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `identifier` | *string* | :heavy_check_mark: | N/A | -| `updateTenantRequestDto` | [components.UpdateTenantRequestDto](../../models/components/updatetenantrequestdto.md) | :heavy_check_mark: | N/A | -| `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\<[components.UpdateTenantResponseDto](../../models/components/updatetenantresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/topics/README.md b/docs/sdks/topics/README.md index 184309c9..6bfcdf0e 100644 --- a/docs/sdks/topics/README.md +++ b/docs/sdks/topics/README.md @@ -9,10 +9,10 @@ Topics are a way to group subscribers together so that they can be notified of e ### Available Operations * [create](#create) - Topic creation -* [delete](#delete) - Delete topic * [list](#list) - Filter topics -* [rename](#rename) - Rename a topic +* [delete](#delete) - Delete topic * [retrieve](#retrieve) - Get topic +* [rename](#rename) - Rename a topic ## create @@ -32,9 +32,9 @@ async function run() { key: "", name: "", }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -67,7 +67,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -84,18 +84,17 @@ run(); ### Response -**Promise\<[components.CreateTopicResponseDto](../../models/components/createtopicresponsedto.md)\>** +**Promise\<[operations.TopicsControllerCreateTopicResponse](../../models/operations/topicscontrollercreatetopicresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## delete +## list -Delete a topic by its topic key if it has no subscribers +Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter ### Example Usage @@ -107,7 +106,10 @@ const novu = new Novu({ }); async function run() { - await novu.topics.delete(""); + const result = await novu.topics.list({}); + + // Handle the result + console.log(result); } run(); @@ -119,7 +121,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsDelete } from "@novu/api/funcs/topicsDelete.js"; +import { topicsList } from "@novu/api/funcs/topicsList.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -128,7 +130,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsDelete(novu, ""); + const res = await topicsList(novu, {}); if (!res.ok) { throw res.error; @@ -136,7 +138,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -146,25 +149,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `topicKey` | *string* | :heavy_check_mark: | The topic key | +| `request` | [operations.TopicsControllerListTopicsRequest](../../models/operations/topicscontrollerlisttopicsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `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\** +**Promise\<[operations.TopicsControllerListTopicsResponse](../../models/operations/topicscontrollerlisttopicsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## delete -## list - -Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter +Delete a topic by its topic key if it has no subscribers ### Example Usage @@ -176,10 +178,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.topics.list({}); - + const result = await novu.topics.delete(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -191,7 +193,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsList } from "@novu/api/funcs/topicsList.js"; +import { topicsDelete } from "@novu/api/funcs/topicsDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -200,7 +202,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsList(novu, {}); + const res = await topicsDelete(novu, ""); if (!res.ok) { throw res.error; @@ -209,7 +211,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -219,25 +221,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.TopicsControllerListTopicsRequest](../../models/operations/topicscontrollerlisttopicsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `topicKey` | *string* | :heavy_check_mark: | The topic key | | `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\<[components.FilterTopicsResponseDto](../../models/components/filtertopicsresponsedto.md)\>** +**Promise\<[operations.TopicsControllerDeleteTopicResponse](../../models/operations/topicscontrollerdeletetopicresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## retrieve -## rename - -Rename a topic by providing a new name +Get a topic by its topic key ### Example Usage @@ -249,12 +250,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.topics.rename("", { - name: "", - }); - + const result = await novu.topics.retrieve(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -266,7 +265,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsRename } from "@novu/api/funcs/topicsRename.js"; +import { topicsRetrieve } from "@novu/api/funcs/topicsRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -275,9 +274,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsRename(novu, "", { - name: "", - }); + const res = await topicsRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -286,7 +283,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -297,25 +294,23 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `topicKey` | *string* | :heavy_check_mark: | The topic key | -| `renameTopicRequestDto` | [components.RenameTopicRequestDto](../../models/components/renametopicrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.RenameTopicResponseDto](../../models/components/renametopicresponsedto.md)\>** +**Promise\<[operations.TopicsControllerGetTopicResponse](../../models/operations/topicscontrollergettopicresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | +## rename -## retrieve - -Get a topic by its topic key +Rename a topic by providing a new name ### Example Usage @@ -327,10 +322,12 @@ const novu = new Novu({ }); async function run() { - const result = await novu.topics.retrieve(""); - + const result = await novu.topics.rename({ + name: "", + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -342,7 +339,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { topicsRetrieve } from "@novu/api/funcs/topicsRetrieve.js"; +import { topicsRename } from "@novu/api/funcs/topicsRename.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -351,7 +348,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await topicsRetrieve(novu, ""); + const res = await topicsRename(novu, { + name: "", + }, ""); if (!res.ok) { throw res.error; @@ -360,7 +359,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -371,16 +370,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `topicKey` | *string* | :heavy_check_mark: | The topic key | +| `renameTopicRequestDto` | [components.RenameTopicRequestDto](../../models/components/renametopicrequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.GetTopicResponseDto](../../models/components/gettopicresponsedto.md)\>** +**Promise\<[operations.TopicsControllerRenameTopicResponse](../../models/operations/topicscontrollerrenametopicresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/variables/README.md b/docs/sdks/variables/README.md deleted file mode 100644 index df67e49c..00000000 --- a/docs/sdks/variables/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Variables -(*workflows.variables*) - -## Overview - -### Available Operations - -* [retrieve](#retrieve) - Get available variables - -## retrieve - -Get the variables that can be used in the workflow - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.variables.retrieve(); - - // 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 { workflowsVariablesRetrieve } from "@novu/api/funcs/workflowsVariablesRetrieve.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 workflowsVariablesRetrieve(novu); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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\<[components.VariablesResponseDto](../../models/components/variablesresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 9002ec87..5497d0aa 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -21,10 +21,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.integrations.webhooks.retrieve(""); - + const result = await novu.integrations.webhooks.retrieve(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -45,7 +45,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await integrationsWebhooksRetrieve(novu, ""); + const res = await integrationsWebhooksRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -54,7 +54,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -71,10 +71,10 @@ run(); ### Response -**Promise\<[boolean](../../models/.md)\>** +**Promise\<[operations.IntegrationsControllerGetWebhookSupportStatusResponse](../../models/operations/integrationscontrollergetwebhooksupportstatusresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflowgroups/README.md b/docs/sdks/workflowgroups/README.md index 5b30be03..d0d7e3ba 100644 --- a/docs/sdks/workflowgroups/README.md +++ b/docs/sdks/workflowgroups/README.md @@ -8,10 +8,10 @@ Workflow groups are used to organize workflows into logical groups. ### Available Operations * [create](#create) - Create workflow group -* [delete](#delete) - Delete workflow group * [list](#list) - Get workflow groups * [retrieve](#retrieve) - Get workflow group * [update](#update) - Update workflow group +* [delete](#delete) - Delete workflow group ## create @@ -30,9 +30,9 @@ async function run() { const result = await novu.workflowGroups.create({ name: "", }); - + // Handle the result - console.log(result) + console.log(result); } run(); @@ -64,7 +64,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -81,16 +81,15 @@ run(); ### Response -**Promise\<[components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md)\>** +**Promise\<[operations.NotificationGroupsControllerCreateNotificationGroupResponse](../../models/operations/notificationgroupscontrollercreatenotificationgroupresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## delete +## list workflow group was previously named notification group @@ -104,10 +103,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.delete(""); - + const result = await novu.workflowGroups.list(); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -119,7 +118,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { workflowGroupsDelete } from "@novu/api/funcs/workflowGroupsDelete.js"; +import { workflowGroupsList } from "@novu/api/funcs/workflowGroupsList.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -128,7 +127,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsDelete(novu, ""); + const res = await workflowGroupsList(novu); if (!res.ok) { throw res.error; @@ -137,7 +136,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -147,23 +146,21 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | | `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\<[components.DeleteNotificationGroupResponseDto](../../models/components/deletenotificationgroupresponsedto.md)\>** +**Promise\<[operations.NotificationGroupsControllerListNotificationGroupsResponse](../../models/operations/notificationgroupscontrollerlistnotificationgroupsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## list +## retrieve workflow group was previously named notification group @@ -177,10 +174,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.list(); - + const result = await novu.workflowGroups.retrieve(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -192,7 +189,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { workflowGroupsList } from "@novu/api/funcs/workflowGroupsList.js"; +import { workflowGroupsRetrieve } from "@novu/api/funcs/workflowGroupsRetrieve.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -201,7 +198,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsList(novu); + const res = await workflowGroupsRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -210,7 +207,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -220,22 +217,22 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | | `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\<[components.NotificationGroupResponseDto[]](../../models/.md)\>** +**Promise\<[operations.NotificationGroupsControllerGetNotificationGroupResponse](../../models/operations/notificationgroupscontrollergetnotificationgroupresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | - -## retrieve +## update workflow group was previously named notification group @@ -249,10 +246,12 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.retrieve(""); - + const result = await novu.workflowGroups.update({ + name: "", + }, ""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -264,7 +263,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { workflowGroupsRetrieve } from "@novu/api/funcs/workflowGroupsRetrieve.js"; +import { workflowGroupsUpdate } from "@novu/api/funcs/workflowGroupsUpdate.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -273,7 +272,9 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsRetrieve(novu, ""); + const res = await workflowGroupsUpdate(novu, { + name: "", + }, ""); if (!res.ok) { throw res.error; @@ -282,7 +283,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -293,22 +294,22 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `id` | *string* | :heavy_check_mark: | N/A | +| `createNotificationGroupRequestDto` | [components.CreateNotificationGroupRequestDto](../../models/components/createnotificationgrouprequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md)\>** +**Promise\<[operations.NotificationGroupsControllerUpdateNotificationGroupResponse](../../models/operations/notificationgroupscontrollerupdatenotificationgroupresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | -## update +## delete workflow group was previously named notification group @@ -322,12 +323,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.update("", { - name: "", - }); - + const result = await novu.workflowGroups.delete(""); + // Handle the result - console.log(result) + console.log(result); } run(); @@ -339,7 +338,7 @@ The standalone function version of this method: ```typescript import { NovuCore } from "@novu/api/core.js"; -import { workflowGroupsUpdate } from "@novu/api/funcs/workflowGroupsUpdate.js"; +import { workflowGroupsDelete } from "@novu/api/funcs/workflowGroupsDelete.js"; // Use `NovuCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -348,9 +347,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsUpdate(novu, "", { - name: "", - }); + const res = await workflowGroupsDelete(novu, ""); if (!res.ok) { throw res.error; @@ -359,7 +356,7 @@ async function run() { const { value: result } = res; // Handle the result - console.log(result) + console.log(result); } run(); @@ -370,17 +367,16 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `id` | *string* | :heavy_check_mark: | N/A | -| `createNotificationGroupRequestDto` | [components.CreateNotificationGroupRequestDto](../../models/components/createnotificationgrouprequestdto.md) | :heavy_check_mark: | N/A | | `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\<[components.NotificationGroupResponseDto](../../models/components/notificationgroupresponsedto.md)\>** +**Promise\<[operations.NotificationGroupsControllerDeleteNotificationGroupResponse](../../models/operations/notificationgroupscontrollerdeletenotificationgroupresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md deleted file mode 100644 index 184dc471..00000000 --- a/docs/sdks/workflows/README.md +++ /dev/null @@ -1,398 +0,0 @@ -# Workflows -(*workflows*) - -## Overview - -All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system. - - -### Available Operations - -* [create](#create) - Create workflow -* [delete](#delete) - Delete workflow -* [list](#list) - Get workflows -* [retrieve](#retrieve) - Get workflow -* [update](#update) - Update workflow - -## create - -Workflow was previously named notification template - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.create({ - name: "", - notificationGroupId: "", - steps: [ - - ], - }); - - // 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 { workflowsCreate } from "@novu/api/funcs/workflowsCreate.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 workflowsCreate(novu, { - name: "", - notificationGroupId: "", - steps: [ - - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateWorkflowRequestDto](../../models/components/createworkflowrequestdto.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.WorkflowResponse](../../models/components/workflowresponse.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## delete - -Workflow was previously named notification template - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.delete(""); - - // 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 { workflowsDelete } from "@novu/api/funcs/workflowsDelete.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 workflowsDelete(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `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\<[components.DataBooleanDto](../../models/components/databooleandto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## list - -Workflows were previously named notification templates - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.list({}); - - // 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 { workflowsList } from "@novu/api/funcs/workflowsList.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 workflowsList(novu, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.WorkflowControllerListWorkflowsRequest](../../models/operations/workflowcontrollerlistworkflowsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `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\<[components.WorkflowsResponseDto](../../models/components/workflowsresponsedto.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## retrieve - -Workflow was previously named notification template - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.retrieve(""); - - // 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 { workflowsRetrieve } from "@novu/api/funcs/workflowsRetrieve.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 workflowsRetrieve(novu, ""); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `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\<[components.WorkflowResponse](../../models/components/workflowresponse.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - - -## update - -Workflow was previously named notification template - -### Example Usage - -```typescript -import { Novu } from "@novu/api"; - -const novu = new Novu({ - apiKey: "", -}); - -async function run() { - const result = await novu.workflows.update("", { - name: "", - notificationGroupId: "", - }); - - // 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 { workflowsUpdate } from "@novu/api/funcs/workflowsUpdate.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 workflowsUpdate(novu, "", { - name: "", - notificationGroupId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result) -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `workflowId` | *string* | :heavy_check_mark: | N/A | -| `updateWorkflowRequestDto` | [components.UpdateWorkflowRequestDto](../../models/components/updateworkflowrequestdto.md) | :heavy_check_mark: | N/A | -| `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\<[components.WorkflowResponse](../../models/components/workflowresponse.md)\>** - -### Errors - -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | diff --git a/jsr.json b/jsr.json index 081fbdb7..0ad96ee3 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.11", + "version": "0.0.1-alpha.25", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 332335e7..2be5fc72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.11", + "version": "0.0.1-alpha.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.1-alpha.11", + "version": "0.0.1-alpha.25", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index d84a765c..20c80d47 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,9 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.11", + "version": "0.0.1-alpha.25", "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.json b/sources/code-samples.json index 499196e0..21d3fc66 100644 --- a/sources/code-samples.json +++ b/sources/code-samples.json @@ -3,6 +3,7 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: +<<<<<<< Updated upstream - target: $["paths"]["/v1/organizations"]["post"] update: "x-codeSamples": @@ -293,11 +294,32 @@ actions: - "lang": "typescript" "label": "LayoutsController_listLayouts" "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.layouts.list({});\n\n \n}\n\nrun();" +======= + - target: $["paths"]["/v1/environments"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "EnvironmentsControllerV1_listMyEnvironments" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/environments/api-keys"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "EnvironmentsControllerV1_listOrganizationApiKeys" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.apiKeys.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/environments/me"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "EnvironmentsControllerV1_getCurrentEnvironment" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" +>>>>>>> Stashed changes - target: $["paths"]["/v1/events/trigger"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_trigger" +<<<<<<< Updated upstream "source": |- import { Novu } from "@novu/api"; import { TopicPayloadDtoType } from "@novu/api/models/components"; @@ -1618,11 +1640,15 @@ actions: } run(); +======= + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.trigger({\n name: \"workflow_identifier\",\n payload: {},\n overrides: {},\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" +>>>>>>> Stashed changes - target: $["paths"]["/v1/events/trigger/broadcast"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_broadcastEventToAll" +<<<<<<< Updated upstream "source": |- import { Novu } from "@novu/api"; @@ -1744,11 +1770,285 @@ actions: } run(); +======= + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.triggerBroadcast({\n name: \"\",\n payload: {},\n overrides: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/events/trigger/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "EventsController_triggerBulk" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.triggerBulk({\n events: [\n {\n name: \"workflow_identifier\",\n payload: {},\n overrides: {},\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n subscriberId: \"\",\n },\n ],\n },\n {\n name: \"workflow_identifier\",\n payload: {},\n overrides: {},\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n },\n {\n name: \"workflow_identifier\",\n payload: {},\n overrides: {},\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/events/trigger/{transactionId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "EventsController_cancel" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.cancel(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/execution-details"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "ExecutionDetailsController_getExecutionDetailsForNotification" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.executionDetails.retrieve(\"\", \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_listIntegrations" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_createIntegration" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.create({\n providerId: \"\",\n channel: \"sms\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations/active"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_getActiveIntegrations" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.listActive();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations/webhook/provider/{providerOrIntegrationId}/status"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_getWebhookSupportStatus" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.webhooks.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations/{integrationId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_removeIntegration" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations/{integrationId}"]["put"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_updateIntegrationById" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.update({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/integrations/{integrationId}/set-primary"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "IntegrationsController_setIntegrationAsPrimary" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.setAsPrimary(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/messages"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "MessagesController_getMessages" + "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();" + - target: $["paths"]["/v1/messages/transaction/{transactionId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "MessagesController_deleteMessagesByTransactionId" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.messages.deleteByTransactionId(\"\");\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/messages/{messageId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "MessagesController_deleteMessage" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.messages.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notification-groups"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationGroupsController_listNotificationGroups" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notification-groups"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationGroupsController_createNotificationGroup" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.create({\n name: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notification-groups/{id}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationGroupsController_deleteNotificationGroup" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notification-groups/{id}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationGroupsController_getNotificationGroup" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notification-groups/{id}"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationGroupsController_updateNotificationGroup" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.update({\n name: \"\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notifications"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationsController_listNotifications" + "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 channels: [\n \"sms\",\n \"chat\",\n \"in_app\",\n ],\n templates: [\n \"\",\n ],\n emails: [\n \"\",\n ],\n search: \"\",\n subscriberIds: [\n \"\",\n \"\",\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notifications/graph/stats"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationsController_getActivityGraphStats" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.graph();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notifications/stats"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationsController_getActivityStats" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/notifications/{notificationId}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "NotificationsController_getNotification" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_listSubscribers" + "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();" + - target: $["paths"]["/v1/subscribers"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_createSubscriber" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.create({\n subscriberId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_bulkCreateSubscribers" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.createBulk({\n subscribers: [\n \"\",\n ],\n });\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_removeSubscriber" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_getSubscriber" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["put"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_updateSubscriber" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.update({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_modifySubscriberChannel" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.append({\n providerId: 3462.44,\n credentials: {\n webhookUrl: \"https://talkative-pop.org\",\n },\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["put"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_updateSubscriberChannel" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.update({\n providerId: 8574.77,\n credentials: {\n webhookUrl: \"https://grown-worth.name\",\n },\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_deleteSubscriberCredentials" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.credentials.delete(\"\", \"\");\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_chatAccessOauth" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.authentication.chatAccessOauth({\n subscriberId: \"\",\n providerId: \"\",\n hmacHash: \"\",\n environmentId: \"\",\n });\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_chatOauthCallback" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.authentication.chatAccessOauthCallBack({\n subscriberId: \"\",\n providerId: \"\",\n code: \"\",\n hmacHash: \"\",\n environmentId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-all"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_markAllUnreadAsRead" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAll({\n markAs: \"seen\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-as"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_markMessagesAs" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAllAs({\n messageId: \"\",\n markAs: \"unread\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_markActionAsSeen" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.updateAsSeen({\n messageId: \"\",\n type: \"\",\n subscriberId: \"\",\n markMessageActionAsSeenDto: {\n status: \"done\",\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/feed"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_getNotificationsFeed" + "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.retrieve({\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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/unseen"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_getUnseenCount" + "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 seen: true,\n subscriberId: \"\",\n limit: 4327.98,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/online-status"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_updateSubscriberOnlineFlag" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.properties.updateOnlineFlag({\n isOnline: false,\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_listSubscriberPreferences" + "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.list(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_updateSubscriberGlobalPreferences" + "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.updateGlobal({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_getSubscriberPreferenceByLevel" + "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.retrieveByLevel({\n parameter: \"template\",\n subscriberId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "SubscribersController_updateSubscriberPreference" + "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 parameter: \"\",\n updateSubscriberPreferenceRequestDto: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/topics"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_listTopics" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.list({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/topics"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_createTopic" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.create({\n key: \"\",\n name: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" +>>>>>>> Stashed changes - target: $["paths"]["/v1/topics/{topicKey}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_deleteTopic" +<<<<<<< Updated upstream "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.delete(\"\");\n\n \n}\n\nrun();" - target: $["paths"]["/v1/tenants/{identifier}"]["patch"] update: @@ -1770,3 +2070,36 @@ actions: } run(); +======= + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.delete(\"\");\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/topics/{topicKey}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_getTopic" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/topics/{topicKey}"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_renameTopic" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.rename({\n name: \"\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/topics/{topicKey}/subscribers"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_addSubscribers" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.subscribers.assign({\n subscribers: [\n \"\",\n \"\",\n \"\",\n ],\n }, \"\");\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/removal"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_removeSubscribers" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.subscribers.delete({\n subscribers: [\n \"\",\n \"\",\n ],\n }, \"\");\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/{externalSubscriberId}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TopicsController_getTopicSubscriber" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.subscribers.retrieve(\"\", \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" +>>>>>>> Stashed changes diff --git a/sources/code-samples.yaml b/sources/code-samples.yaml index 5956a4d6..24ca5731 100644 --- a/sources/code-samples.yaml +++ b/sources/code-samples.yaml @@ -3,507 +3,339 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/v1/changes"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "ChangesController_getChanges" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.changes.retrieve({\n promoted: \"false\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/changes/bulk/apply"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "ChangesController_bulkApplyDiff" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.changes.applyBulk({\n changeIds: [\n \"\",\n ],\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/changes/count"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "ChangesController_getChangesCount" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.changes.count();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/changes/{changeId}/apply"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "ChangesController_applyDiff" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.changes.apply(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/v1/environments"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "EnvironmentsController_listMyEnvironments" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.list();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + "label": "EnvironmentsControllerV1_listMyEnvironments" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/environments/api-keys"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "EnvironmentsController_listOrganizationApiKeys" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.apiKeys.list();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + "label": "EnvironmentsControllerV1_listOrganizationApiKeys" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.apiKeys.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/environments/me"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "EnvironmentsController_getCurrentEnvironment" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.retrieve();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + "label": "EnvironmentsControllerV1_getCurrentEnvironment" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.environments.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/events/trigger"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_trigger" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.trigger({\n name: \"workflow_identifier\",\n payload: {},\n overrides: {},\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\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.trigger({\n name: \"workflow_identifier\",\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/events/trigger/broadcast"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_broadcastEventToAll" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.triggerBroadcast({\n name: \"\",\n payload: {},\n overrides: {},\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.triggerBroadcast({\n name: \"\",\n payload: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/events/trigger/bulk"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_triggerBulk" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.triggerBulk({\n events: [\n \n ],\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.triggerBulk({\n events: [\n {\n name: \"workflow_identifier\",\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n subscriberId: \"\",\n },\n ],\n },\n {\n name: \"workflow_identifier\",\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n },\n {\n name: \"workflow_identifier\",\n to: [\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n {\n topicKey: \"\",\n type: \"Topic\",\n },\n ],\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/events/trigger/{transactionId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "EventsController_cancel" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.cancel(\"\");\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.cancel(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/execution-details"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "ExecutionDetailsController_getExecutionDetailsForNotification" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.executionDetails.retrieve(\"\", \"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/feeds"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "FeedsController_getFeeds" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.feeds.retrieve();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/feeds"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "FeedsController_createFeed" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.feeds.create({\n name: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/feeds/{feedId}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "FeedsController_deleteFeedById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.feeds.delete(\"\");\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.executionDetails.retrieve(\"\", \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_listIntegrations" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.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.integrations.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_createIntegration" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.create({\n providerId: \"\",\n channel: \"sms\",\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.integrations.create({\n providerId: \"\",\n channel: \"sms\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations/active"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_getActiveIntegrations" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.listActive();\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.integrations.listActive();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations/webhook/provider/{providerOrIntegrationId}/status"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_getWebhookSupportStatus" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.webhooks.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.integrations.webhooks.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations/{integrationId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_removeIntegration" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.delete(\"\");\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.integrations.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations/{integrationId}"]["put"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_updateIntegrationById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.update(\"\", {});\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.integrations.update({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/integrations/{integrationId}/set-primary"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "IntegrationsController_setIntegrationAsPrimary" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.integrations.setAsPrimary(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/layouts"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_listLayouts" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.layouts.list({});\n}\n\nrun();" - - target: $["paths"]["/v1/layouts"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_PropertyDescriptor" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.layouts.create();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/layouts/{layoutId}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_deleteLayout" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.layouts.delete(\"\");\n}\n\nrun();" - - target: $["paths"]["/v1/layouts/{layoutId}"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_getLayout" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.layouts.retrieve(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/layouts/{layoutId}"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_updateLayout" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.layouts.update(\"\", {\n identifier: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/layouts/{layoutId}/default"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "LayoutsController_setDefaultLayout" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.layouts.setAsDefault(\"\");\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.integrations.setAsPrimary(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/messages"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "MessagesController_getMessages" - "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\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/messages/transaction/{transactionId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "MessagesController_deleteMessagesByTransactionId" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.messages.deleteByTransactionId(\"\");\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.deleteByTransactionId(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/messages/{messageId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "MessagesController_deleteMessage" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.messages.delete(\"\");\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.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notification-groups"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationGroupsController_listNotificationGroups" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.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.workflowGroups.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notification-groups"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationGroupsController_createNotificationGroup" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.create({\n name: \"\",\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.workflowGroups.create({\n name: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notification-groups/{id}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationGroupsController_deleteNotificationGroup" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.delete(\"\");\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.workflowGroups.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notification-groups/{id}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationGroupsController_getNotificationGroup" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.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.workflowGroups.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notification-groups/{id}"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationGroupsController_updateNotificationGroup" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflowGroups.update(\"\", {\n name: \"\",\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.workflowGroups.update({\n name: \"\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notifications"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationsController_listNotifications" - "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 channels: [\n \"chat\",\n ],\n templates: [\n \"\",\n ],\n emails: [\n \"\",\n ],\n search: \"\",\n subscriberIds: [\n \"\",\n ],\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.notifications.list({\n channels: [\n \"sms\",\n \"chat\",\n \"in_app\",\n ],\n templates: [\n \"\",\n ],\n emails: [\n \"\",\n ],\n search: \"\",\n subscriberIds: [\n \"\",\n \"\",\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notifications/graph/stats"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationsController_getActivityGraphStats" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.graph();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.graph();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notifications/stats"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationsController_getActivityStats" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.retrieve();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notifications/{notificationId}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "NotificationsController_getNotification" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.retrieve(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/organizations"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "EEOrganizationController_renameOrganization" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.organizations.eeOrganizationControllerRenameOrganization({\n name: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/organizations/branding"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "EEOrganizationController_updateBrandingDetails" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.organizations.update({\n logo: \"\",\n color: \"fuchsia\",\n fontColor: \"\",\n contentBackground: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/organizations/me"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "EEOrganizationController_getMyOrganization" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.organizations.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.notifications.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_listSubscribers" - "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();\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": - "lang": "typescript" "label": "SubscribersController_createSubscriber" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.create({\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.create({\n subscriberId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/bulk"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_bulkCreateSubscribers" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.createBulk({\n subscribers: [\n \"\",\n ],\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.createBulk({\n subscribers: [\n \"\",\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_removeSubscriber" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.delete(\"\");\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.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_getSubscriber" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.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.subscribers.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}"]["put"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_updateSubscriber" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.update(\"\", {});\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.update({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_modifySubscriberChannel" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.append(\"\", {\n providerId: 3462.44,\n credentials: {\n webhookUrl: \"\",\n },\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.credentials.append({\n providerId: \"zulip\",\n credentials: {\n webhookUrl: \"https://talkative-pop.org\",\n },\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["put"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_updateSubscriberChannel" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.update(\"\", {\n providerId: 8574.78,\n credentials: {\n webhookUrl: \"\",\n },\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.credentials.update({\n providerId: \"pushpad\",\n credentials: {\n webhookUrl: \"https://grown-worth.name\",\n },\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_deleteSubscriberCredentials" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.credentials.delete(\"\", \"\");\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.credentials.delete(\"\", \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_chatAccessOauth" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.subscribers.authentication.chatAccessOauth({\n subscriberId: \"\",\n providerId: \"\",\n hmacHash: \"\",\n environmentId: \"\",\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.authentication.chatAccessOauth({\n subscriberId: \"\",\n providerId: \"\",\n hmacHash: \"\",\n environmentId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_chatOauthCallback" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.authentication.chatAccessOauthCallBack({\n subscriberId: \"\",\n providerId: \"\",\n code: \"\",\n hmacHash: \"\",\n environmentId: \"\",\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.authentication.chatAccessOauthCallBack({\n subscriberId: \"\",\n providerId: \"\",\n code: \"\",\n hmacHash: \"\",\n environmentId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-all"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_markAllUnreadAsRead" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAll(\"\", {\n markAs: \"seen\",\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.messages.markAll({\n markAs: \"seen\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-as"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_markMessagesAs" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAllAs(\"\", {\n messageId: \"\",\n markAs: \"seen\",\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.messages.markAllAs({\n messageId: \"\",\n markAs: \"unread\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_markActionAsSeen" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.updateAsSeen({\n messageId: \"\",\n type: \"\",\n subscriberId: \"\",\n markMessageActionAsSeenDto: {\n status: \"done\",\n },\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.messages.updateAsSeen({\n messageId: \"\",\n type: \"\",\n subscriberId: \"\",\n markMessageActionAsSeenDto: {\n status: \"done\",\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/feed"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_getNotificationsFeed" - "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.retrieve({\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.retrieve({\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();" - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/unseen"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_getUnseenCount" - "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 seen: true,\n subscriberId: \"\",\n limit: 4322.81,\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 seen: true,\n subscriberId: \"\",\n limit: 4327.98,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/online-status"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_updateSubscriberOnlineFlag" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.properties.updateOnlineFlag(\"\", {\n isOnline: false,\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.properties.updateOnlineFlag({\n isOnline: false,\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_listSubscriberPreferences" - "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.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.subscribers.preferences.list(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_updateSubscriberGlobalPreferences" - "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.updateGlobal(\"\", {});\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.preferences.updateGlobal({}, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_getSubscriberPreferenceByLevel" - "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.retrieveByLevel(\"Topic\", \"\");\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.preferences.retrieveByLevel({\n parameter: \"template\",\n subscriberId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "SubscribersController_updateSubscriberPreference" - "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 parameter: \"\",\n updateSubscriberPreferenceRequestDto: {},\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/tenants"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TenantController_listTenants" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.tenants.list();\n \n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();" - - target: $["paths"]["/v1/tenants"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TenantController_createTenant" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.tenants.create({\n identifier: \"\",\n name: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/tenants/{identifier}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TenantController_removeTenant" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.tenants.delete(\"\");\n}\n\nrun();" - - target: $["paths"]["/v1/tenants/{identifier}"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TenantController_getTenantById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.tenants.retrieve(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/tenants/{identifier}"]["patch"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "TenantController_updateTenant" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.tenants.update(\"\", {});\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.preferences.update({\n subscriberId: \"\",\n parameter: \"\",\n updateSubscriberPreferenceRequestDto: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_listTopics" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.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.topics.list({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_createTopic" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.create({\n key: \"\",\n name: \"\",\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.topics.create({\n key: \"\",\n name: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}"]["delete"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_deleteTopic" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.delete(\"\");\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.topics.delete(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_getTopic" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.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.topics.retrieve(\"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}"]["patch"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_renameTopic" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.rename(\"\", {\n name: \"\",\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.topics.rename({\n name: \"\",\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}/subscribers"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_addSubscribers" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.subscribers.assign(\"\", {\n subscribers: [\n \"\",\n ],\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.topics.subscribers.assign({\n subscribers: [\n \"\",\n \"\",\n \"\",\n ],\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}/subscribers/removal"]["post"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_removeSubscribers" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.topics.subscribers.delete(\"\", {\n subscribers: [\n \"\",\n ],\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.topics.subscribers.delete({\n subscribers: [\n \"\",\n \"\",\n ],\n }, \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics/{topicKey}/subscribers/{externalSubscriberId}"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "TopicsController_getTopicSubscriber" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.topics.subscribers.retrieve(\"\", \"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_listWorkflows" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.list({});\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_create" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.create({\n name: \"\",\n notificationGroupId: \"\",\n steps: [\n \n ],\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows/variables"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_getWorkflowVariables" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.variables.retrieve();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}"]["delete"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_deleteWorkflowById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.delete(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}"]["get"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_getWorkflowById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.retrieve(\"\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_updateWorkflowById" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.update(\"\", {\n name: \"\",\n notificationGroupId: \"\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}/status"]["put"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "WorkflowController_updateActiveStatus" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.workflows.status.update(\"\", {\n active: false,\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.topics.subscribers.retrieve(\"\", \"\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" diff --git a/sources/json-development.json b/sources/json-development.json index 8d42fbdd..59bce180 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -3,12 +3,35 @@ "paths": { "/v1/environments/me": { "get": { - "operationId": "EnvironmentsController_getCurrentEnvironment", + "operationId": "EnvironmentsControllerV1_getCurrentEnvironment", "summary": "Get current environment", "parameters": [], "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { @@ -19,6 +42,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -30,6 +82,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -41,6 +119,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -63,12 +167,35 @@ }, "/v1/environments": { "get": { - "operationId": "EnvironmentsController_listMyEnvironments", + "operationId": "EnvironmentsControllerV1_listMyEnvironments", "summary": "Get environments", "parameters": [], "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { @@ -82,6 +209,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -93,6 +249,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -104,6 +286,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -126,13 +334,36 @@ }, "/v1/environments/api-keys": { "get": { - "operationId": "EnvironmentsController_listOrganizationApiKeys", + "operationId": "EnvironmentsControllerV1_listOrganizationApiKeys", "x-speakeasy-group": "Environments.ApiKeys", "summary": "Get api keys", "parameters": [], "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { @@ -146,6 +377,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -157,6 +417,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -168,6 +454,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -213,6 +525,29 @@ "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { @@ -226,6 +561,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -237,6 +601,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -248,6 +638,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -268,53 +684,92 @@ ] } }, - "/v1/workflows": { - "get": { - "operationId": "WorkflowController_listWorkflows", - "summary": "Get workflows", - "description": "Workflows were previously named notification templates", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "query", - "required": false, - "in": "query", - "description": "A query string to filter the results. It allows filtering based on either the name or trigger identifier of the workflow items.", - "schema": { - "type": "string" + "/v1/events/trigger": { + "post": { + "operationId": "EventsController_trigger", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Event" + }, + "x-speakeasy-name-override": "trigger", + "summary": "Trigger event", + "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowsResponseDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -326,6 +781,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -337,6 +818,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -348,25 +855,32 @@ } }, "tags": [ - "Workflows" + "Events" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/events/trigger/bulk": { "post": { - "operationId": "WorkflowController_create", - "summary": "Create workflow", - "description": "Workflow was previously named notification template", + "operationId": "EventsController_triggerBulk", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Events in Bulk" + }, + "x-speakeasy-name-override": "triggerBulk", + "summary": "Bulk trigger event", + "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateWorkflowRequestDto" + "$ref": "#/components/schemas/BulkTriggerEventDto" } } } @@ -374,16 +888,71 @@ "responses": { "201": { "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -395,6 +964,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -406,6 +1001,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -417,7 +1038,7 @@ } }, "tags": [ - "Workflows" + "Events" ], "security": [ { @@ -426,27 +1047,23 @@ ] } }, - "/v1/workflows/{workflowId}": { - "put": { - "operationId": "WorkflowController_updateWorkflowById", - "summary": "Update workflow", - "description": "Workflow was previously named notification template", - "parameters": [ - { - "name": "workflowId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], + "/v1/events/trigger/broadcast": { + "post": { + "operationId": "EventsController_broadcastEventToAll", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Broadcast Event to All" + }, + "x-speakeasy-name-override": "triggerBroadcast", + "summary": "Broadcast event to all", + "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateWorkflowRequestDto" + "$ref": "#/components/schemas/TriggerEventToAllRequestDto" } } } @@ -454,16 +1071,68 @@ "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -475,6 +1144,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -486,6 +1181,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -497,21 +1218,28 @@ } }, "tags": [ - "Workflows" + "Events" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/events/trigger/{transactionId}": { "delete": { - "operationId": "WorkflowController_deleteWorkflowById", - "summary": "Delete workflow", - "description": "Workflow was previously named notification template", + "operationId": "EventsController_cancel", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Cancel Triggered Event" + }, + "x-speakeasy-name-override": "cancel", + "summary": "Cancel triggered event", + "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", "parameters": [ { - "name": "workflowId", + "name": "transactionId", "required": true, "in": "path", "schema": { @@ -521,6 +1249,29 @@ ], "responses": { "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "description": "", "content": { "application/json": { @@ -532,6 +1283,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -543,6 +1323,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -554,6 +1360,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -565,23 +1397,93 @@ } }, "tags": [ - "Workflows" + "Events" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/notifications": { "get": { - "operationId": "WorkflowController_getWorkflowById", - "summary": "Get workflow", - "description": "Workflow was previously named notification template", + "operationId": "NotificationsController_listNotifications", + "summary": "Get notifications", "parameters": [ { - "name": "workflowId", + "name": "channels", "required": true, - "in": "path", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ] + } + } + }, + { + "name": "templates", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "emails", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "search", + "required": true, + "in": "query", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberIds", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "transactionId", + "required": false, + "in": "query", "schema": { "type": "string" } @@ -589,17 +1491,69 @@ ], "responses": { "200": { - "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "$ref": "#/components/schemas/ActivitiesResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -611,6 +1565,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -622,6 +1602,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -633,7 +1639,7 @@ } }, "tags": [ - "Workflows" + "Notifications" ], "security": [ { @@ -642,26 +1648,77 @@ ] } }, - "/v1/workflows/variables": { + "/v1/notifications/stats": { "get": { - "operationId": "WorkflowController_getWorkflowVariables", - "x-speakeasy-group": "Workflows.Variables", - "summary": "Get available variables", - "description": "Get the variables that can be used in the workflow", + "operationId": "NotificationsController_getActivityStats", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification statistics", "parameters": [], "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VariablesResponseDto" + "$ref": "#/components/schemas/ActivityStatsResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -673,6 +1730,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -684,6 +1767,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -695,7 +1804,7 @@ } }, "tags": [ - "Workflows" + "Notifications" ], "security": [ { @@ -704,45 +1813,90 @@ ] } }, - "/v1/workflows/{workflowId}/status": { - "put": { - "operationId": "WorkflowController_updateActiveStatus", - "x-speakeasy-group": "Workflows.Status", - "summary": "Update workflow status", - "description": "Workflow was previously named notification template", + "/v1/notifications/graph/stats": { + "get": { + "operationId": "NotificationsController_getActivityGraphStats", + "x-speakeasy-name-override": "graph", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification graph statistics", "parameters": [ { - "name": "workflowId", - "required": true, - "in": "path", + "name": "days", + "required": false, + "in": "query", "schema": { - "type": "string" + "type": "number" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangeWorkflowStatusRequestDto" - } - } - } - }, "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityGraphStatesResponse" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -754,6 +1908,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -765,6 +1945,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -776,7 +1982,7 @@ } }, "tags": [ - "Workflows" + "Notifications" ], "security": [ { @@ -785,40 +1991,85 @@ ] } }, - "/v1/events/trigger": { - "post": { - "operationId": "EventsController_trigger", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Trigger Notification Event" - }, - "x-speakeasy-name-override": "trigger", - "summary": "Trigger event", - "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventRequestDto" - } + "/v1/notifications/{notificationId}": { + "get": { + "operationId": "NotificationsController_getNotification", + "summary": "Get notification", + "parameters": [ + { + "name": "notificationId", + "required": true, + "in": "path", + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" + "$ref": "#/components/schemas/ActivityNotificationResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -830,6 +2081,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -841,6 +2118,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -852,7 +2155,7 @@ } }, "tags": [ - "Events" + "Notifications" ], "security": [ { @@ -861,23 +2164,18 @@ ] } }, - "/v1/events/trigger/bulk": { + "/v1/notification-groups": { "post": { - "operationId": "EventsController_triggerBulk", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Trigger Notification Events in Bulk" - }, - "x-speakeasy-name-override": "triggerBulk", - "summary": "Bulk trigger event", - "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", + "operationId": "NotificationGroupsController_createNotificationGroup", + "summary": "Create workflow group", + "description": "workflow group was previously named notification group", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkTriggerEventDto" + "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" } } } @@ -885,19 +2183,68 @@ "responses": { "201": { "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -909,6 +2256,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -920,6 +2293,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -931,49 +2330,87 @@ } }, "tags": [ - "Events" + "Workflow groups" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/events/trigger/broadcast": { - "post": { - "operationId": "EventsController_broadcastEventToAll", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Broadcast Event to All" - }, - "x-speakeasy-name-override": "triggerBroadcast", - "summary": "Broadcast event to all", - "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", + }, + "get": { + "operationId": "NotificationGroupsController_listNotificationGroups", + "summary": "Get workflow groups", + "description": "workflow group was previously named notification group", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventToAllRequestDto" - } - } - } - }, "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationGroupResponseDto" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -985,6 +2422,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -996,6 +2459,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1007,7 +2496,7 @@ } }, "tags": [ - "Events" + "Workflow groups" ], "security": [ { @@ -1016,19 +2505,14 @@ ] } }, - "/v1/events/trigger/{transactionId}": { - "delete": { - "operationId": "EventsController_cancel", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Cancel Triggered Event" - }, - "x-speakeasy-name-override": "cancel", - "summary": "Cancel triggered event", - "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", + "/v1/notification-groups/{id}": { + "get": { + "operationId": "NotificationGroupsController_getNotificationGroup", + "summary": "Get workflow group", + "description": "workflow group was previously named notification group", "parameters": [ { - "name": "transactionId", + "name": "id", "required": true, "in": "path", "schema": { @@ -1038,17 +2522,69 @@ ], "responses": { "200": { - "description": "", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataBooleanDto" + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1060,6 +2596,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1071,6 +2633,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1082,111 +2670,103 @@ } }, "tags": [ - "Events" + "Workflow groups" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/notifications": { - "get": { - "operationId": "NotificationsController_listNotifications", - "summary": "Get notifications", + }, + "patch": { + "operationId": "NotificationGroupsController_updateNotificationGroup", + "summary": "Update workflow group", + "description": "workflow group was previously named notification group", "parameters": [ { - "name": "channels", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ] - } - } - }, - { - "name": "templates", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "emails", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "search", + "name": "id", "required": true, - "in": "query", - "deprecated": true, + "in": "path", "schema": { "type": "string" } - }, - { - "name": "subscriberIds", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" } } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "default": 0, - "type": "number" - } - }, - { - "name": "transactionId", - "required": false, - "in": "query", - "schema": { - "type": "string" - } } - ], + }, "responses": { "200": { - "description": "", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1198,6 +2778,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1209,6 +2815,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1220,34 +2852,93 @@ } }, "tags": [ - "Notifications" + "Workflow groups" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/notifications/stats": { - "get": { - "operationId": "NotificationsController_getActivityStats", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification statistics", - "parameters": [], - "responses": { - "200": { - "description": "Ok", + }, + "delete": { + "operationId": "NotificationGroupsController_deleteNotificationGroup", + "summary": "Delete workflow group", + "description": "workflow group was previously named notification group", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityStatsResponseDto" + "$ref": "#/components/schemas/DeleteNotificationGroupResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1259,6 +2950,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1270,6 +2987,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1281,7 +3024,7 @@ } }, "tags": [ - "Notifications" + "Workflow groups" ], "security": [ { @@ -1290,31 +3033,44 @@ ] } }, - "/v1/notifications/graph/stats": { + "/v1/integrations": { "get": { - "operationId": "NotificationsController_getActivityGraphStats", - "x-speakeasy-name-override": "graph", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification graph statistics", - "parameters": [ - { - "name": "days", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - } - ], + "operationId": "IntegrationsController_listIntegrations", + "summary": "Get integrations", + "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", + "parameters": [], "responses": { "200": { - "description": "Ok", + "description": "The list of integrations belonging to the organization that are successfully returned.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ActivityGraphStatesResponse" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } @@ -1322,6 +3078,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1333,6 +3118,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1344,6 +3155,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1355,42 +3192,94 @@ } }, "tags": [ - "Notifications" + "Integrations" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/notifications/{notificationId}": { - "get": { - "operationId": "NotificationsController_getNotification", - "summary": "Get notification", - "parameters": [ - { - "name": "notificationId", - "required": true, - "in": "path", - "schema": { - "type": "string" + }, + "post": { + "operationId": "IntegrationsController_createIntegration", + "summary": "Create integration", + "description": "Create an integration for the current environment the user is based on the API key provided", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityNotificationResponseDto" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1402,6 +3291,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1413,6 +3328,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1424,7 +3365,7 @@ } }, "tags": [ - "Notifications" + "Integrations" ], "security": [ { @@ -1433,35 +3374,81 @@ ] } }, - "/v1/notification-groups": { - "post": { - "operationId": "NotificationGroupsController_createNotificationGroup", - "summary": "Create workflow group", - "description": "workflow group was previously named notification group", + "/v1/integrations/active": { + "get": { + "operationId": "IntegrationsController_getActiveIntegrations", + "x-speakeasy-name-override": "listActive", + "summary": "Get active integrations", + "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "The list of active integrations belonging to the organization that are successfully returned.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1473,6 +3460,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1484,68 +3497,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Workflow groups" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "NotificationGroupsController_listNotificationGroups", - "summary": "Get workflow groups", - "description": "workflow group was previously named notification group", - "parameters": [], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + }, "content": { "application/json": { "schema": { @@ -1557,7 +3534,7 @@ } }, "tags": [ - "Workflow groups" + "Integrations" ], "security": [ { @@ -1566,14 +3543,15 @@ ] } }, - "/v1/notification-groups/{id}": { + "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { "get": { - "operationId": "NotificationGroupsController_getNotificationGroup", - "summary": "Get workflow group", - "description": "workflow group was previously named notification group", + "operationId": "IntegrationsController_getWebhookSupportStatus", + "x-speakeasy-group": "Integrations.Webhooks", + "summary": "Get webhook support status for provider", + "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", "parameters": [ { - "name": "id", + "name": "providerOrIntegrationId", "required": true, "in": "path", "schema": { @@ -1583,17 +3561,69 @@ ], "responses": { "200": { - "description": "Ok", + "description": "The status of the webhook for the provider requested", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" + "type": "boolean" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1605,6 +3635,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1616,6 +3672,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1627,21 +3709,22 @@ } }, "tags": [ - "Workflow groups" + "Integrations" ], "security": [ { "api-key": [] } ] - }, - "patch": { - "operationId": "NotificationGroupsController_updateNotificationGroup", - "summary": "Update workflow group", - "description": "workflow group was previously named notification group", + } + }, + "/v1/integrations/{integrationId}": { + "put": { + "operationId": "IntegrationsController_updateIntegrationById", + "summary": "Update integration", "parameters": [ { - "name": "id", + "name": "integrationId", "required": true, "in": "path", "schema": { @@ -1654,7 +3737,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" + "$ref": "#/components/schemas/UpdateIntegrationRequestDto" } } } @@ -1662,16 +3745,94 @@ "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } }, + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1683,6 +3844,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1694,6 +3881,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1705,7 +3918,7 @@ } }, "tags": [ - "Workflow groups" + "Integrations" ], "security": [ { @@ -1714,12 +3927,11 @@ ] }, "delete": { - "operationId": "NotificationGroupsController_deleteNotificationGroup", - "summary": "Delete workflow group", - "description": "workflow group was previously named notification group", + "operationId": "IntegrationsController_removeIntegration", + "summary": "Delete integration", "parameters": [ { - "name": "id", + "name": "integrationId", "required": true, "in": "path", "schema": { @@ -1730,16 +3942,71 @@ "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteNotificationGroupResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1751,6 +4018,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1762,6 +4055,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1773,7 +4092,7 @@ } }, "tags": [ - "Workflow groups" + "Integrations" ], "security": [ { @@ -1782,24 +4101,112 @@ ] } }, - "/v1/organizations/me": { - "get": { - "operationId": "EEOrganizationController_getMyOrganization", - "summary": "Fetch current organization details", - "parameters": [], + "/v1/integrations/{integrationId}/set-primary": { + "post": { + "operationId": "IntegrationsController_setIntegrationAsPrimary", + "x-speakeasy-name-override": "setAsPrimary", + "summary": "Set integration as primary", + "parameters": [ + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationResponseDto" - } - } - } - }, + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + }, + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1811,6 +4218,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1822,6 +4255,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1833,7 +4292,7 @@ } }, "tags": [ - "Organizations" + "Integrations" ], "security": [ { @@ -1842,34 +4301,128 @@ ] } }, - "/v1/organizations/branding": { - "put": { - "operationId": "EEOrganizationController_updateBrandingDetails", - "summary": "Update organization branding details", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateBrandingDetailsDto" - } + "/v1/subscribers": { + "get": { + "operationId": "SubscribersController_listSubscribers", + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "limit", + "in": "parameters", + "type": "limit" } + ], + "outputs": { + "results": "$.data.resultArray" } }, + "summary": "Get subscribers", + "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + } + ], "responses": { "200": { - "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationBrandingResponseDto" + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + } + ] } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1881,6 +4434,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1892,6 +4471,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1903,43 +4508,94 @@ } }, "tags": [ - "Organizations" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/organizations": { - "patch": { - "operationId": "EEOrganizationController_renameOrganization", - "summary": "Rename organization name", + }, + "post": { + "operationId": "SubscribersController_createSubscriber", + "summary": "Create subscriber", + "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RenameOrganizationDto" + "$ref": "#/components/schemas/CreateSubscriberRequestDto" } } } }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RenameOrganizationDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -1951,6 +4607,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1962,6 +4644,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -1973,7 +4681,7 @@ } }, "tags": [ - "Organizations" + "Subscribers" ], "security": [ { @@ -1982,39 +4690,132 @@ ] } }, - "/v1/integrations": { + "/v1/subscribers/{subscriberId}": { "get": { - "operationId": "IntegrationsController_listIntegrations", - "summary": "Get integrations", - "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", - "parameters": [], + "operationId": "SubscribersController_getSubscriber", + "summary": "Get subscriber", + "description": "Get subscriber by your internal id used to identify the subscriber", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "includeTopics", + "required": false, + "in": "query", + "description": "Includes the topics associated with the subscriber", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "The list of integrations belonging to the organization that are successfully returned.", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" + } + } } }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2026,6 +4827,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2037,7 +4864,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2045,34 +4872,95 @@ } ] }, - "post": { - "operationId": "IntegrationsController_createIntegration", - "summary": "Create integration", - "description": "Create an integration for the current environment the user is based on the API key provided", - "parameters": [], + "put": { + "operationId": "SubscribersController_updateSubscriber", + "summary": "Update subscriber", + "description": "Used to update the subscriber entity with new information", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateIntegrationRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2084,6 +4972,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2095,6 +5009,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2106,38 +5046,93 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/integrations/active": { - "get": { - "operationId": "IntegrationsController_getActiveIntegrations", - "x-speakeasy-name-override": "listActive", - "summary": "Get active integrations", - "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", - "parameters": [], + }, + "delete": { + "operationId": "SubscribersController_removeSubscriber", + "summary": "Delete subscriber", + "description": "Deletes a subscriber entity from the Novu platform", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "The list of active integrations belonging to the organization that are successfully returned.", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "$ref": "#/components/schemas/DeleteSubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2149,6 +5144,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2160,6 +5181,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2171,7 +5218,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2180,35 +5227,58 @@ ] } }, - "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { - "get": { - "operationId": "IntegrationsController_getWebhookSupportStatus", - "x-speakeasy-group": "Integrations.Webhooks", - "summary": "Get webhook support status for provider", - "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", - "parameters": [ - { - "name": "providerOrIntegrationId", - "required": true, - "in": "path", - "schema": { - "type": "string" + "/v1/subscribers/bulk": { + "post": { + "operationId": "SubscribersController_bulkCreateSubscribers", + "x-speakeasy-name-override": "createBulk", + "summary": "Bulk create subscribers", + "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSubscriberCreateDto" + } } } - ], + }, "responses": { - "200": { - "description": "The status of the webhook for the provider requested", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } + "201": { + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2220,6 +5290,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2231,6 +5327,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2242,7 +5364,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2251,13 +5373,15 @@ ] } }, - "/v1/integrations/{integrationId}": { + "/v1/subscribers/{subscriberId}/credentials": { "put": { - "operationId": "IntegrationsController_updateIntegrationById", - "summary": "Update integration", + "operationId": "SubscribersController_updateSubscriberChannel", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Update subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", "parameters": [ { - "name": "integrationId", + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -2270,7 +5394,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateIntegrationRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" } } } @@ -2278,19 +5402,68 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, - "404": { - "description": "The integration with the integrationId provided does not exist in the database." - }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2302,6 +5475,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2313,6 +5512,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2324,7 +5549,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2332,12 +5557,15 @@ } ] }, - "delete": { - "operationId": "IntegrationsController_removeIntegration", - "summary": "Delete integration", + "patch": { + "operationId": "SubscribersController_modifySubscriberChannel", + "x-speakeasy-name-override": "append", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Modify subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n\n This endpoint appends provided credentials and deviceTokens to the existing ones.", "parameters": [ { - "name": "integrationId", + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -2345,22 +5573,81 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + } + } + } + }, "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2372,6 +5659,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2383,6 +5696,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2394,7 +5733,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2403,14 +5742,23 @@ ] } }, - "/v1/integrations/{integrationId}/set-primary": { - "post": { - "operationId": "IntegrationsController_setIntegrationAsPrimary", - "x-speakeasy-name-override": "setAsPrimary", - "summary": "Set integration as primary", + "/v1/subscribers/{subscriberId}/credentials/{providerId}": { + "delete": { + "operationId": "SubscribersController_deleteSubscriberCredentials", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Delete subscriber credentials by providerId", + "description": "Delete subscriber credentials such as slack and expo tokens.", "parameters": [ { - "name": "integrationId", + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", "required": true, "in": "path", "schema": { @@ -2419,21 +5767,63 @@ } ], "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } - } - }, - "404": { - "description": "The integration with the integrationId provided does not exist in the database." + }, + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2445,6 +5835,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2456,6 +5872,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2467,7 +5909,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -2476,52 +5918,98 @@ ] } }, - "/v1/changes": { - "get": { - "operationId": "ChangesController_getChanges", - "summary": "Get changes", + "/v1/subscribers/{subscriberId}/online-status": { + "patch": { + "operationId": "SubscribersController_updateSubscriberOnlineFlag", + "x-speakeasy-name-override": "updateOnlineFlag", + "x-speakeasy-group": "Subscribers.properties", + "summary": "Update subscriber online status", + "description": "Used to update the subscriber isOnline flag.", "parameters": [ { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "promoted", + "name": "subscriberId", "required": true, - "in": "query", + "in": "path", "schema": { - "default": "false", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" + } + } + } + }, "responses": { "200": { - "description": "", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangesResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2533,6 +6021,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2544,6 +6058,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2555,7 +6095,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -2564,25 +6104,98 @@ ] } }, - "/v1/changes/count": { + "/v1/subscribers/{subscriberId}/preferences": { "get": { - "operationId": "ChangesController_getChangesCount", - "x-speakeasy-name-override": "count", - "summary": "Get changes count", - "parameters": [], + "operationId": "SubscribersController_listSubscriberPreferences", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { - "description": "", + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataNumberDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2594,6 +6207,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2605,6 +6244,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2616,47 +6281,104 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/changes/bulk/apply": { - "post": { - "operationId": "ChangesController_bulkApplyDiff", - "x-speakeasy-name-override": "applyBulk", - "summary": "Apply changes", - "parameters": [], + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberGlobalPreferences", + "x-speakeasy-name-override": "updateGlobal", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber global preferences", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkApplyChangeDto" + "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeResponseDto" - } + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2668,6 +6390,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2679,6 +6427,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2690,7 +6464,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -2699,14 +6473,37 @@ ] } }, - "/v1/changes/{changeId}/apply": { - "post": { - "operationId": "ChangesController_applyDiff", - "x-speakeasy-name-override": "apply", - "summary": "Apply change", + "/v1/subscribers/{subscriberId}/preferences/{parameter}": { + "get": { + "operationId": "SubscribersController_getSubscriberPreferenceByLevel", + "x-speakeasy-name-override": "retrieveByLevel", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences by level", "parameters": [ { - "name": "changeId", + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + }, + { + "name": "parameter", + "required": true, + "in": "path", + "description": "the preferences level to be retrieved (template / global) ", + "schema": { + "enum": [ + "global", + "template" + ], + "type": "string" + } + }, + { + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -2715,14 +6512,37 @@ } ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ChangeResponseDto" + "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" } } } @@ -2730,6 +6550,35 @@ }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2741,6 +6590,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2752,6 +6627,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2763,85 +6664,111 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/subscribers": { - "get": { - "operationId": "SubscribersController_listSubscribers", - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data.resultArray" - } - }, - "summary": "Get subscribers", - "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberPreference", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber preference", "parameters": [ { - "name": "page", - "required": false, - "in": "query", + "name": "subscriberId", + "required": true, + "in": "path", "schema": { - "type": "number" + "type": "string" } }, { - "name": "limit", - "required": false, - "in": "query", + "name": "parameter", + "required": true, + "in": "path", "schema": { - "maximum": 100, - "default": 10, - "type": "number" + "type": "string" } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } - } - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2853,6 +6780,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2864,6 +6817,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2882,35 +6861,146 @@ "api-key": [] } ] - }, - "post": { - "operationId": "SubscribersController_createSubscriber", - "summary": "Create subscriber", - "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSubscriberRequestDto" - } + } + }, + "/v1/subscribers/{subscriberId}/notifications/feed": { + "get": { + "operationId": "SubscribersController_getNotificationsFeed", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get in-app notification feed for a particular subscriber", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + }, + { + "name": "read", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "seen", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "payload", + "required": false, + "in": "query", + "description": "Base64 encoded string of the partial payload JSON object", + "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Created", + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedResponseDto" + } + } + } + } + ] } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2922,6 +7012,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2933,6 +7049,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -2953,12 +7095,21 @@ ] } }, - "/v1/subscribers/{subscriberId}": { + "/v1/subscribers/{subscriberId}/notifications/unseen": { "get": { - "operationId": "SubscribersController_getSubscriber", - "summary": "Get subscriber", - "description": "Get subscriber by your internal id used to identify the subscriber", + "operationId": "SubscribersController_getUnseenCount", + "x-speakeasy-name-override": "unseenCount", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get the unseen in-app notifications count for subscribers feed", "parameters": [ + { + "name": "seen", + "required": true, + "in": "query", + "schema": { + "type": "boolean" + } + }, { "name": "subscriberId", "required": true, @@ -2966,21 +7117,81 @@ "schema": { "type": "string" } + }, + { + "name": "limit", + "required": true, + "in": "query", + "schema": { + "type": "number" + } } ], "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/UnseenCountResponse" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -2992,6 +7203,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3003,14 +7240,40 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } } }, "tags": [ @@ -3021,11 +7284,14 @@ "api-key": [] } ] - }, - "put": { - "operationId": "SubscribersController_updateSubscriber", - "summary": "Update subscriber", - "description": "Used to update the subscriber entity with new information", + } + }, + "/v1/subscribers/{subscriberId}/messages/mark-as": { + "post": { + "operationId": "SubscribersController_markMessagesAs", + "x-speakeasy-name-override": "markAllAs", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark a subscriber messages as seen, read, unseen or unread", "parameters": [ { "name": "subscriberId", @@ -3041,24 +7307,56 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberRequestDto" + "$ref": "#/components/schemas/MessageMarkAsRequestDto" } } } }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageEntity" + } } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3070,6 +7368,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3081,6 +7405,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3099,11 +7449,14 @@ "api-key": [] } ] - }, - "delete": { - "operationId": "SubscribersController_removeSubscriber", - "summary": "Delete subscriber", - "description": "Deletes a subscriber entity from the Novu platform", + } + }, + "/v1/subscribers/{subscriberId}/messages/mark-all": { + "post": { + "operationId": "SubscribersController_markAllUnreadAsRead", + "x-speakeasy-name-override": "markAll", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", "parameters": [ { "name": "subscriberId", @@ -3114,84 +7467,58 @@ } } ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteSubscriberResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/subscribers/bulk": { - "post": { - "operationId": "SubscribersController_bulkCreateSubscribers", - "x-speakeasy-name-override": "createBulk", - "summary": "Bulk create subscribers", - "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", - "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkSubscriberCreateDto" + "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" } } } }, "responses": { "201": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3203,6 +7530,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3214,6 +7567,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3234,13 +7613,27 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials": { - "put": { - "operationId": "SubscribersController_updateSubscriberChannel", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Update subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", + "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { + "post": { + "operationId": "SubscribersController_markActionAsSeen", + "x-speakeasy-name-override": "updateAsSeen", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark message action as seen", "parameters": [ + { + "name": "messageId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "required": true, + "in": "path", + "schema": {} + }, { "name": "subscriberId", "required": true, @@ -3255,24 +7648,76 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" } } } }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/MessageResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3284,6 +7729,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3295,6 +7766,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3313,13 +7810,14 @@ "api-key": [] } ] - }, - "patch": { - "operationId": "SubscribersController_modifySubscriberChannel", - "x-speakeasy-name-override": "append", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Modify subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n This endpoint appends provided credentials and deviceTokens to the existing ones.", + } + }, + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { + "get": { + "operationId": "SubscribersController_chatOauthCallback", + "x-speakeasy-name-override": "chatAccessOauthCallBack", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle providers oauth redirect", "parameters": [ { "name": "subscriberId", @@ -3328,31 +7826,88 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" - } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": {} + }, + { + "name": "code", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "Ok", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "type": "object" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3364,6 +7919,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3375,6 +7956,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3395,12 +8002,12 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}": { - "delete": { - "operationId": "SubscribersController_deleteSubscriberCredentials", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Delete subscriber credentials by providerId", - "description": "Delete subscriber credentials such as slack and expo tokens.", + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { + "get": { + "operationId": "SubscribersController_chatAccessOauth", + "x-speakeasy-name-override": "chatAccessOauth", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle chat oauth", "parameters": [ { "name": "subscriberId", @@ -3414,17 +8021,68 @@ "name": "providerId", "required": true, "in": "path", + "schema": {} + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", "schema": { "type": "string" } } ], "responses": { - "204": { + "200": { "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3436,6 +8094,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3447,6 +8131,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3467,46 +8177,130 @@ ] } }, - "/v1/subscribers/{subscriberId}/online-status": { - "patch": { - "operationId": "SubscribersController_updateSubscriberOnlineFlag", - "x-speakeasy-name-override": "updateOnlineFlag", - "x-speakeasy-group": "Subscribers.properties", - "summary": "Update subscriber online status", - "description": "Used to update the subscriber isOnline flag.", + "/v1/messages": { + "get": { + "operationId": "MessagesController_getMessages", + "summary": "Get messages", + "description": "Returns a list of messages, could paginate using the `page` query parameter", "parameters": [ + { + "name": "channel", + "required": false, + "in": "query", + "schema": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" + } + }, { "name": "subscriberId", - "required": true, - "in": "path", + "required": false, + "in": "query", "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" } } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "default": 10, + "type": "number" + } } - }, + ], "responses": { "200": { - "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/ActivitiesResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3518,6 +8312,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3529,8 +8349,34 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { "schema": { "type": "string", "example": "Please wait some time, then try again." @@ -3540,7 +8386,7 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { @@ -3549,14 +8395,14 @@ ] } }, - "/v1/subscribers/{subscriberId}/preferences": { - "get": { - "operationId": "SubscribersController_listSubscriberPreferences", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences", + "/v1/messages/{messageId}": { + "delete": { + "operationId": "MessagesController_deleteMessage", + "summary": "Delete message", + "description": "Deletes a message entity from the Novu platform", "parameters": [ { - "name": "subscriberId", + "name": "messageId", "required": true, "in": "path", "schema": { @@ -3567,19 +8413,68 @@ "responses": { "200": { "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" - } + "$ref": "#/components/schemas/DeleteMessageResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3591,6 +8486,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3602,6 +8523,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3613,22 +8560,40 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { "api-key": [] } ] - }, - "patch": { - "operationId": "SubscribersController_updateSubscriberGlobalPreferences", - "x-speakeasy-name-override": "updateGlobal", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber global preferences", + } + }, + "/v1/messages/transaction/{transactionId}": { + "delete": { + "operationId": "MessagesController_deleteMessagesByTransactionId", + "x-speakeasy-name-override": "deleteByTransactionId", + "summary": "Delete messages by transactionId", + "description": "Deletes messages entity from the Novu platform using TransactionId of message", "parameters": [ { - "name": "subscriberId", + "name": "channel", + "required": false, + "in": "query", + "description": "The channel of the message to be deleted", + "schema": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" + } + }, + { + "name": "transactionId", "required": true, "in": "path", "schema": { @@ -3636,29 +8601,64 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" - } - } - } - }, "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" - } + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } - } + }, + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3670,6 +8670,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3681,6 +8707,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3692,7 +8744,7 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { @@ -3701,51 +8753,87 @@ ] } }, - "/v1/subscribers/{subscriberId}/preferences/{parameter}": { - "get": { - "operationId": "SubscribersController_getSubscriberPreferenceByLevel", - "x-speakeasy-name-override": "retrieveByLevel", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences by level", - "parameters": [ - { - "name": "parameter", - "required": true, - "in": "path", - "description": "the preferences level to be retrieved( Subscriber / Topic) ", - "schema": { - "enum": [ - "Subscriber", - "Topic" - ], - "type": "string" - } - }, - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" + "/v1/topics": { + "post": { + "operationId": "TopicsController_createTopic", + "summary": "Topic creation", + "description": "Create a topic", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTopicRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" - } + "$ref": "#/components/schemas/CreateTopicResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3757,6 +8845,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3768,6 +8882,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3779,7 +8919,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -3787,51 +8927,108 @@ } ] }, - "patch": { - "operationId": "SubscribersController_updateSubscriberPreference", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber preference", + "get": { + "operationId": "TopicsController_listTopics", + "summary": "Filter topics", + "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } + "name": "page", + "required": false, + "in": "query", + "description": "Number of page for the pagination", + "schema": { + "minimum": 0, + "default": 0, + "type": "number" + } }, { - "name": "parameter", - "required": true, - "in": "path", + "name": "pageSize", + "required": false, + "in": "query", + "description": "Size of page for the pagination", + "schema": { + "minimum": 0, + "default": 10, + "type": "number" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Topic key", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" - } - } - } - }, "responses": { "200": { - "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + "$ref": "#/components/schemas/FilterTopicsResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3843,6 +9040,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3854,6 +9077,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3865,7 +9114,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -3874,92 +9123,92 @@ ] } }, - "/v1/subscribers/{subscriberId}/notifications/feed": { - "get": { - "operationId": "SubscribersController_getNotificationsFeed", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get in-app notification feed for a particular subscriber", + "/v1/topics/{topicKey}/subscribers": { + "post": { + "operationId": "TopicsController_addSubscribers", + "x-speakeasy-name-override": "assign", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers addition", + "description": "Add subscribers to a topic by key", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "read", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "seen", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "payload", - "required": false, - "in": "query", - "description": "Base64 encoded string of the partial payload JSON object", - "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + "description": "The topic key", "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - ] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddSubscribersRequestDto" } } + } + }, + "responses": { + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -3971,6 +9220,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3982,6 +9257,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -3993,7 +9294,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -4002,51 +9303,74 @@ ] } }, - "/v1/subscribers/{subscriberId}/notifications/unseen": { + "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { "get": { - "operationId": "SubscribersController_getUnseenCount", - "x-speakeasy-name-override": "unseenCount", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get the unseen in-app notifications count for subscribers feed", + "operationId": "TopicsController_getTopicSubscriber", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Check topic subscriber", + "description": "Check if a subscriber belongs to a certain topic", "parameters": [ { - "name": "seen", - "required": true, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "subscriberId", + "name": "externalSubscriberId", "required": true, "in": "path", + "description": "The external subscriber id", "schema": { "type": "string" } }, { - "name": "limit", + "name": "topicKey", "required": true, - "in": "query", + "in": "path", + "description": "The topic key", "schema": { - "type": "number" + "type": "string" } } ], "responses": { "200": { - "description": "Ok", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnseenCountResponse" + "$ref": "#/components/schemas/TopicSubscriberDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -4058,17 +9382,69 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" } } } }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4080,7 +9456,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -4089,17 +9465,18 @@ ] } }, - "/v1/subscribers/{subscriberId}/messages/mark-as": { + "/v1/topics/{topicKey}/subscribers/removal": { "post": { - "operationId": "SubscribersController_markMessagesAs", - "x-speakeasy-name-override": "markAllAs", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark a subscriber messages as seen, read, unseen or unread", + "operationId": "TopicsController_removeSubscribers", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers removal", + "description": "Remove subscribers from a topic", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } @@ -4110,27 +9487,69 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageMarkAsRequestDto" + "$ref": "#/components/schemas/RemoveSubscribersRequestDto" } } } }, "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageEntity" - } - } + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } - } + }, + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -4142,6 +9561,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4153,6 +9598,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4164,7 +9635,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -4173,45 +9644,100 @@ ] } }, - "/v1/subscribers/{subscriberId}/messages/mark-all": { - "post": { - "operationId": "SubscribersController_markAllUnreadAsRead", - "x-speakeasy-name-override": "markAll", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", + "/v1/topics/{topicKey}": { + "delete": { + "operationId": "TopicsController_deleteTopic", + "summary": "Delete topic", + "description": "Delete a topic by its topic key if it has no subscribers", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" + "responses": { + "204": { + "description": "The topic has been deleted correctly", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "number" - } + }, + "404": { + "description": "The topic with the key provided does not exist in the database so it can not be deleted.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } } }, "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "description": "The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { @@ -4223,6 +9749,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4234,6 +9786,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4245,68 +9823,94 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { - "post": { - "operationId": "SubscribersController_markActionAsSeen", - "x-speakeasy-name-override": "updateAsSeen", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark message action as seen", + }, + "get": { + "operationId": "TopicsController_getTopic", + "summary": "Get topic", + "description": "Get a topic by its topic key", "parameters": [ { - "name": "messageId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": true, - "in": "path", - "schema": {} - }, - { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageResponseDto" + "$ref": "#/components/schemas/GetTopicResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -4318,6 +9922,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4329,6 +9959,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4340,246 +9996,105 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { - "get": { - "operationId": "SubscribersController_chatOauthCallback", - "x-speakeasy-name-override": "chatAccessOauthCallBack", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle providers oauth redirect", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "providerId", - "required": true, - "in": "path", - "schema": {} - }, - { - "name": "code", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "hmacHash", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { - "get": { - "operationId": "SubscribersController_chatAccessOauth", - "x-speakeasy-name-override": "chatAccessOauth", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle chat oauth", + }, + "patch": { + "operationId": "TopicsController_renameTopic", + "x-speakeasy-name-override": "rename", + "summary": "Rename a topic", + "description": "Rename a topic by providing a new name", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "providerId", + "name": "topicKey", "required": true, "in": "path", - "schema": {} - }, - { - "name": "hmacHash", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", + "description": "The topic key", "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/feeds": { - "post": { - "operationId": "FeedsController_createFeed", - "summary": "Create feed", - "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateFeedRequestDto" + "$ref": "#/components/schemas/RenameTopicRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedResponseDto" + "$ref": "#/components/schemas/RenameTopicResponseDto" } } } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" + } + }, "content": { "application/json": { "schema": { @@ -4591,6 +10106,32 @@ }, "429": { "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4602,6 +10143,32 @@ }, "503": { "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, "content": { "application/json": { "schema": { @@ -4613,68 +10180,7 @@ } }, "tags": [ - "Feeds" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "FeedsController_getFeeds", - "summary": "Get feeds", - "parameters": [], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Feeds" + "Topics" ], "security": [ { @@ -4682,2619 +10188,168 @@ } ] } + } + }, + "info": { + "title": "Novu API", + "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", + "version": "1.0", + "contact": { + "name": "Novu Support", + "url": "https://discord.gg/novu", + "email": "support@novu.co" }, - "/v1/feeds/{feedId}": { - "delete": { - "operationId": "FeedsController_deleteFeedById", - "summary": "Delete feed", - "parameters": [ - { - "name": "feedId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Feeds" - ], - "security": [ - { - "api-key": [] - } - ] + "termsOfService": "https://novu.co/terms", + "license": { + "name": "MIT", + "url": "https://opensource.org/license/mit" + } + }, + "tags": [ + { + "name": "Events", + "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" } }, - "/v1/layouts": { - "post": { - "operationId": "LayoutsController_PropertyDescriptor", - "x-speakeasy-name-override": "create", - "summary": "Layout creation", - "description": "Create a layout", - "parameters": [], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLayoutResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "LayoutsController_listLayouts", - "summary": "Filter layouts", - "description": "Returns a list of layouts that can be paginated using the `page` query parameter and filtered by the environment where it is executed from the organization the user belongs to.", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "description": "Number of page for pagination", - "schema": { - "minimum": 0, - "type": "number" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Size of page for pagination", - "schema": { - "minimum": 0, - "type": "number" - } - }, - { - "name": "sortBy", - "required": false, - "in": "query", - "description": "Sort field. Currently only supported `createdAt`", - "schema": { - "type": "string" - } - }, - { - "name": "orderBy", - "required": false, - "in": "query", - "description": "Direction of the sorting query param", - "schema": { - "enum": [ - "ASC", - "DESC" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The list of layouts that match the criteria of the query params are successfully returned." - }, - "400": { - "description": "Page size can not be larger than the page size limit." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Subscribers", + "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/subscribers" } }, - "/v1/layouts/{layoutId}": { - "get": { - "operationId": "LayoutsController_getLayout", - "summary": "Get layout", - "description": "Get a layout by its ID", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "description": "The layout id", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLayoutResponseDto" - } - } - } - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "delete": { - "operationId": "LayoutsController_deleteLayout", - "summary": "Delete layout", - "description": "Execute a soft delete of a layout given a certain ID.", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "description": "The layout id", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The layout has been deleted correctly" - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be deleted." - }, - "409": { - "description": "Either you are trying to delete a layout that is being used or a layout that is the default in the environment.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "LayoutsController_updateLayout", - "summary": "Update a layout", - "description": "Update the name, content and variables of a layout. Also change it to be default or no.", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "description": "The layout id", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLayoutRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLayoutResponseDto" - } - } - } - }, - "400": { - "description": "The payload provided or the URL param are not right." - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be updated." - }, - "409": { - "description": "One default layout is needed. If you are trying to turn a default layout as not default, you should turn a different layout as default first and automatically it will be done by the system.", - "content": { - "application/json": { - "schema": { - "example": "One default layout is required" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Topics", + "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/topics" } }, - "/v1/layouts/{layoutId}/default": { - "post": { - "operationId": "LayoutsController_setDefaultLayout", - "x-speakeasy-name-override": "setAsDefault", - "summary": "Set default layout", - "description": "Sets the default layout for the environment and updates to non default to the existing default layout (if any).", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "description": "The layout id", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The selected layout has been set as the default for the environment." - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be set as the default for the environment." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Notification", + "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", + "externalDocs": { + "url": "https://docs.novu.co/getting-started/introduction" } }, - "/v1/messages": { - "get": { - "operationId": "MessagesController_getMessages", - "summary": "Get messages", - "description": "Returns a list of messages, could paginate using the `page` query parameter", - "parameters": [ - { - "name": "channel", - "required": false, - "in": "query", - "schema": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" - } - }, - { - "name": "subscriberId", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "transactionId", - "required": false, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "default": 0, - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "default": 10, - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Integrations", + "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", + "externalDocs": { + "url": "https://docs.novu.co/channels-and-providers/integration-store" } }, - "/v1/messages/{messageId}": { - "delete": { - "operationId": "MessagesController_deleteMessage", - "summary": "Delete message", - "description": "Deletes a message entity from the Novu platform", - "parameters": [ - { - "name": "messageId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteMessageResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Layouts", + "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", + "externalDocs": { + "url": "https://docs.novu.co/content-creation-design/layouts" } }, - "/v1/messages/transaction/{transactionId}": { - "delete": { - "operationId": "MessagesController_deleteMessagesByTransactionId", - "x-speakeasy-name-override": "deleteByTransactionId", - "summary": "Delete messages by transactionId", - "description": "Deletes messages entity from the Novu platform using TransactionId of message", - "parameters": [ - { - "name": "channel", - "required": false, - "in": "query", - "description": "The channel of the message to be deleted", - "schema": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" - } - }, - { - "name": "transactionId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Workflows", + "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" } }, - "/v1/topics": { - "post": { - "operationId": "TopicsController_createTopic", - "summary": "Topic creation", - "description": "Create a topic", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTopicRequestDto" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "TopicsController_listTopics", - "summary": "Filter topics", - "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "description": "Number of page for the pagination", - "schema": { - "minimum": 0, - "default": 0, - "type": "number" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Size of page for the pagination", - "schema": { - "minimum": 0, - "default": 10, - "type": "number" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "Topic key", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilterTopicsResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Notification Templates", + "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name." + }, + { + "name": "Workflow groups", + "description": "Workflow groups are used to organize workflows into logical groups." + }, + { + "name": "Changes", + "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production" } }, - "/v1/topics/{topicKey}/subscribers": { - "post": { - "operationId": "TopicsController_addSubscribers", - "x-speakeasy-name-override": "assign", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers addition", - "description": "Add subscribers to a topic by key", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddSubscribersRequestDto" - } - } - } - }, - "responses": { - "204": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { - "get": { - "operationId": "TopicsController_getTopicSubscriber", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Check topic subscriber", - "description": "Check if a subscriber belongs to a certain topic", - "parameters": [ - { - "name": "externalSubscriberId", - "required": true, - "in": "path", - "description": "The external subscriber id", - "schema": { - "type": "string" - } - }, - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TopicSubscriberDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}/subscribers/removal": { - "post": { - "operationId": "TopicsController_removeSubscribers", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers removal", - "description": "Remove subscribers from a topic", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RemoveSubscribersRequestDto" - } - } - } - }, - "responses": { - "204": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Environments", + "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments" } }, - "/v1/topics/{topicKey}": { - "delete": { - "operationId": "TopicsController_deleteTopic", - "summary": "Delete topic", - "description": "Delete a topic by its topic key if it has no subscribers", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The topic has been deleted correctly" - }, - "404": { - "description": "The topic with the key provided does not exist in the database so it can not be deleted." - }, - "409": { - "description": "The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "TopicsController_getTopic", - "summary": "Get topic", - "description": "Get a topic by its topic key", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "TopicsController_renameTopic", - "x-speakeasy-name-override": "rename", - "summary": "Rename a topic", - "description": "Rename a topic by providing a new name", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "description": "The topic key", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/tenants": { - "get": { - "operationId": "TenantController_listTenants", - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data.resultArray" - } - }, - "summary": "Get tenants", - "description": "Returns a list of tenants, could paginated using the `page` and `limit` query parameter. Tenants is not supported in code first version of the API.", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetTenantResponseDto" - } - } - } - } - ] - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "post": { - "operationId": "TenantController_createTenant", - "summary": "Create tenant", - "description": "Create tenant under the current environment Tenants is not supported in code first version of the API.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantResponseDto" - } - } - } - }, - "409": { - "description": "A tenant with the same identifier is already exist.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/tenants/{identifier}": { - "get": { - "operationId": "TenantController_getTenantById", - "summary": "Get tenant", - "description": "Get tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API.", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTenantResponseDto" - } - } - } - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "TenantController_updateTenant", - "summary": "Update tenant", - "description": "Update tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API.", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantResponseDto" - } - } - } - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "delete": { - "operationId": "TenantController_removeTenant", - "summary": "Delete tenant", - "description": "Deletes a tenant entity from the Novu platform. Tenants is not supported in code first version of the API.", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The tenant has been deleted correctly" - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database so it can not be deleted." - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - } - } - }, - "info": { - "title": "Novu API", - "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", - "version": "1.0", - "contact": { - "name": "Novu Support", - "url": "https://discord.gg/novu", - "email": "support@novu.co" - }, - "termsOfService": "https://novu.co/terms", - "license": { - "name": "MIT", - "url": "https://opensource.org/license/mit" - } - }, - "tags": [ - { - "name": "Events", - "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", - "externalDocs": { - "url": "https://docs.novu.co/workflows" - } - }, - { - "name": "Subscribers", - "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", - "externalDocs": { - "url": "https://docs.novu.co/subscribers/subscribers" - } - }, - { - "name": "Topics", - "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", - "externalDocs": { - "url": "https://docs.novu.co/subscribers/topics" - } - }, - { - "name": "Notification", - "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", - "externalDocs": { - "url": "https://docs.novu.co/getting-started/introduction" - } - }, - { - "name": "Integrations", - "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", - "externalDocs": { - "url": "https://docs.novu.co/channels-and-providers/integration-store" - } - }, - { - "name": "Layouts", - "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", - "externalDocs": { - "url": "https://docs.novu.co/content-creation-design/layouts" - } - }, - { - "name": "Workflows", - "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", - "externalDocs": { - "url": "https://docs.novu.co/workflows" - } - }, - { - "name": "Notification Templates", - "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name." - }, - { - "name": "Workflow groups", - "description": "Workflow groups are used to organize workflows into logical groups." - }, - { - "name": "Changes", - "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", - "externalDocs": { - "url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production" - } - }, - { - "name": "Environments", - "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", - "externalDocs": { - "url": "https://docs.novu.co/platform/environments" - } - }, - { - "name": "Inbound Parse", - "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", - "externalDocs": { - "url": "https://docs.novu.co/platform/inbound-parse-webhook" - } - }, - { - "name": "Feeds", - "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", - "externalDocs": { - "url": "https://docs.novu.co/activity-feed" - } - }, - { - "name": "Tenants", - "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", - "externalDocs": { - "url": "https://docs.novu.co/tenants" - } - }, - { - "name": "Messages", - "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", - "externalDocs": { - "url": "https://docs.novu.co/workflows/messages" - } - }, - { - "name": "Organizations", - "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", - "externalDocs": { - "url": "https://docs.novu.co/platform/organizations" - } - }, - { - "name": "Execution Details", - "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", - "externalDocs": { - "url": "https://docs.novu.co/activity-feed" - } - }, - { - "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": [ - { - "url": "https://api.novu.co" - }, - { - "url": "https://eu.api.novu.co" - } - ], - "components": { - "securitySchemes": { - "api-key": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \u003capi_key\u003e\"." - } - }, - "schemas": { - "DataWrapperDto": { - "type": "object", - "properties": { - "data": { - "type": "object" - } - }, - "required": [ - "data" - ] - }, - "EnvironmentResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "apiKeys": { - "type": "array", - "items": { - "type": "string" - } - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "name", - "_organizationId", - "identifier", - "_parentId" - ] - }, - "ApiKey": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "_userId": { - "type": "string" - } - }, - "required": [ - "key", - "_userId" - ] - }, - "ExecutionDetailsResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_jobId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_notificationId": { - "type": "string" - }, - "_notificationTemplateId": { - "type": "string" - }, - "_subscriberId": { - "type": "string" - }, - "_messageId": { - "type": "string" - }, - "providerId": { - "type": "string" - }, - "transactionId": { - "type": "string" - }, - "channel": { - "type": "string", - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push", - "digest", - "trigger", - "delay", - "custom" - ] - }, - "detail": { - "type": "string" - }, - "source": { - "type": "string", - "enum": [ - "Credentials", - "Internal", - "Payload", - "Webhook" - ] - }, - "status": { - "type": "string", - "enum": [ - "Success", - "Warning", - "Failed", - "Pending", - "Queued", - "ReadConfirmation" - ] - }, - "isTest": { - "type": "boolean" - }, - "isRetry": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "_organizationId", - "_jobId", - "_environmentId", - "_notificationId", - "_notificationTemplateId", - "_subscriberId", - "transactionId", - "channel", - "detail", - "source", - "status", - "isTest", - "isRetry" - ] - }, - "WorkflowsResponseDto": { - "type": "object", - "properties": { - "totalCount": { - "type": "number" - }, - "data": { - "type": "array", - "items": { - "type": "string" - } - }, - "pageSize": { - "type": "number" - }, - "page": { - "type": "number" - } - }, - "required": [ - "totalCount", - "data", - "pageSize", - "page" - ] - }, - "NotificationGroup": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "name", - "_environmentId", - "_organizationId" - ] - }, - "PreferenceChannels": { - "type": "object", - "properties": { - "email": { - "type": "boolean" - }, - "sms": { - "type": "boolean" - }, - "in_app": { - "type": "boolean" - }, - "chat": { - "type": "boolean" - }, - "push": { - "type": "boolean" - } - } - }, - "DigestRegularMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "digestKey": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "regular", - "backoff" - ] - }, - "backoff": { - "type": "boolean" - }, - "backoffAmount": { - "type": "number" - }, - "backoffUnit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "updateMode": { - "type": "boolean" - } - }, - "required": [ - "type" - ] - }, - "TimedConfig": { - "type": "object", - "properties": { - "atTime": { - "type": "string" - }, - "weekDays": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday", - "sunday" - ] - } - }, - "monthDays": { - "type": "array", - "items": { - "type": "string" - } - }, - "ordinal": { - "type": "string", - "enum": [ - "1", - "2", - "3", - "4", - "5", - "last" - ] - }, - "ordinalValue": { - "type": "string", - "enum": [ - "day", - "weekday", - "weekend", - "sunday", - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday" - ] - }, - "monthlyType": { - "type": "string", - "enum": [ - "each", - "on" - ] - } - } - }, - "DigestTimedMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "digestKey": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "timed" - ] - }, - "timed": { - "$ref": "#/components/schemas/TimedConfig" - } - }, - "required": [ - "type" - ] - }, - "DelayRegularMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "type": { - "type": "string", - "enum": [ - "regular" - ] - } - }, - "required": [ - "type" - ] - }, - "DelayScheduledMetadata": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scheduled" - ] - }, - "delayPath": { - "type": "string" - } - }, - "required": [ - "type", - "delayPath" - ] - }, - "MessageTemplate": { - "type": "object", - "properties": {} - }, - "FieldFilterPart": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - }, - "operator": { - "type": "string", - "enum": [ - "LARGER", - "SMALLER", - "LARGER_EQUAL", - "SMALLER_EQUAL", - "EQUAL", - "NOT_EQUAL", - "ALL_IN", - "ANY_IN", - "NOT_IN", - "BETWEEN", - "NOT_BETWEEN", - "LIKE", - "NOT_LIKE", - "IN" - ] - }, - "on": { - "type": "string", - "enum": [ - "subscriber", - "payload" - ] - } - }, - "required": [ - "field", - "value", - "operator", - "on" - ] - }, - "StepFilter": { - "type": "object", - "properties": { - "isNegated": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "BOOLEAN", - "TEXT", - "DATE", - "NUMBER", - "STATEMENT", - "LIST", - "MULTI_LIST", - "GROUP" - ] - }, - "value": { - "type": "string", - "enum": [ - "AND", - "OR" - ] - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FieldFilterPart" - } - } - }, - "required": [ - "isNegated", - "type", - "value", - "children" - ] - }, - "NotificationStepVariant": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_templateId": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "shouldStopOnFail": { - "type": "boolean" - }, - "template": { - "$ref": "#/components/schemas/MessageTemplate" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StepFilter" - } - }, - "_parentId": { - "type": "object" - }, - "metadata": { - "oneOf": [ - { - "$ref": "#/components/schemas/DigestRegularMetadata" - }, - { - "$ref": "#/components/schemas/DigestTimedMetadata" - }, - { - "$ref": "#/components/schemas/DelayRegularMetadata" - }, - { - "$ref": "#/components/schemas/DelayScheduledMetadata" - } - ] - }, - "replyCallback": { - "type": "object" - } - } - }, - "NotificationStep": { + { + "name": "Inbound Parse", + "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", + "externalDocs": { + "url": "https://docs.novu.co/platform/inbound-parse-webhook" + } + }, + { + "name": "Feeds", + "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + }, + { + "name": "Tenants", + "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", + "externalDocs": { + "url": "https://docs.novu.co/tenants" + } + }, + { + "name": "Messages", + "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", + "externalDocs": { + "url": "https://docs.novu.co/workflows/messages" + } + }, + { + "name": "Organizations", + "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", + "externalDocs": { + "url": "https://docs.novu.co/platform/organizations" + } + }, + { + "name": "Execution Details", + "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + } + ], + "servers": [ + { + "url": "https://api.novu.co" + }, + { + "url": "https://eu.api.novu.co" + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \u003capi_key\u003e\"." + } + }, + "schemas": { + "DataWrapperDto": { "type": "object", "properties": { - "_id": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_templateId": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "shouldStopOnFail": { - "type": "boolean" - }, - "template": { - "$ref": "#/components/schemas/MessageTemplate" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StepFilter" - } - }, - "_parentId": { - "type": "object" - }, - "metadata": { - "oneOf": [ - { - "$ref": "#/components/schemas/DigestRegularMetadata" - }, - { - "$ref": "#/components/schemas/DigestTimedMetadata" - }, - { - "$ref": "#/components/schemas/DelayRegularMetadata" - }, - { - "$ref": "#/components/schemas/DelayScheduledMetadata" - } - ] - }, - "replyCallback": { + "data": { "type": "object" - }, - "variants": { - "$ref": "#/components/schemas/NotificationStepVariant" - } - } - }, - "NotificationTriggerVariable": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "NotificationTrigger": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "event" - ] - }, - "identifier": { - "type": "string" - }, - "variables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTriggerVariable" - } - }, - "subscriberVariables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTriggerVariable" - } } }, "required": [ - "type", - "identifier", - "variables" + "data" ] }, - "WorkflowResponse": { + "EnvironmentResponseDto": { "type": "object", "properties": { "_id": { @@ -7303,224 +10358,141 @@ "name": { "type": "string" }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "draft": { - "type": "boolean" - }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" - }, - "critical": { - "type": "boolean" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationStep" - } - }, "_organizationId": { "type": "string" }, - "_creatorId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "triggers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTrigger" - } - }, - "_notificationGroupId": { - "type": "string" - }, - "_parentId": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "deletedAt": { - "type": "string" - }, - "deletedBy": { - "type": "string" - }, - "notificationGroup": { - "$ref": "#/components/schemas/NotificationGroup" - }, - "data": { - "type": "object" - }, - "workflowIntegrationStatus": { - "type": "object" - } - }, - "required": [ - "name", - "description", - "active", - "draft", - "preferenceSettings", - "critical", - "tags", - "steps", - "_organizationId", - "_creatorId", - "_environmentId", - "triggers", - "_notificationGroupId", - "deleted", - "deletedAt", - "deletedBy" - ] - }, - "UpdateWorkflowRequestDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "type": "string", - "maxLength": 300 - }, "identifier": { "type": "string" }, - "steps": { + "apiKeys": { "type": "array", "items": { "type": "string" } }, - "notificationGroupId": { - "type": "string" - }, - "critical": { - "type": "boolean" - }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" + "_parentId": { + "type": "string" }, - "data": { - "type": "object" + "slug": { + "type": "string" } }, "required": [ "name", - "notificationGroupId" - ] - }, - "DataBooleanDto": { - "type": "object", - "properties": { - "data": { - "type": "boolean" - } - }, - "required": [ - "data" + "_organizationId", + "identifier", + "_parentId" ] }, - "VariablesResponseDto": { + "ApiKey": { "type": "object", "properties": { - "translations": { - "type": "object" + "key": { + "type": "string" }, - "system": { - "type": "object" + "_userId": { + "type": "string" } }, "required": [ - "translations", - "system" + "key", + "_userId" ] }, - "CreateWorkflowRequestDto": { + "ExecutionDetailsResponseDto": { "type": "object", "properties": { - "name": { + "_id": { "type": "string" }, - "notificationGroupId": { + "_organizationId": { "type": "string" }, - "notificationGroup": { - "type": "object" + "_jobId": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "_environmentId": { + "type": "string" }, - "description": { - "type": "string", - "maxLength": 1000 + "_notificationId": { + "type": "string" }, - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationStep" - } + "_notificationTemplateId": { + "type": "string" }, - "active": { - "type": "boolean" + "_subscriberId": { + "type": "string" }, - "draft": { - "type": "boolean", - "deprecated": true + "_messageId": { + "type": "string" }, - "critical": { - "type": "boolean" + "providerId": { + "type": "string" }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" + "transactionId": { + "type": "string" + }, + "channel": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push", + "digest", + "trigger", + "delay", + "custom" + ] }, - "blueprintId": { + "detail": { "type": "string" }, - "data": { - "type": "object" - } - }, - "required": [ - "name", - "notificationGroupId", - "steps" - ] - }, - "ChangeWorkflowStatusRequestDto": { - "type": "object", - "properties": { - "active": { + "source": { + "type": "string", + "enum": [ + "Credentials", + "Internal", + "Payload", + "Webhook" + ] + }, + "status": { + "type": "string", + "enum": [ + "Success", + "Warning", + "Failed", + "Pending", + "Queued", + "ReadConfirmation" + ] + }, + "isTest": { + "type": "boolean" + }, + "isRetry": { "type": "boolean" + }, + "createdAt": { + "type": "string" } }, "required": [ - "active" + "_organizationId", + "_jobId", + "_environmentId", + "_notificationId", + "_notificationTemplateId", + "_subscriberId", + "transactionId", + "channel", + "detail", + "source", + "status", + "isTest", + "isRetry" ] }, "TriggerEventResponseDto": { @@ -7798,6 +10770,17 @@ "payload" ] }, + "DataBooleanDto": { + "type": "object", + "properties": { + "data": { + "type": "boolean" + } + }, + "required": [ + "data" + ] + }, "ActivitiesResponseDto": { "type": "object", "properties": { @@ -7957,135 +10940,21 @@ "in_app", "email", "sms", - "chat", - "push", - "digest", - "trigger", - "delay", - "custom" - ] - }, - "subscriber": { - "$ref": "#/components/schemas/ActivityNotificationSubscriberResponseDto" - }, - "template": { - "$ref": "#/components/schemas/ActivityNotificationTemplateResponseDto" - }, - "jobs": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "_environmentId", - "_organizationId", - "transactionId" - ] - }, - "NotificationGroupResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "name", - "_environmentId", - "_organizationId" - ] - }, - "CreateNotificationGroupRequestDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "DeleteNotificationGroupResponseDto": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean", - "description": "A boolean stating the success of the action" - }, - "status": { - "type": "string", - "description": "The status enum for the performed action", - "enum": [ - "deleted" - ] - } - }, - "required": [ - "acknowledged", - "status" - ] - }, - "OrganizationBrandingResponseDto": { - "type": "object", - "properties": { - "direction": { - "enum": [ - "ltr", - "trl" - ], - "type": "string" - }, - "logo": { - "type": "string" - }, - "color": { - "type": "string" - }, - "fontColor": { - "type": "string" - }, - "contentBackground": { - "type": "string" - }, - "fontFamily": { - "type": "string" - } - }, - "required": [ - "logo", - "color", - "fontColor", - "contentBackground" - ] - }, - "OrganizationResponseDto": { - "type": "object", - "properties": { - "name": { - "type": "string" + "chat", + "push", + "digest", + "trigger", + "delay", + "custom" + ] }, - "logo": { - "type": "string" + "subscriber": { + "$ref": "#/components/schemas/ActivityNotificationSubscriberResponseDto" }, - "branding": { - "$ref": "#/components/schemas/OrganizationBrandingResponseDto" + "template": { + "$ref": "#/components/schemas/ActivityNotificationTemplateResponseDto" }, - "partnerConfigurations": { + "jobs": { "type": "array", "items": { "type": "string" @@ -8093,37 +10962,37 @@ } }, "required": [ - "name", - "branding" + "_environmentId", + "_organizationId", + "transactionId" ] }, - "UpdateBrandingDetailsDto": { + "NotificationGroupResponseDto": { "type": "object", "properties": { - "logo": { + "_id": { "type": "string" }, - "color": { + "name": { "type": "string" }, - "fontColor": { + "_environmentId": { "type": "string" }, - "contentBackground": { + "_organizationId": { "type": "string" }, - "fontFamily": { + "_parentId": { "type": "string" } }, "required": [ - "logo", - "color", - "fontColor", - "contentBackground" + "name", + "_environmentId", + "_organizationId" ] }, - "RenameOrganizationDto": { + "CreateNotificationGroupRequestDto": { "type": "object", "properties": { "name": { @@ -8134,6 +11003,26 @@ "name" ] }, + "DeleteNotificationGroupResponseDto": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean", + "description": "A boolean stating the success of the action" + }, + "status": { + "type": "string", + "description": "The status enum for the performed action", + "enum": [ + "deleted" + ] + } + }, + "required": [ + "acknowledged", + "status" + ] + }, "CredentialsDto": { "type": "object", "properties": { @@ -8265,6 +11154,89 @@ } } }, + "FieldFilterPart": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + }, + "operator": { + "type": "string", + "enum": [ + "LARGER", + "SMALLER", + "LARGER_EQUAL", + "SMALLER_EQUAL", + "EQUAL", + "NOT_EQUAL", + "ALL_IN", + "ANY_IN", + "NOT_IN", + "BETWEEN", + "NOT_BETWEEN", + "LIKE", + "NOT_LIKE", + "IN" + ] + }, + "on": { + "type": "string", + "enum": [ + "subscriber", + "payload" + ] + } + }, + "required": [ + "field", + "value", + "operator", + "on" + ] + }, + "StepFilter": { + "type": "object", + "properties": { + "isNegated": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "BOOLEAN", + "TEXT", + "DATE", + "NUMBER", + "STATEMENT", + "LIST", + "MULTI_LIST", + "GROUP" + ] + }, + "value": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldFilterPart" + } + } + }, + "required": [ + "isNegated", + "type", + "value", + "children" + ] + }, "IntegrationResponseDto": { "type": "object", "properties": { @@ -8417,112 +11389,6 @@ } } }, - "ChangesResponseDto": { - "type": "object", - "properties": { - "totalCount": { - "type": "number" - }, - "data": { - "type": "array", - "items": { - "type": "string" - } - }, - "pageSize": { - "type": "number" - }, - "page": { - "type": "number" - } - }, - "required": [ - "totalCount", - "data", - "pageSize", - "page" - ] - }, - "DataNumberDto": { - "type": "object", - "properties": { - "data": { - "type": "number" - } - }, - "required": [ - "data" - ] - }, - "ChangeResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "_creatorId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_entityId": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "type": { - "enum": [ - "Feed", - "MessageTemplate", - "Layout", - "DefaultLayout", - "NotificationTemplate", - "NotificationGroup", - "TranslationGroup", - "Translation" - ], - "type": "string" - }, - "change": { - "type": "object" - }, - "createdAt": { - "type": "string" - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "_creatorId", - "_environmentId", - "_organizationId", - "_entityId", - "enabled", - "type", - "change", - "createdAt" - ] - }, - "BulkApplyChangeDto": { - "type": "object", - "properties": { - "changeIds": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "changeIds" - ] - }, "PaginatedResponseDto": { "type": "object", "properties": { @@ -8600,29 +11466,25 @@ "type": "object", "properties": { "providerId": { - "type": "number", + "type": "string", "enum": [ - { - "Slack": "slack", - "Discord": "discord", - "MsTeams": "msteams", - "Mattermost": "mattermost", - "Ryver": "ryver", - "Zulip": "zulip", - "GrafanaOnCall": "grafana-on-call", - "GetStream": "getstream", - "RocketChat": "rocket-chat", - "WhatsAppBusiness": "whatsapp-business" - }, - { - "FCM": "fcm", - "APNS": "apns", - "EXPO": "expo", - "OneSignal": "one-signal", - "Pushpad": "pushpad", - "PushWebhook": "push-webhook", - "PusherBeams": "pusher-beams" - } + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams" ], "description": "The provider identifier for the credentials" }, @@ -8685,6 +11547,13 @@ "$ref": "#/components/schemas/ChannelSettings" } }, + "topics": { + "description": "Topics that subscriber belongs to", + "type": "array", + "items": { + "type": "string" + } + }, "isOnline": { "type": "boolean" }, @@ -8796,6 +11665,12 @@ }, "data": { "type": "object" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + } } } }, @@ -8803,29 +11678,25 @@ "type": "object", "properties": { "providerId": { - "type": "number", + "type": "string", "enum": [ - { - "Slack": "slack", - "Discord": "discord", - "MsTeams": "msteams", - "Mattermost": "mattermost", - "Ryver": "ryver", - "Zulip": "zulip", - "GrafanaOnCall": "grafana-on-call", - "GetStream": "getstream", - "RocketChat": "rocket-chat", - "WhatsAppBusiness": "whatsapp-business" - }, - { - "FCM": "fcm", - "APNS": "apns", - "EXPO": "expo", - "OneSignal": "one-signal", - "Pushpad": "pushpad", - "PushWebhook": "push-webhook", - "PusherBeams": "pusher-beams" - } + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams" ], "description": "The provider identifier for the credentials" }, @@ -8908,6 +11779,26 @@ "triggers" ] }, + "PreferenceChannels": { + "type": "object", + "properties": { + "email": { + "type": "boolean" + }, + "sms": { + "type": "boolean" + }, + "in_app": { + "type": "boolean" + }, + "chat": { + "type": "boolean" + }, + "push": { + "type": "boolean" + } + } + }, "Preference": { "type": "object", "properties": { @@ -9269,173 +12160,341 @@ "data" ] }, - "MessageResponseDto": { + "NotificationGroup": { "type": "object", "properties": { "_id": { "type": "string" }, - "_templateId": { + "name": { "type": "string" }, "_environmentId": { "type": "string" }, - "_messageTemplateId": { + "_organizationId": { "type": "string" }, - "_organizationId": { + "_parentId": { "type": "string" + } + }, + "required": [ + "name", + "_environmentId", + "_organizationId" + ] + }, + "DigestRegularMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" }, - "_notificationId": { + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "digestKey": { "type": "string" }, - "_subscriberId": { + "type": { + "type": "string", + "enum": [ + "regular", + "backoff" + ] + }, + "backoff": { + "type": "boolean" + }, + "backoffAmount": { + "type": "number" + }, + "backoffUnit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "updateMode": { + "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "TimedConfig": { + "type": "object", + "properties": { + "atTime": { "type": "string" }, - "subscriber": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "weekDays": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" + ] + } }, - "template": { - "$ref": "#/components/schemas/WorkflowResponse" + "monthDays": { + "type": "array", + "items": { + "type": "string" + } }, - "templateIdentifier": { + "ordinal": { + "type": "string", + "enum": [ + "1", + "2", + "3", + "4", + "5", + "last" + ] + }, + "ordinalValue": { + "type": "string", + "enum": [ + "day", + "weekday", + "weekend", + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ] + }, + "monthlyType": { + "type": "string", + "enum": [ + "each", + "on" + ] + } + } + }, + "DigestTimedMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "digestKey": { "type": "string" }, - "createdAt": { + "type": { + "type": "string", + "enum": [ + "timed" + ] + }, + "timed": { + "$ref": "#/components/schemas/TimedConfig" + } + }, + "required": [ + "type" + ] + }, + "DelayRegularMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "type": { + "type": "string", + "enum": [ + "regular" + ] + } + }, + "required": [ + "type" + ] + }, + "DelayScheduledMetadata": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scheduled" + ] + }, + "delayPath": { + "type": "string" + } + }, + "required": [ + "type", + "delayPath" + ] + }, + "MessageTemplate": { + "type": "object", + "properties": {} + }, + "NotificationStepVariant": { + "type": "object", + "properties": { + "_id": { "type": "string" }, - "lastSeenDate": { + "uuid": { "type": "string" }, - "lastReadDate": { + "name": { "type": "string" }, - "content": { + "_templateId": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "shouldStopOnFail": { + "type": "boolean" + }, + "template": { + "$ref": "#/components/schemas/MessageTemplate" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilter" + } + }, + "_parentId": { + "type": "object" + }, + "metadata": { "oneOf": [ { - "$ref": "#/components/schemas/EmailBlock" + "$ref": "#/components/schemas/DigestRegularMetadata" }, { - "type": "string" + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" } ] }, - "transactionId": { + "replyCallback": { + "type": "object" + } + } + }, + "NotificationStep": { + "type": "object", + "properties": { + "_id": { "type": "string" }, - "subject": { + "uuid": { "type": "string" }, - "channel": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], + "name": { "type": "string" }, - "read": { - "type": "boolean" - }, - "seen": { - "type": "boolean" - }, - "email": { + "_templateId": { "type": "string" }, - "phone": { - "type": "string" + "active": { + "type": "boolean" }, - "directWebhookUrl": { - "type": "string" + "shouldStopOnFail": { + "type": "boolean" }, - "providerId": { - "type": "string" + "template": { + "$ref": "#/components/schemas/MessageTemplate" }, - "deviceTokens": { + "filters": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StepFilter" } }, - "title": { - "type": "string" - }, - "cta": { - "$ref": "#/components/schemas/MessageCTA" - }, - "_feedId": { - "type": "object", - "nullable": true + "_parentId": { + "type": "object" }, - "status": { - "type": "string", - "enum": [ - "sent", - "error", - "warning" + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/DigestRegularMetadata" + }, + { + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" + } ] }, - "errorId": { - "type": "string" - }, - "errorText": { - "type": "string" - }, - "payload": { - "type": "object", - "description": "The payload that was used to send the notification trigger" - }, - "overrides": { - "type": "object", - "description": "Provider specific overrides used when triggering the notification" - } - }, - "required": [ - "_templateId", - "_environmentId", - "_messageTemplateId", - "_organizationId", - "_notificationId", - "_subscriberId", - "createdAt", - "content", - "transactionId", - "channel", - "read", - "seen", - "cta", - "status", - "errorId", - "errorText", - "payload", - "overrides" - ] - }, - "MarkMessageActionAsSeenDto": { - "type": "object", - "properties": { - "status": { - "enum": [ - "pending", - "done" - ], - "type": "string", - "description": "Message action status" + "replyCallback": { + "type": "object" }, - "payload": { - "type": "object", - "description": "Message action payload" + "variants": { + "$ref": "#/components/schemas/NotificationStepVariant" } - }, - "required": [ - "status" - ] + } }, - "CreateFeedRequestDto": { + "NotificationTriggerVariable": { "type": "object", "properties": { "name": { @@ -9446,115 +12505,188 @@ "name" ] }, - "CreateLayoutResponseDto": { + "NotificationTrigger": { "type": "object", "properties": { - "_id": { + "type": { "type": "string", - "description": "The unique identifier for the Layout created." + "enum": [ + "event" + ] + }, + "identifier": { + "type": "string" + }, + "variables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } + }, + "subscriberVariables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } } }, "required": [ - "_id" + "type", + "identifier", + "variables" ] }, - "GetLayoutResponseDto": { + "WorkflowResponse": { "type": "object", "properties": { "_id": { "type": "string" }, - "_organizationId": { + "name": { "type": "string" }, - "_environmentId": { + "description": { "type": "string" }, - "_creatorId": { - "type": "string" + "active": { + "type": "boolean" }, - "name": { - "type": "string" + "draft": { + "type": "boolean" }, - "identifier": { - "type": "string" + "preferenceSettings": { + "$ref": "#/components/schemas/PreferenceChannels" }, - "description": { - "type": "string" + "critical": { + "type": "boolean" }, - "channel": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationStep" + } + }, + "_organizationId": { "type": "string" }, - "content": { + "_creatorId": { "type": "string" }, - "contentType": { + "_environmentId": { "type": "string" }, - "variables": { + "triggers": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/NotificationTrigger" } }, - "isDefault": { - "type": "boolean" + "_notificationGroupId": { + "type": "string" + }, + "_parentId": { + "type": "string" }, - "isDeleted": { + "deleted": { "type": "boolean" }, - "createdAt": { + "deletedAt": { "type": "string" }, - "updatedAt": { + "deletedBy": { "type": "string" }, - "_parentId": { - "type": "string" + "notificationGroup": { + "$ref": "#/components/schemas/NotificationGroup" + }, + "data": { + "type": "object" + }, + "workflowIntegrationStatus": { + "type": "object" } }, "required": [ + "name", + "description", + "active", + "draft", + "preferenceSettings", + "critical", + "tags", + "steps", "_organizationId", - "_environmentId", "_creatorId", - "name", - "identifier", - "channel", - "content", - "contentType", - "isDefault", - "isDeleted" + "_environmentId", + "triggers", + "_notificationGroupId", + "deleted", + "deletedAt", + "deletedBy" ] }, - "UpdateLayoutResponseDto": { + "MessageResponseDto": { "type": "object", "properties": { "_id": { "type": "string" }, + "_templateId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "_messageTemplateId": { + "type": "string" + }, "_organizationId": { "type": "string" }, - "_environmentId": { + "_notificationId": { "type": "string" }, - "_creatorId": { + "_subscriberId": { "type": "string" }, - "name": { + "subscriber": { + "$ref": "#/components/schemas/SubscriberResponseDto" + }, + "template": { + "$ref": "#/components/schemas/WorkflowResponse" + }, + "templateIdentifier": { "type": "string" }, - "identifier": { + "createdAt": { "type": "string" }, - "description": { + "lastSeenDate": { + "type": "string" + }, + "lastReadDate": { + "type": "string" + }, + "content": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmailBlock" + }, + { + "type": "string" + } + ] + }, + "transactionId": { + "type": "string" + }, + "subject": { "type": "string" }, "channel": { @@ -9567,77 +12699,102 @@ ], "type": "string" }, - "content": { + "read": { + "type": "boolean" + }, + "seen": { + "type": "boolean" + }, + "email": { + "type": "string" + }, + "phone": { "type": "string" }, - "contentType": { + "directWebhookUrl": { "type": "string" }, - "variables": { + "providerId": { + "type": "string" + }, + "deviceTokens": { "type": "array", "items": { "type": "string" } }, - "isDefault": { - "type": "boolean" + "title": { + "type": "string" }, - "isDeleted": { - "type": "boolean" + "cta": { + "$ref": "#/components/schemas/MessageCTA" }, - "createdAt": { - "type": "string" + "_feedId": { + "type": "object", + "nullable": true }, - "updatedAt": { + "status": { + "type": "string", + "enum": [ + "sent", + "error", + "warning" + ] + }, + "errorId": { "type": "string" }, - "_parentId": { + "errorText": { "type": "string" + }, + "payload": { + "type": "object", + "description": "The payload that was used to send the notification trigger" + }, + "overrides": { + "type": "object", + "description": "Provider specific overrides used when triggering the notification" } }, "required": [ - "_organizationId", + "_templateId", "_environmentId", - "_creatorId", - "name", - "identifier", - "channel", + "_messageTemplateId", + "_organizationId", + "_notificationId", + "_subscriberId", + "createdAt", "content", - "contentType", - "isDefault", - "isDeleted" + "transactionId", + "channel", + "read", + "seen", + "cta", + "status", + "errorId", + "errorText", + "payload", + "overrides" ] }, - "UpdateLayoutRequestDto": { + "MarkMessageActionAsSeenDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "User defined custom name and provided by the user that will name the Layout updated." - }, - "identifier": { - "type": "string", - "description": "User defined custom key that will be a unique identifier for the Layout updated." - }, - "description": { - "type": "string", - "description": "User defined description of the layout" - }, - "content": { + "status": { + "enum": [ + "pending", + "done" + ], "type": "string", - "description": "User defined content for the layout." + "description": "Message action status" }, - "variables": { + "payload": { "type": "object", - "description": "User defined variables to render in the layout placeholders." - }, - "isDefault": { - "type": "boolean", - "description": "Variable that defines if the layout is chosen as default when creating a layout." + "description": "Message action payload" } }, "required": [ - "identifier" + "status" ] }, "DeleteMessageResponseDto": { @@ -9891,136 +13048,9 @@ "name" ] }, - "GetTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "CreateTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "CreateTenantRequestDto": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - } - }, - "required": [ - "identifier", - "name" - ] - }, - "UpdateTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "UpdateTenantRequestDto": { + "GeneratePreviewResponseDto": { "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - } - } + "properties": {} } }, "headers": { diff --git a/sources/openapi.sdk.json b/sources/openapi.sdk.json index 02e7f1c9..f0ae9291 100644 --- a/sources/openapi.sdk.json +++ b/sources/openapi.sdk.json @@ -1,24 +1,14 @@ { "openapi": "3.0.0", "paths": { - "/v1/organizations": { - "post": { - "operationId": "OrganizationController_createOrganization", - "summary": "Create an organization", + "/v1/environments/me": { + "get": { + "operationId": "EnvironmentsControllerV1_getCurrentEnvironment", + "summary": "Get current environment", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrganizationDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -45,7 +35,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationResponseDto" + "$ref": "#/components/schemas/EnvironmentResponseDto" } } } @@ -166,17 +156,19 @@ } }, "tags": [ - "Organizations" + "Environments" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/environments": { "get": { - "operationId": "OrganizationController_listOrganizations", - "summary": "Fetch all organizations", + "operationId": "EnvironmentsControllerV1_listMyEnvironments", + "summary": "Get environments", "parameters": [], "responses": { "200": { @@ -209,7 +201,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationResponseDto" + "$ref": "#/components/schemas/EnvironmentResponseDto" } } } @@ -331,29 +323,21 @@ } }, "tags": [ - "Organizations" + "Environments" ], "security": [ { "api-key": [] } ] - }, - "patch": { - "operationId": "OrganizationController_rename", - "x-speakeasy-name-override": "rename", - "summary": "Rename organization name", + } + }, + "/v1/environments/api-keys": { + "get": { + "operationId": "EnvironmentsControllerV1_listOrganizationApiKeys", + "x-speakeasy-group": "Environments.ApiKeys", + "summary": "Get api keys", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameOrganizationDto" - } - } - } - }, "responses": { "200": { "description": "Ok", @@ -383,7 +367,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RenameOrganizationDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKey" + } } } } @@ -504,7 +491,7 @@ } }, "tags": [ - "Organizations" + "Environments" ], "security": [ { @@ -513,11 +500,28 @@ ] } }, - "/v1/organizations/me": { + "/v1/execution-details": { "get": { - "operationId": "OrganizationController_getSelfOrganizationData", - "summary": "Fetch current organization details", - "parameters": [], + "operationId": "ExecutionDetailsController_getExecutionDetailsForNotification", + "summary": "Get execution details", + "parameters": [ + { + "name": "notificationId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Ok", @@ -547,7 +551,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionDetailsResponseDto" + } } } } @@ -668,7 +675,7 @@ } }, "tags": [ - "Organizations" + "Execution Details" ], "security": [ { @@ -677,24 +684,30 @@ ] } }, - "/v1/organizations/members/{memberId}": { - "delete": { - "operationId": "OrganizationController_remove", - "x-speakeasy-group": "Organizations.Members", - "summary": "Remove a member from organization using memberId", - "parameters": [ - { - "name": "memberId", - "required": true, - "in": "path", - "schema": { - "type": "string" + "/v1/events/trigger": { + "post": { + "operationId": "EventsController_trigger", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Event" + }, + "x-speakeasy-name-override": "trigger", + "summary": "Trigger event", + "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -721,7 +734,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberResponseDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } @@ -842,7 +855,7 @@ } }, "tags": [ - "Organizations" + "Events" ], "security": [ { @@ -851,15 +864,30 @@ ] } }, - "/v1/organizations/members": { - "get": { - "operationId": "OrganizationController_listOrganizationMembers", - "x-speakeasy-group": "Organizations.Members", - "summary": "Fetch all members of current organizations", + "/v1/events/trigger/bulk": { + "post": { + "operationId": "EventsController_triggerBulk", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Events in Bulk" + }, + "x-speakeasy-name-override": "triggerBulk", + "summary": "Bulk trigger event", + "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerEventDto" + } + } + } + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -888,7 +916,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/MemberResponseDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } @@ -1010,7 +1038,7 @@ } }, "tags": [ - "Organizations" + "Events" ], "security": [ { @@ -1019,18 +1047,23 @@ ] } }, - "/v1/organizations/branding": { - "put": { - "operationId": "OrganizationController_updateBrandingDetails", - "x-speakeasy-group": "Organizations.Branding", - "summary": "Update organization branding details", + "/v1/events/trigger/broadcast": { + "post": { + "operationId": "EventsController_broadcastEventToAll", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Broadcast Event to All" + }, + "x-speakeasy-name-override": "triggerBroadcast", + "summary": "Broadcast event to all", + "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateBrandingDetailsDto" + "$ref": "#/components/schemas/TriggerEventToAllRequestDto" } } } @@ -1064,7 +1097,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationBrandingResponseDto" + "$ref": "#/components/schemas/TriggerEventResponseDto" } } } @@ -1185,7 +1218,7 @@ } }, "tags": [ - "Organizations" + "Events" ], "security": [ { @@ -1194,14 +1227,28 @@ ] } }, - "/v1/environments/me": { - "get": { - "operationId": "EnvironmentsController_getCurrentEnvironment", - "summary": "Get current environment", - "parameters": [], + "/v1/events/trigger/{transactionId}": { + "delete": { + "operationId": "EventsController_cancel", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Cancel Triggered Event" + }, + "x-speakeasy-name-override": "cancel", + "summary": "Cancel triggered event", + "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", + "parameters": [ + { + "name": "transactionId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1225,10 +1272,11 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentResponseDto" + "$ref": "#/components/schemas/DataBooleanDto" } } } @@ -1349,7 +1397,7 @@ } }, "tags": [ - "Environments" + "Events" ], "security": [ { @@ -1358,62 +1406,137 @@ ] } }, - "/v1/environments": { + "/v1/notifications": { "get": { - "operationId": "EnvironmentsController_listMyEnvironments", - "summary": "Get environments", - "parameters": [], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" + "operationId": "NotificationsController_listNotifications", + "summary": "Get notifications", + "parameters": [ + { + "name": "channels", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ] } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentResponseDto" - } - } + } + }, + { + "name": "templates", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" } } }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" + { + "name": "emails", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "search", + "required": true, + "in": "query", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberIds", + "required": true, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivitiesResponseDto" + } + } + } + }, + "409": { + "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" }, "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" @@ -1516,7 +1639,7 @@ } }, "tags": [ - "Environments" + "Notifications" ], "security": [ { @@ -1525,11 +1648,11 @@ ] } }, - "/v1/environments/api-keys": { + "/v1/notifications/stats": { "get": { - "operationId": "EnvironmentsController_listOrganizationApiKeys", - "x-speakeasy-group": "Environments.ApiKeys", - "summary": "Get api keys", + "operationId": "NotificationsController_getActivityStats", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification statistics", "parameters": [], "responses": { "200": { @@ -1560,10 +1683,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiKey" - } + "$ref": "#/components/schemas/ActivityStatsResponseDto" } } } @@ -1684,7 +1804,7 @@ } }, "tags": [ - "Environments" + "Notifications" ], "security": [ { @@ -1693,16 +1813,25 @@ ] } }, - "/v1/environments/api-keys/regenerate": { - "post": { - "operationId": "EnvironmentsController_regenerateOrganizationApiKeys", - "x-speakeasy-name-override": "regenerate", - "x-speakeasy-group": "Environments.ApiKeys", - "summary": "Regenerate api keys", - "parameters": [], + "/v1/notifications/graph/stats": { + "get": { + "operationId": "NotificationsController_getActivityGraphStats", + "x-speakeasy-name-override": "graph", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification graph statistics", + "parameters": [ + { + "name": "days", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -1731,7 +1860,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/ActivityGraphStatesResponse" } } } @@ -1853,7 +1982,7 @@ } }, "tags": [ - "Environments" + "Notifications" ], "security": [ { @@ -1862,23 +1991,15 @@ ] } }, - "/v1/execution-details": { + "/v1/notifications/{notificationId}": { "get": { - "operationId": "ExecutionDetailsController_getExecutionDetailsForNotification", - "summary": "Get execution details", + "operationId": "NotificationsController_getNotification", + "summary": "Get notification", "parameters": [ { "name": "notificationId", "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "subscriberId", - "required": true, - "in": "query", + "in": "path", "schema": { "type": "string" } @@ -1913,10 +2034,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExecutionDetailsResponseDto" - } + "$ref": "#/components/schemas/ActivityNotificationResponseDto" } } } @@ -2037,7 +2155,7 @@ } }, "tags": [ - "Execution Details" + "Notifications" ], "security": [ { @@ -2046,43 +2164,25 @@ ] } }, - "/v1/workflows": { - "get": { - "operationId": "WorkflowController_listWorkflows", - "summary": "Get workflows", - "description": "Workflows were previously named notification templates", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "query", - "required": false, - "in": "query", - "description": "A query string to filter the results. It allows filtering based on either the name or trigger identifier of the workflow items.", - "schema": { - "type": "string" + "/v1/notification-groups": { + "post": { + "operationId": "NotificationGroupsController_createNotificationGroup", + "summary": "Create workflow group", + "description": "workflow group was previously named notification group", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2109,7 +2209,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowsResponseDto" + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } @@ -2230,7 +2330,7 @@ } }, "tags": [ - "Workflows" + "Workflow groups" ], "security": [ { @@ -2238,24 +2338,14 @@ } ] }, - "post": { - "operationId": "WorkflowController_create", - "summary": "Create workflow", - "description": "Workflow was previously named notification template", + "get": { + "operationId": "NotificationGroupsController_listNotificationGroups", + "summary": "Get workflow groups", + "description": "workflow group was previously named notification group", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWorkflowRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2282,7 +2372,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationGroupResponseDto" + } } } } @@ -2403,7 +2496,7 @@ } }, "tags": [ - "Workflows" + "Workflow groups" ], "security": [ { @@ -2412,14 +2505,14 @@ ] } }, - "/v1/workflows/{workflowId}": { - "put": { - "operationId": "WorkflowController_updateWorkflowById", - "summary": "Update workflow", - "description": "Workflow was previously named notification template", + "/v1/notification-groups/{id}": { + "get": { + "operationId": "NotificationGroupsController_getNotificationGroup", + "summary": "Get workflow group", + "description": "workflow group was previously named notification group", "parameters": [ { - "name": "workflowId", + "name": "id", "required": true, "in": "path", "schema": { @@ -2427,16 +2520,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateWorkflowRequestDto" - } - } - } - }, "responses": { "200": { "description": "Ok", @@ -2466,7 +2549,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } @@ -2587,7 +2670,7 @@ } }, "tags": [ - "Workflows" + "Workflow groups" ], "security": [ { @@ -2595,13 +2678,13 @@ } ] }, - "delete": { - "operationId": "WorkflowController_deleteWorkflowById", - "summary": "Delete workflow", - "description": "Workflow was previously named notification template", + "patch": { + "operationId": "NotificationGroupsController_updateNotificationGroup", + "summary": "Update workflow group", + "description": "workflow group was previously named notification group", "parameters": [ { - "name": "workflowId", + "name": "id", "required": true, "in": "path", "schema": { @@ -2609,8 +2692,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" + } + } + } + }, "responses": { "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2634,11 +2728,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataBooleanDto" + "$ref": "#/components/schemas/NotificationGroupResponseDto" } } } @@ -2759,7 +2852,7 @@ } }, "tags": [ - "Workflows" + "Workflow groups" ], "security": [ { @@ -2767,13 +2860,13 @@ } ] }, - "get": { - "operationId": "WorkflowController_getWorkflowById", - "summary": "Get workflow", - "description": "Workflow was previously named notification template", + "delete": { + "operationId": "NotificationGroupsController_deleteNotificationGroup", + "summary": "Delete workflow group", + "description": "workflow group was previously named notification group", "parameters": [ { - "name": "workflowId", + "name": "id", "required": true, "in": "path", "schema": { @@ -2810,7 +2903,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "$ref": "#/components/schemas/DeleteNotificationGroupResponseDto" } } } @@ -2931,7 +3024,7 @@ } }, "tags": [ - "Workflows" + "Workflow groups" ], "security": [ { @@ -2940,16 +3033,15 @@ ] } }, - "/v1/workflows/variables": { + "/v1/integrations": { "get": { - "operationId": "WorkflowController_getWorkflowVariables", - "x-speakeasy-group": "Workflows.Variables", - "summary": "Get available variables", - "description": "Get the variables that can be used in the workflow", + "operationId": "IntegrationsController_listIntegrations", + "summary": "Get integrations", + "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [], "responses": { "200": { - "description": "Ok", + "description": "The list of integrations belonging to the organization that are successfully returned.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -2976,7 +3068,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VariablesResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } @@ -3097,44 +3192,32 @@ } }, "tags": [ - "Workflows" + "Integrations" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/workflows/{workflowId}/status": { - "put": { - "operationId": "WorkflowController_updateActiveStatus", - "x-speakeasy-group": "Workflows.Status", - "summary": "Update workflow status", - "description": "Workflow was previously named notification template", - "parameters": [ - { - "name": "workflowId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], + }, + "post": { + "operationId": "IntegrationsController_createIntegration", + "summary": "Create integration", + "description": "Create an integration for the current environment the user is based on the API key provided", + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangeWorkflowStatusRequestDto" + "$ref": "#/components/schemas/CreateIntegrationRequestDto" } } } }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -3161,7 +3244,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowResponse" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } @@ -3282,7 +3365,7 @@ } }, "tags": [ - "Workflows" + "Integrations" ], "security": [ { @@ -3291,30 +3374,16 @@ ] } }, - "/v1/events/trigger": { - "post": { - "operationId": "EventsController_trigger", - "x-speakeasy-group": "", - "x-speakeasy-usage-example": { - "title": "Trigger Notification Event" - }, - "x-speakeasy-name-override": "trigger", - "summary": "Trigger event", - "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", + "/v1/integrations/active": { + "get": { + "operationId": "IntegrationsController_getActiveIntegrations", + "x-speakeasy-name-override": "listActive", + "summary": "Get active integrations", + "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventRequestDto" - } - } - } - }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "The list of active integrations belonging to the organization that are successfully returned.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -3341,7 +3410,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } @@ -3462,7 +3534,7 @@ } }, "tags": [ - "Events" + "Integrations" ], "security": [ { @@ -3471,26 +3543,25 @@ ] } }, - "/v1/events/trigger/bulk": { - "post": { - "operationId": "EventsController_triggerBulk", - "x-speakeasy-name-override": "triggerBulk", - "summary": "Bulk trigger event", - "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkTriggerEventDto" - } + "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { + "get": { + "operationId": "IntegrationsController_getWebhookSupportStatus", + "x-speakeasy-group": "Integrations.Webhooks", + "summary": "Get webhook support status for provider", + "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", + "parameters": [ + { + "name": "providerOrIntegrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "The status of the webhook for the provider requested", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -3517,10 +3588,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } + "type": "boolean" } } } @@ -3641,7 +3709,7 @@ } }, "tags": [ - "Events" + "Integrations" ], "security": [ { @@ -3650,19 +3718,26 @@ ] } }, - "/v1/events/trigger/broadcast": { - "post": { - "operationId": "EventsController_broadcastEventToAll", - "x-speakeasy-name-override": "triggerBroadcast", - "summary": "Broadcast event to all", - "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", - "parameters": [], + "/v1/integrations/{integrationId}": { + "put": { + "operationId": "IntegrationsController_updateIntegrationById", + "summary": "Update integration", + "parameters": [ + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventToAllRequestDto" + "$ref": "#/components/schemas/UpdateIntegrationRequestDto" } } } @@ -3696,18 +3771,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerEventResponseDto" - } + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" } } }, @@ -3827,24 +3918,20 @@ } }, "tags": [ - "Events" + "Integrations" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/events/trigger/{transactionId}": { + }, "delete": { - "operationId": "EventsController_cancel", - "x-speakeasy-name-override": "cancel", - "summary": "Cancel triggered event", - "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", + "operationId": "IntegrationsController_removeIntegration", + "summary": "Delete integration", "parameters": [ { - "name": "transactionId", + "name": "integrationId", "required": true, "in": "path", "schema": { @@ -3854,6 +3941,7 @@ ], "responses": { "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -3877,11 +3965,13 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataBooleanDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } } } } @@ -4002,7 +4092,7 @@ } }, "tags": [ - "Events" + "Integrations" ], "security": [ { @@ -4011,91 +4101,24 @@ ] } }, - "/v1/notifications": { - "get": { - "operationId": "NotificationsController_listNotifications", - "summary": "Get notifications", + "/v1/integrations/{integrationId}/set-primary": { + "post": { + "operationId": "IntegrationsController_setIntegrationAsPrimary", + "x-speakeasy-name-override": "setAsPrimary", + "summary": "Set integration as primary", "parameters": [ { - "name": "channels", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ] - } - } - }, - { - "name": "templates", + "name": "integrationId", "required": true, - "in": "query", + "in": "path", "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "emails", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "search", - "required": true, - "in": "query", - "deprecated": true, - "schema": { - "type": "string" - } - }, - { - "name": "subscriberIds", - "required": true, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "default": 0, - "type": "number" - } - }, - { - "name": "transactionId", - "required": false, - "in": "query", - "schema": { - "type": "string" + "type": "string" } } ], "responses": { "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4119,15 +4142,40 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" + "$ref": "#/components/schemas/IntegrationResponseDto" } } } }, + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": { @@ -4244,7 +4292,7 @@ } }, "tags": [ - "Notifications" + "Integrations" ], "security": [ { @@ -4253,15 +4301,51 @@ ] } }, - "/v1/notifications/stats": { + "/v1/subscribers": { "get": { - "operationId": "NotificationsController_getActivityStats", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification statistics", - "parameters": [], + "operationId": "SubscribersController_listSubscribers", + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "limit", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data.resultArray" + } + }, + "summary": "Get subscribers", + "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + } + ], "responses": { "200": { - "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4285,10 +4369,25 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityStatsResponseDto" + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + } + ] } } } @@ -4409,34 +4508,32 @@ } }, "tags": [ - "Notifications" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/notifications/graph/stats": { - "get": { - "operationId": "NotificationsController_getActivityGraphStats", - "x-speakeasy-name-override": "graph", - "x-speakeasy-group": "Notifications.Stats", - "summary": "Get notification graph statistics", - "parameters": [ - { - "name": "days", - "required": false, - "in": "query", - "schema": { - "type": "number" + }, + "post": { + "operationId": "SubscribersController_createSubscriber", + "summary": "Create subscriber", + "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriberRequestDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", + "201": { + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4463,10 +4560,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActivityGraphStatesResponse" - } + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -4587,7 +4681,7 @@ } }, "tags": [ - "Notifications" + "Subscribers" ], "security": [ { @@ -4596,18 +4690,28 @@ ] } }, - "/v1/notifications/{notificationId}": { + "/v1/subscribers/{subscriberId}": { "get": { - "operationId": "NotificationsController_getNotification", - "summary": "Get notification", + "operationId": "SubscribersController_getSubscriber", + "summary": "Get subscriber", + "description": "Get subscriber by your internal id used to identify the subscriber", "parameters": [ { - "name": "notificationId", + "name": "subscriberId", "required": true, "in": "path", "schema": { "type": "string" } + }, + { + "name": "includeTopics", + "required": false, + "in": "query", + "description": "Includes the topics associated with the subscriber", + "schema": { + "type": "string" + } } ], "responses": { @@ -4639,7 +4743,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityNotificationResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -4760,34 +4864,41 @@ } }, "tags": [ - "Notifications" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/notification-groups": { - "post": { - "operationId": "NotificationGroupsController_createNotificationGroup", - "summary": "Create workflow group", - "description": "workflow group was previously named notification group", - "parameters": [], + }, + "put": { + "operationId": "SubscribersController_updateSubscriber", + "summary": "Update subscriber", + "description": "Used to update the subscriber entity with new information", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -4814,7 +4925,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -4935,7 +5046,7 @@ } }, "tags": [ - "Workflow groups" + "Subscribers" ], "security": [ { @@ -4943,11 +5054,20 @@ } ] }, - "get": { - "operationId": "NotificationGroupsController_listNotificationGroups", - "summary": "Get workflow groups", - "description": "workflow group was previously named notification group", - "parameters": [], + "delete": { + "operationId": "SubscribersController_removeSubscriber", + "summary": "Delete subscriber", + "description": "Deletes a subscriber entity from the Novu platform", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Ok", @@ -4977,10 +5097,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" - } + "$ref": "#/components/schemas/DeleteSubscriberResponseDto" } } } @@ -5101,7 +5218,7 @@ } }, "tags": [ - "Workflow groups" + "Subscribers" ], "security": [ { @@ -5110,54 +5227,26 @@ ] } }, - "/v1/notification-groups/{id}": { - "get": { - "operationId": "NotificationGroupsController_getNotificationGroup", - "summary": "Get workflow group", - "description": "workflow group was previously named notification group", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" + "/v1/subscribers/bulk": { + "post": { + "operationId": "SubscribersController_bulkCreateSubscribers", + "x-speakeasy-name-override": "createBulk", + "summary": "Bulk create subscribers", + "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSubscriberCreateDto" + } } } - ], + }, "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" - } - } - } + "201": { + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -5275,21 +5364,24 @@ } }, "tags": [ - "Workflow groups" + "Subscribers" ], "security": [ { "api-key": [] } ] - }, - "patch": { - "operationId": "NotificationGroupsController_updateNotificationGroup", - "summary": "Update workflow group", - "description": "workflow group was previously named notification group", + } + }, + "/v1/subscribers/{subscriberId}/credentials": { + "put": { + "operationId": "SubscribersController_updateSubscriberChannel", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Update subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", "parameters": [ { - "name": "id", + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -5302,7 +5394,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNotificationGroupRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" } } } @@ -5336,7 +5428,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotificationGroupResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -5457,7 +5549,7 @@ } }, "tags": [ - "Workflow groups" + "Subscribers" ], "security": [ { @@ -5465,13 +5557,15 @@ } ] }, - "delete": { - "operationId": "NotificationGroupsController_deleteNotificationGroup", - "summary": "Delete workflow group", - "description": "workflow group was previously named notification group", + "patch": { + "operationId": "SubscribersController_modifySubscriberChannel", + "x-speakeasy-name-override": "append", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Modify subscriber credentials", + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n This endpoint appends provided credentials and deviceTokens to the existing ones.", "parameters": [ { - "name": "id", + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -5479,6 +5573,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + } + } + } + }, "responses": { "200": { "description": "Ok", @@ -5508,7 +5612,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteNotificationGroupResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -5629,7 +5733,7 @@ } }, "tags": [ - "Workflow groups" + "Subscribers" ], "security": [ { @@ -5638,15 +5742,32 @@ ] } }, - "/v1/integrations": { - "get": { - "operationId": "IntegrationsController_listIntegrations", - "summary": "Get integrations", - "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", - "parameters": [], + "/v1/subscribers/{subscriberId}/credentials/{providerId}": { + "delete": { + "operationId": "SubscribersController_deleteSubscriberCredentials", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Delete subscriber credentials by providerId", + "description": "Delete subscriber credentials such as slack and expo tokens.", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { - "200": { - "description": "The list of integrations belonging to the organization that are successfully returned.", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -5670,16 +5791,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } - } - } - } + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -5797,32 +5909,45 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { "api-key": [] } ] - }, - "post": { - "operationId": "IntegrationsController_createIntegration", - "summary": "Create integration", - "description": "Create an integration for the current environment the user is based on the API key provided", - "parameters": [], + } + }, + "/v1/subscribers/{subscriberId}/online-status": { + "patch": { + "operationId": "SubscribersController_updateSubscriberOnlineFlag", + "x-speakeasy-name-override": "updateOnlineFlag", + "x-speakeasy-group": "Subscribers.properties", + "summary": "Update subscriber online status", + "description": "Used to update the subscriber isOnline flag.", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateIntegrationRequestDto" + "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" } } } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -5849,7 +5974,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "$ref": "#/components/schemas/SubscriberResponseDto" } } } @@ -5970,7 +6095,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -5979,16 +6104,33 @@ ] } }, - "/v1/integrations/active": { + "/v1/subscribers/{subscriberId}/preferences": { "get": { - "operationId": "IntegrationsController_getActiveIntegrations", - "x-speakeasy-name-override": "listActive", - "summary": "Get active integrations", - "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", - "parameters": [], + "operationId": "SubscribersController_listSubscriberPreferences", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { - "description": "The list of active integrations belonging to the organization that are successfully returned.", + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6017,7 +6159,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } @@ -6139,24 +6281,22 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { - "get": { - "operationId": "IntegrationsController_getWebhookSupportStatus", - "x-speakeasy-group": "Integrations.Webhooks", - "summary": "Get webhook support status for provider", - "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberGlobalPreferences", + "x-speakeasy-name-override": "updateGlobal", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber global preferences", "parameters": [ { - "name": "providerOrIntegrationId", + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -6164,9 +6304,19 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" + } + } + } + }, "responses": { "200": { - "description": "The status of the webhook for the provider requested", + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6193,7 +6343,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } @@ -6314,7 +6464,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -6323,30 +6473,44 @@ ] } }, - "/v1/integrations/{integrationId}": { - "put": { - "operationId": "IntegrationsController_updateIntegrationById", - "summary": "Update integration", + "/v1/subscribers/{subscriberId}/preferences/{parameter}": { + "get": { + "operationId": "SubscribersController_getSubscriberPreferenceByLevel", + "x-speakeasy-name-override": "retrieveByLevel", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences by level", "parameters": [ { - "name": "integrationId", + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + }, + { + "name": "parameter", "required": true, "in": "path", + "description": "the preferences level to be retrieved (template / global) ", "schema": { + "enum": [ + "global", + "template" + ], "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIntegrationRequestDto" - } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "Ok", @@ -6376,37 +6540,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" + } } } } }, - "404": { - "description": "The integration with the integrationId provided does not exist in the database.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": { @@ -6523,7 +6664,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -6531,12 +6672,21 @@ } ] }, - "delete": { - "operationId": "IntegrationsController_removeIntegration", - "summary": "Delete integration", + "patch": { + "operationId": "SubscribersController_updateSubscriberPreference", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber preference", "parameters": [ { - "name": "integrationId", + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "parameter", "required": true, "in": "path", "schema": { @@ -6544,6 +6694,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + } + } + } + }, "responses": { "200": { "description": "Ok", @@ -6573,10 +6733,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" } } } @@ -6697,7 +6854,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -6706,24 +6863,67 @@ ] } }, - "/v1/integrations/{integrationId}/set-primary": { - "post": { - "operationId": "IntegrationsController_setIntegrationAsPrimary", - "x-speakeasy-name-override": "setAsPrimary", - "summary": "Set integration as primary", + "/v1/subscribers/{subscriberId}/notifications/feed": { + "get": { + "operationId": "SubscribersController_getNotificationsFeed", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get in-app notification feed for a particular subscriber", "parameters": [ { - "name": "integrationId", + "name": "subscriberId", "required": true, "in": "path", "schema": { "type": "string" } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + }, + { + "name": "read", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "seen", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "payload", + "required": false, + "in": "query", + "description": "Base64 encoded string of the partial payload JSON object", + "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6747,50 +6947,29 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" - } - } - } - }, - "201": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IntegrationResponseDto" + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeedResponseDto" + } + } + } + } + ] } } } }, - "404": { - "description": "The integration with the integrationId provided does not exist in the database.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": { @@ -6907,7 +7086,7 @@ } }, "tags": [ - "Integrations" + "Subscribers" ], "security": [ { @@ -6916,41 +7095,41 @@ ] } }, - "/v1/changes": { + "/v1/subscribers/{subscriberId}/notifications/unseen": { "get": { - "operationId": "ChangesController_getChanges", - "summary": "Get changes", + "operationId": "SubscribersController_getUnseenCount", + "x-speakeasy-name-override": "unseenCount", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get the unseen in-app notifications count for subscribers feed", "parameters": [ { - "name": "page", - "required": false, + "name": "seen", + "required": true, "in": "query", "schema": { - "type": "number" + "type": "boolean" } }, { - "name": "limit", - "required": false, - "in": "query", + "name": "subscriberId", + "required": true, + "in": "path", "schema": { - "maximum": 100, - "default": 10, - "type": "number" + "type": "string" } }, { - "name": "promoted", + "name": "limit", "required": true, "in": "query", "schema": { - "default": "false", - "type": "string" + "type": "number" } } ], "responses": { "200": { + "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -6974,11 +7153,10 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangesResponseDto" + "$ref": "#/components/schemas/UnseenCountResponse" } } } @@ -7099,7 +7277,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -7108,42 +7286,42 @@ ] } }, - "/v1/changes/count": { - "get": { - "operationId": "ChangesController_getChangesCount", - "x-speakeasy-name-override": "count", - "summary": "Get changes count", - "parameters": [], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" + "/v1/subscribers/{subscriberId}/messages/mark-as": { + "post": { + "operationId": "SubscribersController_markMessagesAs", + "x-speakeasy-name-override": "markAllAs", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark a subscriber messages as seen, read, unseen or unread", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageMarkAsRequestDto" } - }, + } + } + }, + "responses": { + "201": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataNumberDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageEntity" + } } } } @@ -7264,7 +7442,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -7273,55 +7451,39 @@ ] } }, - "/v1/changes/bulk/apply": { + "/v1/subscribers/{subscriberId}/messages/mark-all": { "post": { - "operationId": "ChangesController_bulkApplyDiff", - "x-speakeasy-name-override": "applyBulk", - "summary": "Apply changes", - "parameters": [], + "operationId": "SubscribersController_markAllUnreadAsRead", + "x-speakeasy-name-override": "markAll", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkApplyChangeDto" + "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" } } } }, "responses": { "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeResponseDto" - } + "type": "number" } } } @@ -7442,7 +7604,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -7451,14 +7613,31 @@ ] } }, - "/v1/changes/{changeId}/apply": { + "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { "post": { - "operationId": "ChangesController_applyDiff", - "x-speakeasy-name-override": "apply", - "summary": "Apply change", + "operationId": "SubscribersController_markActionAsSeen", + "x-speakeasy-name-override": "updateAsSeen", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark message action as seen", "parameters": [ { - "name": "changeId", + "name": "messageId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "required": true, + "in": "path", + "schema": { + + } + }, + { + "name": "subscriberId", "required": true, "in": "path", "schema": { @@ -7466,6 +7645,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" + } + } + } + }, "responses": { "201": { "description": "Created", @@ -7495,10 +7684,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeResponseDto" - } + "$ref": "#/components/schemas/MessageResponseDto" } } } @@ -7619,7 +7805,7 @@ } }, "tags": [ - "Changes" + "Subscribers" ], "security": [ { @@ -7628,93 +7814,69 @@ ] } }, - "/v1/subscribers": { + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { "get": { - "operationId": "SubscribersController_listSubscribers", - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data.resultArray" - } - }, - "summary": "Get subscribers", - "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + "operationId": "SubscribersController_chatOauthCallback", + "x-speakeasy-name-override": "chatAccessOauthCallBack", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle providers oauth redirect", "parameters": [ { - "name": "page", - "required": false, + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": { + + } + }, + { + "name": "code", + "required": true, "in": "query", "schema": { - "type": "number" + "type": "string" } }, { - "name": "limit", + "name": "hmacHash", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", "required": false, "in": "query", "schema": { - "maximum": 100, - "default": 10, - "type": "number" + "type": "string" } } ], "responses": { "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, "description": "", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } - } - ] + "type": "object" } } } @@ -7842,55 +8004,59 @@ "api-key": [] } ] - }, - "post": { - "operationId": "SubscribersController_createSubscriber", - "summary": "Create subscriber", - "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSubscriberRequestDto" - } + } + }, + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { + "get": { + "operationId": "SubscribersController_chatAccessOauth", + "x-speakeasy-name-override": "chatAccessOauth", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle chat oauth", + "parameters": [ + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": { + + } + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } + "200": { + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -8017,24 +8183,67 @@ ] } }, - "/v1/subscribers/{subscriberId}": { + "/v1/messages": { "get": { - "operationId": "SubscribersController_getSubscriber", - "summary": "Get subscriber", - "description": "Get subscriber by your internal id used to identify the subscriber", + "operationId": "MessagesController_getMessages", + "summary": "Get messages", + "description": "Returns a list of messages, could paginate using the `page` query parameter", "parameters": [ + { + "name": "channel", + "required": false, + "in": "query", + "schema": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" + } + }, { "name": "subscriberId", - "required": true, - "in": "path", + "required": false, + "in": "query", "schema": { "type": "string" } + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "default": 10, + "type": "number" + } } ], "responses": { "200": { - "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8058,10 +8267,11 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/ActivitiesResponseDto" } } } @@ -8182,21 +8392,23 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { "api-key": [] } ] - }, - "put": { - "operationId": "SubscribersController_updateSubscriber", - "summary": "Update subscriber", - "description": "Used to update the subscriber entity with new information", + } + }, + "/v1/messages/{messageId}": { + "delete": { + "operationId": "MessagesController_deleteMessage", + "summary": "Delete message", + "description": "Deletes a message entity from the Novu platform", "parameters": [ { - "name": "subscriberId", + "name": "messageId", "required": true, "in": "path", "schema": { @@ -8204,16 +8416,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberRequestDto" - } - } - } - }, "responses": { "200": { "description": "Ok", @@ -8243,7 +8445,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/DeleteMessageResponseDto" } } } @@ -8364,21 +8566,40 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { "api-key": [] } ] - }, + } + }, + "/v1/messages/transaction/{transactionId}": { "delete": { - "operationId": "SubscribersController_removeSubscriber", - "summary": "Delete subscriber", - "description": "Deletes a subscriber entity from the Novu platform", + "operationId": "MessagesController_deleteMessagesByTransactionId", + "x-speakeasy-name-override": "deleteByTransactionId", + "summary": "Delete messages by transactionId", + "description": "Deletes messages entity from the Novu platform using TransactionId of message", "parameters": [ { - "name": "subscriberId", + "name": "channel", + "required": false, + "in": "query", + "description": "The channel of the message to be deleted", + "schema": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" + } + }, + { + "name": "transactionId", "required": true, "in": "path", "schema": { @@ -8387,8 +8608,7 @@ } ], "responses": { - "200": { - "description": "Ok", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8412,13 +8632,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteSubscriberResponseDto" - } - } - } + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -8536,7 +8750,7 @@ } }, "tags": [ - "Subscribers" + "Messages" ], "security": [ { @@ -8545,29 +8759,25 @@ ] } }, - "/v1/subscribers/bulk": { + "/v1/topics": { "post": { - "operationId": "SubscribersController_bulkCreateSubscribers", - "x-speakeasy-name-override": "createBulk", - "summary": "Bulk create subscribers", - "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", + "operationId": "TopicsController_createTopic", + "summary": "Topic creation", + "description": "Create a topic", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkSubscriberCreateDto" + "$ref": "#/components/schemas/CreateTopicRequestDto" } } } }, "responses": { "201": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "description": "Created", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8589,25 +8799,18 @@ }, "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" } }, "content": { "application/json": { "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" + "$ref": "#/components/schemas/CreateTopicResponseDto" } } } }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", + "409": { + "description": "The request could not be completed due to a conflict with the current state of the target resource.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8632,19 +8835,22 @@ }, "Retry-After": { "$ref": "#/components/headers/Retry-After" + }, + "Link": { + "$ref": "#/components/headers/Link" } }, "content": { "application/json": { "schema": { "type": "string", - "example": "API rate limit exceeded" + "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" } } } }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "429": { + "description": "The client has sent too many requests in a given amount of time. ", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8675,51 +8881,97 @@ "application/json": { "schema": { "type": "string", - "example": "Please wait some time, then try again." + "example": "API rate limit exceeded" } } } - } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/credentials": { - "put": { - "operationId": "SubscribersController_updateSubscriberChannel", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Update subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", + }, + "get": { + "operationId": "TopicsController_listTopics", + "summary": "Filter topics", + "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", + "name": "page", + "required": false, + "in": "query", + "description": "Number of page for the pagination", + "schema": { + "minimum": 0, + "default": 0, + "type": "number" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Size of page for the pagination", + "schema": { + "minimum": 0, + "default": 10, + "type": "number" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Topic key", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" - } - } - } - }, "responses": { "200": { - "description": "Ok", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8743,10 +8995,11 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "$ref": "#/components/schemas/FilterTopicsResponseDto" } } } @@ -8867,25 +9120,28 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { "api-key": [] } ] - }, - "patch": { - "operationId": "SubscribersController_modifySubscriberChannel", - "x-speakeasy-name-override": "append", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Modify subscriber credentials", - "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n This endpoint appends provided credentials and deviceTokens to the existing ones.", + } + }, + "/v1/topics/{topicKey}/subscribers": { + "post": { + "operationId": "TopicsController_addSubscribers", + "x-speakeasy-name-override": "assign", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers addition", + "description": "Add subscribers to a topic by key", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } @@ -8896,14 +9152,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + "$ref": "#/components/schemas/AddSubscribersRequestDto" } } } }, "responses": { - "200": { - "description": "Ok", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -8927,13 +9182,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -9051,7 +9300,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -9060,56 +9309,42 @@ ] } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}": { - "delete": { - "operationId": "SubscribersController_deleteSubscriberCredentials", - "x-speakeasy-group": "Subscribers.Credentials", - "summary": "Delete subscriber credentials by providerId", - "description": "Delete subscriber credentials such as slack and expo tokens.", + "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { + "get": { + "operationId": "TopicsController_getTopicSubscriber", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Check topic subscriber", + "description": "Check if a subscriber belongs to a certain topic", "parameters": [ { - "name": "subscriberId", + "name": "externalSubscriberId", "required": true, "in": "path", + "description": "The external subscriber id", "schema": { "type": "string" } }, { - "name": "providerId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } } ], "responses": { - "204": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicSubscriberDto" + } } - }, - "description": "" + } }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -9227,7 +9462,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -9236,18 +9471,18 @@ ] } }, - "/v1/subscribers/{subscriberId}/online-status": { - "patch": { - "operationId": "SubscribersController_updateSubscriberOnlineFlag", - "x-speakeasy-name-override": "updateOnlineFlag", - "x-speakeasy-group": "Subscribers.properties", - "summary": "Update subscriber online status", - "description": "Used to update the subscriber isOnline flag.", + "/v1/topics/{topicKey}/subscribers/removal": { + "post": { + "operationId": "TopicsController_removeSubscribers", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers removal", + "description": "Remove subscribers from a topic", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } @@ -9258,14 +9493,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" + "$ref": "#/components/schemas/RemoveSubscribersRequestDto" } } } }, "responses": { - "200": { - "description": "Ok", + "204": { "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9289,13 +9523,7 @@ "$ref": "#/components/headers/Idempotency-Replay" } }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriberResponseDto" - } - } - } + "description": "" }, "409": { "description": "The request could not be completed due to a conflict with the current state of the target resource.", @@ -9413,7 +9641,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -9422,24 +9650,25 @@ ] } }, - "/v1/subscribers/{subscriberId}/preferences": { - "get": { - "operationId": "SubscribersController_listSubscriberPreferences", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences", + "/v1/topics/{topicKey}": { + "delete": { + "operationId": "TopicsController_deleteTopic", + "summary": "Delete topic", + "description": "Delete a topic by its topic key if it has no subscribers", "parameters": [ { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } } ], "responses": { - "200": { - "description": "Ok", + "204": { + "description": "The topic has been deleted correctly", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9462,20 +9691,10 @@ "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" - } - } - } } }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "404": { + "description": "The topic with the key provided does not exist in the database so it can not be deleted.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9497,168 +9716,11 @@ }, "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "SubscribersController_updateSubscriberGlobalPreferences", - "x-speakeasy-name-override": "updateGlobal", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber global preferences", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" - } } } }, "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", + "description": "The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic.", "headers": { "Content-Type": { "$ref": "#/components/headers/Content-Type" @@ -9680,12 +9742,6 @@ }, "Idempotency-Replay": { "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" } }, "content": { @@ -9773,34 +9829,24 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { "api-key": [] } ] - } - }, - "/v1/subscribers/{subscriberId}/preferences/{parameter}": { + }, "get": { - "operationId": "SubscribersController_getSubscriberPreferenceByLevel", - "x-speakeasy-name-override": "retrieveByLevel", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Get subscriber preferences by level", + "operationId": "TopicsController_getTopic", + "summary": "Get topic", + "description": "Get a topic by its topic key", "parameters": [ { - "name": "parameter", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "subscriberId", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } @@ -9835,10 +9881,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" - } + "$ref": "#/components/schemas/GetTopicResponseDto" } } } @@ -9959,7 +10002,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -9968,22 +10011,16 @@ ] }, "patch": { - "operationId": "SubscribersController_updateSubscriberPreference", - "x-speakeasy-group": "Subscribers.Preferences", - "summary": "Update subscriber preference", + "operationId": "TopicsController_renameTopic", + "x-speakeasy-name-override": "rename", + "summary": "Rename a topic", + "description": "Rename a topic by providing a new name", "parameters": [ { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "parameter", + "name": "topicKey", "required": true, "in": "path", + "description": "The topic key", "schema": { "type": "string" } @@ -9994,7 +10031,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + "$ref": "#/components/schemas/RenameTopicRequestDto" } } } @@ -10028,7 +10065,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + "$ref": "#/components/schemas/RenameTopicResponseDto" } } } @@ -10149,7 +10186,7 @@ } }, "tags": [ - "Subscribers" + "Topics" ], "security": [ { @@ -10157,7324 +10194,311 @@ } ] } + } + }, + "info": { + "title": "Novu API", + "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", + "version": "1.0", + "contact": { + "name": "Novu Support", + "url": "https://discord.gg/novu", + "email": "support@novu.co" }, - "/v1/subscribers/{subscriberId}/notifications/feed": { - "get": { - "operationId": "SubscribersController_getNotificationsFeed", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get in-app notification feed for a particular subscriber", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - }, - { - "name": "read", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "seen", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "payload", - "required": false, - "in": "query", - "description": "Base64 encoded string of the partial payload JSON object", - "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - ] - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + "termsOfService": "https://novu.co/terms", + "license": { + "name": "MIT", + "url": "https://opensource.org/license/mit" + } + }, + "tags": [ + { + "name": "Events", + "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" } }, - "/v1/subscribers/{subscriberId}/notifications/unseen": { - "get": { - "operationId": "SubscribersController_getUnseenCount", - "x-speakeasy-name-override": "unseenCount", - "x-speakeasy-group": "Subscribers.Notifications", - "summary": "Get the unseen in-app notifications count for subscribers feed", - "parameters": [ - { - "name": "seen", - "required": true, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": true, - "in": "query", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnseenCountResponse" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Subscribers", + "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/subscribers" } }, - "/v1/subscribers/{subscriberId}/messages/mark-as": { - "post": { - "operationId": "SubscribersController_markMessagesAs", - "x-speakeasy-name-override": "markAllAs", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark a subscriber messages as seen, read, unseen or unread", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageMarkAsRequestDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageEntity" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Topics", + "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/topics" } }, - "/v1/subscribers/{subscriberId}/messages/mark-all": { - "post": { - "operationId": "SubscribersController_markAllUnreadAsRead", - "x-speakeasy-name-override": "markAll", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Notification", + "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", + "externalDocs": { + "url": "https://docs.novu.co/getting-started/introduction" } }, - "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { - "post": { - "operationId": "SubscribersController_markActionAsSeen", - "x-speakeasy-name-override": "updateAsSeen", - "x-speakeasy-group": "Subscribers.Messages", - "summary": "Mark message action as seen", - "parameters": [ - { - "name": "messageId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Integrations", + "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", + "externalDocs": { + "url": "https://docs.novu.co/channels-and-providers/integration-store" } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { - "get": { - "operationId": "SubscribersController_chatOauthCallback", - "x-speakeasy-name-override": "chatAccessOauthCallBack", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle providers oauth redirect", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "providerId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "code", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "hmacHash", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Layouts", + "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", + "externalDocs": { + "url": "https://docs.novu.co/content-creation-design/layouts" } }, - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { - "get": { - "operationId": "SubscribersController_chatAccessOauth", - "x-speakeasy-name-override": "chatAccessOauth", - "x-speakeasy-group": "Subscribers.Authentication", - "summary": "Handle chat oauth", - "parameters": [ - { - "name": "subscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "providerId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "hmacHash", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environmentId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "integrationIdentifier", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Subscribers" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Workflows", + "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" } }, - "/v1/feeds": { - "post": { - "operationId": "FeedsController_createFeed", - "summary": "Create feed", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFeedRequestDto" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Feeds" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "FeedsController_getFeeds", - "summary": "Get feeds", - "parameters": [], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Feeds" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Notification Templates", + "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name." + }, + { + "name": "Workflow groups", + "description": "Workflow groups are used to organize workflows into logical groups." + }, + { + "name": "Changes", + "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production" } }, - "/v1/feeds/{feedId}": { - "delete": { - "operationId": "FeedsController_deleteFeedById", - "summary": "Delete feed", - "parameters": [ - { - "name": "feedId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FeedResponseDto" - } - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Feeds" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Environments", + "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments" } }, - "/v1/layouts": { - "post": { - "operationId": "LayoutsController_PropertyDescriptor", - "x-speakeasy-name-override": "create", - "summary": "Layout creation", - "description": "Create a layout", - "parameters": [], - "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLayoutResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "LayoutsController_listLayouts", - "summary": "Filter layouts", - "description": "Returns a list of layouts that can be paginated using the `page` query parameter and filtered by the environment where it is executed from the organization the user belongs to.", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "description": "Number of page for pagination", - "schema": { - "minimum": 0, - "type": "number" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Size of page for pagination", - "schema": { - "minimum": 0, - "type": "number" - } - }, - { - "name": "sortBy", - "required": false, - "in": "query", - "description": "Sort field. Currently only supported `createdAt`", - "schema": { - "type": "string" - } - }, - { - "name": "orderBy", - "required": false, - "in": "query", - "description": "Direction of the sorting query param", - "schema": { - "enum": [ - "ASC", - "DESC" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The list of layouts that match the criteria of the query params are successfully returned.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "400": { - "description": "Page size can not be larger than the page size limit.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] + { + "name": "Inbound Parse", + "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", + "externalDocs": { + "url": "https://docs.novu.co/platform/inbound-parse-webhook" } }, - "/v1/layouts/{layoutId}": { - "get": { - "operationId": "LayoutsController_getLayout", - "summary": "Get layout", - "description": "Get a layout by its ID", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLayoutResponseDto" - } - } - } - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "delete": { - "operationId": "LayoutsController_deleteLayout", - "summary": "Delete layout", - "description": "Execute a soft delete of a layout given a certain ID.", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The layout has been deleted correctly", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be deleted.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "Either you are trying to delete a layout that is being used or a layout that is the default in the environment.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "LayoutsController_updateLayout", - "summary": "Update a layout", - "description": "Update the name, content and variables of a layout. Also change it to be default or no.", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLayoutRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLayoutResponseDto" - } - } - } - }, - "400": { - "description": "The payload provided or the URL param are not right.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be updated.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "One default layout is needed. If you are trying to turn a default layout as not default, you should turn a different layout as default first and automatically it will be done by the system.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "example": "One default layout is required" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/layouts/{layoutId}/default": { - "post": { - "operationId": "LayoutsController_setDefaultLayout", - "x-speakeasy-name-override": "setAsDefault", - "summary": "Set default layout", - "description": "Sets the default layout for the environment and updates to non default to the existing default layout (if any).", - "parameters": [ - { - "name": "layoutId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The selected layout has been set as the default for the environment.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "404": { - "description": "The layout with the layoutId provided does not exist in the database so it can not be set as the default for the environment.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Layouts" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/messages": { - "get": { - "operationId": "MessagesController_getMessages", - "summary": "Get messages", - "description": "Returns a list of messages, could paginate using the `page` query parameter", - "parameters": [ - { - "name": "channel", - "required": false, - "in": "query", - "schema": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" - } - }, - { - "name": "subscriberId", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "transactionId", - "required": false, - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "default": 0, - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "default": 10, - "type": "number" - } - } - ], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivitiesResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/messages/{messageId}": { - "delete": { - "operationId": "MessagesController_deleteMessage", - "summary": "Delete message", - "description": "Deletes a message entity from the Novu platform", - "parameters": [ - { - "name": "messageId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteMessageResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/messages/transaction/{transactionId}": { - "delete": { - "operationId": "MessagesController_deleteMessagesByTransactionId", - "x-speakeasy-name-override": "deleteByTransactionId", - "summary": "Delete messages by transactionId", - "description": "Deletes messages entity from the Novu platform using TransactionId of message", - "parameters": [ - { - "name": "channel", - "required": false, - "in": "query", - "description": "The channel of the message to be deleted", - "schema": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" - } - }, - { - "name": "transactionId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Messages" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics": { - "post": { - "operationId": "TopicsController_createTopic", - "summary": "Topic creation", - "description": "Create a topic", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTopicRequestDto" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "TopicsController_listTopics", - "summary": "Filter topics", - "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "description": "Number of page for the pagination", - "schema": { - "minimum": 0, - "default": 0, - "type": "number" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Size of page for the pagination", - "schema": { - "minimum": 0, - "default": 10, - "type": "number" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "Topic key", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilterTopicsResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}/subscribers": { - "post": { - "operationId": "TopicsController_addSubscribers", - "x-speakeasy-name-override": "assign", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers addition", - "description": "Add subscribers to a topic by key", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddSubscribersRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "" - }, - "204": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { - "get": { - "operationId": "TopicsController_getTopicSubscriber", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Check topic subscriber", - "description": "Check if a subscriber belongs to a certain topic", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "externalSubscriberId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TopicSubscriberDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}/subscribers/removal": { - "post": { - "operationId": "TopicsController_removeSubscribers", - "x-speakeasy-group": "Topics.Subscribers", - "summary": "Subscribers removal", - "description": "Remove subscribers from a topic", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RemoveSubscribersRequestDto" - } - } - } - }, - "responses": { - "204": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "" - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/topics/{topicKey}": { - "delete": { - "operationId": "TopicsController_deleteTopic", - "summary": "Delete topic", - "description": "Delete a topic by its topic key if it has no subscribers", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The topic has been deleted correctly", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "404": { - "description": "The topic with the key provided does not exist in the database so it can not be deleted.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The topic you are trying to delete has subscribers assigned to it. Delete the subscribers before deleting the topic.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "get": { - "operationId": "TopicsController_getTopic", - "summary": "Get topic", - "description": "Get a topic by its topic key", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "TopicsController_renameTopic", - "x-speakeasy-name-override": "rename", - "summary": "Rename a topic", - "description": "Rename a topic by providing a new name", - "parameters": [ - { - "name": "topicKey", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameTopicResponseDto" - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Topics" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/tenants": { - "get": { - "operationId": "TenantController_listTenants", - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data.resultArray" - } - }, - "summary": "Get tenants", - "description": "Returns a list of tenants, could paginated using the `page` and `limit` query parameter", - "parameters": [ - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "maximum": 100, - "default": 10, - "type": "number" - } - } - ], - "responses": { - "200": { - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginatedResponseDto" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetTenantResponseDto" - } - } - } - } - ] - } - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "post": { - "operationId": "TenantController_createTenant", - "summary": "Create tenant", - "description": "Create tenant under the current environment", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantResponseDto" - } - } - } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantResponseDto" - } - } - } - }, - "409": { - "description": "A tenant with the same identifier is already exist.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - } - }, - "/v1/tenants/{identifier}": { - "get": { - "operationId": "TenantController_getTenantById", - "summary": "Get tenant", - "description": "Get tenant by your internal id used to identify the tenant", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTenantResponseDto" - } - } - } - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "patch": { - "operationId": "TenantController_updateTenant", - "summary": "Update tenant", - "description": "Update tenant by your internal id used to identify the tenant", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Ok", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantResponseDto" - } - } - } - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - }, - "delete": { - "operationId": "TenantController_removeTenant", - "summary": "Delete tenant", - "description": "Deletes a tenant entity from the Novu platform", - "parameters": [ - { - "name": "identifier", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The tenant has been deleted correctly", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "404": { - "description": "The tenant with the identifier provided does not exist in the database so it can not be deleted.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - } - } - }, - "409": { - "description": "The request could not be completed due to a conflict with the current state of the target resource.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - }, - "Link": { - "$ref": "#/components/headers/Link" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Request with key 3909d656-d4fe-4e80-ba86-90d3861afcd7 is currently being processed. Please retry after 1 second" - } - } - } - }, - "429": { - "description": "The client has sent too many requests in a given amount of time. ", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "API rate limit exceeded" - } - } - } - }, - "503": { - "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", - "headers": { - "Content-Type": { - "$ref": "#/components/headers/Content-Type" - }, - "RateLimit-Limit": { - "$ref": "#/components/headers/RateLimit-Limit" - }, - "RateLimit-Remaining": { - "$ref": "#/components/headers/RateLimit-Remaining" - }, - "RateLimit-Reset": { - "$ref": "#/components/headers/RateLimit-Reset" - }, - "RateLimit-Policy": { - "$ref": "#/components/headers/RateLimit-Policy" - }, - "Idempotency-Key": { - "$ref": "#/components/headers/Idempotency-Key" - }, - "Idempotency-Replay": { - "$ref": "#/components/headers/Idempotency-Replay" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/json": { - "schema": { - "type": "string", - "example": "Please wait some time, then try again." - } - } - } - } - }, - "tags": [ - "Tenants" - ], - "security": [ - { - "api-key": [] - } - ] - } - } - }, - "info": { - "title": "Novu API", - "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", - "version": "1.0", - "contact": { - "name": "Novu Support", - "url": "https://discord.gg/novu", - "email": "support@novu.co" - }, - "termsOfService": "https://novu.co/terms", - "license": { - "name": "MIT", - "url": "https://opensource.org/license/mit" - } - }, - "tags": [ - { - "name": "Events", - "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", - "externalDocs": { - "url": "https://docs.novu.co/workflows" - } - }, - { - "name": "Subscribers", - "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", - "externalDocs": { - "url": "https://docs.novu.co/subscribers/subscribers" - } - }, - { - "name": "Topics", - "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", - "externalDocs": { - "url": "https://docs.novu.co/subscribers/topics" - } - }, - { - "name": "Notification", - "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", - "externalDocs": { - "url": "https://docs.novu.co/getting-started/introduction" - } - }, - { - "name": "Integrations", - "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", - "externalDocs": { - "url": "https://docs.novu.co/channels-and-providers/integration-store" - } - }, - { - "name": "Layouts", - "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", - "externalDocs": { - "url": "https://docs.novu.co/content-creation-design/layouts" - } - }, - { - "name": "Workflows", - "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", - "externalDocs": { - "url": "https://docs.novu.co/workflows" - } - }, - { - "name": "Notification Templates", - "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name." - }, - { - "name": "Workflow groups", - "description": "Workflow groups are used to organize workflows into logical groups." - }, - { - "name": "Changes", - "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", - "externalDocs": { - "url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production" - } - }, - { - "name": "Environments", - "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", - "externalDocs": { - "url": "https://docs.novu.co/platform/environments" - } - }, - { - "name": "Inbound Parse", - "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", - "externalDocs": { - "url": "https://docs.novu.co/platform/inbound-parse-webhook" - } - }, - { - "name": "Feeds", - "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", - "externalDocs": { - "url": "https://docs.novu.co/activity-feed" - } - }, - { - "name": "Tenants", - "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", - "externalDocs": { - "url": "https://docs.novu.co/tenants" - } - }, - { - "name": "Messages", - "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", - "externalDocs": { - "url": "https://docs.novu.co/workflows/messages" - } - }, - { - "name": "Organizations", - "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", - "externalDocs": { - "url": "https://docs.novu.co/platform/organizations" - } - }, - { - "name": "Execution Details", - "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", - "externalDocs": { - "url": "https://docs.novu.co/activity-feed" - } - } - ], - "servers": [ - { - "url": "https://api.novu.co" - }, - { - "url": "https://eu.api.novu.co" - } - ], - "components": { - "securitySchemes": { - "api-key": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \"." - } - }, - "schemas": { - "DataWrapperDto": { - "type": "object", - "properties": { - "data": { - "type": "object" - } - }, - "required": [ - "data" - ] - }, - "OrganizationBrandingResponseDto": { - "type": "object", - "properties": { - "direction": { - "enum": [ - "ltr", - "trl" - ], - "type": "string" - }, - "logo": { - "type": "string" - }, - "color": { - "type": "string" - }, - "fontColor": { - "type": "string" - }, - "contentBackground": { - "type": "string" - }, - "fontFamily": { - "type": "string" - } - }, - "required": [ - "logo", - "color", - "fontColor", - "contentBackground" - ] - }, - "IPartnerConfigurationResponseDto": { - "type": "object", - "properties": { - "projectIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "accessToken": { - "type": "string" - }, - "configurationId": { - "type": "string" - }, - "teamId": { - "type": "string" - }, - "partnerType": { - "type": "string", - "enum": [ - "vercel" - ], - "description": "Partner Type Enum" - } - }, - "required": [ - "accessToken", - "configurationId", - "partnerType" - ] - }, - "OrganizationResponseDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "branding": { - "$ref": "#/components/schemas/OrganizationBrandingResponseDto" - }, - "partnerConfigurations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IPartnerConfigurationResponseDto" - } - } - }, - "required": [ - "name", - "branding" - ] - }, - "CreateOrganizationDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "jobTitle": { - "enum": [ - "engineer", - "engineering_manager", - "architect", - "product_manager", - "designer", - "cxo_founder", - "marketing_manager", - "other" - ], - "type": "string" - }, - "domain": { - "type": "string" - }, - "productUseCases": { - "type": "object" - } - }, - "required": [ - "name" - ] - }, - "MemberUserDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "required": [ - "_id", - "firstName", - "lastName", - "email" - ] - }, - "MemberInviteDTO": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "token": { - "type": "string" - }, - "invitationDate": { - "format": "date-time", - "type": "string" - }, - "answerDate": { - "format": "date-time", - "type": "string" - }, - "_inviterId": { - "type": "string" - } - }, - "required": [ - "email", - "token", - "invitationDate", - "_inviterId" - ] - }, - "MemberResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "_userId": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/MemberUserDto" - }, - "roles": { - "enum": [ - "admin", - "member" - ], - "type": "string" - }, - "invite": { - "$ref": "#/components/schemas/MemberInviteDTO" - }, - "memberStatus": { - "enum": [ - "new", - "active", - "invited" - ], - "type": "string" - }, - "_organizationId": { - "type": "string" - } - }, - "required": [ - "_id", - "_userId", - "_organizationId" - ] - }, - "UpdateBrandingDetailsDto": { - "type": "object", - "properties": { - "logo": { - "type": "string" - }, - "color": { - "type": "string" - }, - "fontColor": { - "type": "string" - }, - "contentBackground": { - "type": "string" - }, - "fontFamily": { - "type": "string" - } - }, - "required": [ - "logo", - "color", - "fontColor", - "contentBackground" - ] - }, - "RenameOrganizationDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "EnvironmentResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "apiKeys": { - "type": "array", - "items": { - "type": "object" - } - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "name", - "_organizationId", - "identifier", - "_parentId" - ] - }, - "ApiKey": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "_userId": { - "type": "string" - } - }, - "required": [ - "key", - "_userId" - ] - }, - "ExecutionDetailsResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_jobId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_notificationId": { - "type": "string" - }, - "_notificationTemplateId": { - "type": "string" - }, - "_subscriberId": { - "type": "string" - }, - "_messageId": { - "type": "string" - }, - "providerId": { - "type": "string" - }, - "transactionId": { - "type": "string" - }, - "channel": { - "type": "string", - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push", - "digest", - "trigger", - "delay", - "custom" - ] - }, - "detail": { - "type": "string" - }, - "source": { - "type": "string", - "enum": [ - "Credentials", - "Internal", - "Payload", - "Webhook" - ] - }, - "status": { - "type": "string", - "enum": [ - "Success", - "Warning", - "Failed", - "Pending", - "Queued", - "ReadConfirmation" - ] - }, - "isTest": { - "type": "boolean" - }, - "isRetry": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "_organizationId", - "_jobId", - "_environmentId", - "_notificationId", - "_notificationTemplateId", - "_subscriberId", - "transactionId", - "channel", - "detail", - "source", - "status", - "isTest", - "isRetry" - ] - }, - "NotificationGroup": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "name", - "_environmentId", - "_organizationId" - ] - }, - "PreferenceChannels": { - "type": "object", - "properties": { - "email": { - "type": "boolean" - }, - "sms": { - "type": "boolean" - }, - "in_app": { - "type": "boolean" - }, - "chat": { - "type": "boolean" - }, - "push": { - "type": "boolean" - } - } - }, - "DigestRegularMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "digestKey": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "regular", - "backoff" - ] - }, - "backoff": { - "type": "boolean" - }, - "backoffAmount": { - "type": "number" - }, - "backoffUnit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "updateMode": { - "type": "boolean" - } - }, - "required": [ - "type" - ] - }, - "TimedConfig": { - "type": "object", - "properties": { - "atTime": { - "type": "string" - }, - "weekDays": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday", - "sunday" - ] - } - }, - "monthDays": { - "type": "array", - "items": { - "type": "string" - } - }, - "ordinal": { - "type": "string", - "enum": [ - "1", - "2", - "3", - "4", - "5", - "last" - ] - }, - "ordinalValue": { - "type": "string", - "enum": [ - "day", - "weekday", - "weekend", - "sunday", - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday" - ] - }, - "monthlyType": { - "type": "string", - "enum": [ - "each", - "on" - ] - } - } - }, - "DigestTimedMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "digestKey": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "timed" - ] - }, - "timed": { - "$ref": "#/components/schemas/TimedConfig" - } - }, - "required": [ - "type" - ] - }, - "DelayRegularMetadata": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "unit": { - "type": "string", - "enum": [ - "seconds", - "minutes", - "hours", - "days", - "weeks", - "months" - ] - }, - "type": { - "type": "string", - "enum": [ - "regular" - ] - } - }, - "required": [ - "type" - ] - }, - "DelayScheduledMetadata": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scheduled" - ] - }, - "delayPath": { - "type": "string" - } - }, - "required": [ - "type", - "delayPath" - ] - }, - "MessageTemplate": { - "type": "object", - "properties": {} - }, - "FieldFilterPart": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - }, - "operator": { - "type": "string", - "enum": [ - "LARGER", - "SMALLER", - "LARGER_EQUAL", - "SMALLER_EQUAL", - "EQUAL", - "NOT_EQUAL", - "ALL_IN", - "ANY_IN", - "NOT_IN", - "BETWEEN", - "NOT_BETWEEN", - "LIKE", - "NOT_LIKE", - "IN" - ] - }, - "on": { - "type": "string", - "enum": [ - "subscriber", - "payload" - ] - } - }, - "required": [ - "field", - "value", - "operator", - "on" - ] - }, - "StepFilter": { - "type": "object", - "properties": { - "isNegated": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "BOOLEAN", - "TEXT", - "DATE", - "NUMBER", - "STATEMENT", - "LIST", - "MULTI_LIST", - "GROUP" - ] - }, - "value": { - "type": "string", - "enum": [ - "AND", - "OR" - ] - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FieldFilterPart" - } - } - }, - "required": [ - "isNegated", - "type", - "value", - "children" - ] - }, - "NotificationStepVariant": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_templateId": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "shouldStopOnFail": { - "type": "boolean" - }, - "template": { - "$ref": "#/components/schemas/MessageTemplate" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StepFilter" - } - }, - "_parentId": { - "type": "object" - }, - "metadata": { - "oneOf": [ - { - "$ref": "#/components/schemas/DigestRegularMetadata" - }, - { - "$ref": "#/components/schemas/DigestTimedMetadata" - }, - { - "$ref": "#/components/schemas/DelayRegularMetadata" - }, - { - "$ref": "#/components/schemas/DelayScheduledMetadata" - } - ] - }, - "replyCallback": { - "type": "object" - } - } - }, - "NotificationStep": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "_templateId": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "shouldStopOnFail": { - "type": "boolean" - }, - "template": { - "$ref": "#/components/schemas/MessageTemplate" - }, - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StepFilter" - } - }, - "_parentId": { - "type": "object" - }, - "metadata": { - "oneOf": [ - { - "$ref": "#/components/schemas/DigestRegularMetadata" - }, - { - "$ref": "#/components/schemas/DigestTimedMetadata" - }, - { - "$ref": "#/components/schemas/DelayRegularMetadata" - }, - { - "$ref": "#/components/schemas/DelayScheduledMetadata" - } - ] - }, - "replyCallback": { - "type": "object" - }, - "variants": { - "$ref": "#/components/schemas/NotificationStepVariant" - } - } - }, - "NotificationTriggerVariable": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "NotificationTrigger": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "event" - ] - }, - "identifier": { - "type": "string" - }, - "variables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTriggerVariable" - } - }, - "subscriberVariables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTriggerVariable" - } - } - }, - "required": [ - "type", - "identifier", - "variables" - ] - }, - "WorkflowResponse": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "draft": { - "type": "boolean" - }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" - }, - "critical": { - "type": "boolean" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationStep" - } - }, - "_organizationId": { - "type": "string" - }, - "_creatorId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "triggers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTrigger" - } - }, - "_notificationGroupId": { - "type": "string" - }, - "_parentId": { - "type": "string" - }, - "deleted": { - "type": "boolean" - }, - "deletedAt": { - "type": "string" - }, - "deletedBy": { - "type": "string" - }, - "notificationGroup": { - "$ref": "#/components/schemas/NotificationGroup" - }, - "data": { - "type": "object" - }, - "workflowIntegrationStatus": { - "type": "object" - } - }, - "required": [ - "name", - "description", - "active", - "draft", - "preferenceSettings", - "critical", - "tags", - "steps", - "_organizationId", - "_creatorId", - "_environmentId", - "triggers", - "_notificationGroupId", - "deleted", - "deletedAt", - "deletedBy" - ] - }, - "WorkflowsResponseDto": { - "type": "object", - "properties": { - "totalCount": { - "type": "number" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkflowResponse" - } - }, - "pageSize": { - "type": "number" - }, - "page": { - "type": "number" + { + "name": "Feeds", + "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + }, + { + "name": "Tenants", + "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", + "externalDocs": { + "url": "https://docs.novu.co/tenants" + } + }, + { + "name": "Messages", + "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", + "externalDocs": { + "url": "https://docs.novu.co/workflows/messages" + } + }, + { + "name": "Organizations", + "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", + "externalDocs": { + "url": "https://docs.novu.co/platform/organizations" + } + }, + { + "name": "Execution Details", + "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + } + ], + "servers": [ + { + "url": "https://api.novu.co" + }, + { + "url": "https://eu.api.novu.co" + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \u003Capi_key\u003E\"." + } + }, + "schemas": { + "DataWrapperDto": { + "type": "object", + "properties": { + "data": { + "type": "object" } }, "required": [ - "totalCount", - "data", - "pageSize", - "page" + "data" ] }, - "UpdateWorkflowRequestDto": { + "EnvironmentResponseDto": { "type": "object", "properties": { - "name": { + "_id": { "type": "string" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string" }, - "description": { - "type": "string", - "maxLength": 300 + "_organizationId": { + "type": "string" }, "identifier": { "type": "string" }, - "steps": { + "apiKeys": { "type": "array", "items": { - "$ref": "#/components/schemas/NotificationStep" + "type": "string" } }, - "notificationGroupId": { + "_parentId": { "type": "string" }, - "critical": { - "type": "boolean" - }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" - }, - "data": { - "type": "object" + "slug": { + "type": "string" } }, "required": [ "name", - "notificationGroupId" - ] - }, - "DataBooleanDto": { - "type": "object", - "properties": { - "data": { - "type": "boolean" - } - }, - "required": [ - "data" + "_organizationId", + "identifier", + "_parentId" ] }, - "VariablesResponseDto": { + "ApiKey": { "type": "object", "properties": { - "translations": { - "type": "object" + "key": { + "type": "string" }, - "system": { - "type": "object" + "_userId": { + "type": "string" } }, "required": [ - "translations", - "system" + "key", + "_userId" ] }, - "CreateWorkflowRequestDto": { + "ExecutionDetailsResponseDto": { "type": "object", "properties": { - "name": { + "_id": { "type": "string" }, - "notificationGroupId": { + "_organizationId": { "type": "string" }, - "notificationGroup": { - "type": "object" + "_jobId": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "_environmentId": { + "type": "string" }, - "description": { - "type": "string", - "maxLength": 1000 + "_notificationId": { + "type": "string" }, - "steps": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationStep" - } + "_notificationTemplateId": { + "type": "string" }, - "active": { - "type": "boolean" + "_subscriberId": { + "type": "string" }, - "draft": { - "type": "boolean", - "deprecated": true + "_messageId": { + "type": "string" }, - "critical": { - "type": "boolean" + "providerId": { + "type": "string" }, - "preferenceSettings": { - "$ref": "#/components/schemas/PreferenceChannels" + "transactionId": { + "type": "string" + }, + "channel": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push", + "digest", + "trigger", + "delay", + "custom" + ] }, - "blueprintId": { + "detail": { "type": "string" }, - "data": { - "type": "object" - } - }, - "required": [ - "name", - "notificationGroupId", - "steps" - ] - }, - "ChangeWorkflowStatusRequestDto": { - "type": "object", - "properties": { - "active": { + "source": { + "type": "string", + "enum": [ + "Credentials", + "Internal", + "Payload", + "Webhook" + ] + }, + "status": { + "type": "string", + "enum": [ + "Success", + "Warning", + "Failed", + "Pending", + "Queued", + "ReadConfirmation" + ] + }, + "isTest": { "type": "boolean" + }, + "isRetry": { + "type": "boolean" + }, + "createdAt": { + "type": "string" } }, "required": [ - "active" + "_organizationId", + "_jobId", + "_environmentId", + "_notificationId", + "_notificationTemplateId", + "_subscriberId", + "transactionId", + "channel", + "detail", + "source", + "status", + "isTest", + "isRetry" ] }, "TriggerEventResponseDto": { @@ -17518,8 +10542,7 @@ "type": "object", "properties": { "topicKey": { - "type": "string", - "example": "topic_key" + "type": "string" }, "type": { "enum": [ @@ -17549,38 +10572,6 @@ } } }, - "ChannelCredentialsDto": { - "type": "object", - "properties": { - "webhookUrl": { - "type": "string" - }, - "deviceTokens": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SubscriberChannelDto": { - "type": "object", - "properties": { - "integrationIdentifier": { - "type": "string" - }, - "providerId": { - "type": "object" - }, - "credentials": { - "$ref": "#/components/schemas/ChannelCredentialsDto" - } - }, - "required": [ - "providerId", - "credentials" - ] - }, "SubscriberPayloadDto": { "type": "object", "properties": { @@ -17613,7 +10604,7 @@ "channels": { "type": "array", "items": { - "$ref": "#/components/schemas/SubscriberChannelDto" + "type": "string" } } }, @@ -17696,6 +10687,12 @@ "$ref": "#/components/schemas/TenantPayloadDto" } ] + }, + "bridgeUrl": { + "type": "string" + }, + "controls": { + "type": "object" } }, "required": [ @@ -17779,170 +10776,136 @@ "payload" ] }, - "ActivityNotificationSubscriberResponseDto": { + "DataBooleanDto": { "type": "object", "properties": { - "firstName": { - "type": "string" + "data": { + "type": "boolean" + } + }, + "required": [ + "data" + ] + }, + "ActivitiesResponseDto": { + "type": "object", + "properties": { + "hasMore": { + "type": "boolean" }, - "_id": { - "type": "string" + "data": { + "type": "array", + "items": { + "type": "string" + } }, - "lastName": { - "type": "string" + "pageSize": { + "type": "number" }, - "email": { - "type": "string" + "page": { + "type": "number" + } + }, + "required": [ + "hasMore", + "data", + "pageSize", + "page" + ] + }, + "ActivityStatsResponseDto": { + "type": "object", + "properties": { + "weeklySent": { + "type": "number" }, - "phone": { - "type": "string" + "monthlySent": { + "type": "number" } }, "required": [ - "_id" + "weeklySent", + "monthlySent" ] }, - "ActivityNotificationTemplateResponseDto": { + "ActivityGraphStatesResponse": { "type": "object", "properties": { "_id": { "type": "string" }, - "name": { - "type": "string" + "count": { + "type": "number" }, - "triggers": { + "templates": { "type": "array", "items": { - "$ref": "#/components/schemas/NotificationTrigger" + "type": "string" + } + }, + "channels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ] } } }, "required": [ - "name", - "triggers" + "_id", + "count", + "templates", + "channels" ] }, - "ActivityNotificationExecutionDetailResponseDto": { + "ActivityNotificationSubscriberResponseDto": { "type": "object", "properties": { - "_id": { - "type": "string" - }, - "_jobId": { + "firstName": { "type": "string" }, - "status": { - "enum": [ - "Success", - "Warning", - "Failed", - "Pending", - "Queued", - "ReadConfirmation" - ], + "_id": { "type": "string" }, - "detail": { + "lastName": { "type": "string" }, - "isRetry": { - "type": "boolean" - }, - "isTest": { - "type": "boolean" - }, - "providerId": { - "type": "object" - }, - "raw": { + "email": { "type": "string" }, - "source": { - "enum": [ - "Credentials", - "Internal", - "Payload", - "Webhook" - ], - "type": "string" - } - }, - "required": [ - "_id", - "_jobId", - "status", - "detail", - "isRetry", - "isTest", - "providerId", - "source" - ] - }, - "MessageTemplateDto": { - "type": "object", - "properties": {} - }, - "ActivityNotificationStepResponseDto": { - "type": "object", - "properties": { - "_id": { + "phone": { "type": "string" - }, - "active": { - "type": "boolean" - }, - "filters": { - "$ref": "#/components/schemas/StepFilter" - }, - "template": { - "$ref": "#/components/schemas/MessageTemplateDto" } }, "required": [ - "_id", - "active", - "filters" + "_id" ] }, - "ActivityNotificationJobResponseDto": { + "ActivityNotificationTemplateResponseDto": { "type": "object", "properties": { "_id": { "type": "string" }, - "type": { + "name": { "type": "string" }, - "digest": { - "type": "object" - }, - "executionDetails": { + "triggers": { "type": "array", "items": { - "$ref": "#/components/schemas/ActivityNotificationExecutionDetailResponseDto" + "type": "string" } - }, - "step": { - "$ref": "#/components/schemas/ActivityNotificationStepResponseDto" - }, - "payload": { - "type": "object" - }, - "providerId": { - "type": "object" - }, - "status": { - "type": "string" } }, "required": [ - "_id", - "type", - "executionDetails", - "step", - "providerId", - "status" + "name", + "triggers" ] }, "ActivityNotificationResponseDto": { @@ -18000,7 +10963,7 @@ "jobs": { "type": "array", "items": { - "$ref": "#/components/schemas/ActivityNotificationJobResponseDto" + "type": "string" } } }, @@ -18010,83 +10973,6 @@ "transactionId" ] }, - "ActivitiesResponseDto": { - "type": "object", - "properties": { - "hasMore": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActivityNotificationResponseDto" - } - }, - "pageSize": { - "type": "number" - }, - "page": { - "type": "number" - } - }, - "required": [ - "hasMore", - "data", - "pageSize", - "page" - ] - }, - "ActivityStatsResponseDto": { - "type": "object", - "properties": { - "weeklySent": { - "type": "number" - }, - "monthlySent": { - "type": "number" - } - }, - "required": [ - "weeklySent", - "monthlySent" - ] - }, - "ActivityGraphStatesResponse": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "count": { - "type": "number" - }, - "templates": { - "type": "array", - "items": { - "type": "string" - } - }, - "channels": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ] - } - } - }, - "required": [ - "_id", - "count", - "templates", - "channels" - ] - }, "NotificationGroupResponseDto": { "type": "object", "properties": { @@ -18260,16 +11146,102 @@ "state": { "type": "string" }, - "externalLink": { - "type": "string" + "externalLink": { + "type": "string" + }, + "channelId": { + "type": "string" + }, + "phoneNumberIdentification": { + "type": "string" + }, + "accessKey": { + "type": "string" + } + } + }, + "FieldFilterPart": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + }, + "operator": { + "type": "string", + "enum": [ + "LARGER", + "SMALLER", + "LARGER_EQUAL", + "SMALLER_EQUAL", + "EQUAL", + "NOT_EQUAL", + "ALL_IN", + "ANY_IN", + "NOT_IN", + "BETWEEN", + "NOT_BETWEEN", + "LIKE", + "NOT_LIKE", + "IN" + ] + }, + "on": { + "type": "string", + "enum": [ + "subscriber", + "payload" + ] + } + }, + "required": [ + "field", + "value", + "operator", + "on" + ] + }, + "StepFilter": { + "type": "object", + "properties": { + "isNegated": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "BOOLEAN", + "TEXT", + "DATE", + "NUMBER", + "STATEMENT", + "LIST", + "MULTI_LIST", + "GROUP" + ] }, - "channelId": { - "type": "string" + "value": { + "type": "string", + "enum": [ + "AND", + "OR" + ] }, - "phoneNumberIdentification": { - "type": "string" + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldFilterPart" + } } - } + }, + "required": [ + "isNegated", + "type", + "value", + "children" + ] }, "IntegrationResponseDto": { "type": "object", @@ -18408,6 +11380,10 @@ "credentials": { "$ref": "#/components/schemas/CredentialsDto" }, + "removeNovuBranding": { + "type": "boolean", + "description": "If true, the Novu branding will be removed from the Inbox component" + }, "check": { "type": "boolean" }, @@ -18419,112 +11395,6 @@ } } }, - "ChangeResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "_creatorId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_organizationId": { - "type": "string" - }, - "_entityId": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "type": { - "enum": [ - "Feed", - "MessageTemplate", - "Layout", - "DefaultLayout", - "NotificationTemplate", - "NotificationGroup", - "TranslationGroup", - "Translation" - ], - "type": "string" - }, - "change": { - "type": "object" - }, - "createdAt": { - "type": "string" - }, - "_parentId": { - "type": "string" - } - }, - "required": [ - "_creatorId", - "_environmentId", - "_organizationId", - "_entityId", - "enabled", - "type", - "change", - "createdAt" - ] - }, - "ChangesResponseDto": { - "type": "object", - "properties": { - "totalCount": { - "type": "number" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeResponseDto" - } - }, - "pageSize": { - "type": "number" - }, - "page": { - "type": "number" - } - }, - "required": [ - "totalCount", - "data", - "pageSize", - "page" - ] - }, - "DataNumberDto": { - "type": "object", - "properties": { - "data": { - "type": "number" - } - }, - "required": [ - "data" - ] - }, - "BulkApplyChangeDto": { - "type": "object", - "properties": { - "changeIds": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "changeIds" - ] - }, "PaginatedResponseDto": { "type": "object", "properties": { @@ -18683,6 +11553,13 @@ "$ref": "#/components/schemas/ChannelSettings" } }, + "topics": { + "description": "Topics that subscriber belongs to", + "type": "array", + "items": { + "type": "string" + } + }, "isOnline": { "type": "boolean" }, @@ -18749,7 +11626,7 @@ "channels": { "type": "array", "items": { - "$ref": "#/components/schemas/SubscriberChannelDto" + "type": "string" } } }, @@ -18763,7 +11640,7 @@ "subscribers": { "type": "array", "items": { - "$ref": "#/components/schemas/CreateSubscriberRequestDto" + "type": "string" } } }, @@ -18794,6 +11671,12 @@ }, "data": { "type": "object" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + } } } }, @@ -18902,6 +11785,26 @@ "triggers" ] }, + "PreferenceChannels": { + "type": "object", + "properties": { + "email": { + "type": "boolean" + }, + "sms": { + "type": "boolean" + }, + "in_app": { + "type": "boolean" + }, + "chat": { + "type": "boolean" + }, + "push": { + "type": "boolean" + } + } + }, "Preference": { "type": "object", "properties": { @@ -18969,86 +11872,198 @@ } }, "required": [ - "preference" + "preference" + ] + }, + "ChannelPreference": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "description": "The type of channel that is enabled or not" + }, + "enabled": { + "type": "boolean", + "description": "If channel is enabled or not" + } + }, + "required": [ + "type", + "enabled" + ] + }, + "UpdateSubscriberPreferenceRequestDto": { + "type": "object", + "properties": { + "channel": { + "description": "The subscriber preferences for every ChannelTypeEnum for the workflow assigned.", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelPreference" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Sets if the workflow is fully enabled for all channels or not for the subscriber." + } + } + }, + "UpdateSubscriberGlobalPreferencesRequestDto": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the subscriber global preferences." + }, + "preferences": { + "description": "The subscriber global preferences for every ChannelTypeEnum.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelPreference" + } + } + } + }, + "FeedResponseDto": { + "type": "object", + "properties": { + "totalCount": { + "type": "number" + }, + "hasMore": { + "type": "boolean" + }, + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "pageSize": { + "type": "number" + }, + "page": { + "type": "number" + } + }, + "required": [ + "hasMore", + "data", + "pageSize", + "page" + ] + }, + "UnseenCountResponse": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" ] }, - "ChannelPreference": { + "MessageMarkAsRequestDto": { "type": "object", "properties": { - "type": { - "type": "string", + "messageId": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "markAs": { "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" + "read", + "seen", + "unread", + "unseen" ], - "description": "The type of channel that is enabled or not" - }, - "enabled": { - "type": "boolean", - "description": "If channel is enabled or not" + "type": "string" } }, "required": [ - "type", - "enabled" + "messageId", + "markAs" ] }, - "UpdateSubscriberPreferenceRequestDto": { + "MessageEntity": { "type": "object", "properties": { - "channel": { - "description": "The subscriber preferences for every ChannelTypeEnum for the workflow assigned.", - "allOf": [ - { - "$ref": "#/components/schemas/ChannelPreference" - } - ] - }, - "enabled": { - "type": "boolean", - "description": "Sets if the workflow is fully enabled for all channels or not for the subscriber." - } + } }, - "UpdateSubscriberGlobalPreferencesRequestDto": { + "MarkAllMessageAsRequestDto": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Enable or disable the subscriber global preferences." + "feedIdentifier": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Optional feed identifier or array of feed identifiers" }, - "preferences": { - "description": "The subscriber global preferences for every ChannelTypeEnum.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelPreference" - } + "markAs": { + "enum": [ + "read", + "seen", + "unread", + "unseen" + ], + "type": "string", + "description": "Mark all subscriber messages as read, unread, seen or unseen" } - } + }, + "required": [ + "markAs" + ] }, "EmailBlockStyles": { "type": "object", "properties": { "textAlign": { + "type": "string", "enum": [ + "center", "left", - "right", - "center" - ], - "type": "string" + "right" + ] } - } + }, + "required": [ + "textAlign" + ] }, "EmailBlock": { "type": "object", "properties": { "type": { "enum": [ - "text", - "button" + "button", + "text" ], "type": "string" }, @@ -19079,12 +12094,11 @@ "type": "object", "properties": { "type": { + "type": "string", "enum": [ "primary", - "secondary", - "clicked" - ], - "type": "string" + "secondary" + ] }, "content": { "type": "string" @@ -19105,12 +12119,11 @@ "type": "object" }, "type": { + "type": "string", "enum": [ "primary", - "secondary", - "clicked" - ], - "type": "string" + "secondary" + ] } } }, @@ -19118,11 +12131,11 @@ "type": "object", "properties": { "status": { + "type": "string", "enum": [ "pending", "done" - ], - "type": "string" + ] }, "buttons": { "type": "array", @@ -19155,425 +12168,343 @@ "data" ] }, - "Actor": { - "type": "object", - "properties": { - "data": { - "type": "string", - "nullable": true - }, - "type": { - "enum": [ - "none", - "user", - "system_icon", - "system_custom" - ], - "type": "string" - } - }, - "required": [ - "data", - "type" - ] - }, - "NotificationDto": { + "NotificationGroup": { "type": "object", "properties": { "_id": { "type": "string" }, - "_templateId": { + "name": { "type": "string" }, "_environmentId": { "type": "string" }, - "_messageTemplateId": { - "type": "string" - }, "_organizationId": { "type": "string" }, - "_notificationId": { - "type": "string" - }, - "_subscriberId": { - "type": "string" - }, - "_feedId": { - "type": "string" - }, - "_jobId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - }, - "expireAt": { - "type": "string" - }, - "actor": { - "$ref": "#/components/schemas/Actor" - }, - "subscriber": { - "$ref": "#/components/schemas/SubscriberResponseDto" - }, - "transactionId": { - "type": "string" - }, - "templateIdentifier": { - "type": "string" - }, - "providerId": { + "_parentId": { "type": "string" + } + }, + "required": [ + "name", + "_environmentId", + "_organizationId" + ] + }, + "DigestRegularMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" }, - "content": { - "type": "string" + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] }, - "subject": { + "digestKey": { "type": "string" }, - "channel": { + "type": { + "type": "string", "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" + "regular", + "backoff" + ] }, - "read": { + "backoff": { "type": "boolean" }, - "seen": { - "type": "boolean" + "backoffAmount": { + "type": "number" }, - "deleted": { + "backoffUnit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "updateMode": { "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "TimedConfig": { + "type": "object", + "properties": { + "atTime": { + "type": "string" }, - "deviceTokens": { + "weekDays": { "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" + ] } }, - "cta": { - "$ref": "#/components/schemas/MessageCTA" + "monthDays": { + "type": "array", + "items": { + "type": "string" + } }, - "status": { + "ordinal": { "type": "string", "enum": [ - "sent", - "error", - "warning" + "1", + "2", + "3", + "4", + "5", + "last" ] }, - "payload": { - "type": "object", - "description": "The payload that was used to send the notification trigger" + "ordinalValue": { + "type": "string", + "enum": [ + "day", + "weekday", + "weekend", + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ] }, - "overrides": { - "type": "object", - "description": "Provider specific overrides used when triggering the notification" + "monthlyType": { + "type": "string", + "enum": [ + "each", + "on" + ] } - }, - "required": [ - "_templateId", - "_environmentId", - "_messageTemplateId", - "_organizationId", - "_notificationId", - "_subscriberId", - "_feedId", - "_jobId", - "transactionId", - "content", - "channel", - "read", - "seen", - "deleted", - "cta", - "status", - "payload", - "overrides" - ] + } }, - "FeedResponseDto": { + "DigestTimedMetadata": { "type": "object", "properties": { - "_id": { - "type": "string" + "amount": { + "type": "number" }, - "name": { - "type": "string" + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] }, - "identifier": { + "digestKey": { "type": "string" }, - "_environmentId": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "timed" + ] }, - "_organizationId": { - "type": "string" + "timed": { + "$ref": "#/components/schemas/TimedConfig" } }, "required": [ - "name", - "identifier", - "_environmentId", - "_organizationId" + "type" ] }, - "UnseenCountResponse": { + "DelayRegularMetadata": { "type": "object", "properties": { - "count": { + "amount": { "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "type": { + "type": "string", + "enum": [ + "regular" + ] } }, "required": [ - "count" + "type" ] }, - "MessageMarkAsRequestDto": { + "DelayScheduledMetadata": { "type": "object", "properties": { - "messageId": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } + "type": { + "type": "string", + "enum": [ + "scheduled" ] }, - "markAs": { - "enum": [ - "read", - "seen", - "unread", - "unseen" - ], + "delayPath": { "type": "string" } }, "required": [ - "messageId", - "markAs" + "type", + "delayPath" ] }, - "MessageEntity": { - "type": "object", - "properties": {} - }, - "MarkAllMessageAsRequestDto": { + "MessageTemplate": { "type": "object", "properties": { - "feedIdentifier": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Optional feed identifier or array of feed identifiers" - }, - "markAs": { - "enum": [ - "read", - "seen", - "unread", - "unseen" - ], - "type": "string", - "description": "Mark all subscriber messages as read, unread, seen or unseen" - } - }, - "required": [ - "markAs" - ] + + } }, - "MessageResponseDto": { + "NotificationStepVariant": { "type": "object", "properties": { "_id": { "type": "string" }, - "_templateId": { - "type": "string" - }, - "_environmentId": { - "type": "string" - }, - "_messageTemplateId": { + "uuid": { "type": "string" }, - "_organizationId": { + "name": { "type": "string" }, - "_notificationId": { + "_templateId": { "type": "string" }, - "_subscriberId": { - "type": "string" + "active": { + "type": "boolean" }, - "subscriber": { - "$ref": "#/components/schemas/SubscriberResponseDto" + "shouldStopOnFail": { + "type": "boolean" }, "template": { - "$ref": "#/components/schemas/WorkflowResponse" - }, - "templateIdentifier": { - "type": "string" - }, - "createdAt": { - "type": "string" + "$ref": "#/components/schemas/MessageTemplate" }, - "lastSeenDate": { - "type": "string" + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilter" + } }, - "lastReadDate": { - "type": "string" + "_parentId": { + "type": "object" }, - "content": { + "metadata": { "oneOf": [ { - "$ref": "#/components/schemas/EmailBlock" + "$ref": "#/components/schemas/DigestRegularMetadata" }, { - "type": "string" + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" } ] }, - "transactionId": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "channel": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], - "type": "string" - }, - "read": { - "type": "boolean" - }, - "seen": { - "type": "boolean" - }, - "email": { + "replyCallback": { + "type": "object" + } + } + }, + "NotificationStep": { + "type": "object", + "properties": { + "_id": { "type": "string" }, - "phone": { + "uuid": { "type": "string" }, - "directWebhookUrl": { + "name": { "type": "string" }, - "providerId": { + "_templateId": { "type": "string" }, - "deviceTokens": { + "active": { + "type": "boolean" + }, + "shouldStopOnFail": { + "type": "boolean" + }, + "template": { + "$ref": "#/components/schemas/MessageTemplate" + }, + "filters": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StepFilter" } }, - "title": { - "type": "string" - }, - "cta": { - "$ref": "#/components/schemas/MessageCTA" - }, - "_feedId": { - "type": "string", - "nullable": true + "_parentId": { + "type": "object" }, - "status": { - "type": "string", - "enum": [ - "sent", - "error", - "warning" + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/DigestRegularMetadata" + }, + { + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" + } ] }, - "errorId": { - "type": "string" - }, - "errorText": { - "type": "string" - }, - "payload": { - "type": "object", - "description": "The payload that was used to send the notification trigger" - }, - "overrides": { - "type": "object", - "description": "Provider specific overrides used when triggering the notification" - } - }, - "required": [ - "_templateId", - "_environmentId", - "_messageTemplateId", - "_organizationId", - "_notificationId", - "_subscriberId", - "createdAt", - "content", - "transactionId", - "channel", - "read", - "seen", - "cta", - "status", - "errorId", - "errorText", - "payload", - "overrides" - ] - }, - "MarkMessageActionAsSeenDto": { - "type": "object", - "properties": { - "status": { - "enum": [ - "pending", - "done" - ], - "type": "string", - "description": "Message action status" + "replyCallback": { + "type": "object" }, - "payload": { - "type": "object", - "description": "Message action payload" + "variants": { + "$ref": "#/components/schemas/NotificationStepVariant" } - }, - "required": [ - "status" - ] + } }, - "CreateFeedRequestDto": { + "NotificationTriggerVariable": { "type": "object", "properties": { "name": { @@ -19584,114 +12515,188 @@ "name" ] }, - "CreateLayoutResponseDto": { + "NotificationTrigger": { "type": "object", "properties": { - "_id": { + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "identifier": { "type": "string" + }, + "variables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } + }, + "subscriberVariables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } } }, "required": [ - "_id" + "type", + "identifier", + "variables" ] }, - "GetLayoutResponseDto": { + "WorkflowResponse": { "type": "object", "properties": { "_id": { "type": "string" }, - "_organizationId": { + "name": { "type": "string" }, - "_environmentId": { + "description": { "type": "string" }, - "_creatorId": { - "type": "string" + "active": { + "type": "boolean" }, - "name": { - "type": "string" + "draft": { + "type": "boolean" }, - "identifier": { - "type": "string" + "preferenceSettings": { + "$ref": "#/components/schemas/PreferenceChannels" }, - "description": { - "type": "string" + "critical": { + "type": "boolean" }, - "channel": { - "enum": [ - "in_app", - "email", - "sms", - "chat", - "push" - ], + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationStep" + } + }, + "_organizationId": { "type": "string" }, - "content": { + "_creatorId": { "type": "string" }, - "contentType": { + "_environmentId": { "type": "string" }, - "variables": { + "triggers": { "type": "array", "items": { - "type": "object" + "$ref": "#/components/schemas/NotificationTrigger" } }, - "isDefault": { - "type": "boolean" + "_notificationGroupId": { + "type": "string" }, - "isDeleted": { + "_parentId": { + "type": "string" + }, + "deleted": { "type": "boolean" }, - "createdAt": { + "deletedAt": { "type": "string" }, - "updatedAt": { + "deletedBy": { "type": "string" }, - "_parentId": { - "type": "string" + "notificationGroup": { + "$ref": "#/components/schemas/NotificationGroup" + }, + "data": { + "type": "object" + }, + "workflowIntegrationStatus": { + "type": "object" } }, "required": [ + "name", + "description", + "active", + "draft", + "preferenceSettings", + "critical", + "tags", + "steps", "_organizationId", - "_environmentId", "_creatorId", - "name", - "identifier", - "channel", - "content", - "contentType", - "isDefault", - "isDeleted" + "_environmentId", + "triggers", + "_notificationGroupId", + "deleted", + "deletedAt", + "deletedBy" ] }, - "UpdateLayoutResponseDto": { + "MessageResponseDto": { "type": "object", "properties": { "_id": { "type": "string" }, - "_organizationId": { + "_templateId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "_messageTemplateId": { + "type": "string" + }, + "_organizationId": { + "type": "string" + }, + "_notificationId": { + "type": "string" + }, + "_subscriberId": { + "type": "string" + }, + "subscriber": { + "$ref": "#/components/schemas/SubscriberResponseDto" + }, + "template": { + "$ref": "#/components/schemas/WorkflowResponse" + }, + "templateIdentifier": { "type": "string" }, - "_environmentId": { + "createdAt": { "type": "string" }, - "_creatorId": { + "lastSeenDate": { "type": "string" }, - "name": { + "lastReadDate": { "type": "string" }, - "identifier": { + "content": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmailBlock" + }, + { + "type": "string" + } + ] + }, + "transactionId": { "type": "string" }, - "description": { + "subject": { "type": "string" }, "channel": { @@ -19704,80 +12709,102 @@ ], "type": "string" }, - "content": { + "read": { + "type": "boolean" + }, + "seen": { + "type": "boolean" + }, + "email": { "type": "string" }, - "contentType": { + "phone": { "type": "string" }, - "variables": { + "directWebhookUrl": { + "type": "string" + }, + "providerId": { + "type": "string" + }, + "deviceTokens": { "type": "array", "items": { - "type": "object" + "type": "string" } }, - "isDefault": { - "type": "boolean" + "title": { + "type": "string" }, - "isDeleted": { - "type": "boolean" + "cta": { + "$ref": "#/components/schemas/MessageCTA" }, - "createdAt": { - "type": "string" + "_feedId": { + "type": "object", + "nullable": true }, - "updatedAt": { + "status": { + "type": "string", + "enum": [ + "sent", + "error", + "warning" + ] + }, + "errorId": { "type": "string" }, - "_parentId": { + "errorText": { "type": "string" + }, + "payload": { + "type": "object", + "description": "The payload that was used to send the notification trigger" + }, + "overrides": { + "type": "object", + "description": "Provider specific overrides used when triggering the notification" } }, "required": [ - "_organizationId", + "_templateId", "_environmentId", - "_creatorId", - "name", - "identifier", - "channel", + "_messageTemplateId", + "_organizationId", + "_notificationId", + "_subscriberId", + "createdAt", "content", - "contentType", - "isDefault", - "isDeleted" + "transactionId", + "channel", + "read", + "seen", + "cta", + "status", + "errorId", + "errorText", + "payload", + "overrides" ] }, - "UpdateLayoutRequestDto": { + "MarkMessageActionAsSeenDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "User defined custom name and provided by the user that will name the Layout updated." - }, - "identifier": { - "type": "string", - "description": "User defined custom key that will be a unique identifier for the Layout updated." - }, - "description": { - "type": "string", - "description": "User defined description of the layout" - }, - "content": { + "status": { + "enum": [ + "pending", + "done" + ], "type": "string", - "description": "User defined content for the layout." - }, - "variables": { - "description": "User defined variables to render in the layout placeholders.", - "type": "array", - "items": { - "type": "object" - } + "description": "Message action status" }, - "isDefault": { - "type": "boolean", - "description": "Variable that defines if the layout is chosen as default when creating a layout." + "payload": { + "type": "object", + "description": "Message action payload" } }, "required": [ - "identifier" + "status" ] }, "DeleteMessageResponseDto": { @@ -19802,7 +12829,19 @@ }, "CreateTopicResponseDto": { "type": "object", - "properties": {} + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier for the Topic created." + }, + "key": { + "type": "string", + "description": "User defined custom key and provided by the user that will be an unique identifier for the Topic created." + } + }, + "required": [ + "key" + ] }, "CreateTopicRequestDto": { "type": "object", @@ -20019,135 +13058,10 @@ "name" ] }, - "GetTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "CreateTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "CreateTenantRequestDto": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - } - }, - "required": [ - "identifier", - "name" - ] - }, - "UpdateTenantResponseDto": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "_environmentId": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "_id", - "identifier", - "_environmentId", - "createdAt", - "updatedAt" - ] - }, - "UpdateTenantRequestDto": { + "GeneratePreviewResponseDto": { "type": "object", "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - } + } } }, diff --git a/src/funcs/cancel.ts b/src/funcs/cancel.ts index af85b536..9589a631 100644 --- a/src/funcs/cancel.ts +++ b/src/funcs/cancel.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -31,12 +30,12 @@ import { Result } from "../types/fp.js"; * will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... */ export async function cancel( - client$: NovuCore, + client: NovuCore, transactionId: string, options?: RequestOptions, ): Promise< Result< - components.DataBooleanDto, + operations.EventsControllerCancelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,62 +45,48 @@ export async function cancel( | ConnectionError > > { - const input$: operations.EventsControllerCancelRequest = { + const input: operations.EventsControllerCancelRequest = { transactionId: transactionId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.EventsControllerCancelRequest$outboundSchema.parse(value$), + const parsed = safeParse( + input, + (value) => + operations.EventsControllerCancelRequest$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - transactionId: encodeSimple$("transactionId", payload$.transactionId, { + const pathParams = { + transactionId: encodeSimple("transactionId", payload.transactionId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/events/trigger/{transactionId}")(pathParams$); + const path = pathToFunc("/v1/events/trigger/{transactionId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "EventsController_cancel", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +96,41 @@ export async function cancel( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.DataBooleanDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EventsControllerCancelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +139,16 @@ export async function cancel( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.DataBooleanDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(200, operations.EventsControllerCancelResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/changesApply.ts b/src/funcs/changesApply.ts deleted file mode 100644 index f30b617c..00000000 --- a/src/funcs/changesApply.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Apply change - */ -export async function changesApply( - client$: NovuCore, - changeId: string, - options?: RequestOptions, -): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.ChangesControllerApplyDiffRequest = { - changeId: changeId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ChangesControllerApplyDiffRequest$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - changeId: encodeSimple$("changeId", payload$.changeId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/changes/{changeId}/apply")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "ChangesController_applyDiff", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, z.array(components.ChangeResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/changesApplyBulk.ts b/src/funcs/changesApplyBulk.ts deleted file mode 100644 index 9ddabb21..00000000 --- a/src/funcs/changesApplyBulk.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Apply changes - */ -export async function changesApplyBulk( - client$: NovuCore, - request: components.BulkApplyChangeDto, - options?: RequestOptions, -): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.BulkApplyChangeDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/changes/bulk/apply")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "ChangesController_bulkApplyDiff", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, z.array(components.ChangeResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/changesCount.ts b/src/funcs/changesCount.ts deleted file mode 100644 index 1d9569b6..00000000 --- a/src/funcs/changesCount.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.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 { Result } from "../types/fp.js"; - -/** - * Get changes count - */ -export async function changesCount( - client$: NovuCore, - options?: RequestOptions, -): Promise< - Result< - components.DataNumberDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path$ = pathToFunc("/v1/changes/count")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "ChangesController_getChangesCount", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.DataNumberDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DataNumberDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/changesRetrieve.ts b/src/funcs/changesRetrieve.ts deleted file mode 100644 index a7d6e940..00000000 --- a/src/funcs/changesRetrieve.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Get changes - */ -export async function changesRetrieve( - client$: NovuCore, - request: operations.ChangesControllerGetChangesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ChangesControllerGetChangesRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const path$ = pathToFunc("/v1/changes")(); - - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "page": payload$.page, - "promoted": payload$.promoted, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "ChangesController_getChanges", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.ChangesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ChangesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/environmentsApiKeysList.ts b/src/funcs/environmentsApiKeysList.ts index 2f87658d..834bb9a3 100644 --- a/src/funcs/environmentsApiKeysList.ts +++ b/src/funcs/environmentsApiKeysList.ts @@ -2,13 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -18,17 +16,18 @@ import { } 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"; /** * Get api keys */ export async function environmentsApiKeysList( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - Array, + operations.EnvironmentsControllerV1ListOrganizationApiKeysResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -38,38 +37,25 @@ export async function environmentsApiKeysList( | ConnectionError > > { - const path$ = pathToFunc("/v1/environments/api-keys")(); + const path = pathToFunc("/v1/environments/api-keys")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { - operationID: "EnvironmentsController_listOrganizationApiKeys", + operationID: "EnvironmentsControllerV1_listOrganizationApiKeys", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -79,16 +65,40 @@ export async function environmentsApiKeysList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EnvironmentsControllerV1ListOrganizationApiKeysResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -97,12 +107,18 @@ export async function environmentsApiKeysList( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.ApiKey$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .EnvironmentsControllerV1ListOrganizationApiKeysResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/environmentsList.ts b/src/funcs/environmentsList.ts index b3c6bf4e..a89ef071 100644 --- a/src/funcs/environmentsList.ts +++ b/src/funcs/environmentsList.ts @@ -2,13 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -18,17 +16,18 @@ import { } 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"; /** * Get environments */ export async function environmentsList( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - Array, + operations.EnvironmentsControllerV1ListMyEnvironmentsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -38,38 +37,25 @@ export async function environmentsList( | ConnectionError > > { - const path$ = pathToFunc("/v1/environments")(); + const path = pathToFunc("/v1/environments")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { - operationID: "EnvironmentsController_listMyEnvironments", + operationID: "EnvironmentsControllerV1_listMyEnvironments", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -79,16 +65,40 @@ export async function environmentsList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EnvironmentsControllerV1ListMyEnvironmentsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -97,12 +107,18 @@ export async function environmentsList( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.EnvironmentResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .EnvironmentsControllerV1ListMyEnvironmentsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/environmentsRetrieve.ts b/src/funcs/environmentsRetrieve.ts index bbbcedc0..dfbd74df 100644 --- a/src/funcs/environmentsRetrieve.ts +++ b/src/funcs/environmentsRetrieve.ts @@ -3,11 +3,10 @@ */ import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -17,17 +16,18 @@ import { } 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"; /** * Get current environment */ export async function environmentsRetrieve( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - components.EnvironmentResponseDto, + operations.EnvironmentsControllerV1GetCurrentEnvironmentResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -37,38 +37,25 @@ export async function environmentsRetrieve( | ConnectionError > > { - const path$ = pathToFunc("/v1/environments/me")(); + const path = pathToFunc("/v1/environments/me")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { - operationID: "EnvironmentsController_getCurrentEnvironment", + operationID: "EnvironmentsControllerV1_getCurrentEnvironment", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -78,16 +65,40 @@ export async function environmentsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.EnvironmentResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EnvironmentsControllerV1GetCurrentEnvironmentResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -96,12 +107,18 @@ export async function environmentsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.EnvironmentResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .EnvironmentsControllerV1GetCurrentEnvironmentResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/executionDetailsRetrieve.ts b/src/funcs/executionDetailsRetrieve.ts index 0e67d6ed..75a9bd93 100644 --- a/src/funcs/executionDetailsRetrieve.ts +++ b/src/funcs/executionDetailsRetrieve.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -27,13 +25,13 @@ import { Result } from "../types/fp.js"; * Get execution details */ export async function executionDetailsRetrieve( - client$: NovuCore, + client: NovuCore, notificationId: string, subscriberId: string, options?: RequestOptions, ): Promise< Result< - Array, + operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,67 +41,52 @@ export async function executionDetailsRetrieve( | ConnectionError > > { - const input$: + const input: operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { notificationId: notificationId, subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/execution-details")(); + const path = pathToFunc("/v1/execution-details")(); - const query$ = encodeFormQuery$({ - "notificationId": payload$.notificationId, - "subscriberId": payload$.subscriberId, + const query = encodeFormQuery({ + "notificationId": payload.notificationId, + "subscriberId": payload.subscriberId, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "ExecutionDetailsController_getExecutionDetailsForNotification", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -113,16 +96,42 @@ export async function executionDetailsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -131,12 +140,18 @@ export async function executionDetailsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.ExecutionDetailsResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/feedsCreate.ts b/src/funcs/feedsCreate.ts deleted file mode 100644 index 7a72681c..00000000 --- a/src/funcs/feedsCreate.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Create feed - */ -export async function feedsCreate( - client$: NovuCore, - request: components.CreateFeedRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.FeedResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateFeedRequestDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/feeds")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "FeedsController_createFeed", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.FeedResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.FeedResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/feedsDelete.ts b/src/funcs/feedsDelete.ts deleted file mode 100644 index 4fb59744..00000000 --- a/src/funcs/feedsDelete.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Delete feed - */ -export async function feedsDelete( - client$: NovuCore, - feedId: string, - options?: RequestOptions, -): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.FeedsControllerDeleteFeedByIdRequest = { - feedId: feedId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.FeedsControllerDeleteFeedByIdRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - feedId: encodeSimple$("feedId", payload$.feedId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/feeds/{feedId}")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "FeedsController_deleteFeedById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.FeedResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/feedsRetrieve.ts b/src/funcs/feedsRetrieve.ts deleted file mode 100644 index 8ee75fe9..00000000 --- a/src/funcs/feedsRetrieve.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.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 { Result } from "../types/fp.js"; - -/** - * Get feeds - */ -export async function feedsRetrieve( - client$: NovuCore, - options?: RequestOptions, -): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path$ = pathToFunc("/v1/feeds")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "FeedsController_getFeeds", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.FeedResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/integrationsCreate.ts b/src/funcs/integrationsCreate.ts index 711603b9..85abc07a 100644 --- a/src/funcs/integrationsCreate.ts +++ b/src/funcs/integrationsCreate.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -28,12 +29,12 @@ import { Result } from "../types/fp.js"; * Create an integration for the current environment the user is based on the API key provided */ export async function integrationsCreate( - client$: NovuCore, + client: NovuCore, request: components.CreateIntegrationRequestDto, options?: RequestOptions, ): Promise< Result< - components.IntegrationResponseDto, + operations.IntegrationsControllerCreateIntegrationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,54 +44,38 @@ export async function integrationsCreate( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.CreateIntegrationRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => + components.CreateIntegrationRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/integrations")(); + const path = pathToFunc("/v1/integrations")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_createIntegration", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -100,16 +85,41 @@ export async function integrationsCreate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.IntegrationResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerCreateIntegrationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -118,12 +128,17 @@ export async function integrationsCreate( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.IntegrationResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations.IntegrationsControllerCreateIntegrationResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsDelete.ts b/src/funcs/integrationsDelete.ts index db593277..564e1e4d 100644 --- a/src/funcs/integrationsDelete.ts +++ b/src/funcs/integrationsDelete.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -27,12 +25,12 @@ import { Result } from "../types/fp.js"; * Delete integration */ export async function integrationsDelete( - client$: NovuCore, + client: NovuCore, integrationId: string, options?: RequestOptions, ): Promise< Result< - Array, + operations.IntegrationsControllerRemoveIntegrationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -42,63 +40,49 @@ export async function integrationsDelete( | ConnectionError > > { - const input$: operations.IntegrationsControllerRemoveIntegrationRequest = { + const input: operations.IntegrationsControllerRemoveIntegrationRequest = { integrationId: integrationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.IntegrationsControllerRemoveIntegrationRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { + const pathParams = { + integrationId: encodeSimple("integrationId", payload.integrationId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/integrations/{integrationId}")(pathParams$); + const path = pathToFunc("/v1/integrations/{integrationId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_removeIntegration", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -108,16 +92,41 @@ export async function integrationsDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerRemoveIntegrationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -126,12 +135,17 @@ export async function integrationsDelete( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.IntegrationsControllerRemoveIntegrationResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsList.ts b/src/funcs/integrationsList.ts index c18bef66..bf621189 100644 --- a/src/funcs/integrationsList.ts +++ b/src/funcs/integrationsList.ts @@ -2,13 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -18,6 +16,7 @@ import { } 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"; /** @@ -27,11 +26,11 @@ import { Result } from "../types/fp.js"; * Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change */ export async function integrationsList( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - Array, + operations.IntegrationsControllerListIntegrationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,38 +40,25 @@ export async function integrationsList( | ConnectionError > > { - const path$ = pathToFunc("/v1/integrations")(); + const path = pathToFunc("/v1/integrations")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_listIntegrations", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -82,16 +68,40 @@ export async function integrationsList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerListIntegrationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -100,12 +110,17 @@ export async function integrationsList( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.IntegrationsControllerListIntegrationsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsListActive.ts b/src/funcs/integrationsListActive.ts index 0321683b..aaeba337 100644 --- a/src/funcs/integrationsListActive.ts +++ b/src/funcs/integrationsListActive.ts @@ -2,13 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -18,6 +16,7 @@ import { } 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"; /** @@ -27,11 +26,11 @@ import { Result } from "../types/fp.js"; * Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change */ export async function integrationsListActive( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - Array, + operations.IntegrationsControllerGetActiveIntegrationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,38 +40,25 @@ export async function integrationsListActive( | ConnectionError > > { - const path$ = pathToFunc("/v1/integrations/active")(); + const path = pathToFunc("/v1/integrations/active")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_getActiveIntegrations", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -82,16 +68,40 @@ export async function integrationsListActive( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerGetActiveIntegrationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -100,12 +110,18 @@ export async function integrationsListActive( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .IntegrationsControllerGetActiveIntegrationsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsSetAsPrimary.ts b/src/funcs/integrationsSetAsPrimary.ts index a13a3be9..e3baf90e 100644 --- a/src/funcs/integrationsSetAsPrimary.ts +++ b/src/funcs/integrationsSetAsPrimary.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -26,12 +25,12 @@ import { Result } from "../types/fp.js"; * Set integration as primary */ export async function integrationsSetAsPrimary( - client$: NovuCore, + client: NovuCore, integrationId: string, options?: RequestOptions, ): Promise< Result< - components.IntegrationResponseDto, + operations.IntegrationsControllerSetIntegrationAsPrimaryResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,67 +40,53 @@ export async function integrationsSetAsPrimary( | ConnectionError > > { - const input$: - operations.IntegrationsControllerSetIntegrationAsPrimaryRequest = { + const input: operations.IntegrationsControllerSetIntegrationAsPrimaryRequest = + { integrationId: integrationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { + const pathParams = { + integrationId: encodeSimple("integrationId", payload.integrationId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/integrations/{integrationId}/set-primary")( - pathParams$, + const path = pathToFunc("/v1/integrations/{integrationId}/set-primary")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_setIntegrationAsPrimary", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +96,41 @@ export async function integrationsSetAsPrimary( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["404", "409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.IntegrationResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerSetIntegrationAsPrimaryResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +139,18 @@ export async function integrationsSetAsPrimary( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.IntegrationResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .IntegrationsControllerSetIntegrationAsPrimaryResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([404, 409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsUpdate.ts b/src/funcs/integrationsUpdate.ts index 6fa7dfd3..75764de9 100644 --- a/src/funcs/integrationsUpdate.ts +++ b/src/funcs/integrationsUpdate.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,13 +26,13 @@ import { Result } from "../types/fp.js"; * Update integration */ export async function integrationsUpdate( - client$: NovuCore, - integrationId: string, + client: NovuCore, updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, + integrationId: string, options?: RequestOptions, ): Promise< Result< - components.IntegrationResponseDto, + operations.IntegrationsControllerUpdateIntegrationByIdResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -45,69 +42,54 @@ export async function integrationsUpdate( | ConnectionError > > { - const input$: operations.IntegrationsControllerUpdateIntegrationByIdRequest = - { - integrationId: integrationId, - updateIntegrationRequestDto: updateIntegrationRequestDto, - }; + const input: operations.IntegrationsControllerUpdateIntegrationByIdRequest = { + updateIntegrationRequestDto: updateIntegrationRequestDto, + integrationId: integrationId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateIntegrationRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateIntegrationRequestDto, { explode: true, }); - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { + const pathParams = { + integrationId: encodeSimple("integrationId", payload.integrationId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/integrations/{integrationId}")(pathParams$); + const path = pathToFunc("/v1/integrations/{integrationId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_updateIntegrationById", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -117,16 +99,41 @@ export async function integrationsUpdate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + 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: ["404", "409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.IntegrationResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerUpdateIntegrationByIdResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -135,12 +142,18 @@ export async function integrationsUpdate( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.IntegrationResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .IntegrationsControllerUpdateIntegrationByIdResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([404, 409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/integrationsWebhooksRetrieve.ts b/src/funcs/integrationsWebhooksRetrieve.ts index 773c34b6..2f11ee97 100644 --- a/src/funcs/integrationsWebhooksRetrieve.ts +++ b/src/funcs/integrationsWebhooksRetrieve.ts @@ -2,11 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value */ export async function integrationsWebhooksRetrieve( - client$: NovuCore, + client: NovuCore, providerOrIntegrationId: string, options?: RequestOptions, ): Promise< Result< - boolean, + operations.IntegrationsControllerGetWebhookSupportStatusResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,68 +43,54 @@ export async function integrationsWebhooksRetrieve( | ConnectionError > > { - const input$: - operations.IntegrationsControllerGetWebhookSupportStatusRequest = { + const input: operations.IntegrationsControllerGetWebhookSupportStatusRequest = + { providerOrIntegrationId: providerOrIntegrationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - providerOrIntegrationId: encodeSimple$( + const pathParams = { + providerOrIntegrationId: encodeSimple( "providerOrIntegrationId", - payload$.providerOrIntegrationId, + payload.providerOrIntegrationId, { explode: false, charEncoding: "percent" }, ), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status", - )(pathParams$); + )(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "IntegrationsController_getWebhookSupportStatus", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -115,16 +100,41 @@ export async function integrationsWebhooksRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - boolean, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.IntegrationsControllerGetWebhookSupportStatusResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -133,12 +143,18 @@ export async function integrationsWebhooksRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.boolean()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .IntegrationsControllerGetWebhookSupportStatusResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/layoutsCreate.ts b/src/funcs/layoutsCreate.ts deleted file mode 100644 index 16783977..00000000 --- a/src/funcs/layoutsCreate.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.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 { Result } from "../types/fp.js"; - -/** - * Layout creation - * - * @remarks - * Create a layout - */ -export async function layoutsCreate( - client$: NovuCore, - options?: RequestOptions, -): Promise< - Result< - components.CreateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path$ = pathToFunc("/v1/layouts")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_PropertyDescriptor", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.CreateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.CreateLayoutResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/layoutsDelete.ts b/src/funcs/layoutsDelete.ts deleted file mode 100644 index 1cf04f2b..00000000 --- a/src/funcs/layoutsDelete.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.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"; - -/** - * Delete layout - * - * @remarks - * Execute a soft delete of a layout given a certain ID. - */ -export async function layoutsDelete( - client$: NovuCore, - layoutId: string, - options?: RequestOptions, -): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.LayoutsControllerDeleteLayoutRequest = { - layoutId: layoutId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.LayoutsControllerDeleteLayoutRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - - const headers$ = new Headers({ - Accept: "*/*", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_deleteLayout", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/layoutsList.ts b/src/funcs/layoutsList.ts deleted file mode 100644 index 5e373cd4..00000000 --- a/src/funcs/layoutsList.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.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"; - -/** - * Filter layouts - * - * @remarks - * Returns a list of layouts that can be paginated using the `page` query parameter and filtered by the environment where it is executed from the organization the user belongs to. - */ -export async function layoutsList( - client$: NovuCore, - request: operations.LayoutsControllerListLayoutsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.LayoutsControllerListLayoutsRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const path$ = pathToFunc("/v1/layouts")(); - - const query$ = encodeFormQuery$({ - "orderBy": payload$.orderBy, - "page": payload$.page, - "pageSize": payload$.pageSize, - "sortBy": payload$.sortBy, - }); - - const headers$ = new Headers({ - Accept: "*/*", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_listLayouts", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, z.void()), - m$.fail([400, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/layoutsRetrieve.ts b/src/funcs/layoutsRetrieve.ts deleted file mode 100644 index ece864d4..00000000 --- a/src/funcs/layoutsRetrieve.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Get layout - * - * @remarks - * Get a layout by its ID - */ -export async function layoutsRetrieve( - client$: NovuCore, - layoutId: string, - options?: RequestOptions, -): Promise< - Result< - components.GetLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.LayoutsControllerGetLayoutRequest = { - layoutId: layoutId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.LayoutsControllerGetLayoutRequest$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_getLayout", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.GetLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetLayoutResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/layoutsSetAsDefault.ts b/src/funcs/layoutsSetAsDefault.ts deleted file mode 100644 index 0db331fe..00000000 --- a/src/funcs/layoutsSetAsDefault.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.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"; - -/** - * Set default layout - * - * @remarks - * Sets the default layout for the environment and updates to non default to the existing default layout (if any). - */ -export async function layoutsSetAsDefault( - client$: NovuCore, - layoutId: string, - options?: RequestOptions, -): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.LayoutsControllerSetDefaultLayoutRequest = { - layoutId: layoutId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.LayoutsControllerSetDefaultLayoutRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/layouts/{layoutId}/default")(pathParams$); - - const headers$ = new Headers({ - Accept: "*/*", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_setDefaultLayout", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/layoutsUpdate.ts b/src/funcs/layoutsUpdate.ts deleted file mode 100644 index a5015fd0..00000000 --- a/src/funcs/layoutsUpdate.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Update a layout - * - * @remarks - * Update the name, content and variables of a layout. Also change it to be default or no. - */ -export async function layoutsUpdate( - client$: NovuCore, - layoutId: string, - updateLayoutRequestDto: components.UpdateLayoutRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.UpdateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.LayoutsControllerUpdateLayoutRequest = { - layoutId: layoutId, - updateLayoutRequestDto: updateLayoutRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.LayoutsControllerUpdateLayoutRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateLayoutRequestDto, { - explode: true, - }); - - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "LayoutsController_updateLayout", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.UpdateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UpdateLayoutResponseDto$inboundSchema), - m$.fail([400, 404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/messagesDelete.ts b/src/funcs/messagesDelete.ts index 19734bf8..b7a5121a 100644 --- a/src/funcs/messagesDelete.ts +++ b/src/funcs/messagesDelete.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Deletes a message entity from the Novu platform */ export async function messagesDelete( - client$: NovuCore, + client: NovuCore, messageId: string, options?: RequestOptions, ): Promise< Result< - components.DeleteMessageResponseDto, + operations.MessagesControllerDeleteMessageResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,64 +43,50 @@ export async function messagesDelete( | ConnectionError > > { - const input$: operations.MessagesControllerDeleteMessageRequest = { + const input: operations.MessagesControllerDeleteMessageRequest = { messageId: messageId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.MessagesControllerDeleteMessageRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - messageId: encodeSimple$("messageId", payload$.messageId, { + const pathParams = { + messageId: encodeSimple("messageId", payload.messageId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/messages/{messageId}")(pathParams$); + const path = pathToFunc("/v1/messages/{messageId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "MessagesController_deleteMessage", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +96,41 @@ export async function messagesDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.DeleteMessageResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.MessagesControllerDeleteMessageResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +139,17 @@ export async function messagesDelete( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.DeleteMessageResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.MessagesControllerDeleteMessageResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/messagesDeleteByTransactionId.ts b/src/funcs/messagesDeleteByTransactionId.ts index 3fdbb2f7..74617b66 100644 --- a/src/funcs/messagesDeleteByTransactionId.ts +++ b/src/funcs/messagesDeleteByTransactionId.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,13 +28,14 @@ import { Result } from "../types/fp.js"; * Deletes messages entity from the Novu platform using TransactionId of message */ export async function messagesDeleteByTransactionId( - client$: NovuCore, + client: NovuCore, transactionId: string, - channel?: operations.Channel | undefined, + channel?: operations.QueryParamChannel | undefined, options?: RequestOptions, ): Promise< Result< - void, + | operations.MessagesControllerDeleteMessagesByTransactionIdResponse + | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -48,73 +45,58 @@ export async function messagesDeleteByTransactionId( | ConnectionError > > { - const input$: + const input: operations.MessagesControllerDeleteMessagesByTransactionIdRequest = { - channel: channel, transactionId: transactionId, + channel: channel, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - transactionId: encodeSimple$("transactionId", payload$.transactionId, { + const pathParams = { + transactionId: encodeSimple("transactionId", payload.transactionId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/messages/transaction/{transactionId}")( - pathParams$, + const path = pathToFunc("/v1/messages/transaction/{transactionId}")( + pathParams, ); - const query$ = encodeFormQuery$({ - "channel": payload$.channel, + const query = encodeFormQuery({ + "channel": payload.channel, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "MessagesController_deleteMessagesByTransactionId", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -124,16 +106,43 @@ export async function messagesDeleteByTransactionId( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + | operations.MessagesControllerDeleteMessagesByTransactionIdResponse + | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -142,12 +151,19 @@ export async function messagesDeleteByTransactionId( | RequestTimeoutError | ConnectionError >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 204, + operations + .MessagesControllerDeleteMessagesByTransactionIdResponse$inboundSchema + .optional(), + { hdrs: true }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/messagesRetrieve.ts b/src/funcs/messagesRetrieve.ts index a17a2ded..a6c96530 100644 --- a/src/funcs/messagesRetrieve.ts +++ b/src/funcs/messagesRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Returns a list of messages, could paginate using the `page` query parameter */ export async function messagesRetrieve( - client$: NovuCore, + client: NovuCore, request: operations.MessagesControllerGetMessagesRequest, options?: RequestOptions, ): Promise< Result< - components.ActivitiesResponseDto, + operations.MessagesControllerGetMessagesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,64 +43,47 @@ export async function messagesRetrieve( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.MessagesControllerGetMessagesRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/messages")(); + const path = pathToFunc("/v1/messages")(); - const query$ = encodeFormQuery$({ - "channel": payload$.channel, - "limit": payload$.limit, - "page": payload$.page, - "subscriberId": payload$.subscriberId, - "transactionId": payload$.transactionId, + const query = encodeFormQuery({ + "channel": payload.channel, + "limit": payload.limit, + "page": payload.page, + "subscriberId": payload.subscriberId, + "transactionId": payload.transactionId, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "MessagesController_getMessages", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +93,42 @@ export async function messagesRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.ActivitiesResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.MessagesControllerGetMessagesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +137,17 @@ export async function messagesRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.ActivitiesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.MessagesControllerGetMessagesResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/notificationsList.ts b/src/funcs/notificationsList.ts index 0c0a75ec..b81a75be 100644 --- a/src/funcs/notificationsList.ts +++ b/src/funcs/notificationsList.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -26,12 +25,12 @@ import { Result } from "../types/fp.js"; * Get notifications */ export async function notificationsList( - client$: NovuCore, + client: NovuCore, request: operations.NotificationsControllerListNotificationsRequest, options?: RequestOptions, ): Promise< Result< - components.ActivitiesResponseDto, + operations.NotificationsControllerListNotificationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,65 +40,48 @@ export async function notificationsList( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.NotificationsControllerListNotificationsRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/notifications")(); + const path = pathToFunc("/v1/notifications")(); - const query$ = encodeFormQuery$({ - "channels": payload$.channels, - "emails": payload$.emails, - "page": payload$.page, - "search": payload$.search, - "subscriberIds": payload$.subscriberIds, - "templates": payload$.templates, - "transactionId": payload$.transactionId, + const query = encodeFormQuery({ + "channels": payload.channels, + "emails": payload.emails, + "page": payload.page, + "search": payload.search, + "subscriberIds": payload.subscriberIds, + "templates": payload.templates, + "transactionId": payload.transactionId, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationsController_listNotifications", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -109,16 +91,42 @@ export async function notificationsList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.ActivitiesResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationsControllerListNotificationsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -127,12 +135,17 @@ export async function notificationsList( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.ActivitiesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.NotificationsControllerListNotificationsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/notificationsRetrieve.ts b/src/funcs/notificationsRetrieve.ts index b834e689..c18ce6a2 100644 --- a/src/funcs/notificationsRetrieve.ts +++ b/src/funcs/notificationsRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -26,12 +25,12 @@ import { Result } from "../types/fp.js"; * Get notification */ export async function notificationsRetrieve( - client$: NovuCore, + client: NovuCore, notificationId: string, options?: RequestOptions, ): Promise< Result< - components.ActivityNotificationResponseDto, + operations.NotificationsControllerGetNotificationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,63 +40,49 @@ export async function notificationsRetrieve( | ConnectionError > > { - const input$: operations.NotificationsControllerGetNotificationRequest = { + const input: operations.NotificationsControllerGetNotificationRequest = { notificationId: notificationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.NotificationsControllerGetNotificationRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - notificationId: encodeSimple$("notificationId", payload$.notificationId, { + const pathParams = { + notificationId: encodeSimple("notificationId", payload.notificationId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/notifications/{notificationId}")(pathParams$); + const path = pathToFunc("/v1/notifications/{notificationId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationsController_getNotification", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -107,16 +92,41 @@ export async function notificationsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.ActivityNotificationResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationsControllerGetNotificationResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -125,12 +135,17 @@ export async function notificationsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.ActivityNotificationResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.NotificationsControllerGetNotificationResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/notificationsStatsGraph.ts b/src/funcs/notificationsStatsGraph.ts index 8e64da09..518bac45 100644 --- a/src/funcs/notificationsStatsGraph.ts +++ b/src/funcs/notificationsStatsGraph.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -27,12 +25,12 @@ import { Result } from "../types/fp.js"; * Get notification graph statistics */ export async function notificationsStatsGraph( - client$: NovuCore, + client: NovuCore, days?: number | undefined, options?: RequestOptions, ): Promise< Result< - Array, + operations.NotificationsControllerGetActivityGraphStatsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -42,63 +40,48 @@ export async function notificationsStatsGraph( | ConnectionError > > { - const input$: operations.NotificationsControllerGetActivityGraphStatsRequest = + const input: operations.NotificationsControllerGetActivityGraphStatsRequest = { days: days, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .NotificationsControllerGetActivityGraphStatsRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/notifications/graph/stats")(); + const path = pathToFunc("/v1/notifications/graph/stats")(); - const query$ = encodeFormQuery$({ - "days": payload$.days, + const query = encodeFormQuery({ + "days": payload.days, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationsController_getActivityGraphStats", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -108,16 +91,42 @@ export async function notificationsStatsGraph( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationsControllerGetActivityGraphStatsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -126,12 +135,18 @@ export async function notificationsStatsGraph( | RequestTimeoutError | ConnectionError >( - m$.json(200, z.array(components.ActivityGraphStatesResponse$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .NotificationsControllerGetActivityGraphStatsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/notificationsStatsRetrieve.ts b/src/funcs/notificationsStatsRetrieve.ts index af40cec5..d90ece34 100644 --- a/src/funcs/notificationsStatsRetrieve.ts +++ b/src/funcs/notificationsStatsRetrieve.ts @@ -3,11 +3,10 @@ */ import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -17,17 +16,18 @@ import { } 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"; /** * Get notification statistics */ export async function notificationsStatsRetrieve( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - components.ActivityStatsResponseDto, + operations.NotificationsControllerGetActivityStatsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -37,38 +37,25 @@ export async function notificationsStatsRetrieve( | ConnectionError > > { - const path$ = pathToFunc("/v1/notifications/stats")(); + const path = pathToFunc("/v1/notifications/stats")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationsController_getActivityStats", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -78,16 +65,40 @@ export async function notificationsStatsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.ActivityStatsResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationsControllerGetActivityStatsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -96,12 +107,17 @@ export async function notificationsStatsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.ActivityStatsResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.NotificationsControllerGetActivityStatsResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts b/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts deleted file mode 100644 index a5a583de..00000000 --- a/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Rename organization name - */ -export async function organizationsEEOrganizationControllerRenameOrganization( - client$: NovuCore, - request: components.RenameOrganizationDto, - options?: RequestOptions, -): Promise< - Result< - components.RenameOrganizationDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.RenameOrganizationDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/organizations")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EEOrganizationController_renameOrganization", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.RenameOrganizationDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.RenameOrganizationDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/organizationsRetrieve.ts b/src/funcs/organizationsRetrieve.ts deleted file mode 100644 index fcb079be..00000000 --- a/src/funcs/organizationsRetrieve.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.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 { Result } from "../types/fp.js"; - -/** - * Fetch current organization details - */ -export async function organizationsRetrieve( - client$: NovuCore, - options?: RequestOptions, -): Promise< - Result< - components.OrganizationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path$ = pathToFunc("/v1/organizations/me")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EEOrganizationController_getMyOrganization", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.OrganizationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.OrganizationResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/organizationsUpdate.ts b/src/funcs/organizationsUpdate.ts deleted file mode 100644 index be4f456f..00000000 --- a/src/funcs/organizationsUpdate.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Update organization branding details - */ -export async function organizationsUpdate( - client$: NovuCore, - request: components.UpdateBrandingDetailsDto, - options?: RequestOptions, -): Promise< - Result< - components.OrganizationBrandingResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.UpdateBrandingDetailsDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/organizations/branding")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EEOrganizationController_updateBrandingDetails", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.OrganizationBrandingResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.OrganizationBrandingResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/subscribersAuthenticationChatAccessOauth.ts b/src/funcs/subscribersAuthenticationChatAccessOauth.ts index f217a422..08684004 100644 --- a/src/funcs/subscribersAuthenticationChatAccessOauth.ts +++ b/src/funcs/subscribersAuthenticationChatAccessOauth.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,12 +25,12 @@ import { Result } from "../types/fp.js"; * Handle chat oauth */ export async function subscribersAuthenticationChatAccessOauth( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerChatAccessOauthRequest, options?: RequestOptions, ): Promise< Result< - void, + operations.SubscribersControllerChatAccessOauthResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,74 +40,57 @@ export async function subscribersAuthenticationChatAccessOauth( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.SubscribersControllerChatAccessOauthRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { + const pathParams = { + providerId: encodeSimple("providerId", payload.providerId, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth", - )(pathParams$); + )(pathParams); - const query$ = encodeFormQuery$({ - "environmentId": payload$.environmentId, - "hmacHash": payload$.hmacHash, - "integrationIdentifier": payload$.integrationIdentifier, + const query = encodeFormQuery({ + "environmentId": payload.environmentId, + "hmacHash": payload.hmacHash, + "integrationIdentifier": payload.integrationIdentifier, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_chatAccessOauth", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -121,16 +100,42 @@ export async function subscribersAuthenticationChatAccessOauth( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerChatAccessOauthResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -139,12 +144,17 @@ export async function subscribersAuthenticationChatAccessOauth( | RequestTimeoutError | ConnectionError >( - m$.nil(200, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 200, + operations.SubscribersControllerChatAccessOauthResponse$inboundSchema + .optional(), + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts b/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts index 1cf9abef..f4d70e72 100644 --- a/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +++ b/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -28,12 +25,12 @@ import { Result } from "../types/fp.js"; * Handle providers oauth redirect */ export async function subscribersAuthenticationChatAccessOauthCallBack( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerChatOauthCallbackRequest, options?: RequestOptions, ): Promise< Result< - operations.SubscribersControllerChatOauthCallbackResponseBody, + operations.SubscribersControllerChatOauthCallbackResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,75 +40,58 @@ export async function subscribersAuthenticationChatAccessOauthCallBack( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.SubscribersControllerChatOauthCallbackRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { + const pathParams = { + providerId: encodeSimple("providerId", payload.providerId, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback", - )(pathParams$); + )(pathParams); - const query$ = encodeFormQuery$({ - "code": payload$.code, - "environmentId": payload$.environmentId, - "hmacHash": payload$.hmacHash, - "integrationIdentifier": payload$.integrationIdentifier, + const query = encodeFormQuery({ + "code": payload.code, + "environmentId": payload.environmentId, + "hmacHash": payload.hmacHash, + "integrationIdentifier": payload.integrationIdentifier, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_chatOauthCallback", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -121,16 +101,42 @@ export async function subscribersAuthenticationChatAccessOauthCallBack( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - operations.SubscribersControllerChatOauthCallbackResponseBody, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerChatOauthCallbackResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -139,16 +145,17 @@ export async function subscribersAuthenticationChatAccessOauthCallBack( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - operations - .SubscribersControllerChatOauthCallbackResponseBody$inboundSchema, + operations.SubscribersControllerChatOauthCallbackResponse$inboundSchema, + { key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersCreate.ts b/src/funcs/subscribersCreate.ts index 368b7590..3b5f1f56 100644 --- a/src/funcs/subscribersCreate.ts +++ b/src/funcs/subscribersCreate.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -28,12 +29,12 @@ import { Result } from "../types/fp.js"; * Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. */ export async function subscribersCreate( - client$: NovuCore, + client: NovuCore, request: components.CreateSubscriberRequestDto, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerCreateSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,54 +44,38 @@ export async function subscribersCreate( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.CreateSubscriberRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => + components.CreateSubscriberRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/subscribers")(); + const path = pathToFunc("/v1/subscribers")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_createSubscriber", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -100,16 +85,41 @@ export async function subscribersCreate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerCreateSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -118,12 +128,17 @@ export async function subscribersCreate( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations.SubscribersControllerCreateSubscriberResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersCreateBulk.ts b/src/funcs/subscribersCreateBulk.ts index 4353e37c..009682f8 100644 --- a/src/funcs/subscribersCreateBulk.ts +++ b/src/funcs/subscribersCreateBulk.ts @@ -2,11 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -20,6 +19,7 @@ import { } 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"; /** @@ -31,12 +31,12 @@ import { Result } from "../types/fp.js"; * The bulk API is limited to 500 subscribers per request. */ export async function subscribersCreateBulk( - client$: NovuCore, + client: NovuCore, request: components.BulkSubscriberCreateDto, options?: RequestOptions, ): Promise< Result< - void, + operations.SubscribersControllerBulkCreateSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,53 +46,37 @@ export async function subscribersCreateBulk( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.BulkSubscriberCreateDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => components.BulkSubscriberCreateDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/subscribers/bulk")(); + const path = pathToFunc("/v1/subscribers/bulk")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_bulkCreateSubscribers", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -102,16 +86,41 @@ export async function subscribersCreateBulk( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerBulkCreateSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -120,12 +129,18 @@ export async function subscribersCreateBulk( | RequestTimeoutError | ConnectionError >( - m$.nil(201, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 201, + operations + .SubscribersControllerBulkCreateSubscribersResponse$inboundSchema + .optional(), + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersCredentialsAppend.ts b/src/funcs/subscribersCredentialsAppend.ts index a07dd359..f5674ecf 100644 --- a/src/funcs/subscribersCredentialsAppend.ts +++ b/src/funcs/subscribersCredentialsAppend.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -30,17 +27,18 @@ import { Result } from "../types/fp.js"; * * @remarks * Subscriber credentials associated to the delivery methods such as slack and push tokens. + * * This endpoint appends provided credentials and deviceTokens to the existing ones. */ export async function subscribersCredentialsAppend( - client$: NovuCore, - subscriberId: string, + client: NovuCore, updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerModifySubscriberChannelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -50,73 +48,57 @@ export async function subscribersCredentialsAppend( | ConnectionError > > { - const input$: operations.SubscribersControllerModifySubscriberChannelRequest = + const input: operations.SubscribersControllerModifySubscriberChannelRequest = { - subscriberId: subscriberId, updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerModifySubscriberChannelRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( - "body", - payload$.UpdateSubscriberChannelRequestDto, - { explode: true }, - ); + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateSubscriberChannelRequestDto, { + explode: true, + }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/credentials")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/credentials")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_modifySubscriberChannel", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -126,16 +108,41 @@ export async function subscribersCredentialsAppend( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerModifySubscriberChannelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -144,12 +151,18 @@ export async function subscribersCredentialsAppend( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .SubscribersControllerModifySubscriberChannelResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersCredentialsDelete.ts b/src/funcs/subscribersCredentialsDelete.ts index 00df9a48..ed006cbf 100644 --- a/src/funcs/subscribersCredentialsDelete.ts +++ b/src/funcs/subscribersCredentialsDelete.ts @@ -2,11 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,13 +28,14 @@ import { Result } from "../types/fp.js"; * Delete subscriber credentials such as slack and expo tokens. */ export async function subscribersCredentialsDelete( - client$: NovuCore, + client: NovuCore, subscriberId: string, providerId: string, options?: RequestOptions, ): Promise< Result< - void, + | operations.SubscribersControllerDeleteSubscriberCredentialsResponse + | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -45,72 +45,58 @@ export async function subscribersCredentialsDelete( | ConnectionError > > { - const input$: + const input: operations.SubscribersControllerDeleteSubscriberCredentialsRequest = { subscriberId: subscriberId, providerId: providerId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { + const pathParams = { + providerId: encodeSimple("providerId", payload.providerId, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/credentials/{providerId}", - )(pathParams$); + )(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_deleteSubscriberCredentials", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -120,16 +106,42 @@ export async function subscribersCredentialsDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + | operations.SubscribersControllerDeleteSubscriberCredentialsResponse + | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -138,12 +150,19 @@ export async function subscribersCredentialsDelete( | RequestTimeoutError | ConnectionError >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 204, + operations + .SubscribersControllerDeleteSubscriberCredentialsResponse$inboundSchema + .optional(), + { hdrs: true }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersCredentialsUpdate.ts b/src/funcs/subscribersCredentialsUpdate.ts index 11a0b5f1..f5f507f1 100644 --- a/src/funcs/subscribersCredentialsUpdate.ts +++ b/src/funcs/subscribersCredentialsUpdate.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,14 +29,14 @@ import { Result } from "../types/fp.js"; * Subscriber credentials associated to the delivery methods such as slack and push tokens. */ export async function subscribersCredentialsUpdate( - client$: NovuCore, - subscriberId: string, + client: NovuCore, updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerUpdateSubscriberChannelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -49,73 +46,57 @@ export async function subscribersCredentialsUpdate( | ConnectionError > > { - const input$: operations.SubscribersControllerUpdateSubscriberChannelRequest = + const input: operations.SubscribersControllerUpdateSubscriberChannelRequest = { - subscriberId: subscriberId, updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( - "body", - payload$.UpdateSubscriberChannelRequestDto, - { explode: true }, - ); + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateSubscriberChannelRequestDto, { + explode: true, + }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/credentials")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/credentials")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_updateSubscriberChannel", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -125,16 +106,41 @@ export async function subscribersCredentialsUpdate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerUpdateSubscriberChannelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -143,12 +149,18 @@ export async function subscribersCredentialsUpdate( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .SubscribersControllerUpdateSubscriberChannelResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersDelete.ts b/src/funcs/subscribersDelete.ts index 938540d6..09d9f88b 100644 --- a/src/funcs/subscribersDelete.ts +++ b/src/funcs/subscribersDelete.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Deletes a subscriber entity from the Novu platform */ export async function subscribersDelete( - client$: NovuCore, + client: NovuCore, subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.DeleteSubscriberResponseDto, + operations.SubscribersControllerRemoveSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,63 +43,49 @@ export async function subscribersDelete( | ConnectionError > > { - const input$: operations.SubscribersControllerRemoveSubscriberRequest = { + const input: operations.SubscribersControllerRemoveSubscriberRequest = { subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerRemoveSubscriberRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams$); + const path = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_removeSubscriber", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -110,16 +95,41 @@ export async function subscribersDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.DeleteSubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerRemoveSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -128,12 +138,17 @@ export async function subscribersDelete( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.DeleteSubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.SubscribersControllerRemoveSubscriberResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersList.ts b/src/funcs/subscribersList.ts index de4b29d9..edad860b 100644 --- a/src/funcs/subscribersList.ts +++ b/src/funcs/subscribersList.ts @@ -4,9 +4,9 @@ import { NovuCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -35,7 +35,7 @@ import { * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter */ export async function subscribersList( - client$: NovuCore, + client: NovuCore, page?: number | undefined, limit?: number | undefined, options?: RequestOptions, @@ -53,63 +53,48 @@ export async function subscribersList( > > > { - const input$: operations.SubscribersControllerListSubscribersRequest = { + const input: operations.SubscribersControllerListSubscribersRequest = { page: page, limit: limit, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerListSubscribersRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return haltIterator(parsed$); + if (!parsed.ok) { + return haltIterator(parsed); } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/subscribers")(); + const path = pathToFunc("/v1/subscribers")(); - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "page": payload$.page, + const query = encodeFormQuery({ + "limit": payload.limit, + "page": payload.page, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_listSubscribers", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -119,19 +104,41 @@ export async function subscribersList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); } const response = doResult.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, + const responseFields = { + HttpMeta: { Response: response, Request: req }, }; - const [result$, raw$] = await m$.match< + const [result, raw] = await M.match< operations.SubscribersControllerListSubscribersResponse, | SDKError | SDKValidationError @@ -141,15 +148,16 @@ export async function subscribersList( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, operations.SubscribersControllerListSubscribersResponse$inboundSchema, - { key: "Result" }, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return haltIterator(result); } const nextFunc = ( @@ -166,7 +174,7 @@ export async function subscribersList( | ConnectionError > > => { - const page = input$?.page || 0; + const page = input?.page || 0; const nextPage = page + 1; if (!responseData) { @@ -176,20 +184,20 @@ export async function subscribersList( if (!Array.isArray(results) || !results.length) { return () => null; } - const limit = input$?.limit || 0; + const limit = input?.limit || 0; if (results.length < limit) { return () => null; } return () => subscribersList( - client$, + client, nextPage, limit, options, ); }; - const page$ = { ...result$, next: nextFunc(raw$) }; + const page$ = { ...result, next: nextFunc(raw) }; return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/subscribersMessagesMarkAll.ts b/src/funcs/subscribersMessagesMarkAll.ts index fc83af32..4d5df079 100644 --- a/src/funcs/subscribersMessagesMarkAll.ts +++ b/src/funcs/subscribersMessagesMarkAll.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -30,13 +26,13 @@ import { Result } from "../types/fp.js"; * Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. */ export async function subscribersMessagesMarkAll( - client$: NovuCore, - subscriberId: string, + client: NovuCore, markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - number, + operations.SubscribersControllerMarkAllUnreadAsReadResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,69 +42,55 @@ export async function subscribersMessagesMarkAll( | ConnectionError > > { - const input$: operations.SubscribersControllerMarkAllUnreadAsReadRequest = { - subscriberId: subscriberId, + const input: operations.SubscribersControllerMarkAllUnreadAsReadRequest = { markAllMessageAsRequestDto: markAllMessageAsRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MarkAllMessageAsRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.MarkAllMessageAsRequestDto, { explode: true, }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/messages/mark-all")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/messages/mark-all")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_markAllUnreadAsRead", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -118,16 +100,41 @@ export async function subscribersMessagesMarkAll( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - number, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerMarkAllUnreadAsReadResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -136,12 +143,17 @@ export async function subscribersMessagesMarkAll( | RequestTimeoutError | ConnectionError >( - m$.json(201, z.number()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations.SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema, + { key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersMessagesMarkAllAs.ts b/src/funcs/subscribersMessagesMarkAllAs.ts index de3c2f3c..30029091 100644 --- a/src/funcs/subscribersMessagesMarkAllAs.ts +++ b/src/funcs/subscribersMessagesMarkAllAs.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -30,13 +26,13 @@ import { Result } from "../types/fp.js"; * Mark a subscriber messages as seen, read, unseen or unread */ export async function subscribersMessagesMarkAllAs( - client$: NovuCore, - subscriberId: string, + client: NovuCore, messageMarkAsRequestDto: components.MessageMarkAsRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - Array, + operations.SubscribersControllerMarkMessagesAsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,69 +42,55 @@ export async function subscribersMessagesMarkAllAs( | ConnectionError > > { - const input$: operations.SubscribersControllerMarkMessagesAsRequest = { - subscriberId: subscriberId, + const input: operations.SubscribersControllerMarkMessagesAsRequest = { messageMarkAsRequestDto: messageMarkAsRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerMarkMessagesAsRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MessageMarkAsRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.MessageMarkAsRequestDto, { explode: true, }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/messages/mark-as")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/messages/mark-as")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_markMessagesAs", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -118,16 +100,41 @@ export async function subscribersMessagesMarkAllAs( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerMarkMessagesAsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -136,12 +143,17 @@ export async function subscribersMessagesMarkAllAs( | RequestTimeoutError | ConnectionError >( - m$.json(201, z.array(components.MessageEntity$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations.SubscribersControllerMarkMessagesAsResponse$inboundSchema, + { key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersMessagesUpdateAsSeen.ts b/src/funcs/subscribersMessagesUpdateAsSeen.ts index 2e46bb9f..0fc8ece6 100644 --- a/src/funcs/subscribersMessagesUpdateAsSeen.ts +++ b/src/funcs/subscribersMessagesUpdateAsSeen.ts @@ -3,16 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +25,12 @@ import { Result } from "../types/fp.js"; * Mark message action as seen */ export async function subscribersMessagesUpdateAsSeen( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerMarkActionAsSeenRequest, options?: RequestOptions, ): Promise< Result< - components.MessageResponseDto, + operations.SubscribersControllerMarkActionAsSeenResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,74 +40,58 @@ export async function subscribersMessagesUpdateAsSeen( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.SubscribersControllerMarkActionAsSeenRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MarkMessageActionAsSeenDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.MarkMessageActionAsSeenDto, { explode: true, }); - const pathParams$ = { - messageId: encodeSimple$("messageId", payload$.messageId, { + const pathParams = { + messageId: encodeSimple("messageId", payload.messageId, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), - type: encodeSimple$("type", payload$.type, { + type: encodeSimple("type", payload.type, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}", - )(pathParams$); + )(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_markActionAsSeen", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -121,16 +101,41 @@ export async function subscribersMessagesUpdateAsSeen( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.MessageResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerMarkActionAsSeenResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -139,12 +144,17 @@ export async function subscribersMessagesUpdateAsSeen( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.MessageResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations.SubscribersControllerMarkActionAsSeenResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersNotificationsRetrieve.ts b/src/funcs/subscribersNotificationsRetrieve.ts index 4ba293fb..8c3615ff 100644 --- a/src/funcs/subscribersNotificationsRetrieve.ts +++ b/src/funcs/subscribersNotificationsRetrieve.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -28,12 +25,12 @@ import { Result } from "../types/fp.js"; * Get in-app notification feed for a particular subscriber */ export async function subscribersNotificationsRetrieve( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerGetNotificationsFeedRequest, options?: RequestOptions, ): Promise< Result< - operations.SubscribersControllerGetNotificationsFeedResponseBody, + operations.SubscribersControllerGetNotificationsFeedResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,72 +40,55 @@ export async function subscribersNotificationsRetrieve( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.SubscribersControllerGetNotificationsFeedRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/notifications/feed")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/notifications/feed")( + pathParams, ); - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "page": payload$.page, - "payload": payload$.payload, - "read": payload$.read, - "seen": payload$.seen, + const query = encodeFormQuery({ + "limit": payload.limit, + "page": payload.page, + "payload": payload.payload, + "read": payload.read, + "seen": payload.seen, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_getNotificationsFeed", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -118,16 +98,42 @@ export async function subscribersNotificationsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - operations.SubscribersControllerGetNotificationsFeedResponseBody, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerGetNotificationsFeedResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -136,16 +142,18 @@ export async function subscribersNotificationsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, operations - .SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema, + .SubscribersControllerGetNotificationsFeedResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersNotificationsUnseenCount.ts b/src/funcs/subscribersNotificationsUnseenCount.ts index 9f98dc9d..0589d80e 100644 --- a/src/funcs/subscribersNotificationsUnseenCount.ts +++ b/src/funcs/subscribersNotificationsUnseenCount.ts @@ -3,16 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +25,12 @@ import { Result } from "../types/fp.js"; * Get the unseen in-app notifications count for subscribers feed */ export async function subscribersNotificationsUnseenCount( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerGetUnseenCountRequest, options?: RequestOptions, ): Promise< Result< - components.UnseenCountResponse, + operations.SubscribersControllerGetUnseenCountResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,69 +40,52 @@ export async function subscribersNotificationsUnseenCount( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations.SubscribersControllerGetUnseenCountRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/notifications/unseen", - )(pathParams$); + )(pathParams); - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "seen": payload$.seen, + const query = encodeFormQuery({ + "limit": payload.limit, + "seen": payload.seen, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_getUnseenCount", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -116,16 +95,42 @@ export async function subscribersNotificationsUnseenCount( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.UnseenCountResponse, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerGetUnseenCountResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -134,12 +139,17 @@ export async function subscribersNotificationsUnseenCount( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.UnseenCountResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.SubscribersControllerGetUnseenCountResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersPreferencesList.ts b/src/funcs/subscribersPreferencesList.ts index 7d815c92..0207dcfd 100644 --- a/src/funcs/subscribersPreferencesList.ts +++ b/src/funcs/subscribersPreferencesList.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -27,12 +25,13 @@ import { Result } from "../types/fp.js"; * Get subscriber preferences */ export async function subscribersPreferencesList( - client$: NovuCore, + client: NovuCore, subscriberId: string, + includeInactiveChannels?: boolean | undefined, options?: RequestOptions, ): Promise< Result< - Array, + operations.SubscribersControllerListSubscriberPreferencesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -42,67 +41,58 @@ export async function subscribersPreferencesList( | ConnectionError > > { - const input$: + const input: operations.SubscribersControllerListSubscriberPreferencesRequest = { subscriberId: subscriberId, + includeInactiveChannels: includeInactiveChannels, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerListSubscriberPreferencesRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/preferences")( + pathParams, ); - const headers$ = new Headers({ + const query = encodeFormQuery({ + "includeInactiveChannels": payload.includeInactiveChannels, + }); + + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_listSubscriberPreferences", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -112,16 +102,42 @@ export async function subscribersPreferencesList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerListSubscriberPreferencesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -130,15 +146,18 @@ export async function subscribersPreferencesList( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - z.array(components.UpdateSubscriberPreferenceResponseDto$inboundSchema), + operations + .SubscribersControllerListSubscriberPreferencesResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersPreferencesRetrieveByLevel.ts b/src/funcs/subscribersPreferencesRetrieveByLevel.ts index fc9f5db5..351067b7 100644 --- a/src/funcs/subscribersPreferencesRetrieveByLevel.ts +++ b/src/funcs/subscribersPreferencesRetrieveByLevel.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -27,13 +25,13 @@ import { Result } from "../types/fp.js"; * Get subscriber preferences by level */ export async function subscribersPreferencesRetrieveByLevel( - client$: NovuCore, - parameter: operations.Parameter, - subscriberId: string, + client: NovuCore, + request: + operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest, options?: RequestOptions, ): Promise< Result< - Array, + operations.SubscribersControllerGetSubscriberPreferenceByLevelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,72 +41,56 @@ export async function subscribersPreferencesRetrieveByLevel( | ConnectionError > > { - const input$: - operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - parameter: parameter, - subscriberId: subscriberId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations .SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - parameter: encodeSimple$("parameter", payload$.parameter, { + const pathParams = { + parameter: encodeSimple("parameter", payload.parameter, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/preferences/{parameter}", - )(pathParams$); + )(pathParams); + + const query = encodeFormQuery({ + "includeInactiveChannels": payload.includeInactiveChannels, + }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_getSubscriberPreferenceByLevel", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -118,16 +100,42 @@ export async function subscribersPreferencesRetrieveByLevel( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerGetSubscriberPreferenceByLevelResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -136,15 +144,18 @@ export async function subscribersPreferencesRetrieveByLevel( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - z.array(components.GetSubscriberPreferencesResponseDto$inboundSchema), + operations + .SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersPreferencesUpdate.ts b/src/funcs/subscribersPreferencesUpdate.ts index 451e189a..67682342 100644 --- a/src/funcs/subscribersPreferencesUpdate.ts +++ b/src/funcs/subscribersPreferencesUpdate.ts @@ -3,16 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +25,12 @@ import { Result } from "../types/fp.js"; * Update subscriber preference */ export async function subscribersPreferencesUpdate( - client$: NovuCore, + client: NovuCore, request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, options?: RequestOptions, ): Promise< Result< - components.UpdateSubscriberPreferenceResponseDto, + operations.SubscribersControllerUpdateSubscriberPreferenceResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,73 +40,57 @@ export async function subscribersPreferencesUpdate( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + request, + (value) => operations .SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( + const payload = parsed.value; + const body = encodeJSON( "body", - payload$.UpdateSubscriberPreferenceRequestDto, + payload.UpdateSubscriberPreferenceRequestDto, { explode: true }, ); - const pathParams$ = { - parameter: encodeSimple$("parameter", payload$.parameter, { + const pathParams = { + parameter: encodeSimple("parameter", payload.parameter, { explode: false, charEncoding: "percent", }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/subscribers/{subscriberId}/preferences/{parameter}", - )(pathParams$); + )(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_updateSubscriberPreference", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -120,16 +100,41 @@ export async function subscribersPreferencesUpdate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.UpdateSubscriberPreferenceResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerUpdateSubscriberPreferenceResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -138,15 +143,18 @@ export async function subscribersPreferencesUpdate( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + operations + .SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersPreferencesUpdateGlobal.ts b/src/funcs/subscribersPreferencesUpdateGlobal.ts index c509b03e..8d22e367 100644 --- a/src/funcs/subscribersPreferencesUpdateGlobal.ts +++ b/src/funcs/subscribersPreferencesUpdateGlobal.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,14 +26,14 @@ import { Result } from "../types/fp.js"; * Update subscriber global preferences */ export async function subscribersPreferencesUpdateGlobal( - client$: NovuCore, - subscriberId: string, + client: NovuCore, updateSubscriberGlobalPreferencesRequestDto: components.UpdateSubscriberGlobalPreferencesRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.UpdateSubscriberPreferenceResponseDto, + operations.SubscribersControllerUpdateSubscriberGlobalPreferencesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,74 +43,60 @@ export async function subscribersPreferencesUpdateGlobal( | ConnectionError > > { - const input$: + const input: operations.SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { - subscriberId: subscriberId, updateSubscriberGlobalPreferencesRequestDto: updateSubscriberGlobalPreferencesRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( + const payload = parsed.value; + const body = encodeJSON( "body", - payload$.UpdateSubscriberGlobalPreferencesRequestDto, + payload.UpdateSubscriberGlobalPreferencesRequestDto, { explode: true }, ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/preferences")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_updateSubscriberGlobalPreferences", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -123,16 +106,41 @@ export async function subscribersPreferencesUpdateGlobal( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.UpdateSubscriberPreferenceResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerUpdateSubscriberGlobalPreferencesResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -141,15 +149,18 @@ export async function subscribersPreferencesUpdateGlobal( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + operations + .SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts b/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts index 59961603..309edbbd 100644 --- a/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +++ b/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,14 +29,14 @@ import { Result } from "../types/fp.js"; * Used to update the subscriber isOnline flag. */ export async function subscribersPropertiesUpdateOnlineFlag( - client$: NovuCore, - subscriberId: string, + client: NovuCore, updateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerUpdateSubscriberOnlineFlagResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -49,74 +46,60 @@ export async function subscribersPropertiesUpdateOnlineFlag( | ConnectionError > > { - const input$: + const input: operations.SubscribersControllerUpdateSubscriberOnlineFlagRequest = { - subscriberId: subscriberId, updateSubscriberOnlineFlagRequestDto: updateSubscriberOnlineFlagRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( + const payload = parsed.value; + const body = encodeJSON( "body", - payload$.UpdateSubscriberOnlineFlagRequestDto, + payload.UpdateSubscriberOnlineFlagRequestDto, { explode: true }, ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/online-status")( - pathParams$, + const path = pathToFunc("/v1/subscribers/{subscriberId}/online-status")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_updateSubscriberOnlineFlag", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -126,16 +109,41 @@ export async function subscribersPropertiesUpdateOnlineFlag( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerUpdateSubscriberOnlineFlagResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -144,12 +152,18 @@ export async function subscribersPropertiesUpdateOnlineFlag( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersRetrieve.ts b/src/funcs/subscribersRetrieve.ts index 99b4c315..c53191ce 100644 --- a/src/funcs/subscribersRetrieve.ts +++ b/src/funcs/subscribersRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,13 @@ import { Result } from "../types/fp.js"; * Get subscriber by your internal id used to identify the subscriber */ export async function subscribersRetrieve( - client$: NovuCore, + client: NovuCore, subscriberId: string, + includeTopics?: string | undefined, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerGetSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,64 +44,55 @@ export async function subscribersRetrieve( | ConnectionError > > { - const input$: operations.SubscribersControllerGetSubscriberRequest = { + const input: operations.SubscribersControllerGetSubscriberRequest = { subscriberId: subscriberId, + includeTopics: includeTopics, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerGetSubscriberRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams$); + const path = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams); - const headers$ = new Headers({ + const query = encodeFormQuery({ + "includeTopics": payload.includeTopics, + }); + + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_getSubscriber", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +102,42 @@ export async function subscribersRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerGetSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +146,17 @@ export async function subscribersRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.SubscribersControllerGetSubscriberResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/subscribersUpdate.ts b/src/funcs/subscribersUpdate.ts index 6dc677ff..77f405e3 100644 --- a/src/funcs/subscribersUpdate.ts +++ b/src/funcs/subscribersUpdate.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,13 +29,13 @@ import { Result } from "../types/fp.js"; * Used to update the subscriber entity with new information */ export async function subscribersUpdate( - client$: NovuCore, - subscriberId: string, + client: NovuCore, updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, + subscriberId: string, options?: RequestOptions, ): Promise< Result< - components.SubscriberResponseDto, + operations.SubscribersControllerUpdateSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -48,67 +45,53 @@ export async function subscribersUpdate( | ConnectionError > > { - const input$: operations.SubscribersControllerUpdateSubscriberRequest = { - subscriberId: subscriberId, + const input: operations.SubscribersControllerUpdateSubscriberRequest = { updateSubscriberRequestDto: updateSubscriberRequestDto, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.SubscribersControllerUpdateSubscriberRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateSubscriberRequestDto, { explode: true, }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + const pathParams = { + subscriberId: encodeSimple("subscriberId", payload.subscriberId, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams$); + const path = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "SubscribersController_updateSubscriber", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -118,16 +101,41 @@ export async function subscribersUpdate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.SubscriberResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.SubscribersControllerUpdateSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -136,12 +144,17 @@ export async function subscribersUpdate( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.SubscribersControllerUpdateSubscriberResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/tenantsCreate.ts b/src/funcs/tenantsCreate.ts deleted file mode 100644 index b1c7c55b..00000000 --- a/src/funcs/tenantsCreate.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Create tenant - * - * @remarks - * Create tenant under the current environment Tenants is not supported in code first version of the API. - */ -export async function tenantsCreate( - client$: NovuCore, - request: components.CreateTenantRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.CreateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateTenantRequestDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/tenants")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TenantController_createTenant", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.CreateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.CreateTenantResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/tenantsDelete.ts b/src/funcs/tenantsDelete.ts deleted file mode 100644 index ad5bdbe7..00000000 --- a/src/funcs/tenantsDelete.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.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"; - -/** - * Delete tenant - * - * @remarks - * Deletes a tenant entity from the Novu platform. Tenants is not supported in code first version of the API. - */ -export async function tenantsDelete( - client$: NovuCore, - identifier: string, - options?: RequestOptions, -): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.TenantControllerRemoveTenantRequest = { - identifier: identifier, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TenantControllerRemoveTenantRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - identifier: encodeSimple$("identifier", payload$.identifier, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - - const headers$ = new Headers({ - Accept: "*/*", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TenantController_removeTenant", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/tenantsList.ts b/src/funcs/tenantsList.ts deleted file mode 100644 index b86246c2..00000000 --- a/src/funcs/tenantsList.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.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"; -import { - createPageIterator, - haltIterator, - PageIterator, - Paginator, -} from "../types/operations.js"; - -/** - * Get tenants - * - * @remarks - * Returns a list of tenants, could paginated using the `page` and `limit` query parameter. Tenants is not supported in code first version of the API. - */ -export async function tenantsList( - client$: NovuCore, - page?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, -): Promise< - PageIterator< - Result< - operations.TenantControllerListTenantsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > -> { - const input$: operations.TenantControllerListTenantsRequest = { - page: page, - limit: limit, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TenantControllerListTenantsRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return haltIterator(parsed$); - } - const payload$ = parsed$.value; - const body$ = null; - - const path$ = pathToFunc("/v1/tenants")(); - - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "page": payload$.page, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TenantController_listTenants", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.TenantControllerListTenantsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.TenantControllerListTenantsResponse$inboundSchema, { - key: "Result", - }), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } - - const nextFunc = ( - responseData: unknown, - ): Paginator< - Result< - operations.TenantControllerListTenantsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const page = input$?.page || 0; - const nextPage = page + 1; - - if (!responseData) { - return () => null; - } - const results = dlv(responseData, "data.resultArray"); - if (!Array.isArray(results) || !results.length) { - return () => null; - } - const limit = input$?.limit || 0; - if (results.length < limit) { - return () => null; - } - - return () => - tenantsList( - client$, - nextPage, - limit, - options, - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; -} diff --git a/src/funcs/tenantsRetrieve.ts b/src/funcs/tenantsRetrieve.ts deleted file mode 100644 index 38b5d8b4..00000000 --- a/src/funcs/tenantsRetrieve.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Get tenant - * - * @remarks - * Get tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - */ -export async function tenantsRetrieve( - client$: NovuCore, - identifier: string, - options?: RequestOptions, -): Promise< - Result< - components.GetTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.TenantControllerGetTenantByIdRequest = { - identifier: identifier, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TenantControllerGetTenantByIdRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - identifier: encodeSimple$("identifier", payload$.identifier, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TenantController_getTenantById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.GetTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetTenantResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/tenantsUpdate.ts b/src/funcs/tenantsUpdate.ts deleted file mode 100644 index 51eb7f5e..00000000 --- a/src/funcs/tenantsUpdate.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Update tenant - * - * @remarks - * Update tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - */ -export async function tenantsUpdate( - client$: NovuCore, - identifier: string, - updateTenantRequestDto: components.UpdateTenantRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.UpdateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.TenantControllerUpdateTenantRequest = { - identifier: identifier, - updateTenantRequestDto: updateTenantRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TenantControllerUpdateTenantRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateTenantRequestDto, { - explode: true, - }); - - const pathParams$ = { - identifier: encodeSimple$("identifier", payload$.identifier, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TenantController_updateTenant", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.UpdateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UpdateTenantResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/topicsCreate.ts b/src/funcs/topicsCreate.ts index 478b92e2..e2f8b70d 100644 --- a/src/funcs/topicsCreate.ts +++ b/src/funcs/topicsCreate.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -28,12 +29,12 @@ import { Result } from "../types/fp.js"; * Create a topic */ export async function topicsCreate( - client$: NovuCore, + client: NovuCore, request: components.CreateTopicRequestDto, options?: RequestOptions, ): Promise< Result< - components.CreateTopicResponseDto, + operations.TopicsControllerCreateTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,53 +44,37 @@ export async function topicsCreate( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateTopicRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => components.CreateTopicRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/topics")(); + const path = pathToFunc("/v1/topics")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_createTopic", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -99,16 +84,41 @@ export async function topicsCreate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.CreateTopicResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerCreateTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -117,12 +127,16 @@ export async function topicsCreate( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.CreateTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(201, operations.TopicsControllerCreateTopicResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsDelete.ts b/src/funcs/topicsDelete.ts index 7da8e531..cf295ba2 100644 --- a/src/funcs/topicsDelete.ts +++ b/src/funcs/topicsDelete.ts @@ -2,11 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Delete a topic by its topic key if it has no subscribers */ export async function topicsDelete( - client$: NovuCore, + client: NovuCore, topicKey: string, options?: RequestOptions, ): Promise< Result< - void, + operations.TopicsControllerDeleteTopicResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,64 +43,48 @@ export async function topicsDelete( | ConnectionError > > { - const input$: operations.TopicsControllerDeleteTopicRequest = { + const input: operations.TopicsControllerDeleteTopicRequest = { topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerDeleteTopicRequest$outboundSchema.parse( - value$, - ), + const parsed = safeParse( + input, + (value) => + operations.TopicsControllerDeleteTopicRequest$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + const pathParams = { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); + const path = pathToFunc("/v1/topics/{topicKey}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_deleteTopic", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["404", "409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -111,16 +94,41 @@ export async function topicsDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["404", "409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerDeleteTopicResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -129,12 +137,17 @@ export async function topicsDelete( | RequestTimeoutError | ConnectionError >( - m$.nil(204, z.void()), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 204, + operations.TopicsControllerDeleteTopicResponse$inboundSchema.optional(), + { hdrs: true }, + ), + M.fail([404, 409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsList.ts b/src/funcs/topicsList.ts index 78b1c098..f545ecc1 100644 --- a/src/funcs/topicsList.ts +++ b/src/funcs/topicsList.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter */ export async function topicsList( - client$: NovuCore, + client: NovuCore, request: operations.TopicsControllerListTopicsRequest, options?: RequestOptions, ): Promise< Result< - components.FilterTopicsResponseDto, + operations.TopicsControllerListTopicsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,60 +43,43 @@ export async function topicsList( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerListTopicsRequest$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => + operations.TopicsControllerListTopicsRequest$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const path$ = pathToFunc("/v1/topics")(); + const path = pathToFunc("/v1/topics")(); - const query$ = encodeFormQuery$({ - "key": payload$.key, - "page": payload$.page, - "pageSize": payload$.pageSize, + const query = encodeFormQuery({ + "key": payload.key, + "page": payload.page, + "pageSize": payload.pageSize, }); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_listTopics", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -107,16 +89,42 @@ export async function topicsList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.FilterTopicsResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerListTopicsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -125,12 +133,16 @@ export async function topicsList( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.FilterTopicsResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(200, operations.TopicsControllerListTopicsResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsRename.ts b/src/funcs/topicsRename.ts index d9685ee8..79f89ce9 100644 --- a/src/funcs/topicsRename.ts +++ b/src/funcs/topicsRename.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,13 +29,13 @@ import { Result } from "../types/fp.js"; * Rename a topic by providing a new name */ export async function topicsRename( - client$: NovuCore, - topicKey: string, + client: NovuCore, renameTopicRequestDto: components.RenameTopicRequestDto, + topicKey: string, options?: RequestOptions, ): Promise< Result< - components.RenameTopicResponseDto, + operations.TopicsControllerRenameTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -48,68 +45,52 @@ export async function topicsRename( | ConnectionError > > { - const input$: operations.TopicsControllerRenameTopicRequest = { - topicKey: topicKey, + const input: operations.TopicsControllerRenameTopicRequest = { renameTopicRequestDto: renameTopicRequestDto, + topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerRenameTopicRequest$outboundSchema.parse( - value$, - ), + const parsed = safeParse( + input, + (value) => + operations.TopicsControllerRenameTopicRequest$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RenameTopicRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.RenameTopicRequestDto, { explode: true, }); - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + const pathParams = { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); + const path = pathToFunc("/v1/topics/{topicKey}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_renameTopic", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -119,16 +100,41 @@ export async function topicsRename( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.RenameTopicResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerRenameTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -137,12 +143,16 @@ export async function topicsRename( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.RenameTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(200, operations.TopicsControllerRenameTopicResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsRetrieve.ts b/src/funcs/topicsRetrieve.ts index 86192d23..8f4b71a0 100644 --- a/src/funcs/topicsRetrieve.ts +++ b/src/funcs/topicsRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * Get a topic by its topic key */ export async function topicsRetrieve( - client$: NovuCore, + client: NovuCore, topicKey: string, options?: RequestOptions, ): Promise< Result< - components.GetTopicResponseDto, + operations.TopicsControllerGetTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,62 +43,48 @@ export async function topicsRetrieve( | ConnectionError > > { - const input$: operations.TopicsControllerGetTopicRequest = { + const input: operations.TopicsControllerGetTopicRequest = { topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerGetTopicRequest$outboundSchema.parse(value$), + const parsed = safeParse( + input, + (value) => + operations.TopicsControllerGetTopicRequest$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + const pathParams = { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); + const path = pathToFunc("/v1/topics/{topicKey}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_getTopic", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -109,16 +94,41 @@ export async function topicsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.GetTopicResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerGetTopicResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -127,12 +137,16 @@ export async function topicsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.GetTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(200, operations.TopicsControllerGetTopicResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsSubscribersAssign.ts b/src/funcs/topicsSubscribersAssign.ts index d3337afe..e868c7bd 100644 --- a/src/funcs/topicsSubscribersAssign.ts +++ b/src/funcs/topicsSubscribersAssign.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -33,13 +29,13 @@ import { Result } from "../types/fp.js"; * Add subscribers to a topic by key */ export async function topicsSubscribersAssign( - client$: NovuCore, - topicKey: string, + client: NovuCore, addSubscribersRequestDto: components.AddSubscribersRequestDto, + topicKey: string, options?: RequestOptions, ): Promise< Result< - void, + operations.TopicsControllerAddSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -49,68 +45,54 @@ export async function topicsSubscribersAssign( | ConnectionError > > { - const input$: operations.TopicsControllerAddSubscribersRequest = { - topicKey: topicKey, + const input: operations.TopicsControllerAddSubscribersRequest = { addSubscribersRequestDto: addSubscribersRequestDto, + topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.TopicsControllerAddSubscribersRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.AddSubscribersRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.AddSubscribersRequestDto, { explode: true, }); - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + const pathParams = { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/topics/{topicKey}/subscribers")(pathParams$); + const path = pathToFunc("/v1/topics/{topicKey}/subscribers")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_addSubscribers", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -120,16 +102,41 @@ export async function topicsSubscribersAssign( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerAddSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -138,12 +145,18 @@ export async function topicsSubscribersAssign( | RequestTimeoutError | ConnectionError >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 204, + operations.TopicsControllerAddSubscribersResponse$inboundSchema + .optional(), + { hdrs: true }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsSubscribersDelete.ts b/src/funcs/topicsSubscribersDelete.ts index 557f4f40..f3059e17 100644 --- a/src/funcs/topicsSubscribersDelete.ts +++ b/src/funcs/topicsSubscribersDelete.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -33,13 +29,13 @@ import { Result } from "../types/fp.js"; * Remove subscribers from a topic */ export async function topicsSubscribersDelete( - client$: NovuCore, - topicKey: string, + client: NovuCore, removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, + topicKey: string, options?: RequestOptions, ): Promise< Result< - void, + operations.TopicsControllerRemoveSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -49,70 +45,56 @@ export async function topicsSubscribersDelete( | ConnectionError > > { - const input$: operations.TopicsControllerRemoveSubscribersRequest = { - topicKey: topicKey, + const input: operations.TopicsControllerRemoveSubscribersRequest = { removeSubscribersRequestDto: removeSubscribersRequestDto, + topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.TopicsControllerRemoveSubscribersRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RemoveSubscribersRequestDto, { + const payload = parsed.value; + const body = encodeJSON("body", payload.RemoveSubscribersRequestDto, { explode: true, }); - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + const pathParams = { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/topics/{topicKey}/subscribers/removal")( - pathParams$, + const path = pathToFunc("/v1/topics/{topicKey}/subscribers/removal")( + pathParams, ); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "*/*", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_removeSubscribers", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -122,16 +104,41 @@ export async function topicsSubscribersDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - void, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerRemoveSubscribersResponse | undefined, | SDKError | SDKValidationError | UnexpectedClientError @@ -140,12 +147,18 @@ export async function topicsSubscribersDelete( | RequestTimeoutError | ConnectionError >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.nil( + 204, + operations.TopicsControllerRemoveSubscribersResponse$inboundSchema + .optional(), + { hdrs: true }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/topicsSubscribersRetrieve.ts b/src/funcs/topicsSubscribersRetrieve.ts index 856d0a62..d4b068ae 100644 --- a/src/funcs/topicsSubscribersRetrieve.ts +++ b/src/funcs/topicsSubscribersRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,13 +28,13 @@ import { Result } from "../types/fp.js"; * Check if a subscriber belongs to a certain topic */ export async function topicsSubscribersRetrieve( - client$: NovuCore, + client: NovuCore, externalSubscriberId: string, topicKey: string, options?: RequestOptions, ): Promise< Result< - components.TopicSubscriberDto, + operations.TopicsControllerGetTopicSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -45,72 +44,58 @@ export async function topicsSubscribersRetrieve( | ConnectionError > > { - const input$: operations.TopicsControllerGetTopicSubscriberRequest = { + const input: operations.TopicsControllerGetTopicSubscriberRequest = { externalSubscriberId: externalSubscriberId, topicKey: topicKey, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations.TopicsControllerGetTopicSubscriberRequest$outboundSchema.parse( - value$, + value, ), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - externalSubscriberId: encodeSimple$( + const pathParams = { + externalSubscriberId: encodeSimple( "externalSubscriberId", - payload$.externalSubscriberId, + payload.externalSubscriberId, { explode: false, charEncoding: "percent" }, ), - topicKey: encodeSimple$("topicKey", payload$.topicKey, { + topicKey: encodeSimple("topicKey", payload.topicKey, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc( + const path = pathToFunc( "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}", - )(pathParams$); + )(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "TopicsController_getTopicSubscriber", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -120,16 +105,41 @@ export async function topicsSubscribersRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.TopicSubscriberDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.TopicsControllerGetTopicSubscriberResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -138,12 +148,17 @@ export async function topicsSubscribersRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.TopicSubscriberDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.TopicsControllerGetTopicSubscriberResponse$inboundSchema, + { key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/trigger.ts b/src/funcs/trigger.ts index ae672b44..1c976f9b 100644 --- a/src/funcs/trigger.ts +++ b/src/funcs/trigger.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -31,12 +32,12 @@ import { Result } from "../types/fp.js"; * Additional information can be passed according the body interface below. */ export async function trigger( - client$: NovuCore, + client: NovuCore, request: components.TriggerEventRequestDto, options?: RequestOptions, ): Promise< Result< - components.TriggerEventResponseDto, + operations.EventsControllerTriggerResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,53 +47,37 @@ export async function trigger( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.TriggerEventRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => components.TriggerEventRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/events/trigger")(); + const path = pathToFunc("/v1/events/trigger")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "EventsController_trigger", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -102,16 +87,41 @@ export async function trigger( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.TriggerEventResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EventsControllerTriggerResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -120,12 +130,16 @@ export async function trigger( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.TriggerEventResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(201, operations.EventsControllerTriggerResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/triggerBroadcast.ts b/src/funcs/triggerBroadcast.ts index 7004f5b8..beabf47b 100644 --- a/src/funcs/triggerBroadcast.ts +++ b/src/funcs/triggerBroadcast.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -26,15 +27,16 @@ import { Result } from "../types/fp.js"; * * @remarks * Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. + * * In the future could be used to trigger events to a subset of subscribers based on defined filters. */ export async function triggerBroadcast( - client$: NovuCore, + client: NovuCore, request: components.TriggerEventToAllRequestDto, options?: RequestOptions, ): Promise< Result< - components.TriggerEventResponseDto, + operations.EventsControllerBroadcastEventToAllResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,54 +46,38 @@ export async function triggerBroadcast( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.TriggerEventToAllRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => + components.TriggerEventToAllRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/events/trigger/broadcast")(); + const path = pathToFunc("/v1/events/trigger/broadcast")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "EventsController_broadcastEventToAll", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -101,16 +87,41 @@ export async function triggerBroadcast( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.TriggerEventResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EventsControllerBroadcastEventToAllResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -119,12 +130,17 @@ export async function triggerBroadcast( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.TriggerEventResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations.EventsControllerBroadcastEventToAllResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/triggerBulk.ts b/src/funcs/triggerBulk.ts index 7072dd0d..b96c8557 100644 --- a/src/funcs/triggerBulk.ts +++ b/src/funcs/triggerBulk.ts @@ -2,11 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -20,6 +19,7 @@ import { } 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"; /** @@ -31,12 +31,12 @@ import { Result } from "../types/fp.js"; * The bulk API is limited to 100 events per request. */ export async function triggerBulk( - client$: NovuCore, + client: NovuCore, request: components.BulkTriggerEventDto, options?: RequestOptions, ): Promise< Result< - Array, + operations.EventsControllerTriggerBulkResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -46,53 +46,37 @@ export async function triggerBulk( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.BulkTriggerEventDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => components.BulkTriggerEventDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/events/trigger/bulk")(); + const path = pathToFunc("/v1/events/trigger/bulk")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "EventsController_triggerBulk", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -102,16 +86,41 @@ export async function triggerBulk( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EventsControllerTriggerBulkResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -120,12 +129,16 @@ export async function triggerBulk( | RequestTimeoutError | ConnectionError >( - m$.json(201, z.array(components.TriggerEventResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json(201, operations.EventsControllerTriggerBulkResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowGroupsCreate.ts b/src/funcs/workflowGroupsCreate.ts index 64aae9b6..a9a3fa1a 100644 --- a/src/funcs/workflowGroupsCreate.ts +++ b/src/funcs/workflowGroupsCreate.ts @@ -3,9 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -19,6 +19,7 @@ import { } 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"; /** @@ -28,12 +29,12 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsCreate( - client$: NovuCore, + client: NovuCore, request: components.CreateNotificationGroupRequestDto, options?: RequestOptions, ): Promise< Result< - components.NotificationGroupResponseDto, + operations.NotificationGroupsControllerCreateNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -43,54 +44,38 @@ export async function workflowGroupsCreate( | ConnectionError > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.CreateNotificationGroupRequestDto$outboundSchema.parse(value$), + const parsed = safeParse( + request, + (value) => + components.CreateNotificationGroupRequestDto$outboundSchema.parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); - const path$ = pathToFunc("/v1/notification-groups")(); + const path = pathToFunc("/v1/notification-groups")(); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationGroupsController_createNotificationGroup", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -100,16 +85,41 @@ export async function workflowGroupsCreate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.NotificationGroupResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationGroupsControllerCreateNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -118,12 +128,18 @@ export async function workflowGroupsCreate( | RequestTimeoutError | ConnectionError >( - m$.json(201, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 201, + operations + .NotificationGroupsControllerCreateNotificationGroupResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowGroupsDelete.ts b/src/funcs/workflowGroupsDelete.ts index 9bed9bf5..2828ea51 100644 --- a/src/funcs/workflowGroupsDelete.ts +++ b/src/funcs/workflowGroupsDelete.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsDelete( - client$: NovuCore, + client: NovuCore, id: string, options?: RequestOptions, ): Promise< Result< - components.DeleteNotificationGroupResponseDto, + operations.NotificationGroupsControllerDeleteNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,65 +43,51 @@ export async function workflowGroupsDelete( | ConnectionError > > { - const input$: + const input: operations.NotificationGroupsControllerDeleteNotificationGroupRequest = { id: id, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { + const pathParams = { + id: encodeSimple("id", payload.id, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); + const path = pathToFunc("/v1/notification-groups/{id}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationGroupsController_deleteNotificationGroup", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -112,16 +97,41 @@ export async function workflowGroupsDelete( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.DeleteNotificationGroupResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationGroupsControllerDeleteNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -130,12 +140,18 @@ export async function workflowGroupsDelete( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.DeleteNotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .NotificationGroupsControllerDeleteNotificationGroupResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowGroupsList.ts b/src/funcs/workflowGroupsList.ts index 8edd041f..a10cfeab 100644 --- a/src/funcs/workflowGroupsList.ts +++ b/src/funcs/workflowGroupsList.ts @@ -2,13 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.js"; +import * as M from "../lib/matchers.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, @@ -18,6 +16,7 @@ import { } 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"; /** @@ -27,11 +26,11 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsList( - client$: NovuCore, + client: NovuCore, options?: RequestOptions, ): Promise< Result< - Array, + operations.NotificationGroupsControllerListNotificationGroupsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -41,38 +40,25 @@ export async function workflowGroupsList( | ConnectionError > > { - const path$ = pathToFunc("/v1/notification-groups")(); + const path = pathToFunc("/v1/notification-groups")(); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationGroupsController_listNotificationGroups", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -82,16 +68,40 @@ export async function workflowGroupsList( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - Array, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationGroupsControllerListNotificationGroupsResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -100,15 +110,18 @@ export async function workflowGroupsList( | RequestTimeoutError | ConnectionError >( - m$.json( + M.json( 200, - z.array(components.NotificationGroupResponseDto$inboundSchema), + operations + .NotificationGroupsControllerListNotificationGroupsResponse$inboundSchema, + { hdrs: true, key: "Result" }, ), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowGroupsRetrieve.ts b/src/funcs/workflowGroupsRetrieve.ts index da00f3e6..b79ebb53 100644 --- a/src/funcs/workflowGroupsRetrieve.ts +++ b/src/funcs/workflowGroupsRetrieve.ts @@ -3,13 +3,12 @@ */ import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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, @@ -29,12 +28,12 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsRetrieve( - client$: NovuCore, + client: NovuCore, id: string, options?: RequestOptions, ): Promise< Result< - components.NotificationGroupResponseDto, + operations.NotificationGroupsControllerGetNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -44,65 +43,51 @@ export async function workflowGroupsRetrieve( | ConnectionError > > { - const input$: + const input: operations.NotificationGroupsControllerGetNotificationGroupRequest = { id: id, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = null; + const payload = parsed.value; + const body = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { + const pathParams = { + id: encodeSimple("id", payload.id, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); + const path = pathToFunc("/v1/notification-groups/{id}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationGroupsController_getNotificationGroup", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -112,16 +97,41 @@ export async function workflowGroupsRetrieve( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.NotificationGroupResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationGroupsControllerGetNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -130,12 +140,18 @@ export async function workflowGroupsRetrieve( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .NotificationGroupsControllerGetNotificationGroupResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowGroupsUpdate.ts b/src/funcs/workflowGroupsUpdate.ts index 284d5d50..9737567e 100644 --- a/src/funcs/workflowGroupsUpdate.ts +++ b/src/funcs/workflowGroupsUpdate.ts @@ -3,12 +3,9 @@ */ import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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"; @@ -32,14 +29,14 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsUpdate( - client$: NovuCore, - id: string, + client: NovuCore, createNotificationGroupRequestDto: components.CreateNotificationGroupRequestDto, + id: string, options?: RequestOptions, ): Promise< Result< - components.NotificationGroupResponseDto, + operations.NotificationGroupsControllerUpdateNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -49,71 +46,55 @@ export async function workflowGroupsUpdate( | ConnectionError > > { - const input$: + const input: operations.NotificationGroupsControllerUpdateNotificationGroupRequest = { - id: id, createNotificationGroupRequestDto: createNotificationGroupRequestDto, + id: id, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => + const parsed = safeParse( + input, + (value) => operations .NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema - .parse(value$), + .parse(value), "Input validation failed", ); - if (!parsed$.ok) { - return parsed$; + if (!parsed.ok) { + return parsed; } - const payload$ = parsed$.value; - const body$ = encodeJSON$( - "body", - payload$.CreateNotificationGroupRequestDto, - { explode: true }, - ); + const payload = parsed.value; + const body = encodeJSON("body", payload.CreateNotificationGroupRequestDto, { + explode: true, + }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { + const pathParams = { + id: encodeSimple("id", payload.id, { explode: false, charEncoding: "percent", }), }; - const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); + const path = pathToFunc("/v1/notification-groups/{id}")(pathParams); - const headers$ = new Headers({ + const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json", }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "NotificationGroupsController_updateNotificationGroup", oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PATCH", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + resolvedSecurity: requestSecurity, - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], + securitySource: client._options.apiKey, retryConfig: options?.retries - || client$.options$.retryConfig + || client._options.retryConfig || { strategy: "backoff", backoff: { @@ -123,16 +104,41 @@ export async function workflowGroupsUpdate( maxElapsedTime: 3600000, }, retryConnectionErrors: true, - }, + } + || { strategy: "none" }, retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + 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: ["409", "429", "4XX", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; } const response = doResult.value; - const [result$] = await m$.match< - components.NotificationGroupResponseDto, + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.NotificationGroupsControllerUpdateNotificationGroupResponse, | SDKError | SDKValidationError | UnexpectedClientError @@ -141,12 +147,18 @@ export async function workflowGroupsUpdate( | RequestTimeoutError | ConnectionError >( - m$.json(200, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; + M.json( + 200, + operations + .NotificationGroupsControllerUpdateNotificationGroupResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + M.fail([409, 429, 503]), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; } - return result$; + return result; } diff --git a/src/funcs/workflowsCreate.ts b/src/funcs/workflowsCreate.ts deleted file mode 100644 index be87fc98..00000000 --- a/src/funcs/workflowsCreate.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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 { Result } from "../types/fp.js"; - -/** - * Create workflow - * - * @remarks - * Workflow was previously named notification template - */ -export async function workflowsCreate( - client$: NovuCore, - request: components.CreateWorkflowRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - components.CreateWorkflowRequestDto$outboundSchema.parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); - - const path$ = pathToFunc("/v1/workflows")(); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_create", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.WorkflowResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsDelete.ts b/src/funcs/workflowsDelete.ts deleted file mode 100644 index 936ecf50..00000000 --- a/src/funcs/workflowsDelete.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Delete workflow - * - * @remarks - * Workflow was previously named notification template - */ -export async function workflowsDelete( - client$: NovuCore, - workflowId: string, - options?: RequestOptions, -): Promise< - Result< - components.DataBooleanDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: workflowId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema - .parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_deleteWorkflowById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.DataBooleanDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DataBooleanDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsList.ts b/src/funcs/workflowsList.ts deleted file mode 100644 index 039ecb7d..00000000 --- a/src/funcs/workflowsList.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Get workflows - * - * @remarks - * Workflows were previously named notification templates - */ -export async function workflowsList( - client$: NovuCore, - request: operations.WorkflowControllerListWorkflowsRequest, - options?: RequestOptions, -): Promise< - Result< - components.WorkflowsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.WorkflowControllerListWorkflowsRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const path$ = pathToFunc("/v1/workflows")(); - - const query$ = encodeFormQuery$({ - "limit": payload$.limit, - "page": payload$.page, - "query": payload$.query, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_listWorkflows", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.WorkflowsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WorkflowsResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsRetrieve.ts b/src/funcs/workflowsRetrieve.ts deleted file mode 100644 index 38cf326a..00000000 --- a/src/funcs/workflowsRetrieve.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Get workflow - * - * @remarks - * Workflow was previously named notification template - */ -export async function workflowsRetrieve( - client$: NovuCore, - workflowId: string, - options?: RequestOptions, -): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.WorkflowControllerGetWorkflowByIdRequest = { - workflowId: workflowId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.WorkflowControllerGetWorkflowByIdRequest$outboundSchema.parse( - value$, - ), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_getWorkflowById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WorkflowResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsStatusUpdate.ts b/src/funcs/workflowsStatusUpdate.ts deleted file mode 100644 index 31e1d20a..00000000 --- a/src/funcs/workflowsStatusUpdate.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Update workflow status - * - * @remarks - * Workflow was previously named notification template - */ -export async function workflowsStatusUpdate( - client$: NovuCore, - workflowId: string, - changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.WorkflowControllerUpdateActiveStatusRequest = { - workflowId: workflowId, - changeWorkflowStatusRequestDto: changeWorkflowStatusRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.WorkflowControllerUpdateActiveStatusRequest$outboundSchema - .parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.ChangeWorkflowStatusRequestDto, { - explode: true, - }); - - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/workflows/{workflowId}/status")(pathParams$); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_updateActiveStatus", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WorkflowResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsUpdate.ts b/src/funcs/workflowsUpdate.ts deleted file mode 100644 index 7a0ba097..00000000 --- a/src/funcs/workflowsUpdate.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import { - encodeJSON as encodeJSON$, - encodeSimple as encodeSimple$, -} from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ 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"; - -/** - * Update workflow - * - * @remarks - * Workflow was previously named notification template - */ -export async function workflowsUpdate( - client$: NovuCore, - workflowId: string, - updateWorkflowRequestDto: components.UpdateWorkflowRequestDto, - options?: RequestOptions, -): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.WorkflowControllerUpdateWorkflowByIdRequest = { - workflowId: workflowId, - updateWorkflowRequestDto: updateWorkflowRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.WorkflowControllerUpdateWorkflowByIdRequest$outboundSchema - .parse(value$), - "Input validation failed", - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateWorkflowRequestDto, { - explode: true, - }); - - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_updateWorkflowById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WorkflowResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/workflowsVariablesRetrieve.ts b/src/funcs/workflowsVariablesRetrieve.ts deleted file mode 100644 index 1062f192..00000000 --- a/src/funcs/workflowsVariablesRetrieve.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { NovuCore } from "../core.js"; -import * as m$ from "../lib/matchers.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 { Result } from "../types/fp.js"; - -/** - * Get available variables - * - * @remarks - * Get the variables that can be used in the workflow - */ -export async function workflowsVariablesRetrieve( - client$: NovuCore, - options?: RequestOptions, -): Promise< - Result< - components.VariablesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path$ = pathToFunc("/v1/workflows/variables")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "WorkflowController_getWorkflowVariables", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$(context, { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["409", "429", "4XX", "503", "5XX"], - retryConfig: options?.retries - || client$.options$.retryConfig - || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 30000, - exponent: 1.5, - maxElapsedTime: 3600000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - components.VariablesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.VariablesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]), - )(response); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts index b6872b43..70649734 100644 --- a/src/hooks/registration.ts +++ b/src/hooks/registration.ts @@ -1,28 +1,14 @@ -import { isPlainObject } from "../lib/is-plain-object"; -import {AfterSuccessContext, AfterSuccessHook, Hooks} from "./types"; +import { Hooks } from "./types.js"; -export function initHooks(hooks: Hooks) { - hooks.registerAfterSuccessHook(new TransformResponse()); -} +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ -function isResponseEnveloped(body: unknown): body is { data: unknown } { - return isPlainObject(body) && "data" in body && Object.keys(body).every(key => key === "data") && isPlainObject(body.data); +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance } - -class TransformResponse implements AfterSuccessHook { - - async afterSuccess(_context: AfterSuccessContext, response: Response) { - if (!response.ok) { - return response; - } - - const body: unknown = await response.json(); - const validBody = - isResponseEnveloped(body); - if (!validBody) { - return new Response(JSON.stringify(body), response); - } - return new Response(JSON.stringify(body.data), response); - } - -} \ No newline at end of file diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 656b9e37..df5237dc 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -3,11 +3,15 @@ */ import { HTTPClient, RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; +import { SecurityState } from "../lib/security.js"; export type HookContext = { operationID: string; oAuth2Scopes?: string[]; securitySource?: any | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; }; export type Awaitable = T | Promise; diff --git a/src/lib/config.ts b/src/lib/config.ts index 0a6e23cb..c8302a5a 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.0.1-alpha.11", - genVersion: "2.416.6", - userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.11 2.416.6 1.0 @novu/api", + sdkVersion: "0.0.1-alpha.25", + genVersion: "2.462.1", + userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.25 2.462.1 1.0 @novu/api", } as const; diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 55a9e14b..19b46b33 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -205,7 +205,7 @@ export function match( raw = await response.json(); break; case "bytes": - raw = await response.arrayBuffer(); + raw = new Uint8Array(await response.arrayBuffer()); break; case "stream": raw = response.body; diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts index 23794a2b..48b28674 100644 --- a/src/lib/primitives.ts +++ b/src/lib/primitives.ts @@ -2,6 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +class InvariantError extends Error { + constructor(message: string) { + super(message); + this.name = "InvariantError"; + } +} + +export function invariant( + condition: unknown, + message: string, +): asserts condition { + if (!condition) { + throw new InvariantError(message); + } +} + +export type ExactPartial = { + [P in keyof T]?: T[P] | undefined; +}; + export type Remap = { [k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */ ? Mapping[k] diff --git a/src/lib/retries.ts b/src/lib/retries.ts index df3e0bc2..93ebc8de 100644 --- a/src/lib/retries.ts +++ b/src/lib/retries.ts @@ -26,23 +26,44 @@ export type RetryConfig = retryConnectionErrors?: boolean; }; -class PermanentError extends Error { - inner: unknown; +/** + * PermanentError is an error that is not recoverable. Throwing this error will + * cause a retry loop to terminate. + */ +export class PermanentError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + + constructor(message: string, options?: { cause?: unknown }) { + let msg = message; + if (options?.cause) { + msg += `: ${options.cause}`; + } - constructor(inner: unknown) { - super("Permanent error"); - this.inner = inner; + super(msg, options); + this.name = "PermanentError"; + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = options?.cause; + } Object.setPrototypeOf(this, PermanentError.prototype); } } -class TemporaryError extends Error { - res: Response; +/** + * TemporaryError is an error is used to signal that an HTTP request can be + * retried as part of a retry loop. If retry attempts are exhausted and this + * error is thrown, the response will be returned to the caller. + */ +export class TemporaryError extends Error { + response: Response; - constructor(res: Response) { - super("Temporary error"); - this.res = res; + constructor(message: string, response: Response) { + super(message); + this.response = response; + this.name = "TemporaryError"; Object.setPrototypeOf(this, TemporaryError.prototype); } @@ -80,11 +101,14 @@ function wrapFetcher( try { const res = await fn(); if (isRetryableResponse(res, options.statusCodes)) { - throw new TemporaryError(res); + throw new TemporaryError( + "Response failed with retryable status code", + res, + ); } return res; - } catch (err) { + } catch (err: unknown) { if (err instanceof TemporaryError) { throw err; } @@ -96,7 +120,7 @@ function wrapFetcher( throw err; } - throw new PermanentError(err); + throw new PermanentError("Permanent error", { cause: err }); } }; } @@ -139,37 +163,25 @@ async function retryBackoff( try { const res = await fn(); return res; - } catch (err) { + } catch (err: unknown) { if (err instanceof PermanentError) { - throw err.inner; + throw err.cause; } const elapsed = Date.now() - start; if (elapsed > maxElapsedTime) { if (err instanceof TemporaryError) { - return err.res; + return err.response; } throw err; } let retryInterval = 0; - if (err instanceof TemporaryError && err.res && err.res.headers) { - const retryVal = err.res.headers.get("retry-after") || ""; - if (retryVal != "") { - const parsedNumber = Number(retryVal); - if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) { - retryInterval = parsedNumber * 1000; - } else { - const parsedDate = Date.parse(retryVal); - if (!isNaN(parsedDate)) { - const deltaMS = parsedDate - Date.now(); - retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0; - } - } - } + if (err instanceof TemporaryError) { + retryInterval = retryIntervalFromResponse(err.response); } - if (retryInterval == 0) { + if (retryInterval <= 0) { retryInterval = initialInterval * Math.pow(x, exponent) + Math.random() * 1000; } @@ -182,6 +194,26 @@ async function retryBackoff( } } +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + + const parsedNumber = Number(retryVal); + if (Number.isInteger(parsedNumber)) { + return parsedNumber * 1000; + } + + const parsedDate = Date.parse(retryVal); + if (Number.isInteger(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + return deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + + return 0; +} + async function delay(delay: number): Promise { return new Promise((resolve) => setTimeout(resolve, delay)); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 5e2a8909..2ce720a9 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -71,11 +71,11 @@ const isBrowserLike = webWorkerLike || (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { - private readonly httpClient: HTTPClient; - protected readonly baseURL: URL | null; - protected readonly hooks$: SDKHooks; - protected readonly logger?: Logger | undefined; - public readonly options$: SDKOptions & { hooks?: SDKHooks }; + readonly #httpClient: HTTPClient; + readonly #hooks: SDKHooks; + readonly #logger?: Logger | undefined; + protected readonly _baseURL: URL | null; + public readonly _options: SDKOptions & { hooks?: SDKHooks }; constructor(options: SDKOptions = {}) { const opt = options as unknown; @@ -85,33 +85,33 @@ export class ClientSDK { && "hooks" in opt && opt.hooks instanceof SDKHooks ) { - this.hooks$ = opt.hooks; + this.#hooks = opt.hooks; } else { - this.hooks$ = new SDKHooks(); + this.#hooks = new SDKHooks(); } - this.options$ = { ...options, hooks: this.hooks$ }; + this._options = { ...options, hooks: this.#hooks }; const url = serverURLFromOptions(options); if (url) { url.pathname = url.pathname.replace(/\/+$/, "") + "/"; } - const { baseURL, client } = this.hooks$.sdkInit({ + const { baseURL, client } = this.#hooks.sdkInit({ baseURL: url, client: options.httpClient || new HTTPClient(), }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + this._baseURL = baseURL; + this.#httpClient = client; + this.#logger = options.debugLogger; } - public createRequest$( + public _createRequest( context: HookContext, conf: RequestConfig, options?: RequestOptions, ): Result { const { method, path, query, headers: opHeaders, security } = conf; - const base = conf.baseURL ?? this.baseURL; + const base = conf.baseURL ?? this._baseURL; if (!base) { return ERR(new InvalidRequestError("No base URL provided for operation")); } @@ -195,7 +195,7 @@ export class ClientSDK { let input; try { - input = this.hooks$.beforeCreateRequest(context, { + input = this.#hooks.beforeCreateRequest(context, { url: reqURL, options: { ...fetchOptions, @@ -215,13 +215,13 @@ export class ClientSDK { return OK(new Request(input.url, input.options)); } - public async do$( + public async _do( request: Request, options: { context: HookContext; errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; + retryConfig: RetryConfig; + retryCodes: string[]; }, ): Promise< Result< @@ -233,34 +233,38 @@ export class ClientSDK { > > { const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; return retry( async () => { - const req = await this.hooks$.beforeRequest(context, request.clone()); - await logRequest(this.logger, req).catch((e) => - this.logger?.log("Failed to log request:", e) + const req = await this.#hooks.beforeRequest(context, request.clone()); + await logRequest(this.#logger, req).catch((e) => + this.#logger?.log("Failed to log request:", e) ); - let response = await this.httpClient.request(req); + let response = await this.#httpClient.request(req); - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; + try { + if (matchStatusCode(response, errorCodes)) { + const result = await this.#hooks.afterError( + context, + response, + null, + ); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.#hooks.afterSuccess(context, response); } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); + } finally { + await logResponse(this.#logger, response, req) + .catch(e => this.#logger?.log("Failed to log response:", e)); } - await logResponse(this.logger, response, req) - .catch(e => this.logger?.log("Failed to log response:", e)); - return response; }, - { config: retryConfig, statusCodes: retryCodes }, + { config: options.retryConfig, statusCodes: options.retryCodes }, ).then( (r) => OK(r), (err) => { diff --git a/src/lib/security.ts b/src/lib/security.ts index f9d684c4..5a45e6d0 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -4,6 +4,14 @@ import * as components from "../models/components/index.js"; +type OAuth2PasswordFlow = { + username: string; + password?: string | undefined; + clientID: string; + clientSecret?: string | undefined; + tokenURL: string; +}; + export enum SecurityErrorCode { Incomplete = "incomplete", UnrecognisedSecurityType = "unrecognized_security_type", @@ -37,6 +45,7 @@ export type SecurityState = { headers: Record; queryParams: Record; cookies: Record; + oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" }; }; type SecurityInputBasic = { @@ -73,7 +82,18 @@ type SecurityInputOAuth2 = { type SecurityInputOAuth2ClientCredentials = { type: "oauth2:client_credentials"; - value: string | null | undefined; + value: + | { clientID?: string | undefined; clientSecret?: string | undefined } + | null + | undefined; +}; + +type SecurityInputOAuth2PasswordCredentials = { + type: "oauth2:password"; + value: + | string + | null + | undefined; fieldName: string; }; @@ -89,6 +109,7 @@ export type SecurityInput = | SecurityInputAPIKey | SecurityInputOAuth2 | SecurityInputOAuth2ClientCredentials + | SecurityInputOAuth2PasswordCredentials | SecurityInputOIDC | SecurityInputCustom; @@ -100,6 +121,7 @@ export function resolveSecurity( headers: {}, queryParams: {}, cookies: {}, + oauth2: { type: "none" }, }; const option = options.find((opts) => { @@ -110,6 +132,12 @@ export function resolveSecurity( return o.value.username != null || o.value.password != null; } else if (o.type === "http:custom") { return null; + } else if (o.type === "oauth2:password") { + return ( + typeof o.value === "string" && !!o.value + ); + } else if (o.type === "oauth2:client_credentials") { + return o.value.clientID != null || o.value.clientSecret != null; } else if (typeof o.value === "string") { return !!o.value; } else { @@ -152,6 +180,9 @@ export function resolveSecurity( case "oauth2": applyBearer(state, spec); break; + case "oauth2:password": + applyBearer(state, spec); + break; case "oauth2:client_credentials": break; case "openIdConnect": @@ -179,9 +210,13 @@ function applyBasic( function applyBearer( state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, + spec: + | SecurityInputBearer + | SecurityInputOAuth2 + | SecurityInputOIDC + | SecurityInputOAuth2PasswordCredentials, ) { - if (spec.value == null) { + if (typeof spec.value !== "string" || !spec.value) { return; } @@ -192,6 +227,7 @@ function applyBearer( state.headers[spec.fieldName] = value; } + export function resolveGlobalSecurity( security: Partial | null | undefined, ): SecurityState | null { diff --git a/src/models/components/activitiesresponsedto.ts b/src/models/components/activitiesresponsedto.ts index 2f217b85..43be2909 100644 --- a/src/models/components/activitiesresponsedto.ts +++ b/src/models/components/activitiesresponsedto.ts @@ -3,12 +3,15 @@ */ 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 ActivitiesResponseDto = { - data: Array; hasMore: boolean; - page: number; + data: Array; pageSize: number; + page: number; }; /** @internal */ @@ -17,18 +20,18 @@ export const ActivitiesResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(z.string()), hasMore: z.boolean(), - page: z.number(), + data: z.array(z.string()), pageSize: z.number(), + page: z.number(), }); /** @internal */ export type ActivitiesResponseDto$Outbound = { - data: Array; hasMore: boolean; - page: number; + data: Array; pageSize: number; + page: number; }; /** @internal */ @@ -37,10 +40,10 @@ export const ActivitiesResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, ActivitiesResponseDto > = z.object({ - data: z.array(z.string()), hasMore: z.boolean(), - page: z.number(), + data: z.array(z.string()), pageSize: z.number(), + page: z.number(), }); /** @@ -55,3 +58,21 @@ export namespace ActivitiesResponseDto$ { /** @deprecated use `ActivitiesResponseDto$Outbound` instead. */ export type Outbound = ActivitiesResponseDto$Outbound; } + +export function activitiesResponseDtoToJSON( + activitiesResponseDto: ActivitiesResponseDto, +): string { + return JSON.stringify( + ActivitiesResponseDto$outboundSchema.parse(activitiesResponseDto), + ); +} + +export function activitiesResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivitiesResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivitiesResponseDto' from JSON`, + ); +} diff --git a/src/models/components/activitygraphstatesresponse.ts b/src/models/components/activitygraphstatesresponse.ts index 8898c0f4..f2e00967 100644 --- a/src/models/components/activitygraphstatesresponse.ts +++ b/src/models/components/activitygraphstatesresponse.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const Channels = { InApp: "in_app", @@ -17,9 +20,9 @@ export type Channels = ClosedEnum; export type ActivityGraphStatesResponse = { id: string; - channels: Array; count: number; templates: Array; + channels: Array; }; /** @internal */ @@ -48,9 +51,9 @@ export const ActivityGraphStatesResponse$inboundSchema: z.ZodType< unknown > = z.object({ _id: z.string(), - channels: z.array(Channels$inboundSchema), count: z.number(), templates: z.array(z.string()), + channels: z.array(Channels$inboundSchema), }).transform((v) => { return remap$(v, { "_id": "id", @@ -60,9 +63,9 @@ export const ActivityGraphStatesResponse$inboundSchema: z.ZodType< /** @internal */ export type ActivityGraphStatesResponse$Outbound = { _id: string; - channels: Array; count: number; templates: Array; + channels: Array; }; /** @internal */ @@ -72,9 +75,9 @@ export const ActivityGraphStatesResponse$outboundSchema: z.ZodType< ActivityGraphStatesResponse > = z.object({ id: z.string(), - channels: z.array(Channels$outboundSchema), count: z.number(), templates: z.array(z.string()), + channels: z.array(Channels$outboundSchema), }).transform((v) => { return remap$(v, { id: "_id", @@ -93,3 +96,23 @@ export namespace ActivityGraphStatesResponse$ { /** @deprecated use `ActivityGraphStatesResponse$Outbound` instead. */ export type Outbound = ActivityGraphStatesResponse$Outbound; } + +export function activityGraphStatesResponseToJSON( + activityGraphStatesResponse: ActivityGraphStatesResponse, +): string { + return JSON.stringify( + ActivityGraphStatesResponse$outboundSchema.parse( + activityGraphStatesResponse, + ), + ); +} + +export function activityGraphStatesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivityGraphStatesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivityGraphStatesResponse' from JSON`, + ); +} diff --git a/src/models/components/activitynotificationresponsedto.ts b/src/models/components/activitynotificationresponsedto.ts index cd4d41fc..522b0579 100644 --- a/src/models/components/activitynotificationresponsedto.ts +++ b/src/models/components/activitynotificationresponsedto.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ActivityNotificationSubscriberResponseDto, ActivityNotificationSubscriberResponseDto$inboundSchema, @@ -34,15 +37,15 @@ export type ActivityNotificationResponseDtoChannels = ClosedEnum< >; export type ActivityNotificationResponseDto = { - environmentId: string; id?: string | undefined; + environmentId: string; organizationId: string; - channels?: ActivityNotificationResponseDtoChannels | undefined; + transactionId: string; createdAt?: string | undefined; - jobs?: Array | undefined; + channels?: ActivityNotificationResponseDtoChannels | undefined; subscriber?: ActivityNotificationSubscriberResponseDto | undefined; template?: ActivityNotificationTemplateResponseDto | undefined; - transactionId: string; + jobs?: Array | undefined; }; /** @internal */ @@ -74,35 +77,35 @@ export const ActivityNotificationResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), + _environmentId: z.string(), _organizationId: z.string(), - channels: ActivityNotificationResponseDtoChannels$inboundSchema.optional(), + transactionId: z.string(), createdAt: z.string().optional(), - jobs: z.array(z.string()).optional(), + channels: ActivityNotificationResponseDtoChannels$inboundSchema.optional(), subscriber: ActivityNotificationSubscriberResponseDto$inboundSchema .optional(), template: ActivityNotificationTemplateResponseDto$inboundSchema.optional(), - transactionId: z.string(), + jobs: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", + "_environmentId": "environmentId", "_organizationId": "organizationId", }); }); /** @internal */ export type ActivityNotificationResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; + _environmentId: string; _organizationId: string; - channels?: string | undefined; + transactionId: string; createdAt?: string | undefined; - jobs?: Array | undefined; + channels?: string | undefined; subscriber?: ActivityNotificationSubscriberResponseDto$Outbound | undefined; template?: ActivityNotificationTemplateResponseDto$Outbound | undefined; - transactionId: string; + jobs?: Array | undefined; }; /** @internal */ @@ -111,20 +114,20 @@ export const ActivityNotificationResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, ActivityNotificationResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), + environmentId: z.string(), organizationId: z.string(), - channels: ActivityNotificationResponseDtoChannels$outboundSchema.optional(), + transactionId: z.string(), createdAt: z.string().optional(), - jobs: z.array(z.string()).optional(), + channels: ActivityNotificationResponseDtoChannels$outboundSchema.optional(), subscriber: ActivityNotificationSubscriberResponseDto$outboundSchema .optional(), template: ActivityNotificationTemplateResponseDto$outboundSchema.optional(), - transactionId: z.string(), + jobs: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", + environmentId: "_environmentId", organizationId: "_organizationId", }); }); @@ -141,3 +144,23 @@ export namespace ActivityNotificationResponseDto$ { /** @deprecated use `ActivityNotificationResponseDto$Outbound` instead. */ export type Outbound = ActivityNotificationResponseDto$Outbound; } + +export function activityNotificationResponseDtoToJSON( + activityNotificationResponseDto: ActivityNotificationResponseDto, +): string { + return JSON.stringify( + ActivityNotificationResponseDto$outboundSchema.parse( + activityNotificationResponseDto, + ), + ); +} + +export function activityNotificationResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivityNotificationResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivityNotificationResponseDto' from JSON`, + ); +} diff --git a/src/models/components/activitynotificationsubscriberresponsedto.ts b/src/models/components/activitynotificationsubscriberresponsedto.ts index 45b5c01e..33a6ca03 100644 --- a/src/models/components/activitynotificationsubscriberresponsedto.ts +++ b/src/models/components/activitynotificationsubscriberresponsedto.ts @@ -4,12 +4,15 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ActivityNotificationSubscriberResponseDto = { - id: string; - email?: string | undefined; firstName?: string | undefined; + id: string; lastName?: string | undefined; + email?: string | undefined; phone?: string | undefined; }; @@ -19,10 +22,10 @@ export const ActivityNotificationSubscriberResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _id: z.string(), - email: z.string().optional(), firstName: z.string().optional(), + _id: z.string(), lastName: z.string().optional(), + email: z.string().optional(), phone: z.string().optional(), }).transform((v) => { return remap$(v, { @@ -32,10 +35,10 @@ export const ActivityNotificationSubscriberResponseDto$inboundSchema: z.ZodType< /** @internal */ export type ActivityNotificationSubscriberResponseDto$Outbound = { - _id: string; - email?: string | undefined; firstName?: string | undefined; + _id: string; lastName?: string | undefined; + email?: string | undefined; phone?: string | undefined; }; @@ -46,10 +49,10 @@ export const ActivityNotificationSubscriberResponseDto$outboundSchema: z.ZodTypeDef, ActivityNotificationSubscriberResponseDto > = z.object({ - id: z.string(), - email: z.string().optional(), firstName: z.string().optional(), + id: z.string(), lastName: z.string().optional(), + email: z.string().optional(), phone: z.string().optional(), }).transform((v) => { return remap$(v, { @@ -71,3 +74,30 @@ export namespace ActivityNotificationSubscriberResponseDto$ { /** @deprecated use `ActivityNotificationSubscriberResponseDto$Outbound` instead. */ export type Outbound = ActivityNotificationSubscriberResponseDto$Outbound; } + +export function activityNotificationSubscriberResponseDtoToJSON( + activityNotificationSubscriberResponseDto: + ActivityNotificationSubscriberResponseDto, +): string { + return JSON.stringify( + ActivityNotificationSubscriberResponseDto$outboundSchema.parse( + activityNotificationSubscriberResponseDto, + ), + ); +} + +export function activityNotificationSubscriberResponseDtoFromJSON( + jsonString: string, +): SafeParseResult< + ActivityNotificationSubscriberResponseDto, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ActivityNotificationSubscriberResponseDto$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ActivityNotificationSubscriberResponseDto' from JSON`, + ); +} diff --git a/src/models/components/activitynotificationtemplateresponsedto.ts b/src/models/components/activitynotificationtemplateresponsedto.ts index 4191097a..83bea08b 100644 --- a/src/models/components/activitynotificationtemplateresponsedto.ts +++ b/src/models/components/activitynotificationtemplateresponsedto.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ActivityNotificationTemplateResponseDto = { id?: string | undefined; @@ -62,3 +65,30 @@ export namespace ActivityNotificationTemplateResponseDto$ { /** @deprecated use `ActivityNotificationTemplateResponseDto$Outbound` instead. */ export type Outbound = ActivityNotificationTemplateResponseDto$Outbound; } + +export function activityNotificationTemplateResponseDtoToJSON( + activityNotificationTemplateResponseDto: + ActivityNotificationTemplateResponseDto, +): string { + return JSON.stringify( + ActivityNotificationTemplateResponseDto$outboundSchema.parse( + activityNotificationTemplateResponseDto, + ), + ); +} + +export function activityNotificationTemplateResponseDtoFromJSON( + jsonString: string, +): SafeParseResult< + ActivityNotificationTemplateResponseDto, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ActivityNotificationTemplateResponseDto$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ActivityNotificationTemplateResponseDto' from JSON`, + ); +} diff --git a/src/models/components/activitystatsresponsedto.ts b/src/models/components/activitystatsresponsedto.ts index 78abb8d1..f0ce0e9c 100644 --- a/src/models/components/activitystatsresponsedto.ts +++ b/src/models/components/activitystatsresponsedto.ts @@ -3,10 +3,13 @@ */ 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 ActivityStatsResponseDto = { - monthlySent: number; weeklySent: number; + monthlySent: number; }; /** @internal */ @@ -15,14 +18,14 @@ export const ActivityStatsResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - monthlySent: z.number(), weeklySent: z.number(), + monthlySent: z.number(), }); /** @internal */ export type ActivityStatsResponseDto$Outbound = { - monthlySent: number; weeklySent: number; + monthlySent: number; }; /** @internal */ @@ -31,8 +34,8 @@ export const ActivityStatsResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, ActivityStatsResponseDto > = z.object({ - monthlySent: z.number(), weeklySent: z.number(), + monthlySent: z.number(), }); /** @@ -47,3 +50,21 @@ export namespace ActivityStatsResponseDto$ { /** @deprecated use `ActivityStatsResponseDto$Outbound` instead. */ export type Outbound = ActivityStatsResponseDto$Outbound; } + +export function activityStatsResponseDtoToJSON( + activityStatsResponseDto: ActivityStatsResponseDto, +): string { + return JSON.stringify( + ActivityStatsResponseDto$outboundSchema.parse(activityStatsResponseDto), + ); +} + +export function activityStatsResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivityStatsResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivityStatsResponseDto' from JSON`, + ); +} diff --git a/src/models/components/addsubscribersrequestdto.ts b/src/models/components/addsubscribersrequestdto.ts index 1c4cf277..c03c0c39 100644 --- a/src/models/components/addsubscribersrequestdto.ts +++ b/src/models/components/addsubscribersrequestdto.ts @@ -3,6 +3,9 @@ */ 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 AddSubscribersRequestDto = { /** @@ -46,3 +49,21 @@ export namespace AddSubscribersRequestDto$ { /** @deprecated use `AddSubscribersRequestDto$Outbound` instead. */ export type Outbound = AddSubscribersRequestDto$Outbound; } + +export function addSubscribersRequestDtoToJSON( + addSubscribersRequestDto: AddSubscribersRequestDto, +): string { + return JSON.stringify( + AddSubscribersRequestDto$outboundSchema.parse(addSubscribersRequestDto), + ); +} + +export function addSubscribersRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AddSubscribersRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AddSubscribersRequestDto' from JSON`, + ); +} diff --git a/src/models/components/apikey.ts b/src/models/components/apikey.ts index 7e7886db..2432c7a1 100644 --- a/src/models/components/apikey.ts +++ b/src/models/components/apikey.ts @@ -4,17 +4,20 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ApiKey = { - userId: string; key: string; + userId: string; }; /** @internal */ export const ApiKey$inboundSchema: z.ZodType = z .object({ - _userId: z.string(), key: z.string(), + _userId: z.string(), }).transform((v) => { return remap$(v, { "_userId": "userId", @@ -23,8 +26,8 @@ export const ApiKey$inboundSchema: z.ZodType = z /** @internal */ export type ApiKey$Outbound = { - _userId: string; key: string; + _userId: string; }; /** @internal */ @@ -33,8 +36,8 @@ export const ApiKey$outboundSchema: z.ZodType< z.ZodTypeDef, ApiKey > = z.object({ - userId: z.string(), key: z.string(), + userId: z.string(), }).transform((v) => { return remap$(v, { userId: "_userId", @@ -53,3 +56,17 @@ export namespace ApiKey$ { /** @deprecated use `ApiKey$Outbound` instead. */ export type Outbound = ApiKey$Outbound; } + +export function apiKeyToJSON(apiKey: ApiKey): string { + return JSON.stringify(ApiKey$outboundSchema.parse(apiKey)); +} + +export function apiKeyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApiKey$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApiKey' from JSON`, + ); +} diff --git a/src/models/components/bulkapplychangedto.ts b/src/models/components/bulkapplychangedto.ts deleted file mode 100644 index e13f15eb..00000000 --- a/src/models/components/bulkapplychangedto.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type BulkApplyChangeDto = { - changeIds: Array; -}; - -/** @internal */ -export const BulkApplyChangeDto$inboundSchema: z.ZodType< - BulkApplyChangeDto, - z.ZodTypeDef, - unknown -> = z.object({ - changeIds: z.array(z.string()), -}); - -/** @internal */ -export type BulkApplyChangeDto$Outbound = { - changeIds: Array; -}; - -/** @internal */ -export const BulkApplyChangeDto$outboundSchema: z.ZodType< - BulkApplyChangeDto$Outbound, - z.ZodTypeDef, - BulkApplyChangeDto -> = z.object({ - changeIds: z.array(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 BulkApplyChangeDto$ { - /** @deprecated use `BulkApplyChangeDto$inboundSchema` instead. */ - export const inboundSchema = BulkApplyChangeDto$inboundSchema; - /** @deprecated use `BulkApplyChangeDto$outboundSchema` instead. */ - export const outboundSchema = BulkApplyChangeDto$outboundSchema; - /** @deprecated use `BulkApplyChangeDto$Outbound` instead. */ - export type Outbound = BulkApplyChangeDto$Outbound; -} diff --git a/src/models/components/bulksubscribercreatedto.ts b/src/models/components/bulksubscribercreatedto.ts index baaf729d..16b49fb2 100644 --- a/src/models/components/bulksubscribercreatedto.ts +++ b/src/models/components/bulksubscribercreatedto.ts @@ -3,6 +3,9 @@ */ 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 BulkSubscriberCreateDto = { subscribers: Array; @@ -43,3 +46,21 @@ export namespace BulkSubscriberCreateDto$ { /** @deprecated use `BulkSubscriberCreateDto$Outbound` instead. */ export type Outbound = BulkSubscriberCreateDto$Outbound; } + +export function bulkSubscriberCreateDtoToJSON( + bulkSubscriberCreateDto: BulkSubscriberCreateDto, +): string { + return JSON.stringify( + BulkSubscriberCreateDto$outboundSchema.parse(bulkSubscriberCreateDto), + ); +} + +export function bulkSubscriberCreateDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkSubscriberCreateDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkSubscriberCreateDto' from JSON`, + ); +} diff --git a/src/models/components/bulktriggereventdto.ts b/src/models/components/bulktriggereventdto.ts index 6a5bfecd..a668f98c 100644 --- a/src/models/components/bulktriggereventdto.ts +++ b/src/models/components/bulktriggereventdto.ts @@ -3,6 +3,9 @@ */ 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"; import { TriggerEventRequestDto, TriggerEventRequestDto$inboundSchema, @@ -49,3 +52,21 @@ export namespace BulkTriggerEventDto$ { /** @deprecated use `BulkTriggerEventDto$Outbound` instead. */ export type Outbound = BulkTriggerEventDto$Outbound; } + +export function bulkTriggerEventDtoToJSON( + bulkTriggerEventDto: BulkTriggerEventDto, +): string { + return JSON.stringify( + BulkTriggerEventDto$outboundSchema.parse(bulkTriggerEventDto), + ); +} + +export function bulkTriggerEventDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkTriggerEventDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkTriggerEventDto' from JSON`, + ); +} diff --git a/src/models/components/changeresponsedto.ts b/src/models/components/changeresponsedto.ts deleted file mode 100644 index c30a32d9..00000000 --- a/src/models/components/changeresponsedto.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { ClosedEnum } from "../../types/enums.js"; - -export type Change = {}; - -export const Type = { - Feed: "Feed", - MessageTemplate: "MessageTemplate", - Layout: "Layout", - DefaultLayout: "DefaultLayout", - NotificationTemplate: "NotificationTemplate", - NotificationGroup: "NotificationGroup", - TranslationGroup: "TranslationGroup", - Translation: "Translation", -} as const; -export type Type = ClosedEnum; - -export type ChangeResponseDto = { - creatorId: string; - entityId: string; - environmentId: string; - id?: string | undefined; - organizationId: string; - parentId?: string | undefined; - change: Change; - createdAt: string; - enabled: boolean; - type: Type; -}; - -/** @internal */ -export const Change$inboundSchema: z.ZodType = z - .object({}); - -/** @internal */ -export type Change$Outbound = {}; - -/** @internal */ -export const Change$outboundSchema: z.ZodType< - Change$Outbound, - z.ZodTypeDef, - Change -> = 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 Change$ { - /** @deprecated use `Change$inboundSchema` instead. */ - export const inboundSchema = Change$inboundSchema; - /** @deprecated use `Change$outboundSchema` instead. */ - export const outboundSchema = Change$outboundSchema; - /** @deprecated use `Change$Outbound` instead. */ - export type Outbound = Change$Outbound; -} - -/** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); - -/** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; -} - -/** @internal */ -export const ChangeResponseDto$inboundSchema: z.ZodType< - ChangeResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _creatorId: z.string(), - _entityId: z.string(), - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string().optional(), - change: z.lazy(() => Change$inboundSchema), - createdAt: z.string(), - enabled: z.boolean(), - type: Type$inboundSchema, -}).transform((v) => { - return remap$(v, { - "_creatorId": "creatorId", - "_entityId": "entityId", - "_environmentId": "environmentId", - "_id": "id", - "_organizationId": "organizationId", - "_parentId": "parentId", - }); -}); - -/** @internal */ -export type ChangeResponseDto$Outbound = { - _creatorId: string; - _entityId: string; - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - _parentId?: string | undefined; - change: Change$Outbound; - createdAt: string; - enabled: boolean; - type: string; -}; - -/** @internal */ -export const ChangeResponseDto$outboundSchema: z.ZodType< - ChangeResponseDto$Outbound, - z.ZodTypeDef, - ChangeResponseDto -> = z.object({ - creatorId: z.string(), - entityId: z.string(), - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string().optional(), - change: z.lazy(() => Change$outboundSchema), - createdAt: z.string(), - enabled: z.boolean(), - type: Type$outboundSchema, -}).transform((v) => { - return remap$(v, { - creatorId: "_creatorId", - entityId: "_entityId", - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangeResponseDto$ { - /** @deprecated use `ChangeResponseDto$inboundSchema` instead. */ - export const inboundSchema = ChangeResponseDto$inboundSchema; - /** @deprecated use `ChangeResponseDto$outboundSchema` instead. */ - export const outboundSchema = ChangeResponseDto$outboundSchema; - /** @deprecated use `ChangeResponseDto$Outbound` instead. */ - export type Outbound = ChangeResponseDto$Outbound; -} diff --git a/src/models/components/changesresponsedto.ts b/src/models/components/changesresponsedto.ts deleted file mode 100644 index d8b7ffaf..00000000 --- a/src/models/components/changesresponsedto.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type ChangesResponseDto = { - data: Array; - page: number; - pageSize: number; - totalCount: number; -}; - -/** @internal */ -export const ChangesResponseDto$inboundSchema: z.ZodType< - ChangesResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), -}); - -/** @internal */ -export type ChangesResponseDto$Outbound = { - data: Array; - page: number; - pageSize: number; - totalCount: number; -}; - -/** @internal */ -export const ChangesResponseDto$outboundSchema: z.ZodType< - ChangesResponseDto$Outbound, - z.ZodTypeDef, - ChangesResponseDto -> = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangesResponseDto$ { - /** @deprecated use `ChangesResponseDto$inboundSchema` instead. */ - export const inboundSchema = ChangesResponseDto$inboundSchema; - /** @deprecated use `ChangesResponseDto$outboundSchema` instead. */ - export const outboundSchema = ChangesResponseDto$outboundSchema; - /** @deprecated use `ChangesResponseDto$Outbound` instead. */ - export type Outbound = ChangesResponseDto$Outbound; -} diff --git a/src/models/components/changeworkflowstatusrequestdto.ts b/src/models/components/changeworkflowstatusrequestdto.ts deleted file mode 100644 index ee83a2d2..00000000 --- a/src/models/components/changeworkflowstatusrequestdto.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type ChangeWorkflowStatusRequestDto = { - active: boolean; -}; - -/** @internal */ -export const ChangeWorkflowStatusRequestDto$inboundSchema: z.ZodType< - ChangeWorkflowStatusRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - active: z.boolean(), -}); - -/** @internal */ -export type ChangeWorkflowStatusRequestDto$Outbound = { - active: boolean; -}; - -/** @internal */ -export const ChangeWorkflowStatusRequestDto$outboundSchema: z.ZodType< - ChangeWorkflowStatusRequestDto$Outbound, - z.ZodTypeDef, - ChangeWorkflowStatusRequestDto -> = z.object({ - active: z.boolean(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangeWorkflowStatusRequestDto$ { - /** @deprecated use `ChangeWorkflowStatusRequestDto$inboundSchema` instead. */ - export const inboundSchema = ChangeWorkflowStatusRequestDto$inboundSchema; - /** @deprecated use `ChangeWorkflowStatusRequestDto$outboundSchema` instead. */ - export const outboundSchema = ChangeWorkflowStatusRequestDto$outboundSchema; - /** @deprecated use `ChangeWorkflowStatusRequestDto$Outbound` instead. */ - export type Outbound = ChangeWorkflowStatusRequestDto$Outbound; -} diff --git a/src/models/components/channelcredentials.ts b/src/models/components/channelcredentials.ts index dac42e95..1428a907 100644 --- a/src/models/components/channelcredentials.ts +++ b/src/models/components/channelcredentials.ts @@ -3,12 +3,15 @@ */ 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 ChannelCredentials = { /** - * alert_uid for grafana on-call webhook payload + * Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. */ - alertUid?: string | undefined; + webhookUrl: string; /** * Channel specification for Mattermost chat notifications */ @@ -18,9 +21,13 @@ export type ChannelCredentials = { */ deviceTokens?: Array | undefined; /** - * link_to_upstream_details property fo grafana on call webhook + * alert_uid for grafana on-call webhook payload */ - externalUrl?: string | undefined; + alertUid?: string | undefined; + /** + * title to be used with grafana on call webhook + */ + title?: string | undefined; /** * image_url property fo grafana on call webhook */ @@ -30,13 +37,9 @@ export type ChannelCredentials = { */ state?: string | undefined; /** - * title to be used with grafana on call webhook - */ - title?: string | undefined; - /** - * Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. + * link_to_upstream_details property fo grafana on call webhook */ - webhookUrl: string; + externalUrl?: string | undefined; }; /** @internal */ @@ -45,26 +48,26 @@ export const ChannelCredentials$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - alertUid: z.string().optional(), + webhookUrl: z.string(), channel: z.string().optional(), deviceTokens: z.array(z.string()).optional(), - externalUrl: z.string().optional(), + alertUid: z.string().optional(), + title: z.string().optional(), imageUrl: z.string().optional(), state: z.string().optional(), - title: z.string().optional(), - webhookUrl: z.string(), + externalUrl: z.string().optional(), }); /** @internal */ export type ChannelCredentials$Outbound = { - alertUid?: string | undefined; + webhookUrl: string; channel?: string | undefined; deviceTokens?: Array | undefined; - externalUrl?: string | undefined; + alertUid?: string | undefined; + title?: string | undefined; imageUrl?: string | undefined; state?: string | undefined; - title?: string | undefined; - webhookUrl: string; + externalUrl?: string | undefined; }; /** @internal */ @@ -73,14 +76,14 @@ export const ChannelCredentials$outboundSchema: z.ZodType< z.ZodTypeDef, ChannelCredentials > = z.object({ - alertUid: z.string().optional(), + webhookUrl: z.string(), channel: z.string().optional(), deviceTokens: z.array(z.string()).optional(), - externalUrl: z.string().optional(), + alertUid: z.string().optional(), + title: z.string().optional(), imageUrl: z.string().optional(), state: z.string().optional(), - title: z.string().optional(), - webhookUrl: z.string(), + externalUrl: z.string().optional(), }); /** @@ -95,3 +98,21 @@ export namespace ChannelCredentials$ { /** @deprecated use `ChannelCredentials$Outbound` instead. */ export type Outbound = ChannelCredentials$Outbound; } + +export function channelCredentialsToJSON( + channelCredentials: ChannelCredentials, +): string { + return JSON.stringify( + ChannelCredentials$outboundSchema.parse(channelCredentials), + ); +} + +export function channelCredentialsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChannelCredentials$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChannelCredentials' from JSON`, + ); +} diff --git a/src/models/components/channelpreference.ts b/src/models/components/channelpreference.ts index 4f761043..d637a376 100644 --- a/src/models/components/channelpreference.ts +++ b/src/models/components/channelpreference.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of channel that is enabled or not @@ -21,14 +24,14 @@ export const ChannelPreferenceType = { export type ChannelPreferenceType = ClosedEnum; export type ChannelPreference = { - /** - * If channel is enabled or not - */ - enabled: boolean; /** * The type of channel that is enabled or not */ type: ChannelPreferenceType; + /** + * If channel is enabled or not + */ + enabled: boolean; }; /** @internal */ @@ -58,14 +61,14 @@ export const ChannelPreference$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - enabled: z.boolean(), type: ChannelPreferenceType$inboundSchema, + enabled: z.boolean(), }); /** @internal */ export type ChannelPreference$Outbound = { - enabled: boolean; type: string; + enabled: boolean; }; /** @internal */ @@ -74,8 +77,8 @@ export const ChannelPreference$outboundSchema: z.ZodType< z.ZodTypeDef, ChannelPreference > = z.object({ - enabled: z.boolean(), type: ChannelPreferenceType$outboundSchema, + enabled: z.boolean(), }); /** @@ -90,3 +93,21 @@ export namespace ChannelPreference$ { /** @deprecated use `ChannelPreference$Outbound` instead. */ export type Outbound = ChannelPreference$Outbound; } + +export function channelPreferenceToJSON( + channelPreference: ChannelPreference, +): string { + return JSON.stringify( + ChannelPreference$outboundSchema.parse(channelPreference), + ); +} + +export function channelPreferenceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChannelPreference$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChannelPreference' from JSON`, + ); +} diff --git a/src/models/components/channelsettings.ts b/src/models/components/channelsettings.ts index 1417df3b..5be94479 100644 --- a/src/models/components/channelsettings.ts +++ b/src/models/components/channelsettings.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChannelCredentials, ChannelCredentials$inboundSchema, @@ -11,35 +15,81 @@ import { ChannelCredentials$outboundSchema, } from "./channelcredentials.js"; +/** + * The provider identifier for the credentials + */ +export const ProviderId = { + Slack: "slack", + Discord: "discord", + Msteams: "msteams", + Mattermost: "mattermost", + Ryver: "ryver", + Zulip: "zulip", + GrafanaOnCall: "grafana-on-call", + Getstream: "getstream", + RocketChat: "rocket-chat", + WhatsappBusiness: "whatsapp-business", + Fcm: "fcm", + Apns: "apns", + Expo: "expo", + OneSignal: "one-signal", + Pushpad: "pushpad", + PushWebhook: "push-webhook", + PusherBeams: "pusher-beams", +} as const; +/** + * The provider identifier for the credentials + */ +export type ProviderId = ClosedEnum; + export type ChannelSettings = { /** - * Id of the integration that is used for this channel - */ - integrationId: string; - /** - * Credentials payload for the specified provider + * The provider identifier for the credentials */ - credentials: ChannelCredentials; + providerId: ProviderId; /** * The integration identifier */ integrationIdentifier?: string | undefined; /** - * The provider identifier for the credentials + * Credentials payload for the specified provider + */ + credentials: ChannelCredentials; + /** + * Id of the integration that is used for this channel */ - providerId: number; + integrationId: string; }; +/** @internal */ +export const ProviderId$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ProviderId); + +/** @internal */ +export const ProviderId$outboundSchema: z.ZodNativeEnum = + ProviderId$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProviderId$ { + /** @deprecated use `ProviderId$inboundSchema` instead. */ + export const inboundSchema = ProviderId$inboundSchema; + /** @deprecated use `ProviderId$outboundSchema` instead. */ + export const outboundSchema = ProviderId$outboundSchema; +} + /** @internal */ export const ChannelSettings$inboundSchema: z.ZodType< ChannelSettings, z.ZodTypeDef, unknown > = z.object({ - _integrationId: z.string(), - credentials: ChannelCredentials$inboundSchema, + providerId: ProviderId$inboundSchema, integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$inboundSchema, + _integrationId: z.string(), }).transform((v) => { return remap$(v, { "_integrationId": "integrationId", @@ -48,10 +98,10 @@ export const ChannelSettings$inboundSchema: z.ZodType< /** @internal */ export type ChannelSettings$Outbound = { - _integrationId: string; - credentials: ChannelCredentials$Outbound; + providerId: string; integrationIdentifier?: string | undefined; - providerId: number; + credentials: ChannelCredentials$Outbound; + _integrationId: string; }; /** @internal */ @@ -60,10 +110,10 @@ export const ChannelSettings$outboundSchema: z.ZodType< z.ZodTypeDef, ChannelSettings > = z.object({ - integrationId: z.string(), - credentials: ChannelCredentials$outboundSchema, + providerId: ProviderId$outboundSchema, integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$outboundSchema, + integrationId: z.string(), }).transform((v) => { return remap$(v, { integrationId: "_integrationId", @@ -82,3 +132,19 @@ export namespace ChannelSettings$ { /** @deprecated use `ChannelSettings$Outbound` instead. */ export type Outbound = ChannelSettings$Outbound; } + +export function channelSettingsToJSON( + channelSettings: ChannelSettings, +): string { + return JSON.stringify(ChannelSettings$outboundSchema.parse(channelSettings)); +} + +export function channelSettingsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChannelSettings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChannelSettings' from JSON`, + ); +} diff --git a/src/models/components/createfeedrequestdto.ts b/src/models/components/createfeedrequestdto.ts deleted file mode 100644 index d5383714..00000000 --- a/src/models/components/createfeedrequestdto.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type CreateFeedRequestDto = { - name: string; -}; - -/** @internal */ -export const CreateFeedRequestDto$inboundSchema: z.ZodType< - CreateFeedRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), -}); - -/** @internal */ -export type CreateFeedRequestDto$Outbound = { - name: string; -}; - -/** @internal */ -export const CreateFeedRequestDto$outboundSchema: z.ZodType< - CreateFeedRequestDto$Outbound, - z.ZodTypeDef, - CreateFeedRequestDto -> = z.object({ - name: 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 CreateFeedRequestDto$ { - /** @deprecated use `CreateFeedRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateFeedRequestDto$inboundSchema; - /** @deprecated use `CreateFeedRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateFeedRequestDto$outboundSchema; - /** @deprecated use `CreateFeedRequestDto$Outbound` instead. */ - export type Outbound = CreateFeedRequestDto$Outbound; -} diff --git a/src/models/components/createintegrationrequestdto.ts b/src/models/components/createintegrationrequestdto.ts index de0d5b5a..f35347ca 100644 --- a/src/models/components/createintegrationrequestdto.ts +++ b/src/models/components/createintegrationrequestdto.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CredentialsDto, CredentialsDto$inboundSchema, @@ -18,47 +21,52 @@ import { StepFilter$outboundSchema, } from "./stepfilter.js"; -export const Channel = { +export const CreateIntegrationRequestDtoChannel = { InApp: "in_app", Email: "email", Sms: "sms", Chat: "chat", Push: "push", } as const; -export type Channel = ClosedEnum; +export type CreateIntegrationRequestDtoChannel = ClosedEnum< + typeof CreateIntegrationRequestDtoChannel +>; export type CreateIntegrationRequestDto = { + name?: string | undefined; + identifier?: string | undefined; environmentId?: string | undefined; + providerId: string; + channel: CreateIntegrationRequestDtoChannel; + credentials?: CredentialsDto | undefined; /** * If the integration is active the validation on the credentials field will run */ active?: boolean | undefined; - channel: Channel; check?: boolean | undefined; conditions?: Array | undefined; - credentials?: CredentialsDto | undefined; - identifier?: string | undefined; - name?: string | undefined; - providerId: string; }; /** @internal */ -export const Channel$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Channel); +export const CreateIntegrationRequestDtoChannel$inboundSchema: z.ZodNativeEnum< + typeof CreateIntegrationRequestDtoChannel +> = z.nativeEnum(CreateIntegrationRequestDtoChannel); /** @internal */ -export const Channel$outboundSchema: z.ZodNativeEnum = - Channel$inboundSchema; +export const CreateIntegrationRequestDtoChannel$outboundSchema: z.ZodNativeEnum< + typeof CreateIntegrationRequestDtoChannel +> = CreateIntegrationRequestDtoChannel$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Channel$ { - /** @deprecated use `Channel$inboundSchema` instead. */ - export const inboundSchema = Channel$inboundSchema; - /** @deprecated use `Channel$outboundSchema` instead. */ - export const outboundSchema = Channel$outboundSchema; +export namespace CreateIntegrationRequestDtoChannel$ { + /** @deprecated use `CreateIntegrationRequestDtoChannel$inboundSchema` instead. */ + export const inboundSchema = CreateIntegrationRequestDtoChannel$inboundSchema; + /** @deprecated use `CreateIntegrationRequestDtoChannel$outboundSchema` instead. */ + export const outboundSchema = + CreateIntegrationRequestDtoChannel$outboundSchema; } /** @internal */ @@ -67,15 +75,15 @@ export const CreateIntegrationRequestDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + name: z.string().optional(), + identifier: z.string().optional(), _environmentId: z.string().optional(), + providerId: z.string(), + channel: CreateIntegrationRequestDtoChannel$inboundSchema, + credentials: CredentialsDto$inboundSchema.optional(), active: z.boolean().optional(), - channel: Channel$inboundSchema, check: z.boolean().optional(), conditions: z.array(StepFilter$inboundSchema).optional(), - credentials: CredentialsDto$inboundSchema.optional(), - identifier: z.string().optional(), - name: z.string().optional(), - providerId: z.string(), }).transform((v) => { return remap$(v, { "_environmentId": "environmentId", @@ -84,15 +92,15 @@ export const CreateIntegrationRequestDto$inboundSchema: z.ZodType< /** @internal */ export type CreateIntegrationRequestDto$Outbound = { + name?: string | undefined; + identifier?: string | undefined; _environmentId?: string | undefined; - active?: boolean | undefined; + providerId: string; channel: string; + credentials?: CredentialsDto$Outbound | undefined; + active?: boolean | undefined; check?: boolean | undefined; conditions?: Array | undefined; - credentials?: CredentialsDto$Outbound | undefined; - identifier?: string | undefined; - name?: string | undefined; - providerId: string; }; /** @internal */ @@ -101,15 +109,15 @@ export const CreateIntegrationRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, CreateIntegrationRequestDto > = z.object({ + name: z.string().optional(), + identifier: z.string().optional(), environmentId: z.string().optional(), + providerId: z.string(), + channel: CreateIntegrationRequestDtoChannel$outboundSchema, + credentials: CredentialsDto$outboundSchema.optional(), active: z.boolean().optional(), - channel: Channel$outboundSchema, check: z.boolean().optional(), conditions: z.array(StepFilter$outboundSchema).optional(), - credentials: CredentialsDto$outboundSchema.optional(), - identifier: z.string().optional(), - name: z.string().optional(), - providerId: z.string(), }).transform((v) => { return remap$(v, { environmentId: "_environmentId", @@ -128,3 +136,23 @@ export namespace CreateIntegrationRequestDto$ { /** @deprecated use `CreateIntegrationRequestDto$Outbound` instead. */ export type Outbound = CreateIntegrationRequestDto$Outbound; } + +export function createIntegrationRequestDtoToJSON( + createIntegrationRequestDto: CreateIntegrationRequestDto, +): string { + return JSON.stringify( + CreateIntegrationRequestDto$outboundSchema.parse( + createIntegrationRequestDto, + ), + ); +} + +export function createIntegrationRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIntegrationRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIntegrationRequestDto' from JSON`, + ); +} diff --git a/src/models/components/createlayoutresponsedto.ts b/src/models/components/createlayoutresponsedto.ts deleted file mode 100644 index b39c9283..00000000 --- a/src/models/components/createlayoutresponsedto.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; - -export type CreateLayoutResponseDto = { - /** - * The unique identifier for the Layout created. - */ - id: string; -}; - -/** @internal */ -export const CreateLayoutResponseDto$inboundSchema: z.ZodType< - CreateLayoutResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _id: z.string(), -}).transform((v) => { - return remap$(v, { - "_id": "id", - }); -}); - -/** @internal */ -export type CreateLayoutResponseDto$Outbound = { - _id: string; -}; - -/** @internal */ -export const CreateLayoutResponseDto$outboundSchema: z.ZodType< - CreateLayoutResponseDto$Outbound, - z.ZodTypeDef, - CreateLayoutResponseDto -> = z.object({ - id: z.string(), -}).transform((v) => { - return remap$(v, { - id: "_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateLayoutResponseDto$ { - /** @deprecated use `CreateLayoutResponseDto$inboundSchema` instead. */ - export const inboundSchema = CreateLayoutResponseDto$inboundSchema; - /** @deprecated use `CreateLayoutResponseDto$outboundSchema` instead. */ - export const outboundSchema = CreateLayoutResponseDto$outboundSchema; - /** @deprecated use `CreateLayoutResponseDto$Outbound` instead. */ - export type Outbound = CreateLayoutResponseDto$Outbound; -} diff --git a/src/models/components/createnotificationgrouprequestdto.ts b/src/models/components/createnotificationgrouprequestdto.ts index 515a12c5..4deb78b9 100644 --- a/src/models/components/createnotificationgrouprequestdto.ts +++ b/src/models/components/createnotificationgrouprequestdto.ts @@ -3,6 +3,9 @@ */ 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 CreateNotificationGroupRequestDto = { name: string; @@ -44,3 +47,23 @@ export namespace CreateNotificationGroupRequestDto$ { /** @deprecated use `CreateNotificationGroupRequestDto$Outbound` instead. */ export type Outbound = CreateNotificationGroupRequestDto$Outbound; } + +export function createNotificationGroupRequestDtoToJSON( + createNotificationGroupRequestDto: CreateNotificationGroupRequestDto, +): string { + return JSON.stringify( + CreateNotificationGroupRequestDto$outboundSchema.parse( + createNotificationGroupRequestDto, + ), + ); +} + +export function createNotificationGroupRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateNotificationGroupRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNotificationGroupRequestDto' from JSON`, + ); +} diff --git a/src/models/components/createsubscriberrequestdto.ts b/src/models/components/createsubscriberrequestdto.ts index 4992e28a..180eb6d1 100644 --- a/src/models/components/createsubscriberrequestdto.ts +++ b/src/models/components/createsubscriberrequestdto.ts @@ -3,49 +3,78 @@ */ 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 Data = {}; +export type CreateSubscriberRequestDtoData = {}; export type CreateSubscriberRequestDto = { /** - * An http url to the profile image of your subscriber + * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems */ - avatar?: string | undefined; - channels?: Array | undefined; - data?: Data | undefined; + subscriberId: string; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; /** - * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + * An http url to the profile image of your subscriber */ - subscriberId: string; + avatar?: string | undefined; + locale?: string | undefined; + data?: CreateSubscriberRequestDtoData | undefined; + channels?: Array | undefined; }; /** @internal */ -export const Data$inboundSchema: z.ZodType = z - .object({}); +export const CreateSubscriberRequestDtoData$inboundSchema: z.ZodType< + CreateSubscriberRequestDtoData, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type Data$Outbound = {}; +export type CreateSubscriberRequestDtoData$Outbound = {}; /** @internal */ -export const Data$outboundSchema: z.ZodType = - z.object({}); +export const CreateSubscriberRequestDtoData$outboundSchema: z.ZodType< + CreateSubscriberRequestDtoData$Outbound, + z.ZodTypeDef, + CreateSubscriberRequestDtoData +> = 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 Data$ { - /** @deprecated use `Data$inboundSchema` instead. */ - export const inboundSchema = Data$inboundSchema; - /** @deprecated use `Data$outboundSchema` instead. */ - export const outboundSchema = Data$outboundSchema; - /** @deprecated use `Data$Outbound` instead. */ - export type Outbound = Data$Outbound; +export namespace CreateSubscriberRequestDtoData$ { + /** @deprecated use `CreateSubscriberRequestDtoData$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriberRequestDtoData$inboundSchema; + /** @deprecated use `CreateSubscriberRequestDtoData$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriberRequestDtoData$outboundSchema; + /** @deprecated use `CreateSubscriberRequestDtoData$Outbound` instead. */ + export type Outbound = CreateSubscriberRequestDtoData$Outbound; +} + +export function createSubscriberRequestDtoDataToJSON( + createSubscriberRequestDtoData: CreateSubscriberRequestDtoData, +): string { + return JSON.stringify( + CreateSubscriberRequestDtoData$outboundSchema.parse( + createSubscriberRequestDtoData, + ), + ); +} + +export function createSubscriberRequestDtoDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriberRequestDtoData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriberRequestDtoData' from JSON`, + ); } /** @internal */ @@ -54,28 +83,28 @@ export const CreateSubscriberRequestDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => Data$inboundSchema).optional(), + subscriberId: z.string(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), - subscriberId: z.string(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => CreateSubscriberRequestDtoData$inboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @internal */ export type CreateSubscriberRequestDto$Outbound = { - avatar?: string | undefined; - channels?: Array | undefined; - data?: Data$Outbound | undefined; + subscriberId: string; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; - subscriberId: string; + avatar?: string | undefined; + locale?: string | undefined; + data?: CreateSubscriberRequestDtoData$Outbound | undefined; + channels?: Array | undefined; }; /** @internal */ @@ -84,15 +113,15 @@ export const CreateSubscriberRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, CreateSubscriberRequestDto > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => Data$outboundSchema).optional(), + subscriberId: z.string(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), - subscriberId: z.string(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => CreateSubscriberRequestDtoData$outboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @@ -107,3 +136,21 @@ export namespace CreateSubscriberRequestDto$ { /** @deprecated use `CreateSubscriberRequestDto$Outbound` instead. */ export type Outbound = CreateSubscriberRequestDto$Outbound; } + +export function createSubscriberRequestDtoToJSON( + createSubscriberRequestDto: CreateSubscriberRequestDto, +): string { + return JSON.stringify( + CreateSubscriberRequestDto$outboundSchema.parse(createSubscriberRequestDto), + ); +} + +export function createSubscriberRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSubscriberRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSubscriberRequestDto' from JSON`, + ); +} diff --git a/src/models/components/createtenantrequestdto.ts b/src/models/components/createtenantrequestdto.ts deleted file mode 100644 index 74654278..00000000 --- a/src/models/components/createtenantrequestdto.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type CreateTenantRequestDtoData = {}; - -export type CreateTenantRequestDto = { - data?: CreateTenantRequestDtoData | undefined; - identifier: string; - name: string; -}; - -/** @internal */ -export const CreateTenantRequestDtoData$inboundSchema: z.ZodType< - CreateTenantRequestDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type CreateTenantRequestDtoData$Outbound = {}; - -/** @internal */ -export const CreateTenantRequestDtoData$outboundSchema: z.ZodType< - CreateTenantRequestDtoData$Outbound, - z.ZodTypeDef, - CreateTenantRequestDtoData -> = 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 CreateTenantRequestDtoData$ { - /** @deprecated use `CreateTenantRequestDtoData$inboundSchema` instead. */ - export const inboundSchema = CreateTenantRequestDtoData$inboundSchema; - /** @deprecated use `CreateTenantRequestDtoData$outboundSchema` instead. */ - export const outboundSchema = CreateTenantRequestDtoData$outboundSchema; - /** @deprecated use `CreateTenantRequestDtoData$Outbound` instead. */ - export type Outbound = CreateTenantRequestDtoData$Outbound; -} - -/** @internal */ -export const CreateTenantRequestDto$inboundSchema: z.ZodType< - CreateTenantRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.lazy(() => CreateTenantRequestDtoData$inboundSchema).optional(), - identifier: z.string(), - name: z.string(), -}); - -/** @internal */ -export type CreateTenantRequestDto$Outbound = { - data?: CreateTenantRequestDtoData$Outbound | undefined; - identifier: string; - name: string; -}; - -/** @internal */ -export const CreateTenantRequestDto$outboundSchema: z.ZodType< - CreateTenantRequestDto$Outbound, - z.ZodTypeDef, - CreateTenantRequestDto -> = z.object({ - data: z.lazy(() => CreateTenantRequestDtoData$outboundSchema).optional(), - identifier: z.string(), - name: 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 CreateTenantRequestDto$ { - /** @deprecated use `CreateTenantRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateTenantRequestDto$inboundSchema; - /** @deprecated use `CreateTenantRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateTenantRequestDto$outboundSchema; - /** @deprecated use `CreateTenantRequestDto$Outbound` instead. */ - export type Outbound = CreateTenantRequestDto$Outbound; -} diff --git a/src/models/components/createtenantresponsedto.ts b/src/models/components/createtenantresponsedto.ts deleted file mode 100644 index 6c2a00de..00000000 --- a/src/models/components/createtenantresponsedto.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; - -export type CreateTenantResponseDtoData = {}; - -export type CreateTenantResponseDto = { - environmentId: string; - id: string; - createdAt: string; - data?: CreateTenantResponseDtoData | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const CreateTenantResponseDtoData$inboundSchema: z.ZodType< - CreateTenantResponseDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type CreateTenantResponseDtoData$Outbound = {}; - -/** @internal */ -export const CreateTenantResponseDtoData$outboundSchema: z.ZodType< - CreateTenantResponseDtoData$Outbound, - z.ZodTypeDef, - CreateTenantResponseDtoData -> = 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 CreateTenantResponseDtoData$ { - /** @deprecated use `CreateTenantResponseDtoData$inboundSchema` instead. */ - export const inboundSchema = CreateTenantResponseDtoData$inboundSchema; - /** @deprecated use `CreateTenantResponseDtoData$outboundSchema` instead. */ - export const outboundSchema = CreateTenantResponseDtoData$outboundSchema; - /** @deprecated use `CreateTenantResponseDtoData$Outbound` instead. */ - export type Outbound = CreateTenantResponseDtoData$Outbound; -} - -/** @internal */ -export const CreateTenantResponseDto$inboundSchema: z.ZodType< - CreateTenantResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _environmentId: z.string(), - _id: z.string(), - createdAt: z.string(), - data: z.lazy(() => CreateTenantResponseDtoData$inboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - "_environmentId": "environmentId", - "_id": "id", - }); -}); - -/** @internal */ -export type CreateTenantResponseDto$Outbound = { - _environmentId: string; - _id: string; - createdAt: string; - data?: CreateTenantResponseDtoData$Outbound | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const CreateTenantResponseDto$outboundSchema: z.ZodType< - CreateTenantResponseDto$Outbound, - z.ZodTypeDef, - CreateTenantResponseDto -> = z.object({ - environmentId: z.string(), - id: z.string(), - createdAt: z.string(), - data: z.lazy(() => CreateTenantResponseDtoData$outboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTenantResponseDto$ { - /** @deprecated use `CreateTenantResponseDto$inboundSchema` instead. */ - export const inboundSchema = CreateTenantResponseDto$inboundSchema; - /** @deprecated use `CreateTenantResponseDto$outboundSchema` instead. */ - export const outboundSchema = CreateTenantResponseDto$outboundSchema; - /** @deprecated use `CreateTenantResponseDto$Outbound` instead. */ - export type Outbound = CreateTenantResponseDto$Outbound; -} diff --git a/src/models/components/createtopicrequestdto.ts b/src/models/components/createtopicrequestdto.ts index 1c078b77..51e26840 100644 --- a/src/models/components/createtopicrequestdto.ts +++ b/src/models/components/createtopicrequestdto.ts @@ -3,6 +3,9 @@ */ 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 CreateTopicRequestDto = { /** @@ -53,3 +56,21 @@ export namespace CreateTopicRequestDto$ { /** @deprecated use `CreateTopicRequestDto$Outbound` instead. */ export type Outbound = CreateTopicRequestDto$Outbound; } + +export function createTopicRequestDtoToJSON( + createTopicRequestDto: CreateTopicRequestDto, +): string { + return JSON.stringify( + CreateTopicRequestDto$outboundSchema.parse(createTopicRequestDto), + ); +} + +export function createTopicRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTopicRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTopicRequestDto' from JSON`, + ); +} diff --git a/src/models/components/createtopicresponsedto.ts b/src/models/components/createtopicresponsedto.ts index 95d759f1..b02673c5 100644 --- a/src/models/components/createtopicresponsedto.ts +++ b/src/models/components/createtopicresponsedto.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateTopicResponseDto = { /** @@ -62,3 +65,21 @@ export namespace CreateTopicResponseDto$ { /** @deprecated use `CreateTopicResponseDto$Outbound` instead. */ export type Outbound = CreateTopicResponseDto$Outbound; } + +export function createTopicResponseDtoToJSON( + createTopicResponseDto: CreateTopicResponseDto, +): string { + return JSON.stringify( + CreateTopicResponseDto$outboundSchema.parse(createTopicResponseDto), + ); +} + +export function createTopicResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTopicResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTopicResponseDto' from JSON`, + ); +} diff --git a/src/models/components/createworkflowrequestdto.ts b/src/models/components/createworkflowrequestdto.ts deleted file mode 100644 index cae2a3a2..00000000 --- a/src/models/components/createworkflowrequestdto.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { - NotificationStep, - NotificationStep$inboundSchema, - NotificationStep$Outbound, - NotificationStep$outboundSchema, -} from "./notificationstep.js"; -import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, -} from "./preferencechannels.js"; - -export type CreateWorkflowRequestDtoData = {}; - -export type CreateWorkflowRequestDtoNotificationGroup = {}; - -export type CreateWorkflowRequestDto = { - active?: boolean | undefined; - blueprintId?: string | undefined; - critical?: boolean | undefined; - data?: CreateWorkflowRequestDtoData | undefined; - description?: string | undefined; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - draft?: boolean | undefined; - name: string; - notificationGroup?: CreateWorkflowRequestDtoNotificationGroup | undefined; - notificationGroupId: string; - preferenceSettings?: PreferenceChannels | undefined; - steps: Array; - tags?: Array | undefined; -}; - -/** @internal */ -export const CreateWorkflowRequestDtoData$inboundSchema: z.ZodType< - CreateWorkflowRequestDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type CreateWorkflowRequestDtoData$Outbound = {}; - -/** @internal */ -export const CreateWorkflowRequestDtoData$outboundSchema: z.ZodType< - CreateWorkflowRequestDtoData$Outbound, - z.ZodTypeDef, - CreateWorkflowRequestDtoData -> = 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 CreateWorkflowRequestDtoData$ { - /** @deprecated use `CreateWorkflowRequestDtoData$inboundSchema` instead. */ - export const inboundSchema = CreateWorkflowRequestDtoData$inboundSchema; - /** @deprecated use `CreateWorkflowRequestDtoData$outboundSchema` instead. */ - export const outboundSchema = CreateWorkflowRequestDtoData$outboundSchema; - /** @deprecated use `CreateWorkflowRequestDtoData$Outbound` instead. */ - export type Outbound = CreateWorkflowRequestDtoData$Outbound; -} - -/** @internal */ -export const CreateWorkflowRequestDtoNotificationGroup$inboundSchema: z.ZodType< - CreateWorkflowRequestDtoNotificationGroup, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type CreateWorkflowRequestDtoNotificationGroup$Outbound = {}; - -/** @internal */ -export const CreateWorkflowRequestDtoNotificationGroup$outboundSchema: - z.ZodType< - CreateWorkflowRequestDtoNotificationGroup$Outbound, - z.ZodTypeDef, - CreateWorkflowRequestDtoNotificationGroup - > = 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 CreateWorkflowRequestDtoNotificationGroup$ { - /** @deprecated use `CreateWorkflowRequestDtoNotificationGroup$inboundSchema` instead. */ - export const inboundSchema = - CreateWorkflowRequestDtoNotificationGroup$inboundSchema; - /** @deprecated use `CreateWorkflowRequestDtoNotificationGroup$outboundSchema` instead. */ - export const outboundSchema = - CreateWorkflowRequestDtoNotificationGroup$outboundSchema; - /** @deprecated use `CreateWorkflowRequestDtoNotificationGroup$Outbound` instead. */ - export type Outbound = CreateWorkflowRequestDtoNotificationGroup$Outbound; -} - -/** @internal */ -export const CreateWorkflowRequestDto$inboundSchema: z.ZodType< - CreateWorkflowRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - active: z.boolean().optional(), - blueprintId: z.string().optional(), - critical: z.boolean().optional(), - data: z.lazy(() => CreateWorkflowRequestDtoData$inboundSchema).optional(), - description: z.string().optional(), - draft: z.boolean().optional(), - name: z.string(), - notificationGroup: z.lazy(() => - CreateWorkflowRequestDtoNotificationGroup$inboundSchema - ).optional(), - notificationGroupId: z.string(), - preferenceSettings: PreferenceChannels$inboundSchema.optional(), - steps: z.array(NotificationStep$inboundSchema), - tags: z.array(z.string()).optional(), -}); - -/** @internal */ -export type CreateWorkflowRequestDto$Outbound = { - active?: boolean | undefined; - blueprintId?: string | undefined; - critical?: boolean | undefined; - data?: CreateWorkflowRequestDtoData$Outbound | undefined; - description?: string | undefined; - draft?: boolean | undefined; - name: string; - notificationGroup?: - | CreateWorkflowRequestDtoNotificationGroup$Outbound - | undefined; - notificationGroupId: string; - preferenceSettings?: PreferenceChannels$Outbound | undefined; - steps: Array; - tags?: Array | undefined; -}; - -/** @internal */ -export const CreateWorkflowRequestDto$outboundSchema: z.ZodType< - CreateWorkflowRequestDto$Outbound, - z.ZodTypeDef, - CreateWorkflowRequestDto -> = z.object({ - active: z.boolean().optional(), - blueprintId: z.string().optional(), - critical: z.boolean().optional(), - data: z.lazy(() => CreateWorkflowRequestDtoData$outboundSchema).optional(), - description: z.string().optional(), - draft: z.boolean().optional(), - name: z.string(), - notificationGroup: z.lazy(() => - CreateWorkflowRequestDtoNotificationGroup$outboundSchema - ).optional(), - notificationGroupId: z.string(), - preferenceSettings: PreferenceChannels$outboundSchema.optional(), - steps: z.array(NotificationStep$outboundSchema), - tags: z.array(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateWorkflowRequestDto$ { - /** @deprecated use `CreateWorkflowRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateWorkflowRequestDto$inboundSchema; - /** @deprecated use `CreateWorkflowRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateWorkflowRequestDto$outboundSchema; - /** @deprecated use `CreateWorkflowRequestDto$Outbound` instead. */ - export type Outbound = CreateWorkflowRequestDto$Outbound; -} diff --git a/src/models/components/credentialsdto.ts b/src/models/components/credentialsdto.ts index 8c7f9c76..2818b688 100644 --- a/src/models/components/credentialsdto.ts +++ b/src/models/components/credentialsdto.ts @@ -3,52 +3,55 @@ */ 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 TlsOptions = {}; export type CredentialsDto = { - accessKey?: string | undefined; - accountSid?: string | undefined; - alertUid?: string | undefined; apiKey?: string | undefined; - apiKeyRequestHeader?: string | undefined; - apiToken?: string | undefined; - applicationId?: string | undefined; - authenticateByToken?: boolean | undefined; - authenticationTokenKey?: string | undefined; - baseUrl?: string | undefined; - channelId?: string | undefined; - clientId?: string | undefined; - datePath?: string | undefined; + user?: string | undefined; + secretKey?: string | undefined; domain?: string | undefined; - externalLink?: string | undefined; - from?: string | undefined; - hmac?: boolean | undefined; - host?: string | undefined; - idPath?: string | undefined; - ignoreTls?: boolean | undefined; - imageUrl?: string | undefined; - instanceId?: string | undefined; - ipPoolName?: string | undefined; - messageProfileId?: string | undefined; password?: string | undefined; - phoneNumberIdentification?: string | undefined; + host?: string | undefined; port?: string | undefined; - projectName?: string | undefined; - redirectUrl?: string | undefined; - region?: string | undefined; - requireTls?: boolean | undefined; - secretKey?: string | undefined; - secretKeyRequestHeader?: string | undefined; secure?: boolean | undefined; + region?: string | undefined; + accountSid?: string | undefined; + messageProfileId?: string | undefined; + token?: string | undefined; + from?: string | undefined; senderName?: string | undefined; - serviceAccount?: string | undefined; - state?: string | undefined; - title?: string | undefined; + projectName?: string | undefined; + applicationId?: string | undefined; + clientId?: string | undefined; + requireTls?: boolean | undefined; + ignoreTls?: boolean | undefined; tlsOptions?: TlsOptions | undefined; - token?: string | undefined; - user?: string | undefined; + baseUrl?: string | undefined; webhookUrl?: string | undefined; + redirectUrl?: string | undefined; + hmac?: boolean | undefined; + serviceAccount?: string | undefined; + ipPoolName?: string | undefined; + apiKeyRequestHeader?: string | undefined; + secretKeyRequestHeader?: string | undefined; + idPath?: string | undefined; + datePath?: string | undefined; + apiToken?: string | undefined; + authenticateByToken?: boolean | undefined; + authenticationTokenKey?: string | undefined; + instanceId?: string | undefined; + alertUid?: string | undefined; + title?: string | undefined; + imageUrl?: string | undefined; + state?: string | undefined; + externalLink?: string | undefined; + channelId?: string | undefined; + phoneNumberIdentification?: string | undefined; + accessKey?: string | undefined; }; /** @internal */ @@ -81,100 +84,114 @@ export namespace TlsOptions$ { export type Outbound = TlsOptions$Outbound; } +export function tlsOptionsToJSON(tlsOptions: TlsOptions): string { + return JSON.stringify(TlsOptions$outboundSchema.parse(tlsOptions)); +} + +export function tlsOptionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TlsOptions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TlsOptions' from JSON`, + ); +} + /** @internal */ export const CredentialsDto$inboundSchema: z.ZodType< CredentialsDto, z.ZodTypeDef, unknown > = z.object({ - accessKey: z.string().optional(), - accountSid: z.string().optional(), - alertUid: z.string().optional(), apiKey: z.string().optional(), - apiKeyRequestHeader: z.string().optional(), - apiToken: z.string().optional(), - applicationId: z.string().optional(), - authenticateByToken: z.boolean().optional(), - authenticationTokenKey: z.string().optional(), - baseUrl: z.string().optional(), - channelId: z.string().optional(), - clientId: z.string().optional(), - datePath: z.string().optional(), + user: z.string().optional(), + secretKey: z.string().optional(), domain: z.string().optional(), - externalLink: z.string().optional(), - from: z.string().optional(), - hmac: z.boolean().optional(), - host: z.string().optional(), - idPath: z.string().optional(), - ignoreTls: z.boolean().optional(), - imageUrl: z.string().optional(), - instanceId: z.string().optional(), - ipPoolName: z.string().optional(), - messageProfileId: z.string().optional(), password: z.string().optional(), - phoneNumberIdentification: z.string().optional(), + host: z.string().optional(), port: z.string().optional(), - projectName: z.string().optional(), - redirectUrl: z.string().optional(), - region: z.string().optional(), - requireTls: z.boolean().optional(), - secretKey: z.string().optional(), - secretKeyRequestHeader: z.string().optional(), secure: z.boolean().optional(), + region: z.string().optional(), + accountSid: z.string().optional(), + messageProfileId: z.string().optional(), + token: z.string().optional(), + from: z.string().optional(), senderName: z.string().optional(), - serviceAccount: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), + projectName: z.string().optional(), + applicationId: z.string().optional(), + clientId: z.string().optional(), + requireTls: z.boolean().optional(), + ignoreTls: z.boolean().optional(), tlsOptions: z.lazy(() => TlsOptions$inboundSchema).optional(), - token: z.string().optional(), - user: z.string().optional(), + baseUrl: z.string().optional(), webhookUrl: z.string().optional(), + redirectUrl: z.string().optional(), + hmac: z.boolean().optional(), + serviceAccount: z.string().optional(), + ipPoolName: z.string().optional(), + apiKeyRequestHeader: z.string().optional(), + secretKeyRequestHeader: z.string().optional(), + idPath: z.string().optional(), + datePath: z.string().optional(), + apiToken: z.string().optional(), + authenticateByToken: z.boolean().optional(), + authenticationTokenKey: z.string().optional(), + instanceId: z.string().optional(), + alertUid: z.string().optional(), + title: z.string().optional(), + imageUrl: z.string().optional(), + state: z.string().optional(), + externalLink: z.string().optional(), + channelId: z.string().optional(), + phoneNumberIdentification: z.string().optional(), + accessKey: z.string().optional(), }); /** @internal */ export type CredentialsDto$Outbound = { - accessKey?: string | undefined; - accountSid?: string | undefined; - alertUid?: string | undefined; apiKey?: string | undefined; - apiKeyRequestHeader?: string | undefined; - apiToken?: string | undefined; - applicationId?: string | undefined; - authenticateByToken?: boolean | undefined; - authenticationTokenKey?: string | undefined; - baseUrl?: string | undefined; - channelId?: string | undefined; - clientId?: string | undefined; - datePath?: string | undefined; + user?: string | undefined; + secretKey?: string | undefined; domain?: string | undefined; - externalLink?: string | undefined; - from?: string | undefined; - hmac?: boolean | undefined; - host?: string | undefined; - idPath?: string | undefined; - ignoreTls?: boolean | undefined; - imageUrl?: string | undefined; - instanceId?: string | undefined; - ipPoolName?: string | undefined; - messageProfileId?: string | undefined; password?: string | undefined; - phoneNumberIdentification?: string | undefined; + host?: string | undefined; port?: string | undefined; - projectName?: string | undefined; - redirectUrl?: string | undefined; - region?: string | undefined; - requireTls?: boolean | undefined; - secretKey?: string | undefined; - secretKeyRequestHeader?: string | undefined; secure?: boolean | undefined; + region?: string | undefined; + accountSid?: string | undefined; + messageProfileId?: string | undefined; + token?: string | undefined; + from?: string | undefined; senderName?: string | undefined; - serviceAccount?: string | undefined; - state?: string | undefined; - title?: string | undefined; + projectName?: string | undefined; + applicationId?: string | undefined; + clientId?: string | undefined; + requireTls?: boolean | undefined; + ignoreTls?: boolean | undefined; tlsOptions?: TlsOptions$Outbound | undefined; - token?: string | undefined; - user?: string | undefined; + baseUrl?: string | undefined; webhookUrl?: string | undefined; + redirectUrl?: string | undefined; + hmac?: boolean | undefined; + serviceAccount?: string | undefined; + ipPoolName?: string | undefined; + apiKeyRequestHeader?: string | undefined; + secretKeyRequestHeader?: string | undefined; + idPath?: string | undefined; + datePath?: string | undefined; + apiToken?: string | undefined; + authenticateByToken?: boolean | undefined; + authenticationTokenKey?: string | undefined; + instanceId?: string | undefined; + alertUid?: string | undefined; + title?: string | undefined; + imageUrl?: string | undefined; + state?: string | undefined; + externalLink?: string | undefined; + channelId?: string | undefined; + phoneNumberIdentification?: string | undefined; + accessKey?: string | undefined; }; /** @internal */ @@ -183,48 +200,48 @@ export const CredentialsDto$outboundSchema: z.ZodType< z.ZodTypeDef, CredentialsDto > = z.object({ - accessKey: z.string().optional(), - accountSid: z.string().optional(), - alertUid: z.string().optional(), apiKey: z.string().optional(), - apiKeyRequestHeader: z.string().optional(), - apiToken: z.string().optional(), - applicationId: z.string().optional(), - authenticateByToken: z.boolean().optional(), - authenticationTokenKey: z.string().optional(), - baseUrl: z.string().optional(), - channelId: z.string().optional(), - clientId: z.string().optional(), - datePath: z.string().optional(), + user: z.string().optional(), + secretKey: z.string().optional(), domain: z.string().optional(), - externalLink: z.string().optional(), - from: z.string().optional(), - hmac: z.boolean().optional(), - host: z.string().optional(), - idPath: z.string().optional(), - ignoreTls: z.boolean().optional(), - imageUrl: z.string().optional(), - instanceId: z.string().optional(), - ipPoolName: z.string().optional(), - messageProfileId: z.string().optional(), password: z.string().optional(), - phoneNumberIdentification: z.string().optional(), + host: z.string().optional(), port: z.string().optional(), - projectName: z.string().optional(), - redirectUrl: z.string().optional(), - region: z.string().optional(), - requireTls: z.boolean().optional(), - secretKey: z.string().optional(), - secretKeyRequestHeader: z.string().optional(), secure: z.boolean().optional(), + region: z.string().optional(), + accountSid: z.string().optional(), + messageProfileId: z.string().optional(), + token: z.string().optional(), + from: z.string().optional(), senderName: z.string().optional(), - serviceAccount: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), + projectName: z.string().optional(), + applicationId: z.string().optional(), + clientId: z.string().optional(), + requireTls: z.boolean().optional(), + ignoreTls: z.boolean().optional(), tlsOptions: z.lazy(() => TlsOptions$outboundSchema).optional(), - token: z.string().optional(), - user: z.string().optional(), + baseUrl: z.string().optional(), webhookUrl: z.string().optional(), + redirectUrl: z.string().optional(), + hmac: z.boolean().optional(), + serviceAccount: z.string().optional(), + ipPoolName: z.string().optional(), + apiKeyRequestHeader: z.string().optional(), + secretKeyRequestHeader: z.string().optional(), + idPath: z.string().optional(), + datePath: z.string().optional(), + apiToken: z.string().optional(), + authenticateByToken: z.boolean().optional(), + authenticationTokenKey: z.string().optional(), + instanceId: z.string().optional(), + alertUid: z.string().optional(), + title: z.string().optional(), + imageUrl: z.string().optional(), + state: z.string().optional(), + externalLink: z.string().optional(), + channelId: z.string().optional(), + phoneNumberIdentification: z.string().optional(), + accessKey: z.string().optional(), }); /** @@ -239,3 +256,17 @@ export namespace CredentialsDto$ { /** @deprecated use `CredentialsDto$Outbound` instead. */ export type Outbound = CredentialsDto$Outbound; } + +export function credentialsDtoToJSON(credentialsDto: CredentialsDto): string { + return JSON.stringify(CredentialsDto$outboundSchema.parse(credentialsDto)); +} + +export function credentialsDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CredentialsDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CredentialsDto' from JSON`, + ); +} diff --git a/src/models/components/databooleandto.ts b/src/models/components/databooleandto.ts index 3d202f50..200fb5b0 100644 --- a/src/models/components/databooleandto.ts +++ b/src/models/components/databooleandto.ts @@ -3,6 +3,9 @@ */ 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 DataBooleanDto = { data: boolean; @@ -43,3 +46,17 @@ export namespace DataBooleanDto$ { /** @deprecated use `DataBooleanDto$Outbound` instead. */ export type Outbound = DataBooleanDto$Outbound; } + +export function dataBooleanDtoToJSON(dataBooleanDto: DataBooleanDto): string { + return JSON.stringify(DataBooleanDto$outboundSchema.parse(dataBooleanDto)); +} + +export function dataBooleanDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DataBooleanDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DataBooleanDto' from JSON`, + ); +} diff --git a/src/models/components/datanumberdto.ts b/src/models/components/datanumberdto.ts deleted file mode 100644 index 8fa574a0..00000000 --- a/src/models/components/datanumberdto.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type DataNumberDto = { - data: number; -}; - -/** @internal */ -export const DataNumberDto$inboundSchema: z.ZodType< - DataNumberDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.number(), -}); - -/** @internal */ -export type DataNumberDto$Outbound = { - data: number; -}; - -/** @internal */ -export const DataNumberDto$outboundSchema: z.ZodType< - DataNumberDto$Outbound, - z.ZodTypeDef, - DataNumberDto -> = z.object({ - data: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataNumberDto$ { - /** @deprecated use `DataNumberDto$inboundSchema` instead. */ - export const inboundSchema = DataNumberDto$inboundSchema; - /** @deprecated use `DataNumberDto$outboundSchema` instead. */ - export const outboundSchema = DataNumberDto$outboundSchema; - /** @deprecated use `DataNumberDto$Outbound` instead. */ - export type Outbound = DataNumberDto$Outbound; -} diff --git a/src/models/components/delayregularmetadata.ts b/src/models/components/delayregularmetadata.ts index fb7a6ef3..7c8631f4 100644 --- a/src/models/components/delayregularmetadata.ts +++ b/src/models/components/delayregularmetadata.ts @@ -3,16 +3,12 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const DelayRegularMetadataType = { - Regular: "regular", -} as const; -export type DelayRegularMetadataType = ClosedEnum< - typeof DelayRegularMetadataType ->; - -export const Unit = { +export const DelayRegularMetadataUnit = { Seconds: "seconds", Minutes: "minutes", Hours: "hours", @@ -20,14 +16,44 @@ export const Unit = { Weeks: "weeks", Months: "months", } as const; -export type Unit = ClosedEnum; +export type DelayRegularMetadataUnit = ClosedEnum< + typeof DelayRegularMetadataUnit +>; + +export const DelayRegularMetadataType = { + Regular: "regular", +} as const; +export type DelayRegularMetadataType = ClosedEnum< + typeof DelayRegularMetadataType +>; export type DelayRegularMetadata = { amount?: number | undefined; + unit?: DelayRegularMetadataUnit | undefined; type: DelayRegularMetadataType; - unit?: Unit | undefined; }; +/** @internal */ +export const DelayRegularMetadataUnit$inboundSchema: z.ZodNativeEnum< + typeof DelayRegularMetadataUnit +> = z.nativeEnum(DelayRegularMetadataUnit); + +/** @internal */ +export const DelayRegularMetadataUnit$outboundSchema: z.ZodNativeEnum< + typeof DelayRegularMetadataUnit +> = DelayRegularMetadataUnit$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DelayRegularMetadataUnit$ { + /** @deprecated use `DelayRegularMetadataUnit$inboundSchema` instead. */ + export const inboundSchema = DelayRegularMetadataUnit$inboundSchema; + /** @deprecated use `DelayRegularMetadataUnit$outboundSchema` instead. */ + export const outboundSchema = DelayRegularMetadataUnit$outboundSchema; +} + /** @internal */ export const DelayRegularMetadataType$inboundSchema: z.ZodNativeEnum< typeof DelayRegularMetadataType @@ -49,26 +75,6 @@ export namespace DelayRegularMetadataType$ { export const outboundSchema = DelayRegularMetadataType$outboundSchema; } -/** @internal */ -export const Unit$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Unit, -); - -/** @internal */ -export const Unit$outboundSchema: z.ZodNativeEnum = - Unit$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Unit$ { - /** @deprecated use `Unit$inboundSchema` instead. */ - export const inboundSchema = Unit$inboundSchema; - /** @deprecated use `Unit$outboundSchema` instead. */ - export const outboundSchema = Unit$outboundSchema; -} - /** @internal */ export const DelayRegularMetadata$inboundSchema: z.ZodType< DelayRegularMetadata, @@ -76,15 +82,15 @@ export const DelayRegularMetadata$inboundSchema: z.ZodType< unknown > = z.object({ amount: z.number().optional(), + unit: DelayRegularMetadataUnit$inboundSchema.optional(), type: DelayRegularMetadataType$inboundSchema, - unit: Unit$inboundSchema.optional(), }); /** @internal */ export type DelayRegularMetadata$Outbound = { amount?: number | undefined; - type: string; unit?: string | undefined; + type: string; }; /** @internal */ @@ -94,8 +100,8 @@ export const DelayRegularMetadata$outboundSchema: z.ZodType< DelayRegularMetadata > = z.object({ amount: z.number().optional(), + unit: DelayRegularMetadataUnit$outboundSchema.optional(), type: DelayRegularMetadataType$outboundSchema, - unit: Unit$outboundSchema.optional(), }); /** @@ -110,3 +116,21 @@ export namespace DelayRegularMetadata$ { /** @deprecated use `DelayRegularMetadata$Outbound` instead. */ export type Outbound = DelayRegularMetadata$Outbound; } + +export function delayRegularMetadataToJSON( + delayRegularMetadata: DelayRegularMetadata, +): string { + return JSON.stringify( + DelayRegularMetadata$outboundSchema.parse(delayRegularMetadata), + ); +} + +export function delayRegularMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DelayRegularMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DelayRegularMetadata' from JSON`, + ); +} diff --git a/src/models/components/delayscheduledmetadata.ts b/src/models/components/delayscheduledmetadata.ts index 6c6797fa..cd26f256 100644 --- a/src/models/components/delayscheduledmetadata.ts +++ b/src/models/components/delayscheduledmetadata.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const DelayScheduledMetadataType = { Scheduled: "scheduled", @@ -13,8 +16,8 @@ export type DelayScheduledMetadataType = ClosedEnum< >; export type DelayScheduledMetadata = { - delayPath: string; type: DelayScheduledMetadataType; + delayPath: string; }; /** @internal */ @@ -44,14 +47,14 @@ export const DelayScheduledMetadata$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - delayPath: z.string(), type: DelayScheduledMetadataType$inboundSchema, + delayPath: z.string(), }); /** @internal */ export type DelayScheduledMetadata$Outbound = { - delayPath: string; type: string; + delayPath: string; }; /** @internal */ @@ -60,8 +63,8 @@ export const DelayScheduledMetadata$outboundSchema: z.ZodType< z.ZodTypeDef, DelayScheduledMetadata > = z.object({ - delayPath: z.string(), type: DelayScheduledMetadataType$outboundSchema, + delayPath: z.string(), }); /** @@ -76,3 +79,21 @@ export namespace DelayScheduledMetadata$ { /** @deprecated use `DelayScheduledMetadata$Outbound` instead. */ export type Outbound = DelayScheduledMetadata$Outbound; } + +export function delayScheduledMetadataToJSON( + delayScheduledMetadata: DelayScheduledMetadata, +): string { + return JSON.stringify( + DelayScheduledMetadata$outboundSchema.parse(delayScheduledMetadata), + ); +} + +export function delayScheduledMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DelayScheduledMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DelayScheduledMetadata' from JSON`, + ); +} diff --git a/src/models/components/deletemessageresponsedto.ts b/src/models/components/deletemessageresponsedto.ts index 1d567ae8..50e20aed 100644 --- a/src/models/components/deletemessageresponsedto.ts +++ b/src/models/components/deletemessageresponsedto.ts @@ -3,18 +3,23 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The status enum for the performed action */ -export const Status = { +export const DeleteMessageResponseDtoStatus = { Deleted: "deleted", } as const; /** * The status enum for the performed action */ -export type Status = ClosedEnum; +export type DeleteMessageResponseDtoStatus = ClosedEnum< + typeof DeleteMessageResponseDtoStatus +>; export type DeleteMessageResponseDto = { /** @@ -24,26 +29,28 @@ export type DeleteMessageResponseDto = { /** * The status enum for the performed action */ - status: Status; + status: DeleteMessageResponseDtoStatus; }; /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Status); +export const DeleteMessageResponseDtoStatus$inboundSchema: z.ZodNativeEnum< + typeof DeleteMessageResponseDtoStatus +> = z.nativeEnum(DeleteMessageResponseDtoStatus); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = - Status$inboundSchema; +export const DeleteMessageResponseDtoStatus$outboundSchema: z.ZodNativeEnum< + typeof DeleteMessageResponseDtoStatus +> = DeleteMessageResponseDtoStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; +export namespace DeleteMessageResponseDtoStatus$ { + /** @deprecated use `DeleteMessageResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = DeleteMessageResponseDtoStatus$inboundSchema; + /** @deprecated use `DeleteMessageResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = DeleteMessageResponseDtoStatus$outboundSchema; } /** @internal */ @@ -53,7 +60,7 @@ export const DeleteMessageResponseDto$inboundSchema: z.ZodType< unknown > = z.object({ acknowledged: z.boolean(), - status: Status$inboundSchema, + status: DeleteMessageResponseDtoStatus$inboundSchema, }); /** @internal */ @@ -69,7 +76,7 @@ export const DeleteMessageResponseDto$outboundSchema: z.ZodType< DeleteMessageResponseDto > = z.object({ acknowledged: z.boolean(), - status: Status$outboundSchema, + status: DeleteMessageResponseDtoStatus$outboundSchema, }); /** @@ -84,3 +91,21 @@ export namespace DeleteMessageResponseDto$ { /** @deprecated use `DeleteMessageResponseDto$Outbound` instead. */ export type Outbound = DeleteMessageResponseDto$Outbound; } + +export function deleteMessageResponseDtoToJSON( + deleteMessageResponseDto: DeleteMessageResponseDto, +): string { + return JSON.stringify( + DeleteMessageResponseDto$outboundSchema.parse(deleteMessageResponseDto), + ); +} + +export function deleteMessageResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteMessageResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteMessageResponseDto' from JSON`, + ); +} diff --git a/src/models/components/deletenotificationgroupresponsedto.ts b/src/models/components/deletenotificationgroupresponsedto.ts index 0ea940cf..b75b5c46 100644 --- a/src/models/components/deletenotificationgroupresponsedto.ts +++ b/src/models/components/deletenotificationgroupresponsedto.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The status enum for the performed action @@ -91,3 +94,24 @@ export namespace DeleteNotificationGroupResponseDto$ { /** @deprecated use `DeleteNotificationGroupResponseDto$Outbound` instead. */ export type Outbound = DeleteNotificationGroupResponseDto$Outbound; } + +export function deleteNotificationGroupResponseDtoToJSON( + deleteNotificationGroupResponseDto: DeleteNotificationGroupResponseDto, +): string { + return JSON.stringify( + DeleteNotificationGroupResponseDto$outboundSchema.parse( + deleteNotificationGroupResponseDto, + ), + ); +} + +export function deleteNotificationGroupResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteNotificationGroupResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteNotificationGroupResponseDto' from JSON`, + ); +} diff --git a/src/models/components/deletesubscriberresponsedto.ts b/src/models/components/deletesubscriberresponsedto.ts index 00b98a0d..c23af1a8 100644 --- a/src/models/components/deletesubscriberresponsedto.ts +++ b/src/models/components/deletesubscriberresponsedto.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The status enum for the performed action @@ -89,3 +92,23 @@ export namespace DeleteSubscriberResponseDto$ { /** @deprecated use `DeleteSubscriberResponseDto$Outbound` instead. */ export type Outbound = DeleteSubscriberResponseDto$Outbound; } + +export function deleteSubscriberResponseDtoToJSON( + deleteSubscriberResponseDto: DeleteSubscriberResponseDto, +): string { + return JSON.stringify( + DeleteSubscriberResponseDto$outboundSchema.parse( + deleteSubscriberResponseDto, + ), + ); +} + +export function deleteSubscriberResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteSubscriberResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteSubscriberResponseDto' from JSON`, + ); +} diff --git a/src/models/components/digestregularmetadata.ts b/src/models/components/digestregularmetadata.ts index 67c8f1f4..f59bcbc9 100644 --- a/src/models/components/digestregularmetadata.ts +++ b/src/models/components/digestregularmetadata.ts @@ -3,9 +3,12 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const BackoffUnit = { +export const Unit = { Seconds: "seconds", Minutes: "minutes", Hours: "hours", @@ -13,7 +16,7 @@ export const BackoffUnit = { Weeks: "weeks", Months: "months", } as const; -export type BackoffUnit = ClosedEnum; +export type Unit = ClosedEnum; export const DigestRegularMetadataType = { Regular: "regular", @@ -23,7 +26,7 @@ export type DigestRegularMetadataType = ClosedEnum< typeof DigestRegularMetadataType >; -export const DigestRegularMetadataUnit = { +export const BackoffUnit = { Seconds: "seconds", Minutes: "minutes", Hours: "hours", @@ -31,38 +34,37 @@ export const DigestRegularMetadataUnit = { Weeks: "weeks", Months: "months", } as const; -export type DigestRegularMetadataUnit = ClosedEnum< - typeof DigestRegularMetadataUnit ->; +export type BackoffUnit = ClosedEnum; export type DigestRegularMetadata = { amount?: number | undefined; + unit?: Unit | undefined; + digestKey?: string | undefined; + type: DigestRegularMetadataType; backoff?: boolean | undefined; backoffAmount?: number | undefined; backoffUnit?: BackoffUnit | undefined; - digestKey?: string | undefined; - type: DigestRegularMetadataType; - unit?: DigestRegularMetadataUnit | undefined; updateMode?: boolean | undefined; }; /** @internal */ -export const BackoffUnit$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(BackoffUnit); +export const Unit$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Unit, +); /** @internal */ -export const BackoffUnit$outboundSchema: z.ZodNativeEnum = - BackoffUnit$inboundSchema; +export const Unit$outboundSchema: z.ZodNativeEnum = + Unit$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace BackoffUnit$ { - /** @deprecated use `BackoffUnit$inboundSchema` instead. */ - export const inboundSchema = BackoffUnit$inboundSchema; - /** @deprecated use `BackoffUnit$outboundSchema` instead. */ - export const outboundSchema = BackoffUnit$outboundSchema; +export namespace Unit$ { + /** @deprecated use `Unit$inboundSchema` instead. */ + export const inboundSchema = Unit$inboundSchema; + /** @deprecated use `Unit$outboundSchema` instead. */ + export const outboundSchema = Unit$outboundSchema; } /** @internal */ @@ -87,24 +89,22 @@ export namespace DigestRegularMetadataType$ { } /** @internal */ -export const DigestRegularMetadataUnit$inboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataUnit -> = z.nativeEnum(DigestRegularMetadataUnit); +export const BackoffUnit$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BackoffUnit); /** @internal */ -export const DigestRegularMetadataUnit$outboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataUnit -> = DigestRegularMetadataUnit$inboundSchema; +export const BackoffUnit$outboundSchema: z.ZodNativeEnum = + BackoffUnit$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DigestRegularMetadataUnit$ { - /** @deprecated use `DigestRegularMetadataUnit$inboundSchema` instead. */ - export const inboundSchema = DigestRegularMetadataUnit$inboundSchema; - /** @deprecated use `DigestRegularMetadataUnit$outboundSchema` instead. */ - export const outboundSchema = DigestRegularMetadataUnit$outboundSchema; +export namespace BackoffUnit$ { + /** @deprecated use `BackoffUnit$inboundSchema` instead. */ + export const inboundSchema = BackoffUnit$inboundSchema; + /** @deprecated use `BackoffUnit$outboundSchema` instead. */ + export const outboundSchema = BackoffUnit$outboundSchema; } /** @internal */ @@ -114,24 +114,24 @@ export const DigestRegularMetadata$inboundSchema: z.ZodType< unknown > = z.object({ amount: z.number().optional(), + unit: Unit$inboundSchema.optional(), + digestKey: z.string().optional(), + type: DigestRegularMetadataType$inboundSchema, backoff: z.boolean().optional(), backoffAmount: z.number().optional(), backoffUnit: BackoffUnit$inboundSchema.optional(), - digestKey: z.string().optional(), - type: DigestRegularMetadataType$inboundSchema, - unit: DigestRegularMetadataUnit$inboundSchema.optional(), updateMode: z.boolean().optional(), }); /** @internal */ export type DigestRegularMetadata$Outbound = { amount?: number | undefined; + unit?: string | undefined; + digestKey?: string | undefined; + type: string; backoff?: boolean | undefined; backoffAmount?: number | undefined; backoffUnit?: string | undefined; - digestKey?: string | undefined; - type: string; - unit?: string | undefined; updateMode?: boolean | undefined; }; @@ -142,12 +142,12 @@ export const DigestRegularMetadata$outboundSchema: z.ZodType< DigestRegularMetadata > = z.object({ amount: z.number().optional(), + unit: Unit$outboundSchema.optional(), + digestKey: z.string().optional(), + type: DigestRegularMetadataType$outboundSchema, backoff: z.boolean().optional(), backoffAmount: z.number().optional(), backoffUnit: BackoffUnit$outboundSchema.optional(), - digestKey: z.string().optional(), - type: DigestRegularMetadataType$outboundSchema, - unit: DigestRegularMetadataUnit$outboundSchema.optional(), updateMode: z.boolean().optional(), }); @@ -163,3 +163,21 @@ export namespace DigestRegularMetadata$ { /** @deprecated use `DigestRegularMetadata$Outbound` instead. */ export type Outbound = DigestRegularMetadata$Outbound; } + +export function digestRegularMetadataToJSON( + digestRegularMetadata: DigestRegularMetadata, +): string { + return JSON.stringify( + DigestRegularMetadata$outboundSchema.parse(digestRegularMetadata), + ); +} + +export function digestRegularMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DigestRegularMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DigestRegularMetadata' from JSON`, + ); +} diff --git a/src/models/components/digesttimedmetadata.ts b/src/models/components/digesttimedmetadata.ts index 789d20cc..05b25a8c 100644 --- a/src/models/components/digesttimedmetadata.ts +++ b/src/models/components/digesttimedmetadata.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { TimedConfig, TimedConfig$inboundSchema, @@ -11,13 +14,6 @@ import { TimedConfig$outboundSchema, } from "./timedconfig.js"; -export const DigestTimedMetadataType = { - Timed: "timed", -} as const; -export type DigestTimedMetadataType = ClosedEnum< - typeof DigestTimedMetadataType ->; - export const DigestTimedMetadataUnit = { Seconds: "seconds", Minutes: "minutes", @@ -30,35 +26,21 @@ export type DigestTimedMetadataUnit = ClosedEnum< typeof DigestTimedMetadataUnit >; +export const DigestTimedMetadataType = { + Timed: "timed", +} as const; +export type DigestTimedMetadataType = ClosedEnum< + typeof DigestTimedMetadataType +>; + export type DigestTimedMetadata = { amount?: number | undefined; + unit?: DigestTimedMetadataUnit | undefined; digestKey?: string | undefined; - timed?: TimedConfig | undefined; type: DigestTimedMetadataType; - unit?: DigestTimedMetadataUnit | undefined; + timed?: TimedConfig | undefined; }; -/** @internal */ -export const DigestTimedMetadataType$inboundSchema: z.ZodNativeEnum< - typeof DigestTimedMetadataType -> = z.nativeEnum(DigestTimedMetadataType); - -/** @internal */ -export const DigestTimedMetadataType$outboundSchema: z.ZodNativeEnum< - typeof DigestTimedMetadataType -> = DigestTimedMetadataType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DigestTimedMetadataType$ { - /** @deprecated use `DigestTimedMetadataType$inboundSchema` instead. */ - export const inboundSchema = DigestTimedMetadataType$inboundSchema; - /** @deprecated use `DigestTimedMetadataType$outboundSchema` instead. */ - export const outboundSchema = DigestTimedMetadataType$outboundSchema; -} - /** @internal */ export const DigestTimedMetadataUnit$inboundSchema: z.ZodNativeEnum< typeof DigestTimedMetadataUnit @@ -80,6 +62,27 @@ export namespace DigestTimedMetadataUnit$ { export const outboundSchema = DigestTimedMetadataUnit$outboundSchema; } +/** @internal */ +export const DigestTimedMetadataType$inboundSchema: z.ZodNativeEnum< + typeof DigestTimedMetadataType +> = z.nativeEnum(DigestTimedMetadataType); + +/** @internal */ +export const DigestTimedMetadataType$outboundSchema: z.ZodNativeEnum< + typeof DigestTimedMetadataType +> = DigestTimedMetadataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DigestTimedMetadataType$ { + /** @deprecated use `DigestTimedMetadataType$inboundSchema` instead. */ + export const inboundSchema = DigestTimedMetadataType$inboundSchema; + /** @deprecated use `DigestTimedMetadataType$outboundSchema` instead. */ + export const outboundSchema = DigestTimedMetadataType$outboundSchema; +} + /** @internal */ export const DigestTimedMetadata$inboundSchema: z.ZodType< DigestTimedMetadata, @@ -87,19 +90,19 @@ export const DigestTimedMetadata$inboundSchema: z.ZodType< unknown > = z.object({ amount: z.number().optional(), + unit: DigestTimedMetadataUnit$inboundSchema.optional(), digestKey: z.string().optional(), - timed: TimedConfig$inboundSchema.optional(), type: DigestTimedMetadataType$inboundSchema, - unit: DigestTimedMetadataUnit$inboundSchema.optional(), + timed: TimedConfig$inboundSchema.optional(), }); /** @internal */ export type DigestTimedMetadata$Outbound = { amount?: number | undefined; + unit?: string | undefined; digestKey?: string | undefined; - timed?: TimedConfig$Outbound | undefined; type: string; - unit?: string | undefined; + timed?: TimedConfig$Outbound | undefined; }; /** @internal */ @@ -109,10 +112,10 @@ export const DigestTimedMetadata$outboundSchema: z.ZodType< DigestTimedMetadata > = z.object({ amount: z.number().optional(), + unit: DigestTimedMetadataUnit$outboundSchema.optional(), digestKey: z.string().optional(), - timed: TimedConfig$outboundSchema.optional(), type: DigestTimedMetadataType$outboundSchema, - unit: DigestTimedMetadataUnit$outboundSchema.optional(), + timed: TimedConfig$outboundSchema.optional(), }); /** @@ -127,3 +130,21 @@ export namespace DigestTimedMetadata$ { /** @deprecated use `DigestTimedMetadata$Outbound` instead. */ export type Outbound = DigestTimedMetadata$Outbound; } + +export function digestTimedMetadataToJSON( + digestTimedMetadata: DigestTimedMetadata, +): string { + return JSON.stringify( + DigestTimedMetadata$outboundSchema.parse(digestTimedMetadata), + ); +} + +export function digestTimedMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DigestTimedMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DigestTimedMetadata' from JSON`, + ); +} diff --git a/src/models/components/emailblock.ts b/src/models/components/emailblock.ts index b8da5de8..1f59f8be 100644 --- a/src/models/components/emailblock.ts +++ b/src/models/components/emailblock.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EmailBlockStyles, EmailBlockStyles$inboundSchema, @@ -18,10 +21,10 @@ export const EmailBlockType = { export type EmailBlockType = ClosedEnum; export type EmailBlock = { - content: string; - styles?: EmailBlockStyles | undefined; type: EmailBlockType; + content: string; url?: string | undefined; + styles?: EmailBlockStyles | undefined; }; /** @internal */ @@ -51,18 +54,18 @@ export const EmailBlock$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - content: z.string(), - styles: EmailBlockStyles$inboundSchema.optional(), type: EmailBlockType$inboundSchema, + content: z.string(), url: z.string().optional(), + styles: EmailBlockStyles$inboundSchema.optional(), }); /** @internal */ export type EmailBlock$Outbound = { - content: string; - styles?: EmailBlockStyles$Outbound | undefined; type: string; + content: string; url?: string | undefined; + styles?: EmailBlockStyles$Outbound | undefined; }; /** @internal */ @@ -71,10 +74,10 @@ export const EmailBlock$outboundSchema: z.ZodType< z.ZodTypeDef, EmailBlock > = z.object({ - content: z.string(), - styles: EmailBlockStyles$outboundSchema.optional(), type: EmailBlockType$outboundSchema, + content: z.string(), url: z.string().optional(), + styles: EmailBlockStyles$outboundSchema.optional(), }); /** @@ -89,3 +92,17 @@ export namespace EmailBlock$ { /** @deprecated use `EmailBlock$Outbound` instead. */ export type Outbound = EmailBlock$Outbound; } + +export function emailBlockToJSON(emailBlock: EmailBlock): string { + return JSON.stringify(EmailBlock$outboundSchema.parse(emailBlock)); +} + +export function emailBlockFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmailBlock$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmailBlock' from JSON`, + ); +} diff --git a/src/models/components/emailblockstyles.ts b/src/models/components/emailblockstyles.ts index 9416a9b5..7771a9ba 100644 --- a/src/models/components/emailblockstyles.ts +++ b/src/models/components/emailblockstyles.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const TextAlign = { Center: "center", @@ -70,3 +73,21 @@ export namespace EmailBlockStyles$ { /** @deprecated use `EmailBlockStyles$Outbound` instead. */ export type Outbound = EmailBlockStyles$Outbound; } + +export function emailBlockStylesToJSON( + emailBlockStyles: EmailBlockStyles, +): string { + return JSON.stringify( + EmailBlockStyles$outboundSchema.parse(emailBlockStyles), + ); +} + +export function emailBlockStylesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmailBlockStyles$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmailBlockStyles' from JSON`, + ); +} diff --git a/src/models/components/environmentresponsedto.ts b/src/models/components/environmentresponsedto.ts index dd6faae2..34a022ea 100644 --- a/src/models/components/environmentresponsedto.ts +++ b/src/models/components/environmentresponsedto.ts @@ -4,14 +4,18 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type EnvironmentResponseDto = { id?: string | undefined; + name: string; organizationId: string; - parentId: string; - apiKeys?: Array | undefined; identifier: string; - name: string; + apiKeys?: Array | undefined; + parentId: string; + slug?: string | undefined; }; /** @internal */ @@ -21,11 +25,12 @@ export const EnvironmentResponseDto$inboundSchema: z.ZodType< unknown > = z.object({ _id: z.string().optional(), + name: z.string(), _organizationId: z.string(), - _parentId: z.string(), - apiKeys: z.array(z.string()).optional(), identifier: z.string(), - name: z.string(), + apiKeys: z.array(z.string()).optional(), + _parentId: z.string(), + slug: z.string().optional(), }).transform((v) => { return remap$(v, { "_id": "id", @@ -37,11 +42,12 @@ export const EnvironmentResponseDto$inboundSchema: z.ZodType< /** @internal */ export type EnvironmentResponseDto$Outbound = { _id?: string | undefined; + name: string; _organizationId: string; - _parentId: string; - apiKeys?: Array | undefined; identifier: string; - name: string; + apiKeys?: Array | undefined; + _parentId: string; + slug?: string | undefined; }; /** @internal */ @@ -51,11 +57,12 @@ export const EnvironmentResponseDto$outboundSchema: z.ZodType< EnvironmentResponseDto > = z.object({ id: z.string().optional(), + name: z.string(), organizationId: z.string(), - parentId: z.string(), - apiKeys: z.array(z.string()).optional(), identifier: z.string(), - name: z.string(), + apiKeys: z.array(z.string()).optional(), + parentId: z.string(), + slug: z.string().optional(), }).transform((v) => { return remap$(v, { id: "_id", @@ -76,3 +83,21 @@ export namespace EnvironmentResponseDto$ { /** @deprecated use `EnvironmentResponseDto$Outbound` instead. */ export type Outbound = EnvironmentResponseDto$Outbound; } + +export function environmentResponseDtoToJSON( + environmentResponseDto: EnvironmentResponseDto, +): string { + return JSON.stringify( + EnvironmentResponseDto$outboundSchema.parse(environmentResponseDto), + ); +} + +export function environmentResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnvironmentResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnvironmentResponseDto' from JSON`, + ); +} diff --git a/src/models/components/executiondetailsresponsedto.ts b/src/models/components/executiondetailsresponsedto.ts index fcd14bbb..4f9059c9 100644 --- a/src/models/components/executiondetailsresponsedto.ts +++ b/src/models/components/executiondetailsresponsedto.ts @@ -4,9 +4,12 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const ExecutionDetailsResponseDtoChannel = { +export const Channel = { InApp: "in_app", Email: "email", Sms: "sms", @@ -17,9 +20,7 @@ export const ExecutionDetailsResponseDtoChannel = { Delay: "delay", Custom: "custom", } as const; -export type ExecutionDetailsResponseDtoChannel = ClosedEnum< - typeof ExecutionDetailsResponseDtoChannel ->; +export type Channel = ClosedEnum; export const Source = { Credentials: "Credentials", @@ -29,7 +30,7 @@ export const Source = { } as const; export type Source = ClosedEnum; -export const ExecutionDetailsResponseDtoStatus = { +export const Status = { Success: "Success", Warning: "Warning", Failed: "Failed", @@ -37,50 +38,45 @@ export const ExecutionDetailsResponseDtoStatus = { Queued: "Queued", ReadConfirmation: "ReadConfirmation", } as const; -export type ExecutionDetailsResponseDtoStatus = ClosedEnum< - typeof ExecutionDetailsResponseDtoStatus ->; +export type Status = ClosedEnum; export type ExecutionDetailsResponseDto = { - environmentId: string; id?: string | undefined; + organizationId: string; jobId: string; - messageId?: string | undefined; + environmentId: string; notificationId: string; notificationTemplateId: string; - organizationId: string; subscriberId: string; - channel: ExecutionDetailsResponseDtoChannel; - createdAt?: string | undefined; - detail: string; - isRetry: boolean; - isTest: boolean; + messageId?: string | undefined; providerId?: string | undefined; - source: Source; - status: ExecutionDetailsResponseDtoStatus; transactionId: string; + channel: Channel; + detail: string; + source: Source; + status: Status; + isTest: boolean; + isRetry: boolean; + createdAt?: string | undefined; }; /** @internal */ -export const ExecutionDetailsResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoChannel -> = z.nativeEnum(ExecutionDetailsResponseDtoChannel); +export const Channel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channel); /** @internal */ -export const ExecutionDetailsResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoChannel -> = ExecutionDetailsResponseDtoChannel$inboundSchema; +export const Channel$outboundSchema: z.ZodNativeEnum = + Channel$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ExecutionDetailsResponseDtoChannel$ { - /** @deprecated use `ExecutionDetailsResponseDtoChannel$inboundSchema` instead. */ - export const inboundSchema = ExecutionDetailsResponseDtoChannel$inboundSchema; - /** @deprecated use `ExecutionDetailsResponseDtoChannel$outboundSchema` instead. */ - export const outboundSchema = - ExecutionDetailsResponseDtoChannel$outboundSchema; +export namespace Channel$ { + /** @deprecated use `Channel$inboundSchema` instead. */ + export const inboundSchema = Channel$inboundSchema; + /** @deprecated use `Channel$outboundSchema` instead. */ + export const outboundSchema = Channel$outboundSchema; } /** @internal */ @@ -103,25 +99,22 @@ export namespace Source$ { } /** @internal */ -export const ExecutionDetailsResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoStatus -> = z.nativeEnum(ExecutionDetailsResponseDtoStatus); +export const Status$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Status); /** @internal */ -export const ExecutionDetailsResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoStatus -> = ExecutionDetailsResponseDtoStatus$inboundSchema; +export const Status$outboundSchema: z.ZodNativeEnum = + Status$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ExecutionDetailsResponseDtoStatus$ { - /** @deprecated use `ExecutionDetailsResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = ExecutionDetailsResponseDtoStatus$inboundSchema; - /** @deprecated use `ExecutionDetailsResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = - ExecutionDetailsResponseDtoStatus$outboundSchema; +export namespace Status$ { + /** @deprecated use `Status$inboundSchema` instead. */ + export const inboundSchema = Status$inboundSchema; + /** @deprecated use `Status$outboundSchema` instead. */ + export const outboundSchema = Status$outboundSchema; } /** @internal */ @@ -130,55 +123,55 @@ export const ExecutionDetailsResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), + _organizationId: z.string(), _jobId: z.string(), - _messageId: z.string().optional(), + _environmentId: z.string(), _notificationId: z.string(), _notificationTemplateId: z.string(), - _organizationId: z.string(), _subscriberId: z.string(), - channel: ExecutionDetailsResponseDtoChannel$inboundSchema, - createdAt: z.string().optional(), - detail: z.string(), - isRetry: z.boolean(), - isTest: z.boolean(), + _messageId: z.string().optional(), providerId: z.string().optional(), - source: Source$inboundSchema, - status: ExecutionDetailsResponseDtoStatus$inboundSchema, transactionId: z.string(), + channel: Channel$inboundSchema, + detail: z.string(), + source: Source$inboundSchema, + status: Status$inboundSchema, + isTest: z.boolean(), + isRetry: z.boolean(), + createdAt: z.string().optional(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", + "_organizationId": "organizationId", "_jobId": "jobId", - "_messageId": "messageId", + "_environmentId": "environmentId", "_notificationId": "notificationId", "_notificationTemplateId": "notificationTemplateId", - "_organizationId": "organizationId", "_subscriberId": "subscriberId", + "_messageId": "messageId", }); }); /** @internal */ export type ExecutionDetailsResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; + _organizationId: string; _jobId: string; - _messageId?: string | undefined; + _environmentId: string; _notificationId: string; _notificationTemplateId: string; - _organizationId: string; _subscriberId: string; + _messageId?: string | undefined; + providerId?: string | undefined; + transactionId: string; channel: string; - createdAt?: string | undefined; detail: string; - isRetry: boolean; - isTest: boolean; - providerId?: string | undefined; source: string; status: string; - transactionId: string; + isTest: boolean; + isRetry: boolean; + createdAt?: string | undefined; }; /** @internal */ @@ -187,33 +180,33 @@ export const ExecutionDetailsResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, ExecutionDetailsResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), + organizationId: z.string(), jobId: z.string(), - messageId: z.string().optional(), + environmentId: z.string(), notificationId: z.string(), notificationTemplateId: z.string(), - organizationId: z.string(), subscriberId: z.string(), - channel: ExecutionDetailsResponseDtoChannel$outboundSchema, - createdAt: z.string().optional(), - detail: z.string(), - isRetry: z.boolean(), - isTest: z.boolean(), + messageId: z.string().optional(), providerId: z.string().optional(), - source: Source$outboundSchema, - status: ExecutionDetailsResponseDtoStatus$outboundSchema, transactionId: z.string(), + channel: Channel$outboundSchema, + detail: z.string(), + source: Source$outboundSchema, + status: Status$outboundSchema, + isTest: z.boolean(), + isRetry: z.boolean(), + createdAt: z.string().optional(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", + organizationId: "_organizationId", jobId: "_jobId", - messageId: "_messageId", + environmentId: "_environmentId", notificationId: "_notificationId", notificationTemplateId: "_notificationTemplateId", - organizationId: "_organizationId", subscriberId: "_subscriberId", + messageId: "_messageId", }); }); @@ -229,3 +222,23 @@ export namespace ExecutionDetailsResponseDto$ { /** @deprecated use `ExecutionDetailsResponseDto$Outbound` instead. */ export type Outbound = ExecutionDetailsResponseDto$Outbound; } + +export function executionDetailsResponseDtoToJSON( + executionDetailsResponseDto: ExecutionDetailsResponseDto, +): string { + return JSON.stringify( + ExecutionDetailsResponseDto$outboundSchema.parse( + executionDetailsResponseDto, + ), + ); +} + +export function executionDetailsResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ExecutionDetailsResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExecutionDetailsResponseDto' from JSON`, + ); +} diff --git a/src/models/components/feedresponsedto.ts b/src/models/components/feedresponsedto.ts index 3f09d4e1..dd231d97 100644 --- a/src/models/components/feedresponsedto.ts +++ b/src/models/components/feedresponsedto.ts @@ -3,13 +3,16 @@ */ 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 FeedResponseDto = { - data: Array; + totalCount?: number | undefined; hasMore: boolean; - page: number; + data: Array; pageSize: number; - totalCount?: number | undefined; + page: number; }; /** @internal */ @@ -18,20 +21,20 @@ export const FeedResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(z.string()), + totalCount: z.number().optional(), hasMore: z.boolean(), - page: z.number(), + data: z.array(z.string()), pageSize: z.number(), - totalCount: z.number().optional(), + page: z.number(), }); /** @internal */ export type FeedResponseDto$Outbound = { - data: Array; + totalCount?: number | undefined; hasMore: boolean; - page: number; + data: Array; pageSize: number; - totalCount?: number | undefined; + page: number; }; /** @internal */ @@ -40,11 +43,11 @@ export const FeedResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, FeedResponseDto > = z.object({ - data: z.array(z.string()), + totalCount: z.number().optional(), hasMore: z.boolean(), - page: z.number(), + data: z.array(z.string()), pageSize: z.number(), - totalCount: z.number().optional(), + page: z.number(), }); /** @@ -59,3 +62,19 @@ export namespace FeedResponseDto$ { /** @deprecated use `FeedResponseDto$Outbound` instead. */ export type Outbound = FeedResponseDto$Outbound; } + +export function feedResponseDtoToJSON( + feedResponseDto: FeedResponseDto, +): string { + return JSON.stringify(FeedResponseDto$outboundSchema.parse(feedResponseDto)); +} + +export function feedResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FeedResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FeedResponseDto' from JSON`, + ); +} diff --git a/src/models/components/fieldfilterpart.ts b/src/models/components/fieldfilterpart.ts index 6bdd95c5..80796872 100644 --- a/src/models/components/fieldfilterpart.ts +++ b/src/models/components/fieldfilterpart.ts @@ -3,13 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; - -export const On = { - Subscriber: "subscriber", - Payload: "payload", -} as const; -export type On = ClosedEnum; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const Operator = { Larger: "LARGER", @@ -29,47 +26,53 @@ export const Operator = { } as const; export type Operator = ClosedEnum; +export const On = { + Subscriber: "subscriber", + Payload: "payload", +} as const; +export type On = ClosedEnum; + export type FieldFilterPart = { field: string; - on: On; - operator: Operator; value: string; + operator: Operator; + on: On; }; /** @internal */ -export const On$inboundSchema: z.ZodNativeEnum = z.nativeEnum(On); +export const Operator$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Operator); /** @internal */ -export const On$outboundSchema: z.ZodNativeEnum = On$inboundSchema; +export const Operator$outboundSchema: z.ZodNativeEnum = + Operator$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace On$ { - /** @deprecated use `On$inboundSchema` instead. */ - export const inboundSchema = On$inboundSchema; - /** @deprecated use `On$outboundSchema` instead. */ - export const outboundSchema = On$outboundSchema; +export namespace Operator$ { + /** @deprecated use `Operator$inboundSchema` instead. */ + export const inboundSchema = Operator$inboundSchema; + /** @deprecated use `Operator$outboundSchema` instead. */ + export const outboundSchema = Operator$outboundSchema; } /** @internal */ -export const Operator$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Operator); +export const On$inboundSchema: z.ZodNativeEnum = z.nativeEnum(On); /** @internal */ -export const Operator$outboundSchema: z.ZodNativeEnum = - Operator$inboundSchema; +export const On$outboundSchema: z.ZodNativeEnum = On$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Operator$ { - /** @deprecated use `Operator$inboundSchema` instead. */ - export const inboundSchema = Operator$inboundSchema; - /** @deprecated use `Operator$outboundSchema` instead. */ - export const outboundSchema = Operator$outboundSchema; +export namespace On$ { + /** @deprecated use `On$inboundSchema` instead. */ + export const inboundSchema = On$inboundSchema; + /** @deprecated use `On$outboundSchema` instead. */ + export const outboundSchema = On$outboundSchema; } /** @internal */ @@ -79,17 +82,17 @@ export const FieldFilterPart$inboundSchema: z.ZodType< unknown > = z.object({ field: z.string(), - on: On$inboundSchema, - operator: Operator$inboundSchema, value: z.string(), + operator: Operator$inboundSchema, + on: On$inboundSchema, }); /** @internal */ export type FieldFilterPart$Outbound = { field: string; - on: string; - operator: string; value: string; + operator: string; + on: string; }; /** @internal */ @@ -99,9 +102,9 @@ export const FieldFilterPart$outboundSchema: z.ZodType< FieldFilterPart > = z.object({ field: z.string(), - on: On$outboundSchema, - operator: Operator$outboundSchema, value: z.string(), + operator: Operator$outboundSchema, + on: On$outboundSchema, }); /** @@ -116,3 +119,19 @@ export namespace FieldFilterPart$ { /** @deprecated use `FieldFilterPart$Outbound` instead. */ export type Outbound = FieldFilterPart$Outbound; } + +export function fieldFilterPartToJSON( + fieldFilterPart: FieldFilterPart, +): string { + return JSON.stringify(FieldFilterPart$outboundSchema.parse(fieldFilterPart)); +} + +export function fieldFilterPartFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FieldFilterPart$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FieldFilterPart' from JSON`, + ); +} diff --git a/src/models/components/filtertopicsresponsedto.ts b/src/models/components/filtertopicsresponsedto.ts index 58eed1ba..ca44b57f 100644 --- a/src/models/components/filtertopicsresponsedto.ts +++ b/src/models/components/filtertopicsresponsedto.ts @@ -3,6 +3,9 @@ */ 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"; import { TopicDto, TopicDto$inboundSchema, @@ -61,3 +64,21 @@ export namespace FilterTopicsResponseDto$ { /** @deprecated use `FilterTopicsResponseDto$Outbound` instead. */ export type Outbound = FilterTopicsResponseDto$Outbound; } + +export function filterTopicsResponseDtoToJSON( + filterTopicsResponseDto: FilterTopicsResponseDto, +): string { + return JSON.stringify( + FilterTopicsResponseDto$outboundSchema.parse(filterTopicsResponseDto), + ); +} + +export function filterTopicsResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FilterTopicsResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FilterTopicsResponseDto' from JSON`, + ); +} diff --git a/src/models/components/getlayoutresponsedto.ts b/src/models/components/getlayoutresponsedto.ts deleted file mode 100644 index a4095b13..00000000 --- a/src/models/components/getlayoutresponsedto.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { ClosedEnum } from "../../types/enums.js"; - -export const GetLayoutResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", -} as const; -export type GetLayoutResponseDtoChannel = ClosedEnum< - typeof GetLayoutResponseDtoChannel ->; - -export type GetLayoutResponseDto = { - creatorId: string; - environmentId: string; - id?: string | undefined; - organizationId: string; - parentId?: string | undefined; - channel: GetLayoutResponseDtoChannel; - content: string; - contentType: string; - createdAt?: string | undefined; - description?: string | undefined; - identifier: string; - isDefault: boolean; - isDeleted: boolean; - name: string; - updatedAt?: string | undefined; - variables?: Array | undefined; -}; - -/** @internal */ -export const GetLayoutResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof GetLayoutResponseDtoChannel -> = z.nativeEnum(GetLayoutResponseDtoChannel); - -/** @internal */ -export const GetLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof GetLayoutResponseDtoChannel -> = GetLayoutResponseDtoChannel$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetLayoutResponseDtoChannel$ { - /** @deprecated use `GetLayoutResponseDtoChannel$inboundSchema` instead. */ - export const inboundSchema = GetLayoutResponseDtoChannel$inboundSchema; - /** @deprecated use `GetLayoutResponseDtoChannel$outboundSchema` instead. */ - export const outboundSchema = GetLayoutResponseDtoChannel$outboundSchema; -} - -/** @internal */ -export const GetLayoutResponseDto$inboundSchema: z.ZodType< - GetLayoutResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _creatorId: z.string(), - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string().optional(), - channel: GetLayoutResponseDtoChannel$inboundSchema, - content: z.string(), - contentType: z.string(), - createdAt: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean(), - isDeleted: z.boolean(), - name: z.string(), - updatedAt: z.string().optional(), - variables: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "_creatorId": "creatorId", - "_environmentId": "environmentId", - "_id": "id", - "_organizationId": "organizationId", - "_parentId": "parentId", - }); -}); - -/** @internal */ -export type GetLayoutResponseDto$Outbound = { - _creatorId: string; - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - _parentId?: string | undefined; - channel: string; - content: string; - contentType: string; - createdAt?: string | undefined; - description?: string | undefined; - identifier: string; - isDefault: boolean; - isDeleted: boolean; - name: string; - updatedAt?: string | undefined; - variables?: Array | undefined; -}; - -/** @internal */ -export const GetLayoutResponseDto$outboundSchema: z.ZodType< - GetLayoutResponseDto$Outbound, - z.ZodTypeDef, - GetLayoutResponseDto -> = z.object({ - creatorId: z.string(), - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string().optional(), - channel: GetLayoutResponseDtoChannel$outboundSchema, - content: z.string(), - contentType: z.string(), - createdAt: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean(), - isDeleted: z.boolean(), - name: z.string(), - updatedAt: z.string().optional(), - variables: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - creatorId: "_creatorId", - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetLayoutResponseDto$ { - /** @deprecated use `GetLayoutResponseDto$inboundSchema` instead. */ - export const inboundSchema = GetLayoutResponseDto$inboundSchema; - /** @deprecated use `GetLayoutResponseDto$outboundSchema` instead. */ - export const outboundSchema = GetLayoutResponseDto$outboundSchema; - /** @deprecated use `GetLayoutResponseDto$Outbound` instead. */ - export type Outbound = GetLayoutResponseDto$Outbound; -} diff --git a/src/models/components/getsubscriberpreferencesresponsedto.ts b/src/models/components/getsubscriberpreferencesresponsedto.ts index da059c82..23eaa71f 100644 --- a/src/models/components/getsubscriberpreferencesresponsedto.ts +++ b/src/models/components/getsubscriberpreferencesresponsedto.ts @@ -3,6 +3,9 @@ */ 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"; import { Preference, Preference$inboundSchema, @@ -17,14 +20,14 @@ import { } from "./templateresponse.js"; export type GetSubscriberPreferencesResponseDto = { - /** - * The preferences of the subscriber regarding the related workflow - */ - preference: Preference; /** * The workflow information and if it is critical or not */ template?: TemplateResponse | undefined; + /** + * The preferences of the subscriber regarding the related workflow + */ + preference: Preference; }; /** @internal */ @@ -33,14 +36,14 @@ export const GetSubscriberPreferencesResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - preference: Preference$inboundSchema, template: TemplateResponse$inboundSchema.optional(), + preference: Preference$inboundSchema, }); /** @internal */ export type GetSubscriberPreferencesResponseDto$Outbound = { - preference: Preference$Outbound; template?: TemplateResponse$Outbound | undefined; + preference: Preference$Outbound; }; /** @internal */ @@ -49,8 +52,8 @@ export const GetSubscriberPreferencesResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, GetSubscriberPreferencesResponseDto > = z.object({ - preference: Preference$outboundSchema, template: TemplateResponse$outboundSchema.optional(), + preference: Preference$outboundSchema, }); /** @@ -67,3 +70,24 @@ export namespace GetSubscriberPreferencesResponseDto$ { /** @deprecated use `GetSubscriberPreferencesResponseDto$Outbound` instead. */ export type Outbound = GetSubscriberPreferencesResponseDto$Outbound; } + +export function getSubscriberPreferencesResponseDtoToJSON( + getSubscriberPreferencesResponseDto: GetSubscriberPreferencesResponseDto, +): string { + return JSON.stringify( + GetSubscriberPreferencesResponseDto$outboundSchema.parse( + getSubscriberPreferencesResponseDto, + ), + ); +} + +export function getSubscriberPreferencesResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetSubscriberPreferencesResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetSubscriberPreferencesResponseDto' from JSON`, + ); +} diff --git a/src/models/components/gettenantresponsedto.ts b/src/models/components/gettenantresponsedto.ts deleted file mode 100644 index 8cb45426..00000000 --- a/src/models/components/gettenantresponsedto.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; - -export type GetTenantResponseDtoData = {}; - -export type GetTenantResponseDto = { - environmentId: string; - id: string; - createdAt: string; - data?: GetTenantResponseDtoData | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const GetTenantResponseDtoData$inboundSchema: z.ZodType< - GetTenantResponseDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type GetTenantResponseDtoData$Outbound = {}; - -/** @internal */ -export const GetTenantResponseDtoData$outboundSchema: z.ZodType< - GetTenantResponseDtoData$Outbound, - z.ZodTypeDef, - GetTenantResponseDtoData -> = 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 GetTenantResponseDtoData$ { - /** @deprecated use `GetTenantResponseDtoData$inboundSchema` instead. */ - export const inboundSchema = GetTenantResponseDtoData$inboundSchema; - /** @deprecated use `GetTenantResponseDtoData$outboundSchema` instead. */ - export const outboundSchema = GetTenantResponseDtoData$outboundSchema; - /** @deprecated use `GetTenantResponseDtoData$Outbound` instead. */ - export type Outbound = GetTenantResponseDtoData$Outbound; -} - -/** @internal */ -export const GetTenantResponseDto$inboundSchema: z.ZodType< - GetTenantResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _environmentId: z.string(), - _id: z.string(), - createdAt: z.string(), - data: z.lazy(() => GetTenantResponseDtoData$inboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - "_environmentId": "environmentId", - "_id": "id", - }); -}); - -/** @internal */ -export type GetTenantResponseDto$Outbound = { - _environmentId: string; - _id: string; - createdAt: string; - data?: GetTenantResponseDtoData$Outbound | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const GetTenantResponseDto$outboundSchema: z.ZodType< - GetTenantResponseDto$Outbound, - z.ZodTypeDef, - GetTenantResponseDto -> = z.object({ - environmentId: z.string(), - id: z.string(), - createdAt: z.string(), - data: z.lazy(() => GetTenantResponseDtoData$outboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTenantResponseDto$ { - /** @deprecated use `GetTenantResponseDto$inboundSchema` instead. */ - export const inboundSchema = GetTenantResponseDto$inboundSchema; - /** @deprecated use `GetTenantResponseDto$outboundSchema` instead. */ - export const outboundSchema = GetTenantResponseDto$outboundSchema; - /** @deprecated use `GetTenantResponseDto$Outbound` instead. */ - export type Outbound = GetTenantResponseDto$Outbound; -} diff --git a/src/models/components/gettopicresponsedto.ts b/src/models/components/gettopicresponsedto.ts index 37f92c66..d99b61c4 100644 --- a/src/models/components/gettopicresponsedto.ts +++ b/src/models/components/gettopicresponsedto.ts @@ -4,11 +4,14 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetTopicResponseDto = { - environmentId: string; id?: string | undefined; organizationId: string; + environmentId: string; key: string; name: string; subscribers: Array; @@ -20,25 +23,25 @@ export const GetTopicResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), _organizationId: z.string(), + _environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", "_organizationId": "organizationId", + "_environmentId": "environmentId", }); }); /** @internal */ export type GetTopicResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; _organizationId: string; + _environmentId: string; key: string; name: string; subscribers: Array; @@ -50,17 +53,17 @@ export const GetTopicResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, GetTopicResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), organizationId: z.string(), + environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", organizationId: "_organizationId", + environmentId: "_environmentId", }); }); @@ -76,3 +79,21 @@ export namespace GetTopicResponseDto$ { /** @deprecated use `GetTopicResponseDto$Outbound` instead. */ export type Outbound = GetTopicResponseDto$Outbound; } + +export function getTopicResponseDtoToJSON( + getTopicResponseDto: GetTopicResponseDto, +): string { + return JSON.stringify( + GetTopicResponseDto$outboundSchema.parse(getTopicResponseDto), + ); +} + +export function getTopicResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetTopicResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetTopicResponseDto' from JSON`, + ); +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 74ba9aa3..9d1489e2 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -10,28 +10,18 @@ export * from "./activitynotificationtemplateresponsedto.js"; export * from "./activitystatsresponsedto.js"; export * from "./addsubscribersrequestdto.js"; export * from "./apikey.js"; -export * from "./bulkapplychangedto.js"; export * from "./bulksubscribercreatedto.js"; export * from "./bulktriggereventdto.js"; -export * from "./changeresponsedto.js"; -export * from "./changesresponsedto.js"; -export * from "./changeworkflowstatusrequestdto.js"; export * from "./channelcredentials.js"; export * from "./channelpreference.js"; export * from "./channelsettings.js"; -export * from "./createfeedrequestdto.js"; export * from "./createintegrationrequestdto.js"; -export * from "./createlayoutresponsedto.js"; export * from "./createnotificationgrouprequestdto.js"; export * from "./createsubscriberrequestdto.js"; -export * from "./createtenantrequestdto.js"; -export * from "./createtenantresponsedto.js"; export * from "./createtopicrequestdto.js"; export * from "./createtopicresponsedto.js"; -export * from "./createworkflowrequestdto.js"; export * from "./credentialsdto.js"; export * from "./databooleandto.js"; -export * from "./datanumberdto.js"; export * from "./delayregularmetadata.js"; export * from "./delayscheduledmetadata.js"; export * from "./deletemessageresponsedto.js"; @@ -46,9 +36,7 @@ export * from "./executiondetailsresponsedto.js"; export * from "./feedresponsedto.js"; export * from "./fieldfilterpart.js"; export * from "./filtertopicsresponsedto.js"; -export * from "./getlayoutresponsedto.js"; export * from "./getsubscriberpreferencesresponsedto.js"; -export * from "./gettenantresponsedto.js"; export * from "./gettopicresponsedto.js"; export * from "./integrationresponsedto.js"; export * from "./markallmessageasrequestdto.js"; @@ -68,12 +56,9 @@ export * from "./notificationstep.js"; export * from "./notificationstepvariant.js"; export * from "./notificationtrigger.js"; export * from "./notificationtriggervariable.js"; -export * from "./organizationbrandingresponsedto.js"; -export * from "./organizationresponsedto.js"; export * from "./preference.js"; export * from "./preferencechannels.js"; export * from "./removesubscribersrequestdto.js"; -export * from "./renameorganizationdto.js"; export * from "./renametopicrequestdto.js"; export * from "./renametopicresponsedto.js"; export * from "./security.js"; @@ -90,19 +75,11 @@ export * from "./triggereventrequestdto.js"; export * from "./triggereventresponsedto.js"; export * from "./triggereventtoallrequestdto.js"; export * from "./unseencountresponse.js"; -export * from "./updatebrandingdetailsdto.js"; export * from "./updateintegrationrequestdto.js"; -export * from "./updatelayoutrequestdto.js"; -export * from "./updatelayoutresponsedto.js"; export * from "./updatesubscriberchannelrequestdto.js"; export * from "./updatesubscriberglobalpreferencesrequestdto.js"; export * from "./updatesubscriberonlineflagrequestdto.js"; export * from "./updatesubscriberpreferencerequestdto.js"; export * from "./updatesubscriberpreferenceresponsedto.js"; export * from "./updatesubscriberrequestdto.js"; -export * from "./updatetenantrequestdto.js"; -export * from "./updatetenantresponsedto.js"; -export * from "./updateworkflowrequestdto.js"; -export * from "./variablesresponsedto.js"; export * from "./workflowresponse.js"; -export * from "./workflowsresponsedto.js"; diff --git a/src/models/components/integrationresponsedto.ts b/src/models/components/integrationresponsedto.ts index 7bd5ab35..32f14192 100644 --- a/src/models/components/integrationresponsedto.ts +++ b/src/models/components/integrationresponsedto.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CredentialsDto, CredentialsDto$inboundSchema, @@ -30,20 +33,20 @@ export type IntegrationResponseDtoChannel = ClosedEnum< >; export type IntegrationResponseDto = { - environmentId: string; id?: string | undefined; + environmentId: string; organizationId: string; - active: boolean; + name: string; + identifier: string; + providerId: string; channel: IntegrationResponseDtoChannel; - conditions?: Array | undefined; credentials: CredentialsDto; + active: boolean; deleted: boolean; deletedAt: string; deletedBy: string; - identifier: string; - name: string; primary: boolean; - providerId: string; + conditions?: Array | undefined; }; /** @internal */ @@ -73,44 +76,44 @@ export const IntegrationResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), + _environmentId: z.string(), _organizationId: z.string(), - active: z.boolean(), + name: z.string(), + identifier: z.string(), + providerId: z.string(), channel: IntegrationResponseDtoChannel$inboundSchema, - conditions: z.array(StepFilter$inboundSchema).optional(), credentials: CredentialsDto$inboundSchema, + active: z.boolean(), deleted: z.boolean(), deletedAt: z.string(), deletedBy: z.string(), - identifier: z.string(), - name: z.string(), primary: z.boolean(), - providerId: z.string(), + conditions: z.array(StepFilter$inboundSchema).optional(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", + "_environmentId": "environmentId", "_organizationId": "organizationId", }); }); /** @internal */ export type IntegrationResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; + _environmentId: string; _organizationId: string; - active: boolean; + name: string; + identifier: string; + providerId: string; channel: string; - conditions?: Array | undefined; credentials: CredentialsDto$Outbound; + active: boolean; deleted: boolean; deletedAt: string; deletedBy: string; - identifier: string; - name: string; primary: boolean; - providerId: string; + conditions?: Array | undefined; }; /** @internal */ @@ -119,24 +122,24 @@ export const IntegrationResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), + environmentId: z.string(), organizationId: z.string(), - active: z.boolean(), + name: z.string(), + identifier: z.string(), + providerId: z.string(), channel: IntegrationResponseDtoChannel$outboundSchema, - conditions: z.array(StepFilter$outboundSchema).optional(), credentials: CredentialsDto$outboundSchema, + active: z.boolean(), deleted: z.boolean(), deletedAt: z.string(), deletedBy: z.string(), - identifier: z.string(), - name: z.string(), primary: z.boolean(), - providerId: z.string(), + conditions: z.array(StepFilter$outboundSchema).optional(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", + environmentId: "_environmentId", organizationId: "_organizationId", }); }); @@ -153,3 +156,21 @@ export namespace IntegrationResponseDto$ { /** @deprecated use `IntegrationResponseDto$Outbound` instead. */ export type Outbound = IntegrationResponseDto$Outbound; } + +export function integrationResponseDtoToJSON( + integrationResponseDto: IntegrationResponseDto, +): string { + return JSON.stringify( + IntegrationResponseDto$outboundSchema.parse(integrationResponseDto), + ); +} + +export function integrationResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IntegrationResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationResponseDto' from JSON`, + ); +} diff --git a/src/models/components/markallmessageasrequestdto.ts b/src/models/components/markallmessageasrequestdto.ts index 6c0956e1..1258d034 100644 --- a/src/models/components/markallmessageasrequestdto.ts +++ b/src/models/components/markallmessageasrequestdto.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Optional feed identifier or array of feed identifiers @@ -13,7 +16,7 @@ export type FeedIdentifier = string | Array; /** * Mark all subscriber messages as read, unread, seen or unseen */ -export const MarkAs = { +export const MarkAllMessageAsRequestDtoMarkAs = { Read: "read", Seen: "seen", Unread: "unread", @@ -22,7 +25,9 @@ export const MarkAs = { /** * Mark all subscriber messages as read, unread, seen or unseen */ -export type MarkAs = ClosedEnum; +export type MarkAllMessageAsRequestDtoMarkAs = ClosedEnum< + typeof MarkAllMessageAsRequestDtoMarkAs +>; export type MarkAllMessageAsRequestDto = { /** @@ -32,7 +37,7 @@ export type MarkAllMessageAsRequestDto = { /** * Mark all subscriber messages as read, unread, seen or unseen */ - markAs: MarkAs; + markAs: MarkAllMessageAsRequestDtoMarkAs; }; /** @internal */ @@ -65,23 +70,39 @@ export namespace FeedIdentifier$ { export type Outbound = FeedIdentifier$Outbound; } +export function feedIdentifierToJSON(feedIdentifier: FeedIdentifier): string { + return JSON.stringify(FeedIdentifier$outboundSchema.parse(feedIdentifier)); +} + +export function feedIdentifierFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FeedIdentifier$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FeedIdentifier' from JSON`, + ); +} + /** @internal */ -export const MarkAs$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(MarkAs); +export const MarkAllMessageAsRequestDtoMarkAs$inboundSchema: z.ZodNativeEnum< + typeof MarkAllMessageAsRequestDtoMarkAs +> = z.nativeEnum(MarkAllMessageAsRequestDtoMarkAs); /** @internal */ -export const MarkAs$outboundSchema: z.ZodNativeEnum = - MarkAs$inboundSchema; +export const MarkAllMessageAsRequestDtoMarkAs$outboundSchema: z.ZodNativeEnum< + typeof MarkAllMessageAsRequestDtoMarkAs +> = MarkAllMessageAsRequestDtoMarkAs$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MarkAs$ { - /** @deprecated use `MarkAs$inboundSchema` instead. */ - export const inboundSchema = MarkAs$inboundSchema; - /** @deprecated use `MarkAs$outboundSchema` instead. */ - export const outboundSchema = MarkAs$outboundSchema; +export namespace MarkAllMessageAsRequestDtoMarkAs$ { + /** @deprecated use `MarkAllMessageAsRequestDtoMarkAs$inboundSchema` instead. */ + export const inboundSchema = MarkAllMessageAsRequestDtoMarkAs$inboundSchema; + /** @deprecated use `MarkAllMessageAsRequestDtoMarkAs$outboundSchema` instead. */ + export const outboundSchema = MarkAllMessageAsRequestDtoMarkAs$outboundSchema; } /** @internal */ @@ -91,7 +112,7 @@ export const MarkAllMessageAsRequestDto$inboundSchema: z.ZodType< unknown > = z.object({ feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), - markAs: MarkAs$inboundSchema, + markAs: MarkAllMessageAsRequestDtoMarkAs$inboundSchema, }); /** @internal */ @@ -107,7 +128,7 @@ export const MarkAllMessageAsRequestDto$outboundSchema: z.ZodType< MarkAllMessageAsRequestDto > = z.object({ feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), - markAs: MarkAs$outboundSchema, + markAs: MarkAllMessageAsRequestDtoMarkAs$outboundSchema, }); /** @@ -122,3 +143,21 @@ export namespace MarkAllMessageAsRequestDto$ { /** @deprecated use `MarkAllMessageAsRequestDto$Outbound` instead. */ export type Outbound = MarkAllMessageAsRequestDto$Outbound; } + +export function markAllMessageAsRequestDtoToJSON( + markAllMessageAsRequestDto: MarkAllMessageAsRequestDto, +): string { + return JSON.stringify( + MarkAllMessageAsRequestDto$outboundSchema.parse(markAllMessageAsRequestDto), + ); +} + +export function markAllMessageAsRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MarkAllMessageAsRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MarkAllMessageAsRequestDto' from JSON`, + ); +} diff --git a/src/models/components/markmessageactionasseendto.ts b/src/models/components/markmessageactionasseendto.ts index 65444aa2..4476a8f5 100644 --- a/src/models/components/markmessageactionasseendto.ts +++ b/src/models/components/markmessageactionasseendto.ts @@ -3,12 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; - -/** - * Message action payload - */ -export type Payload = {}; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Message action status @@ -24,44 +22,22 @@ export type MarkMessageActionAsSeenDtoStatus = ClosedEnum< typeof MarkMessageActionAsSeenDtoStatus >; +/** + * Message action payload + */ +export type MarkMessageActionAsSeenDtoPayload = {}; + export type MarkMessageActionAsSeenDto = { - /** - * Message action payload - */ - payload?: Payload | undefined; /** * Message action status */ status: MarkMessageActionAsSeenDtoStatus; + /** + * Message action payload + */ + payload?: MarkMessageActionAsSeenDtoPayload | undefined; }; -/** @internal */ -export const Payload$inboundSchema: z.ZodType = - z.object({}); - -/** @internal */ -export type Payload$Outbound = {}; - -/** @internal */ -export const Payload$outboundSchema: z.ZodType< - Payload$Outbound, - z.ZodTypeDef, - Payload -> = 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 Payload$ { - /** @deprecated use `Payload$inboundSchema` instead. */ - export const inboundSchema = Payload$inboundSchema; - /** @deprecated use `Payload$outboundSchema` instead. */ - export const outboundSchema = Payload$outboundSchema; - /** @deprecated use `Payload$Outbound` instead. */ - export type Outbound = Payload$Outbound; -} - /** @internal */ export const MarkMessageActionAsSeenDtoStatus$inboundSchema: z.ZodNativeEnum< typeof MarkMessageActionAsSeenDtoStatus @@ -83,20 +59,72 @@ export namespace MarkMessageActionAsSeenDtoStatus$ { export const outboundSchema = MarkMessageActionAsSeenDtoStatus$outboundSchema; } +/** @internal */ +export const MarkMessageActionAsSeenDtoPayload$inboundSchema: z.ZodType< + MarkMessageActionAsSeenDtoPayload, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type MarkMessageActionAsSeenDtoPayload$Outbound = {}; + +/** @internal */ +export const MarkMessageActionAsSeenDtoPayload$outboundSchema: z.ZodType< + MarkMessageActionAsSeenDtoPayload$Outbound, + z.ZodTypeDef, + MarkMessageActionAsSeenDtoPayload +> = 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 MarkMessageActionAsSeenDtoPayload$ { + /** @deprecated use `MarkMessageActionAsSeenDtoPayload$inboundSchema` instead. */ + export const inboundSchema = MarkMessageActionAsSeenDtoPayload$inboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDtoPayload$outboundSchema` instead. */ + export const outboundSchema = + MarkMessageActionAsSeenDtoPayload$outboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDtoPayload$Outbound` instead. */ + export type Outbound = MarkMessageActionAsSeenDtoPayload$Outbound; +} + +export function markMessageActionAsSeenDtoPayloadToJSON( + markMessageActionAsSeenDtoPayload: MarkMessageActionAsSeenDtoPayload, +): string { + return JSON.stringify( + MarkMessageActionAsSeenDtoPayload$outboundSchema.parse( + markMessageActionAsSeenDtoPayload, + ), + ); +} + +export function markMessageActionAsSeenDtoPayloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MarkMessageActionAsSeenDtoPayload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MarkMessageActionAsSeenDtoPayload' from JSON`, + ); +} + /** @internal */ export const MarkMessageActionAsSeenDto$inboundSchema: z.ZodType< MarkMessageActionAsSeenDto, z.ZodTypeDef, unknown > = z.object({ - payload: z.lazy(() => Payload$inboundSchema).optional(), status: MarkMessageActionAsSeenDtoStatus$inboundSchema, + payload: z.lazy(() => MarkMessageActionAsSeenDtoPayload$inboundSchema) + .optional(), }); /** @internal */ export type MarkMessageActionAsSeenDto$Outbound = { - payload?: Payload$Outbound | undefined; status: string; + payload?: MarkMessageActionAsSeenDtoPayload$Outbound | undefined; }; /** @internal */ @@ -105,8 +133,9 @@ export const MarkMessageActionAsSeenDto$outboundSchema: z.ZodType< z.ZodTypeDef, MarkMessageActionAsSeenDto > = z.object({ - payload: z.lazy(() => Payload$outboundSchema).optional(), status: MarkMessageActionAsSeenDtoStatus$outboundSchema, + payload: z.lazy(() => MarkMessageActionAsSeenDtoPayload$outboundSchema) + .optional(), }); /** @@ -121,3 +150,21 @@ export namespace MarkMessageActionAsSeenDto$ { /** @deprecated use `MarkMessageActionAsSeenDto$Outbound` instead. */ export type Outbound = MarkMessageActionAsSeenDto$Outbound; } + +export function markMessageActionAsSeenDtoToJSON( + markMessageActionAsSeenDto: MarkMessageActionAsSeenDto, +): string { + return JSON.stringify( + MarkMessageActionAsSeenDto$outboundSchema.parse(markMessageActionAsSeenDto), + ); +} + +export function markMessageActionAsSeenDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MarkMessageActionAsSeenDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MarkMessageActionAsSeenDto' from JSON`, + ); +} diff --git a/src/models/components/messageaction.ts b/src/models/components/messageaction.ts index 5fc17bca..9b865fc7 100644 --- a/src/models/components/messageaction.ts +++ b/src/models/components/messageaction.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { MessageActionResult, MessageActionResult$inboundSchema, @@ -24,9 +27,9 @@ export const MessageActionStatus = { export type MessageActionStatus = ClosedEnum; export type MessageAction = { + status?: MessageActionStatus | undefined; buttons?: Array | undefined; result?: MessageActionResult | undefined; - status?: MessageActionStatus | undefined; }; /** @internal */ @@ -56,16 +59,16 @@ export const MessageAction$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + status: MessageActionStatus$inboundSchema.optional(), buttons: z.array(MessageButton$inboundSchema).optional(), result: MessageActionResult$inboundSchema.optional(), - status: MessageActionStatus$inboundSchema.optional(), }); /** @internal */ export type MessageAction$Outbound = { + status?: string | undefined; buttons?: Array | undefined; result?: MessageActionResult$Outbound | undefined; - status?: string | undefined; }; /** @internal */ @@ -74,9 +77,9 @@ export const MessageAction$outboundSchema: z.ZodType< z.ZodTypeDef, MessageAction > = z.object({ + status: MessageActionStatus$outboundSchema.optional(), buttons: z.array(MessageButton$outboundSchema).optional(), result: MessageActionResult$outboundSchema.optional(), - status: MessageActionStatus$outboundSchema.optional(), }); /** @@ -91,3 +94,17 @@ export namespace MessageAction$ { /** @deprecated use `MessageAction$Outbound` instead. */ export type Outbound = MessageAction$Outbound; } + +export function messageActionToJSON(messageAction: MessageAction): string { + return JSON.stringify(MessageAction$outboundSchema.parse(messageAction)); +} + +export function messageActionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageAction$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageAction' from JSON`, + ); +} diff --git a/src/models/components/messageactionresult.ts b/src/models/components/messageactionresult.ts index f4372eb7..7a147d51 100644 --- a/src/models/components/messageactionresult.ts +++ b/src/models/components/messageactionresult.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type MessageActionResultPayload = {}; @@ -50,6 +53,24 @@ export namespace MessageActionResultPayload$ { export type Outbound = MessageActionResultPayload$Outbound; } +export function messageActionResultPayloadToJSON( + messageActionResultPayload: MessageActionResultPayload, +): string { + return JSON.stringify( + MessageActionResultPayload$outboundSchema.parse(messageActionResultPayload), + ); +} + +export function messageActionResultPayloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageActionResultPayload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageActionResultPayload' from JSON`, + ); +} + /** @internal */ export const MessageActionResultType$inboundSchema: z.ZodNativeEnum< typeof MessageActionResultType @@ -109,3 +130,21 @@ export namespace MessageActionResult$ { /** @deprecated use `MessageActionResult$Outbound` instead. */ export type Outbound = MessageActionResult$Outbound; } + +export function messageActionResultToJSON( + messageActionResult: MessageActionResult, +): string { + return JSON.stringify( + MessageActionResult$outboundSchema.parse(messageActionResult), + ); +} + +export function messageActionResultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageActionResult$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageActionResult' from JSON`, + ); +} diff --git a/src/models/components/messagebutton.ts b/src/models/components/messagebutton.ts index 1b7e42a5..443f8b3f 100644 --- a/src/models/components/messagebutton.ts +++ b/src/models/components/messagebutton.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const MessageButtonType = { Primary: "primary", @@ -12,9 +15,9 @@ export const MessageButtonType = { export type MessageButtonType = ClosedEnum; export type MessageButton = { + type: MessageButtonType; content: string; resultContent?: string | undefined; - type: MessageButtonType; }; /** @internal */ @@ -44,16 +47,16 @@ export const MessageButton$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + type: MessageButtonType$inboundSchema, content: z.string(), resultContent: z.string().optional(), - type: MessageButtonType$inboundSchema, }); /** @internal */ export type MessageButton$Outbound = { + type: string; content: string; resultContent?: string | undefined; - type: string; }; /** @internal */ @@ -62,9 +65,9 @@ export const MessageButton$outboundSchema: z.ZodType< z.ZodTypeDef, MessageButton > = z.object({ + type: MessageButtonType$outboundSchema, content: z.string(), resultContent: z.string().optional(), - type: MessageButtonType$outboundSchema, }); /** @@ -79,3 +82,17 @@ export namespace MessageButton$ { /** @deprecated use `MessageButton$Outbound` instead. */ export type Outbound = MessageButton$Outbound; } + +export function messageButtonToJSON(messageButton: MessageButton): string { + return JSON.stringify(MessageButton$outboundSchema.parse(messageButton)); +} + +export function messageButtonFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageButton$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageButton' from JSON`, + ); +} diff --git a/src/models/components/messagecta.ts b/src/models/components/messagecta.ts index 9ec5d267..6560ba6d 100644 --- a/src/models/components/messagecta.ts +++ b/src/models/components/messagecta.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { MessageAction, MessageAction$inboundSchema, @@ -23,9 +26,9 @@ export const MessageCTAType = { export type MessageCTAType = ClosedEnum; export type MessageCTA = { - action?: MessageAction | undefined; - data: MessageCTAData; type?: MessageCTAType | undefined; + data: MessageCTAData; + action?: MessageAction | undefined; }; /** @internal */ @@ -55,16 +58,16 @@ export const MessageCTA$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - action: MessageAction$inboundSchema.optional(), - data: MessageCTAData$inboundSchema, type: MessageCTAType$inboundSchema.optional(), + data: MessageCTAData$inboundSchema, + action: MessageAction$inboundSchema.optional(), }); /** @internal */ export type MessageCTA$Outbound = { - action?: MessageAction$Outbound | undefined; - data: MessageCTAData$Outbound; type?: string | undefined; + data: MessageCTAData$Outbound; + action?: MessageAction$Outbound | undefined; }; /** @internal */ @@ -73,9 +76,9 @@ export const MessageCTA$outboundSchema: z.ZodType< z.ZodTypeDef, MessageCTA > = z.object({ - action: MessageAction$outboundSchema.optional(), - data: MessageCTAData$outboundSchema, type: MessageCTAType$outboundSchema.optional(), + data: MessageCTAData$outboundSchema, + action: MessageAction$outboundSchema.optional(), }); /** @@ -90,3 +93,17 @@ export namespace MessageCTA$ { /** @deprecated use `MessageCTA$Outbound` instead. */ export type Outbound = MessageCTA$Outbound; } + +export function messageCTAToJSON(messageCTA: MessageCTA): string { + return JSON.stringify(MessageCTA$outboundSchema.parse(messageCTA)); +} + +export function messageCTAFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageCTA$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageCTA' from JSON`, + ); +} diff --git a/src/models/components/messagectadata.ts b/src/models/components/messagectadata.ts index 0bfe4685..a5fef65a 100644 --- a/src/models/components/messagectadata.ts +++ b/src/models/components/messagectadata.ts @@ -3,6 +3,9 @@ */ 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 MessageCTAData = { url?: string | undefined; @@ -43,3 +46,17 @@ export namespace MessageCTAData$ { /** @deprecated use `MessageCTAData$Outbound` instead. */ export type Outbound = MessageCTAData$Outbound; } + +export function messageCTADataToJSON(messageCTAData: MessageCTAData): string { + return JSON.stringify(MessageCTAData$outboundSchema.parse(messageCTAData)); +} + +export function messageCTADataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageCTAData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageCTAData' from JSON`, + ); +} diff --git a/src/models/components/messageentity.ts b/src/models/components/messageentity.ts index 173bd921..d65bebd2 100644 --- a/src/models/components/messageentity.ts +++ b/src/models/components/messageentity.ts @@ -3,6 +3,9 @@ */ 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 MessageEntity = {}; @@ -35,3 +38,17 @@ export namespace MessageEntity$ { /** @deprecated use `MessageEntity$Outbound` instead. */ export type Outbound = MessageEntity$Outbound; } + +export function messageEntityToJSON(messageEntity: MessageEntity): string { + return JSON.stringify(MessageEntity$outboundSchema.parse(messageEntity)); +} + +export function messageEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageEntity' from JSON`, + ); +} diff --git a/src/models/components/messagemarkasrequestdto.ts b/src/models/components/messagemarkasrequestdto.ts index 99f9bdad..22b8a38a 100644 --- a/src/models/components/messagemarkasrequestdto.ts +++ b/src/models/components/messagemarkasrequestdto.ts @@ -3,46 +3,26 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const MessageMarkAsRequestDtoMarkAs = { +export type MessageId = string | Array; + +export const MarkAs = { Read: "read", Seen: "seen", Unread: "unread", Unseen: "unseen", } as const; -export type MessageMarkAsRequestDtoMarkAs = ClosedEnum< - typeof MessageMarkAsRequestDtoMarkAs ->; - -export type MessageId = string | Array; +export type MarkAs = ClosedEnum; export type MessageMarkAsRequestDto = { - markAs: MessageMarkAsRequestDtoMarkAs; messageId: string | Array; + markAs: MarkAs; }; -/** @internal */ -export const MessageMarkAsRequestDtoMarkAs$inboundSchema: z.ZodNativeEnum< - typeof MessageMarkAsRequestDtoMarkAs -> = z.nativeEnum(MessageMarkAsRequestDtoMarkAs); - -/** @internal */ -export const MessageMarkAsRequestDtoMarkAs$outboundSchema: z.ZodNativeEnum< - typeof MessageMarkAsRequestDtoMarkAs -> = MessageMarkAsRequestDtoMarkAs$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageMarkAsRequestDtoMarkAs$ { - /** @deprecated use `MessageMarkAsRequestDtoMarkAs$inboundSchema` instead. */ - export const inboundSchema = MessageMarkAsRequestDtoMarkAs$inboundSchema; - /** @deprecated use `MessageMarkAsRequestDtoMarkAs$outboundSchema` instead. */ - export const outboundSchema = MessageMarkAsRequestDtoMarkAs$outboundSchema; -} - /** @internal */ export const MessageId$inboundSchema: z.ZodType< MessageId, @@ -73,20 +53,53 @@ export namespace MessageId$ { export type Outbound = MessageId$Outbound; } +export function messageIdToJSON(messageId: MessageId): string { + return JSON.stringify(MessageId$outboundSchema.parse(messageId)); +} + +export function messageIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageId' from JSON`, + ); +} + +/** @internal */ +export const MarkAs$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(MarkAs); + +/** @internal */ +export const MarkAs$outboundSchema: z.ZodNativeEnum = + MarkAs$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MarkAs$ { + /** @deprecated use `MarkAs$inboundSchema` instead. */ + export const inboundSchema = MarkAs$inboundSchema; + /** @deprecated use `MarkAs$outboundSchema` instead. */ + export const outboundSchema = MarkAs$outboundSchema; +} + /** @internal */ export const MessageMarkAsRequestDto$inboundSchema: z.ZodType< MessageMarkAsRequestDto, z.ZodTypeDef, unknown > = z.object({ - markAs: MessageMarkAsRequestDtoMarkAs$inboundSchema, messageId: z.union([z.string(), z.array(z.string())]), + markAs: MarkAs$inboundSchema, }); /** @internal */ export type MessageMarkAsRequestDto$Outbound = { - markAs: string; messageId: string | Array; + markAs: string; }; /** @internal */ @@ -95,8 +108,8 @@ export const MessageMarkAsRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, MessageMarkAsRequestDto > = z.object({ - markAs: MessageMarkAsRequestDtoMarkAs$outboundSchema, messageId: z.union([z.string(), z.array(z.string())]), + markAs: MarkAs$outboundSchema, }); /** @@ -111,3 +124,21 @@ export namespace MessageMarkAsRequestDto$ { /** @deprecated use `MessageMarkAsRequestDto$Outbound` instead. */ export type Outbound = MessageMarkAsRequestDto$Outbound; } + +export function messageMarkAsRequestDtoToJSON( + messageMarkAsRequestDto: MessageMarkAsRequestDto, +): string { + return JSON.stringify( + MessageMarkAsRequestDto$outboundSchema.parse(messageMarkAsRequestDto), + ); +} + +export function messageMarkAsRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageMarkAsRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageMarkAsRequestDto' from JSON`, + ); +} diff --git a/src/models/components/messageresponsedto.ts b/src/models/components/messageresponsedto.ts index cbe22d8a..eae7e2c5 100644 --- a/src/models/components/messageresponsedto.ts +++ b/src/models/components/messageresponsedto.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EmailBlock, EmailBlock$inboundSchema, @@ -30,7 +33,7 @@ import { WorkflowResponse$outboundSchema, } from "./workflowresponse.js"; -export type FeedId = {}; +export type Content = EmailBlock | string; export const MessageResponseDtoChannel = { InApp: "in_app", @@ -43,17 +46,7 @@ export type MessageResponseDtoChannel = ClosedEnum< typeof MessageResponseDtoChannel >; -export type Content = EmailBlock | string; - -/** - * Provider specific overrides used when triggering the notification - */ -export type Overrides = {}; - -/** - * The payload that was used to send the notification trigger - */ -export type MessageResponseDtoPayload = {}; +export type FeedId = {}; export const MessageResponseDtoStatus = { Sent: "sent", @@ -64,72 +57,96 @@ export type MessageResponseDtoStatus = ClosedEnum< typeof MessageResponseDtoStatus >; +/** + * The payload that was used to send the notification trigger + */ +export type MessageResponseDtoPayload = {}; + +/** + * Provider specific overrides used when triggering the notification + */ +export type MessageResponseDtoOverrides = {}; + export type MessageResponseDto = { - environmentId: string; - feedId?: FeedId | null | undefined; id?: string | undefined; + templateId: string; + environmentId: string; messageTemplateId: string; - notificationId: string; organizationId: string; + notificationId: string; subscriberId: string; - templateId: string; - channel: MessageResponseDtoChannel; - content: EmailBlock | string; + subscriber?: SubscriberResponseDto | undefined; + template?: WorkflowResponse | undefined; + templateIdentifier?: string | undefined; createdAt: string; - cta: MessageCTA; - deviceTokens?: Array | undefined; - directWebhookUrl?: string | undefined; + lastSeenDate?: string | undefined; + lastReadDate?: string | undefined; + content: EmailBlock | string; + transactionId: string; + subject?: string | undefined; + channel: MessageResponseDtoChannel; + read: boolean; + seen: boolean; email?: string | undefined; + phone?: string | undefined; + directWebhookUrl?: string | undefined; + providerId?: string | undefined; + deviceTokens?: Array | undefined; + title?: string | undefined; + cta: MessageCTA; + feedId?: FeedId | null | undefined; + status: MessageResponseDtoStatus; errorId: string; errorText: string; - lastReadDate?: string | undefined; - lastSeenDate?: string | undefined; - /** - * Provider specific overrides used when triggering the notification - */ - overrides: Overrides; /** * The payload that was used to send the notification trigger */ payload: MessageResponseDtoPayload; - phone?: string | undefined; - providerId?: string | undefined; - read: boolean; - seen: boolean; - status: MessageResponseDtoStatus; - subject?: string | undefined; - subscriber?: SubscriberResponseDto | undefined; - template?: WorkflowResponse | undefined; - templateIdentifier?: string | undefined; - title?: string | undefined; - transactionId: string; + /** + * Provider specific overrides used when triggering the notification + */ + overrides: MessageResponseDtoOverrides; }; /** @internal */ -export const FeedId$inboundSchema: z.ZodType = z - .object({}); +export const Content$inboundSchema: z.ZodType = + z.union([EmailBlock$inboundSchema, z.string()]); /** @internal */ -export type FeedId$Outbound = {}; +export type Content$Outbound = EmailBlock$Outbound | string; /** @internal */ -export const FeedId$outboundSchema: z.ZodType< - FeedId$Outbound, +export const Content$outboundSchema: z.ZodType< + Content$Outbound, z.ZodTypeDef, - FeedId -> = z.object({}); + Content +> = z.union([EmailBlock$outboundSchema, 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 FeedId$ { - /** @deprecated use `FeedId$inboundSchema` instead. */ - export const inboundSchema = FeedId$inboundSchema; - /** @deprecated use `FeedId$outboundSchema` instead. */ - export const outboundSchema = FeedId$outboundSchema; - /** @deprecated use `FeedId$Outbound` instead. */ - export type Outbound = FeedId$Outbound; +export namespace Content$ { + /** @deprecated use `Content$inboundSchema` instead. */ + export const inboundSchema = Content$inboundSchema; + /** @deprecated use `Content$outboundSchema` instead. */ + export const outboundSchema = Content$outboundSchema; + /** @deprecated use `Content$Outbound` instead. */ + export type Outbound = Content$Outbound; +} + +export function contentToJSON(content: Content): string { + return JSON.stringify(Content$outboundSchema.parse(content)); +} + +export function contentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Content$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Content' from JSON`, + ); } /** @internal */ @@ -154,60 +171,65 @@ export namespace MessageResponseDtoChannel$ { } /** @internal */ -export const Content$inboundSchema: z.ZodType = - z.union([EmailBlock$inboundSchema, z.string()]); +export const FeedId$inboundSchema: z.ZodType = z + .object({}); /** @internal */ -export type Content$Outbound = EmailBlock$Outbound | string; +export type FeedId$Outbound = {}; /** @internal */ -export const Content$outboundSchema: z.ZodType< - Content$Outbound, +export const FeedId$outboundSchema: z.ZodType< + FeedId$Outbound, z.ZodTypeDef, - Content -> = z.union([EmailBlock$outboundSchema, z.string()]); + FeedId +> = 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 Content$ { - /** @deprecated use `Content$inboundSchema` instead. */ - export const inboundSchema = Content$inboundSchema; - /** @deprecated use `Content$outboundSchema` instead. */ - export const outboundSchema = Content$outboundSchema; - /** @deprecated use `Content$Outbound` instead. */ - export type Outbound = Content$Outbound; +export namespace FeedId$ { + /** @deprecated use `FeedId$inboundSchema` instead. */ + export const inboundSchema = FeedId$inboundSchema; + /** @deprecated use `FeedId$outboundSchema` instead. */ + export const outboundSchema = FeedId$outboundSchema; + /** @deprecated use `FeedId$Outbound` instead. */ + export type Outbound = FeedId$Outbound; } -/** @internal */ -export const Overrides$inboundSchema: z.ZodType< - Overrides, - z.ZodTypeDef, - unknown -> = z.object({}); +export function feedIdToJSON(feedId: FeedId): string { + return JSON.stringify(FeedId$outboundSchema.parse(feedId)); +} + +export function feedIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FeedId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FeedId' from JSON`, + ); +} /** @internal */ -export type Overrides$Outbound = {}; +export const MessageResponseDtoStatus$inboundSchema: z.ZodNativeEnum< + typeof MessageResponseDtoStatus +> = z.nativeEnum(MessageResponseDtoStatus); /** @internal */ -export const Overrides$outboundSchema: z.ZodType< - Overrides$Outbound, - z.ZodTypeDef, - Overrides -> = z.object({}); +export const MessageResponseDtoStatus$outboundSchema: z.ZodNativeEnum< + typeof MessageResponseDtoStatus +> = MessageResponseDtoStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Overrides$ { - /** @deprecated use `Overrides$inboundSchema` instead. */ - export const inboundSchema = Overrides$inboundSchema; - /** @deprecated use `Overrides$outboundSchema` instead. */ - export const outboundSchema = Overrides$outboundSchema; - /** @deprecated use `Overrides$Outbound` instead. */ - export type Outbound = Overrides$Outbound; +export namespace MessageResponseDtoStatus$ { + /** @deprecated use `MessageResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDtoStatus$inboundSchema; + /** @deprecated use `MessageResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDtoStatus$outboundSchema; } /** @internal */ @@ -240,25 +262,72 @@ export namespace MessageResponseDtoPayload$ { export type Outbound = MessageResponseDtoPayload$Outbound; } +export function messageResponseDtoPayloadToJSON( + messageResponseDtoPayload: MessageResponseDtoPayload, +): string { + return JSON.stringify( + MessageResponseDtoPayload$outboundSchema.parse(messageResponseDtoPayload), + ); +} + +export function messageResponseDtoPayloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageResponseDtoPayload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageResponseDtoPayload' from JSON`, + ); +} + /** @internal */ -export const MessageResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoStatus -> = z.nativeEnum(MessageResponseDtoStatus); +export const MessageResponseDtoOverrides$inboundSchema: z.ZodType< + MessageResponseDtoOverrides, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export const MessageResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoStatus -> = MessageResponseDtoStatus$inboundSchema; +export type MessageResponseDtoOverrides$Outbound = {}; + +/** @internal */ +export const MessageResponseDtoOverrides$outboundSchema: z.ZodType< + MessageResponseDtoOverrides$Outbound, + z.ZodTypeDef, + MessageResponseDtoOverrides +> = 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 MessageResponseDtoStatus$ { - /** @deprecated use `MessageResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = MessageResponseDtoStatus$inboundSchema; - /** @deprecated use `MessageResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = MessageResponseDtoStatus$outboundSchema; +export namespace MessageResponseDtoOverrides$ { + /** @deprecated use `MessageResponseDtoOverrides$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDtoOverrides$inboundSchema; + /** @deprecated use `MessageResponseDtoOverrides$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDtoOverrides$outboundSchema; + /** @deprecated use `MessageResponseDtoOverrides$Outbound` instead. */ + export type Outbound = MessageResponseDtoOverrides$Outbound; +} + +export function messageResponseDtoOverridesToJSON( + messageResponseDtoOverrides: MessageResponseDtoOverrides, +): string { + return JSON.stringify( + MessageResponseDtoOverrides$outboundSchema.parse( + messageResponseDtoOverrides, + ), + ); +} + +export function messageResponseDtoOverridesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageResponseDtoOverrides$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageResponseDtoOverrides' from JSON`, + ); } /** @internal */ @@ -267,85 +336,85 @@ export const MessageResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), - _feedId: z.nullable(z.lazy(() => FeedId$inboundSchema)).optional(), _id: z.string().optional(), + _templateId: z.string(), + _environmentId: z.string(), _messageTemplateId: z.string(), - _notificationId: z.string(), _organizationId: z.string(), + _notificationId: z.string(), _subscriberId: z.string(), - _templateId: z.string(), - channel: MessageResponseDtoChannel$inboundSchema, - content: z.union([EmailBlock$inboundSchema, z.string()]), + subscriber: SubscriberResponseDto$inboundSchema.optional(), + template: WorkflowResponse$inboundSchema.optional(), + templateIdentifier: z.string().optional(), createdAt: z.string(), - cta: MessageCTA$inboundSchema, - deviceTokens: z.array(z.string()).optional(), - directWebhookUrl: z.string().optional(), - email: z.string().optional(), - errorId: z.string(), - errorText: z.string(), - lastReadDate: z.string().optional(), lastSeenDate: z.string().optional(), - overrides: z.lazy(() => Overrides$inboundSchema), - payload: z.lazy(() => MessageResponseDtoPayload$inboundSchema), - phone: z.string().optional(), - providerId: z.string().optional(), + lastReadDate: z.string().optional(), + content: z.union([EmailBlock$inboundSchema, z.string()]), + transactionId: z.string(), + subject: z.string().optional(), + channel: MessageResponseDtoChannel$inboundSchema, read: z.boolean(), seen: z.boolean(), - status: MessageResponseDtoStatus$inboundSchema, - subject: z.string().optional(), - subscriber: SubscriberResponseDto$inboundSchema.optional(), - template: WorkflowResponse$inboundSchema.optional(), - templateIdentifier: z.string().optional(), + email: z.string().optional(), + phone: z.string().optional(), + directWebhookUrl: z.string().optional(), + providerId: z.string().optional(), + deviceTokens: z.array(z.string()).optional(), title: z.string().optional(), - transactionId: z.string(), + cta: MessageCTA$inboundSchema, + _feedId: z.nullable(z.lazy(() => FeedId$inboundSchema)).optional(), + status: MessageResponseDtoStatus$inboundSchema, + errorId: z.string(), + errorText: z.string(), + payload: z.lazy(() => MessageResponseDtoPayload$inboundSchema), + overrides: z.lazy(() => MessageResponseDtoOverrides$inboundSchema), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", - "_feedId": "feedId", "_id": "id", + "_templateId": "templateId", + "_environmentId": "environmentId", "_messageTemplateId": "messageTemplateId", - "_notificationId": "notificationId", "_organizationId": "organizationId", + "_notificationId": "notificationId", "_subscriberId": "subscriberId", - "_templateId": "templateId", + "_feedId": "feedId", }); }); /** @internal */ export type MessageResponseDto$Outbound = { - _environmentId: string; - _feedId?: FeedId$Outbound | null | undefined; _id?: string | undefined; + _templateId: string; + _environmentId: string; _messageTemplateId: string; - _notificationId: string; _organizationId: string; + _notificationId: string; _subscriberId: string; - _templateId: string; - channel: string; - content: EmailBlock$Outbound | string; + subscriber?: SubscriberResponseDto$Outbound | undefined; + template?: WorkflowResponse$Outbound | undefined; + templateIdentifier?: string | undefined; createdAt: string; - cta: MessageCTA$Outbound; - deviceTokens?: Array | undefined; - directWebhookUrl?: string | undefined; - email?: string | undefined; - errorId: string; - errorText: string; - lastReadDate?: string | undefined; lastSeenDate?: string | undefined; - overrides: Overrides$Outbound; - payload: MessageResponseDtoPayload$Outbound; - phone?: string | undefined; - providerId?: string | undefined; + lastReadDate?: string | undefined; + content: EmailBlock$Outbound | string; + transactionId: string; + subject?: string | undefined; + channel: string; read: boolean; seen: boolean; - status: string; - subject?: string | undefined; - subscriber?: SubscriberResponseDto$Outbound | undefined; - template?: WorkflowResponse$Outbound | undefined; - templateIdentifier?: string | undefined; + email?: string | undefined; + phone?: string | undefined; + directWebhookUrl?: string | undefined; + providerId?: string | undefined; + deviceTokens?: Array | undefined; title?: string | undefined; - transactionId: string; + cta: MessageCTA$Outbound; + _feedId?: FeedId$Outbound | null | undefined; + status: string; + errorId: string; + errorText: string; + payload: MessageResponseDtoPayload$Outbound; + overrides: MessageResponseDtoOverrides$Outbound; }; /** @internal */ @@ -354,48 +423,48 @@ export const MessageResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, MessageResponseDto > = z.object({ - environmentId: z.string(), - feedId: z.nullable(z.lazy(() => FeedId$outboundSchema)).optional(), id: z.string().optional(), + templateId: z.string(), + environmentId: z.string(), messageTemplateId: z.string(), - notificationId: z.string(), organizationId: z.string(), + notificationId: z.string(), subscriberId: z.string(), - templateId: z.string(), - channel: MessageResponseDtoChannel$outboundSchema, - content: z.union([EmailBlock$outboundSchema, z.string()]), + subscriber: SubscriberResponseDto$outboundSchema.optional(), + template: WorkflowResponse$outboundSchema.optional(), + templateIdentifier: z.string().optional(), createdAt: z.string(), - cta: MessageCTA$outboundSchema, - deviceTokens: z.array(z.string()).optional(), - directWebhookUrl: z.string().optional(), - email: z.string().optional(), - errorId: z.string(), - errorText: z.string(), - lastReadDate: z.string().optional(), lastSeenDate: z.string().optional(), - overrides: z.lazy(() => Overrides$outboundSchema), - payload: z.lazy(() => MessageResponseDtoPayload$outboundSchema), - phone: z.string().optional(), - providerId: z.string().optional(), + lastReadDate: z.string().optional(), + content: z.union([EmailBlock$outboundSchema, z.string()]), + transactionId: z.string(), + subject: z.string().optional(), + channel: MessageResponseDtoChannel$outboundSchema, read: z.boolean(), seen: z.boolean(), - status: MessageResponseDtoStatus$outboundSchema, - subject: z.string().optional(), - subscriber: SubscriberResponseDto$outboundSchema.optional(), - template: WorkflowResponse$outboundSchema.optional(), - templateIdentifier: z.string().optional(), + email: z.string().optional(), + phone: z.string().optional(), + directWebhookUrl: z.string().optional(), + providerId: z.string().optional(), + deviceTokens: z.array(z.string()).optional(), title: z.string().optional(), - transactionId: z.string(), + cta: MessageCTA$outboundSchema, + feedId: z.nullable(z.lazy(() => FeedId$outboundSchema)).optional(), + status: MessageResponseDtoStatus$outboundSchema, + errorId: z.string(), + errorText: z.string(), + payload: z.lazy(() => MessageResponseDtoPayload$outboundSchema), + overrides: z.lazy(() => MessageResponseDtoOverrides$outboundSchema), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", - feedId: "_feedId", id: "_id", + templateId: "_templateId", + environmentId: "_environmentId", messageTemplateId: "_messageTemplateId", - notificationId: "_notificationId", organizationId: "_organizationId", + notificationId: "_notificationId", subscriberId: "_subscriberId", - templateId: "_templateId", + feedId: "_feedId", }); }); @@ -411,3 +480,21 @@ export namespace MessageResponseDto$ { /** @deprecated use `MessageResponseDto$Outbound` instead. */ export type Outbound = MessageResponseDto$Outbound; } + +export function messageResponseDtoToJSON( + messageResponseDto: MessageResponseDto, +): string { + return JSON.stringify( + MessageResponseDto$outboundSchema.parse(messageResponseDto), + ); +} + +export function messageResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageResponseDto' from JSON`, + ); +} diff --git a/src/models/components/messagetemplate.ts b/src/models/components/messagetemplate.ts index c4276ff1..eff05e96 100644 --- a/src/models/components/messagetemplate.ts +++ b/src/models/components/messagetemplate.ts @@ -3,6 +3,9 @@ */ 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 MessageTemplate = {}; @@ -35,3 +38,19 @@ export namespace MessageTemplate$ { /** @deprecated use `MessageTemplate$Outbound` instead. */ export type Outbound = MessageTemplate$Outbound; } + +export function messageTemplateToJSON( + messageTemplate: MessageTemplate, +): string { + return JSON.stringify(MessageTemplate$outboundSchema.parse(messageTemplate)); +} + +export function messageTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MessageTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessageTemplate' from JSON`, + ); +} diff --git a/src/models/components/notificationgroup.ts b/src/models/components/notificationgroup.ts index e7a2f74c..dfc602f5 100644 --- a/src/models/components/notificationgroup.ts +++ b/src/models/components/notificationgroup.ts @@ -4,13 +4,16 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type NotificationGroup = { - environmentId: string; id?: string | undefined; + name: string; + environmentId: string; organizationId: string; parentId?: string | undefined; - name: string; }; /** @internal */ @@ -19,15 +22,15 @@ export const NotificationGroup$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), + name: z.string(), + _environmentId: z.string(), _organizationId: z.string(), _parentId: z.string().optional(), - name: z.string(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", + "_environmentId": "environmentId", "_organizationId": "organizationId", "_parentId": "parentId", }); @@ -35,11 +38,11 @@ export const NotificationGroup$inboundSchema: z.ZodType< /** @internal */ export type NotificationGroup$Outbound = { - _environmentId: string; _id?: string | undefined; + name: string; + _environmentId: string; _organizationId: string; _parentId?: string | undefined; - name: string; }; /** @internal */ @@ -48,15 +51,15 @@ export const NotificationGroup$outboundSchema: z.ZodType< z.ZodTypeDef, NotificationGroup > = z.object({ - environmentId: z.string(), id: z.string().optional(), + name: z.string(), + environmentId: z.string(), organizationId: z.string(), parentId: z.string().optional(), - name: z.string(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", + environmentId: "_environmentId", organizationId: "_organizationId", parentId: "_parentId", }); @@ -74,3 +77,21 @@ export namespace NotificationGroup$ { /** @deprecated use `NotificationGroup$Outbound` instead. */ export type Outbound = NotificationGroup$Outbound; } + +export function notificationGroupToJSON( + notificationGroup: NotificationGroup, +): string { + return JSON.stringify( + NotificationGroup$outboundSchema.parse(notificationGroup), + ); +} + +export function notificationGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationGroup' from JSON`, + ); +} diff --git a/src/models/components/notificationgroupresponsedto.ts b/src/models/components/notificationgroupresponsedto.ts index 679cb516..39dd84f4 100644 --- a/src/models/components/notificationgroupresponsedto.ts +++ b/src/models/components/notificationgroupresponsedto.ts @@ -4,13 +4,16 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type NotificationGroupResponseDto = { - environmentId: string; id?: string | undefined; + name: string; + environmentId: string; organizationId: string; parentId?: string | undefined; - name: string; }; /** @internal */ @@ -19,15 +22,15 @@ export const NotificationGroupResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), + name: z.string(), + _environmentId: z.string(), _organizationId: z.string(), _parentId: z.string().optional(), - name: z.string(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", + "_environmentId": "environmentId", "_organizationId": "organizationId", "_parentId": "parentId", }); @@ -35,11 +38,11 @@ export const NotificationGroupResponseDto$inboundSchema: z.ZodType< /** @internal */ export type NotificationGroupResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; + name: string; + _environmentId: string; _organizationId: string; _parentId?: string | undefined; - name: string; }; /** @internal */ @@ -48,15 +51,15 @@ export const NotificationGroupResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, NotificationGroupResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), + name: z.string(), + environmentId: z.string(), organizationId: z.string(), parentId: z.string().optional(), - name: z.string(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", + environmentId: "_environmentId", organizationId: "_organizationId", parentId: "_parentId", }); @@ -74,3 +77,23 @@ export namespace NotificationGroupResponseDto$ { /** @deprecated use `NotificationGroupResponseDto$Outbound` instead. */ export type Outbound = NotificationGroupResponseDto$Outbound; } + +export function notificationGroupResponseDtoToJSON( + notificationGroupResponseDto: NotificationGroupResponseDto, +): string { + return JSON.stringify( + NotificationGroupResponseDto$outboundSchema.parse( + notificationGroupResponseDto, + ), + ); +} + +export function notificationGroupResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationGroupResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupResponseDto' from JSON`, + ); +} diff --git a/src/models/components/notificationstep.ts b/src/models/components/notificationstep.ts index f5270483..701311fd 100644 --- a/src/models/components/notificationstep.ts +++ b/src/models/components/notificationstep.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DelayRegularMetadata, DelayRegularMetadata$inboundSchema, @@ -59,21 +62,21 @@ export type ReplyCallback = {}; export type NotificationStep = { id?: string | undefined; - parentId?: ParentId | undefined; + uuid?: string | undefined; + name?: string | undefined; templateId?: string | undefined; active?: boolean | undefined; + shouldStopOnFail?: boolean | undefined; + template?: MessageTemplate | undefined; filters?: Array | undefined; + parentId?: ParentId | undefined; metadata?: | DelayScheduledMetadata | DelayRegularMetadata | DigestTimedMetadata | DigestRegularMetadata | undefined; - name?: string | undefined; replyCallback?: ReplyCallback | undefined; - shouldStopOnFail?: boolean | undefined; - template?: MessageTemplate | undefined; - uuid?: string | undefined; variants?: NotificationStepVariant | undefined; }; @@ -107,6 +110,20 @@ export namespace ParentId$ { export type Outbound = ParentId$Outbound; } +export function parentIdToJSON(parentId: ParentId): string { + return JSON.stringify(ParentId$outboundSchema.parse(parentId)); +} + +export function parentIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ParentId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ParentId' from JSON`, + ); +} + /** @internal */ export const Metadata$inboundSchema: z.ZodType< Metadata, @@ -151,6 +168,20 @@ export namespace Metadata$ { export type Outbound = Metadata$Outbound; } +export function metadataToJSON(metadata: Metadata): string { + return JSON.stringify(Metadata$outboundSchema.parse(metadata)); +} + +export function metadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Metadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Metadata' from JSON`, + ); +} + /** @internal */ export const ReplyCallback$inboundSchema: z.ZodType< ReplyCallback, @@ -181,6 +212,20 @@ export namespace ReplyCallback$ { export type Outbound = ReplyCallback$Outbound; } +export function replyCallbackToJSON(replyCallback: ReplyCallback): string { + return JSON.stringify(ReplyCallback$outboundSchema.parse(replyCallback)); +} + +export function replyCallbackFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReplyCallback$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReplyCallback' from JSON`, + ); +} + /** @internal */ export const NotificationStep$inboundSchema: z.ZodType< NotificationStep, @@ -188,48 +233,48 @@ export const NotificationStep$inboundSchema: z.ZodType< unknown > = z.object({ _id: z.string().optional(), - _parentId: z.lazy(() => ParentId$inboundSchema).optional(), + uuid: z.string().optional(), + name: z.string().optional(), _templateId: z.string().optional(), active: z.boolean().optional(), + shouldStopOnFail: z.boolean().optional(), + template: MessageTemplate$inboundSchema.optional(), filters: z.array(StepFilter$inboundSchema).optional(), + _parentId: z.lazy(() => ParentId$inboundSchema).optional(), metadata: z.union([ DelayScheduledMetadata$inboundSchema, DelayRegularMetadata$inboundSchema, DigestTimedMetadata$inboundSchema, DigestRegularMetadata$inboundSchema, ]).optional(), - name: z.string().optional(), replyCallback: z.lazy(() => ReplyCallback$inboundSchema).optional(), - shouldStopOnFail: z.boolean().optional(), - template: MessageTemplate$inboundSchema.optional(), - uuid: z.string().optional(), variants: NotificationStepVariant$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "_id": "id", - "_parentId": "parentId", "_templateId": "templateId", + "_parentId": "parentId", }); }); /** @internal */ export type NotificationStep$Outbound = { _id?: string | undefined; - _parentId?: ParentId$Outbound | undefined; + uuid?: string | undefined; + name?: string | undefined; _templateId?: string | undefined; active?: boolean | undefined; + shouldStopOnFail?: boolean | undefined; + template?: MessageTemplate$Outbound | undefined; filters?: Array | undefined; + _parentId?: ParentId$Outbound | undefined; metadata?: | DelayScheduledMetadata$Outbound | DelayRegularMetadata$Outbound | DigestTimedMetadata$Outbound | DigestRegularMetadata$Outbound | undefined; - name?: string | undefined; replyCallback?: ReplyCallback$Outbound | undefined; - shouldStopOnFail?: boolean | undefined; - template?: MessageTemplate$Outbound | undefined; - uuid?: string | undefined; variants?: NotificationStepVariant$Outbound | undefined; }; @@ -240,27 +285,27 @@ export const NotificationStep$outboundSchema: z.ZodType< NotificationStep > = z.object({ id: z.string().optional(), - parentId: z.lazy(() => ParentId$outboundSchema).optional(), + uuid: z.string().optional(), + name: z.string().optional(), templateId: z.string().optional(), active: z.boolean().optional(), + shouldStopOnFail: z.boolean().optional(), + template: MessageTemplate$outboundSchema.optional(), filters: z.array(StepFilter$outboundSchema).optional(), + parentId: z.lazy(() => ParentId$outboundSchema).optional(), metadata: z.union([ DelayScheduledMetadata$outboundSchema, DelayRegularMetadata$outboundSchema, DigestTimedMetadata$outboundSchema, DigestRegularMetadata$outboundSchema, ]).optional(), - name: z.string().optional(), replyCallback: z.lazy(() => ReplyCallback$outboundSchema).optional(), - shouldStopOnFail: z.boolean().optional(), - template: MessageTemplate$outboundSchema.optional(), - uuid: z.string().optional(), variants: NotificationStepVariant$outboundSchema.optional(), }).transform((v) => { return remap$(v, { id: "_id", - parentId: "_parentId", templateId: "_templateId", + parentId: "_parentId", }); }); @@ -276,3 +321,21 @@ export namespace NotificationStep$ { /** @deprecated use `NotificationStep$Outbound` instead. */ export type Outbound = NotificationStep$Outbound; } + +export function notificationStepToJSON( + notificationStep: NotificationStep, +): string { + return JSON.stringify( + NotificationStep$outboundSchema.parse(notificationStep), + ); +} + +export function notificationStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationStep' from JSON`, + ); +} diff --git a/src/models/components/notificationstepvariant.ts b/src/models/components/notificationstepvariant.ts index 8308a013..630a6ba1 100644 --- a/src/models/components/notificationstepvariant.ts +++ b/src/models/components/notificationstepvariant.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DelayRegularMetadata, DelayRegularMetadata$inboundSchema, @@ -53,21 +56,21 @@ export type NotificationStepVariantReplyCallback = {}; export type NotificationStepVariant = { id?: string | undefined; - parentId?: NotificationStepVariantParentId | undefined; + uuid?: string | undefined; + name?: string | undefined; templateId?: string | undefined; active?: boolean | undefined; + shouldStopOnFail?: boolean | undefined; + template?: MessageTemplate | undefined; filters?: Array | undefined; + parentId?: NotificationStepVariantParentId | undefined; metadata?: | DelayScheduledMetadata | DelayRegularMetadata | DigestTimedMetadata | DigestRegularMetadata | undefined; - name?: string | undefined; replyCallback?: NotificationStepVariantReplyCallback | undefined; - shouldStopOnFail?: boolean | undefined; - template?: MessageTemplate | undefined; - uuid?: string | undefined; }; /** @internal */ @@ -100,6 +103,26 @@ export namespace NotificationStepVariantParentId$ { export type Outbound = NotificationStepVariantParentId$Outbound; } +export function notificationStepVariantParentIdToJSON( + notificationStepVariantParentId: NotificationStepVariantParentId, +): string { + return JSON.stringify( + NotificationStepVariantParentId$outboundSchema.parse( + notificationStepVariantParentId, + ), + ); +} + +export function notificationStepVariantParentIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationStepVariantParentId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationStepVariantParentId' from JSON`, + ); +} + /** @internal */ export const NotificationStepVariantMetadata$inboundSchema: z.ZodType< NotificationStepVariantMetadata, @@ -144,6 +167,26 @@ export namespace NotificationStepVariantMetadata$ { export type Outbound = NotificationStepVariantMetadata$Outbound; } +export function notificationStepVariantMetadataToJSON( + notificationStepVariantMetadata: NotificationStepVariantMetadata, +): string { + return JSON.stringify( + NotificationStepVariantMetadata$outboundSchema.parse( + notificationStepVariantMetadata, + ), + ); +} + +export function notificationStepVariantMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationStepVariantMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationStepVariantMetadata' from JSON`, + ); +} + /** @internal */ export const NotificationStepVariantReplyCallback$inboundSchema: z.ZodType< NotificationStepVariantReplyCallback, @@ -176,6 +219,27 @@ export namespace NotificationStepVariantReplyCallback$ { export type Outbound = NotificationStepVariantReplyCallback$Outbound; } +export function notificationStepVariantReplyCallbackToJSON( + notificationStepVariantReplyCallback: NotificationStepVariantReplyCallback, +): string { + return JSON.stringify( + NotificationStepVariantReplyCallback$outboundSchema.parse( + notificationStepVariantReplyCallback, + ), + ); +} + +export function notificationStepVariantReplyCallbackFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NotificationStepVariantReplyCallback$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationStepVariantReplyCallback' from JSON`, + ); +} + /** @internal */ export const NotificationStepVariant$inboundSchema: z.ZodType< NotificationStepVariant, @@ -183,50 +247,50 @@ export const NotificationStepVariant$inboundSchema: z.ZodType< unknown > = z.object({ _id: z.string().optional(), - _parentId: z.lazy(() => NotificationStepVariantParentId$inboundSchema) - .optional(), + uuid: z.string().optional(), + name: z.string().optional(), _templateId: z.string().optional(), active: z.boolean().optional(), + shouldStopOnFail: z.boolean().optional(), + template: MessageTemplate$inboundSchema.optional(), filters: z.array(StepFilter$inboundSchema).optional(), + _parentId: z.lazy(() => NotificationStepVariantParentId$inboundSchema) + .optional(), metadata: z.union([ DelayScheduledMetadata$inboundSchema, DelayRegularMetadata$inboundSchema, DigestTimedMetadata$inboundSchema, DigestRegularMetadata$inboundSchema, ]).optional(), - name: z.string().optional(), replyCallback: z.lazy(() => NotificationStepVariantReplyCallback$inboundSchema ).optional(), - shouldStopOnFail: z.boolean().optional(), - template: MessageTemplate$inboundSchema.optional(), - uuid: z.string().optional(), }).transform((v) => { return remap$(v, { "_id": "id", - "_parentId": "parentId", "_templateId": "templateId", + "_parentId": "parentId", }); }); /** @internal */ export type NotificationStepVariant$Outbound = { _id?: string | undefined; - _parentId?: NotificationStepVariantParentId$Outbound | undefined; + uuid?: string | undefined; + name?: string | undefined; _templateId?: string | undefined; active?: boolean | undefined; + shouldStopOnFail?: boolean | undefined; + template?: MessageTemplate$Outbound | undefined; filters?: Array | undefined; + _parentId?: NotificationStepVariantParentId$Outbound | undefined; metadata?: | DelayScheduledMetadata$Outbound | DelayRegularMetadata$Outbound | DigestTimedMetadata$Outbound | DigestRegularMetadata$Outbound | undefined; - name?: string | undefined; replyCallback?: NotificationStepVariantReplyCallback$Outbound | undefined; - shouldStopOnFail?: boolean | undefined; - template?: MessageTemplate$Outbound | undefined; - uuid?: string | undefined; }; /** @internal */ @@ -236,29 +300,29 @@ export const NotificationStepVariant$outboundSchema: z.ZodType< NotificationStepVariant > = z.object({ id: z.string().optional(), - parentId: z.lazy(() => NotificationStepVariantParentId$outboundSchema) - .optional(), + uuid: z.string().optional(), + name: z.string().optional(), templateId: z.string().optional(), active: z.boolean().optional(), + shouldStopOnFail: z.boolean().optional(), + template: MessageTemplate$outboundSchema.optional(), filters: z.array(StepFilter$outboundSchema).optional(), + parentId: z.lazy(() => NotificationStepVariantParentId$outboundSchema) + .optional(), metadata: z.union([ DelayScheduledMetadata$outboundSchema, DelayRegularMetadata$outboundSchema, DigestTimedMetadata$outboundSchema, DigestRegularMetadata$outboundSchema, ]).optional(), - name: z.string().optional(), replyCallback: z.lazy(() => NotificationStepVariantReplyCallback$outboundSchema ).optional(), - shouldStopOnFail: z.boolean().optional(), - template: MessageTemplate$outboundSchema.optional(), - uuid: z.string().optional(), }).transform((v) => { return remap$(v, { id: "_id", - parentId: "_parentId", templateId: "_templateId", + parentId: "_parentId", }); }); @@ -274,3 +338,21 @@ export namespace NotificationStepVariant$ { /** @deprecated use `NotificationStepVariant$Outbound` instead. */ export type Outbound = NotificationStepVariant$Outbound; } + +export function notificationStepVariantToJSON( + notificationStepVariant: NotificationStepVariant, +): string { + return JSON.stringify( + NotificationStepVariant$outboundSchema.parse(notificationStepVariant), + ); +} + +export function notificationStepVariantFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationStepVariant$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationStepVariant' from JSON`, + ); +} diff --git a/src/models/components/notificationtrigger.ts b/src/models/components/notificationtrigger.ts index e9b8cc0e..60397393 100644 --- a/src/models/components/notificationtrigger.ts +++ b/src/models/components/notificationtrigger.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { NotificationTriggerVariable, NotificationTriggerVariable$inboundSchema, @@ -19,10 +22,10 @@ export type NotificationTriggerType = ClosedEnum< >; export type NotificationTrigger = { - identifier: string; - subscriberVariables?: Array | undefined; type: NotificationTriggerType; + identifier: string; variables: Array; + subscriberVariables?: Array | undefined; }; /** @internal */ @@ -52,19 +55,19 @@ export const NotificationTrigger$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + type: NotificationTriggerType$inboundSchema, identifier: z.string(), + variables: z.array(NotificationTriggerVariable$inboundSchema), subscriberVariables: z.array(NotificationTriggerVariable$inboundSchema) .optional(), - type: NotificationTriggerType$inboundSchema, - variables: z.array(NotificationTriggerVariable$inboundSchema), }); /** @internal */ export type NotificationTrigger$Outbound = { - identifier: string; - subscriberVariables?: Array | undefined; type: string; + identifier: string; variables: Array; + subscriberVariables?: Array | undefined; }; /** @internal */ @@ -73,11 +76,11 @@ export const NotificationTrigger$outboundSchema: z.ZodType< z.ZodTypeDef, NotificationTrigger > = z.object({ + type: NotificationTriggerType$outboundSchema, identifier: z.string(), + variables: z.array(NotificationTriggerVariable$outboundSchema), subscriberVariables: z.array(NotificationTriggerVariable$outboundSchema) .optional(), - type: NotificationTriggerType$outboundSchema, - variables: z.array(NotificationTriggerVariable$outboundSchema), }); /** @@ -92,3 +95,21 @@ export namespace NotificationTrigger$ { /** @deprecated use `NotificationTrigger$Outbound` instead. */ export type Outbound = NotificationTrigger$Outbound; } + +export function notificationTriggerToJSON( + notificationTrigger: NotificationTrigger, +): string { + return JSON.stringify( + NotificationTrigger$outboundSchema.parse(notificationTrigger), + ); +} + +export function notificationTriggerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationTrigger$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationTrigger' from JSON`, + ); +} diff --git a/src/models/components/notificationtriggervariable.ts b/src/models/components/notificationtriggervariable.ts index 273d454e..e8961c30 100644 --- a/src/models/components/notificationtriggervariable.ts +++ b/src/models/components/notificationtriggervariable.ts @@ -3,6 +3,9 @@ */ 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 NotificationTriggerVariable = { name: string; @@ -43,3 +46,23 @@ export namespace NotificationTriggerVariable$ { /** @deprecated use `NotificationTriggerVariable$Outbound` instead. */ export type Outbound = NotificationTriggerVariable$Outbound; } + +export function notificationTriggerVariableToJSON( + notificationTriggerVariable: NotificationTriggerVariable, +): string { + return JSON.stringify( + NotificationTriggerVariable$outboundSchema.parse( + notificationTriggerVariable, + ), + ); +} + +export function notificationTriggerVariableFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationTriggerVariable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationTriggerVariable' from JSON`, + ); +} diff --git a/src/models/components/organizationbrandingresponsedto.ts b/src/models/components/organizationbrandingresponsedto.ts deleted file mode 100644 index 8f59189d..00000000 --- a/src/models/components/organizationbrandingresponsedto.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../../types/enums.js"; - -export const Direction = { - Ltr: "ltr", - Trl: "trl", -} as const; -export type Direction = ClosedEnum; - -export type OrganizationBrandingResponseDto = { - color: string; - contentBackground: string; - direction?: Direction | undefined; - fontColor: string; - fontFamily?: string | undefined; - logo: string; -}; - -/** @internal */ -export const Direction$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Direction); - -/** @internal */ -export const Direction$outboundSchema: z.ZodNativeEnum = - Direction$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Direction$ { - /** @deprecated use `Direction$inboundSchema` instead. */ - export const inboundSchema = Direction$inboundSchema; - /** @deprecated use `Direction$outboundSchema` instead. */ - export const outboundSchema = Direction$outboundSchema; -} - -/** @internal */ -export const OrganizationBrandingResponseDto$inboundSchema: z.ZodType< - OrganizationBrandingResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - color: z.string(), - contentBackground: z.string(), - direction: Direction$inboundSchema.optional(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: z.string(), -}); - -/** @internal */ -export type OrganizationBrandingResponseDto$Outbound = { - color: string; - contentBackground: string; - direction?: string | undefined; - fontColor: string; - fontFamily?: string | undefined; - logo: string; -}; - -/** @internal */ -export const OrganizationBrandingResponseDto$outboundSchema: z.ZodType< - OrganizationBrandingResponseDto$Outbound, - z.ZodTypeDef, - OrganizationBrandingResponseDto -> = z.object({ - color: z.string(), - contentBackground: z.string(), - direction: Direction$outboundSchema.optional(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: 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 OrganizationBrandingResponseDto$ { - /** @deprecated use `OrganizationBrandingResponseDto$inboundSchema` instead. */ - export const inboundSchema = OrganizationBrandingResponseDto$inboundSchema; - /** @deprecated use `OrganizationBrandingResponseDto$outboundSchema` instead. */ - export const outboundSchema = OrganizationBrandingResponseDto$outboundSchema; - /** @deprecated use `OrganizationBrandingResponseDto$Outbound` instead. */ - export type Outbound = OrganizationBrandingResponseDto$Outbound; -} diff --git a/src/models/components/organizationresponsedto.ts b/src/models/components/organizationresponsedto.ts deleted file mode 100644 index adce10a6..00000000 --- a/src/models/components/organizationresponsedto.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { - OrganizationBrandingResponseDto, - OrganizationBrandingResponseDto$inboundSchema, - OrganizationBrandingResponseDto$Outbound, - OrganizationBrandingResponseDto$outboundSchema, -} from "./organizationbrandingresponsedto.js"; - -export type OrganizationResponseDto = { - branding: OrganizationBrandingResponseDto; - logo?: string | undefined; - name: string; - partnerConfigurations?: Array | undefined; -}; - -/** @internal */ -export const OrganizationResponseDto$inboundSchema: z.ZodType< - OrganizationResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - branding: OrganizationBrandingResponseDto$inboundSchema, - logo: z.string().optional(), - name: z.string(), - partnerConfigurations: z.array(z.string()).optional(), -}); - -/** @internal */ -export type OrganizationResponseDto$Outbound = { - branding: OrganizationBrandingResponseDto$Outbound; - logo?: string | undefined; - name: string; - partnerConfigurations?: Array | undefined; -}; - -/** @internal */ -export const OrganizationResponseDto$outboundSchema: z.ZodType< - OrganizationResponseDto$Outbound, - z.ZodTypeDef, - OrganizationResponseDto -> = z.object({ - branding: OrganizationBrandingResponseDto$outboundSchema, - logo: z.string().optional(), - name: z.string(), - partnerConfigurations: z.array(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OrganizationResponseDto$ { - /** @deprecated use `OrganizationResponseDto$inboundSchema` instead. */ - export const inboundSchema = OrganizationResponseDto$inboundSchema; - /** @deprecated use `OrganizationResponseDto$outboundSchema` instead. */ - export const outboundSchema = OrganizationResponseDto$outboundSchema; - /** @deprecated use `OrganizationResponseDto$Outbound` instead. */ - export type Outbound = OrganizationResponseDto$Outbound; -} diff --git a/src/models/components/preference.ts b/src/models/components/preference.ts index 6b66833a..bdee77a4 100644 --- a/src/models/components/preference.ts +++ b/src/models/components/preference.ts @@ -3,6 +3,9 @@ */ 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"; import { PreferenceChannels, PreferenceChannels$inboundSchema, @@ -11,14 +14,14 @@ import { } from "./preferencechannels.js"; export type Preference = { - /** - * Subscriber preferences for the different channels regarding this workflow - */ - channels: PreferenceChannels; /** * Sets if the workflow is fully enabled for all channels or not for the subscriber. */ enabled: boolean; + /** + * Subscriber preferences for the different channels regarding this workflow + */ + channels: PreferenceChannels; }; /** @internal */ @@ -27,14 +30,14 @@ export const Preference$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - channels: PreferenceChannels$inboundSchema, enabled: z.boolean(), + channels: PreferenceChannels$inboundSchema, }); /** @internal */ export type Preference$Outbound = { - channels: PreferenceChannels$Outbound; enabled: boolean; + channels: PreferenceChannels$Outbound; }; /** @internal */ @@ -43,8 +46,8 @@ export const Preference$outboundSchema: z.ZodType< z.ZodTypeDef, Preference > = z.object({ - channels: PreferenceChannels$outboundSchema, enabled: z.boolean(), + channels: PreferenceChannels$outboundSchema, }); /** @@ -59,3 +62,17 @@ export namespace Preference$ { /** @deprecated use `Preference$Outbound` instead. */ export type Outbound = Preference$Outbound; } + +export function preferenceToJSON(preference: Preference): string { + return JSON.stringify(Preference$outboundSchema.parse(preference)); +} + +export function preferenceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Preference$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Preference' from JSON`, + ); +} diff --git a/src/models/components/preferencechannels.ts b/src/models/components/preferencechannels.ts index a0c356c6..b4022c33 100644 --- a/src/models/components/preferencechannels.ts +++ b/src/models/components/preferencechannels.ts @@ -4,13 +4,16 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PreferenceChannels = { - chat?: boolean | undefined; email?: boolean | undefined; + sms?: boolean | undefined; inApp?: boolean | undefined; + chat?: boolean | undefined; push?: boolean | undefined; - sms?: boolean | undefined; }; /** @internal */ @@ -19,11 +22,11 @@ export const PreferenceChannels$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - chat: z.boolean().optional(), email: z.boolean().optional(), + sms: z.boolean().optional(), in_app: z.boolean().optional(), + chat: z.boolean().optional(), push: z.boolean().optional(), - sms: z.boolean().optional(), }).transform((v) => { return remap$(v, { "in_app": "inApp", @@ -32,11 +35,11 @@ export const PreferenceChannels$inboundSchema: z.ZodType< /** @internal */ export type PreferenceChannels$Outbound = { - chat?: boolean | undefined; email?: boolean | undefined; + sms?: boolean | undefined; in_app?: boolean | undefined; + chat?: boolean | undefined; push?: boolean | undefined; - sms?: boolean | undefined; }; /** @internal */ @@ -45,11 +48,11 @@ export const PreferenceChannels$outboundSchema: z.ZodType< z.ZodTypeDef, PreferenceChannels > = z.object({ - chat: z.boolean().optional(), email: z.boolean().optional(), + sms: z.boolean().optional(), inApp: z.boolean().optional(), + chat: z.boolean().optional(), push: z.boolean().optional(), - sms: z.boolean().optional(), }).transform((v) => { return remap$(v, { inApp: "in_app", @@ -68,3 +71,21 @@ export namespace PreferenceChannels$ { /** @deprecated use `PreferenceChannels$Outbound` instead. */ export type Outbound = PreferenceChannels$Outbound; } + +export function preferenceChannelsToJSON( + preferenceChannels: PreferenceChannels, +): string { + return JSON.stringify( + PreferenceChannels$outboundSchema.parse(preferenceChannels), + ); +} + +export function preferenceChannelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PreferenceChannels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PreferenceChannels' from JSON`, + ); +} diff --git a/src/models/components/removesubscribersrequestdto.ts b/src/models/components/removesubscribersrequestdto.ts index 6fb22794..963a2092 100644 --- a/src/models/components/removesubscribersrequestdto.ts +++ b/src/models/components/removesubscribersrequestdto.ts @@ -3,6 +3,9 @@ */ 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 RemoveSubscribersRequestDto = { /** @@ -46,3 +49,23 @@ export namespace RemoveSubscribersRequestDto$ { /** @deprecated use `RemoveSubscribersRequestDto$Outbound` instead. */ export type Outbound = RemoveSubscribersRequestDto$Outbound; } + +export function removeSubscribersRequestDtoToJSON( + removeSubscribersRequestDto: RemoveSubscribersRequestDto, +): string { + return JSON.stringify( + RemoveSubscribersRequestDto$outboundSchema.parse( + removeSubscribersRequestDto, + ), + ); +} + +export function removeSubscribersRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoveSubscribersRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoveSubscribersRequestDto' from JSON`, + ); +} diff --git a/src/models/components/renameorganizationdto.ts b/src/models/components/renameorganizationdto.ts deleted file mode 100644 index c0d1d6dd..00000000 --- a/src/models/components/renameorganizationdto.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type RenameOrganizationDto = { - name: string; -}; - -/** @internal */ -export const RenameOrganizationDto$inboundSchema: z.ZodType< - RenameOrganizationDto, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), -}); - -/** @internal */ -export type RenameOrganizationDto$Outbound = { - name: string; -}; - -/** @internal */ -export const RenameOrganizationDto$outboundSchema: z.ZodType< - RenameOrganizationDto$Outbound, - z.ZodTypeDef, - RenameOrganizationDto -> = z.object({ - name: 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 RenameOrganizationDto$ { - /** @deprecated use `RenameOrganizationDto$inboundSchema` instead. */ - export const inboundSchema = RenameOrganizationDto$inboundSchema; - /** @deprecated use `RenameOrganizationDto$outboundSchema` instead. */ - export const outboundSchema = RenameOrganizationDto$outboundSchema; - /** @deprecated use `RenameOrganizationDto$Outbound` instead. */ - export type Outbound = RenameOrganizationDto$Outbound; -} diff --git a/src/models/components/renametopicrequestdto.ts b/src/models/components/renametopicrequestdto.ts index 794dd1e6..fd03c301 100644 --- a/src/models/components/renametopicrequestdto.ts +++ b/src/models/components/renametopicrequestdto.ts @@ -3,6 +3,9 @@ */ 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 RenameTopicRequestDto = { /** @@ -46,3 +49,21 @@ export namespace RenameTopicRequestDto$ { /** @deprecated use `RenameTopicRequestDto$Outbound` instead. */ export type Outbound = RenameTopicRequestDto$Outbound; } + +export function renameTopicRequestDtoToJSON( + renameTopicRequestDto: RenameTopicRequestDto, +): string { + return JSON.stringify( + RenameTopicRequestDto$outboundSchema.parse(renameTopicRequestDto), + ); +} + +export function renameTopicRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RenameTopicRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RenameTopicRequestDto' from JSON`, + ); +} diff --git a/src/models/components/renametopicresponsedto.ts b/src/models/components/renametopicresponsedto.ts index cbebc2e0..b993443b 100644 --- a/src/models/components/renametopicresponsedto.ts +++ b/src/models/components/renametopicresponsedto.ts @@ -4,11 +4,14 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type RenameTopicResponseDto = { - environmentId: string; id?: string | undefined; organizationId: string; + environmentId: string; key: string; name: string; subscribers: Array; @@ -20,25 +23,25 @@ export const RenameTopicResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), _organizationId: z.string(), + _environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", "_organizationId": "organizationId", + "_environmentId": "environmentId", }); }); /** @internal */ export type RenameTopicResponseDto$Outbound = { - _environmentId: string; _id?: string | undefined; _organizationId: string; + _environmentId: string; key: string; name: string; subscribers: Array; @@ -50,17 +53,17 @@ export const RenameTopicResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, RenameTopicResponseDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), organizationId: z.string(), + environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", organizationId: "_organizationId", + environmentId: "_environmentId", }); }); @@ -76,3 +79,21 @@ export namespace RenameTopicResponseDto$ { /** @deprecated use `RenameTopicResponseDto$Outbound` instead. */ export type Outbound = RenameTopicResponseDto$Outbound; } + +export function renameTopicResponseDtoToJSON( + renameTopicResponseDto: RenameTopicResponseDto, +): string { + return JSON.stringify( + RenameTopicResponseDto$outboundSchema.parse(renameTopicResponseDto), + ); +} + +export function renameTopicResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RenameTopicResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RenameTopicResponseDto' from JSON`, + ); +} diff --git a/src/models/components/security.ts b/src/models/components/security.ts index 7d21f891..8000a90c 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Security = { apiKey: string; @@ -52,3 +55,17 @@ export namespace Security$ { /** @deprecated use `Security$Outbound` instead. */ export type Outbound = Security$Outbound; } + +export function securityToJSON(security: Security): string { + return JSON.stringify(Security$outboundSchema.parse(security)); +} + +export function securityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Security$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Security' from JSON`, + ); +} diff --git a/src/models/components/stepfilter.ts b/src/models/components/stepfilter.ts index 2d1c702f..4ad0efc6 100644 --- a/src/models/components/stepfilter.ts +++ b/src/models/components/stepfilter.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { FieldFilterPart, FieldFilterPart$inboundSchema, @@ -30,10 +33,10 @@ export const Value = { export type Value = ClosedEnum; export type StepFilter = { - children: Array; isNegated: boolean; type: StepFilterType; value: Value; + children: Array; }; /** @internal */ @@ -83,18 +86,18 @@ export const StepFilter$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - children: z.array(FieldFilterPart$inboundSchema), isNegated: z.boolean(), type: StepFilterType$inboundSchema, value: Value$inboundSchema, + children: z.array(FieldFilterPart$inboundSchema), }); /** @internal */ export type StepFilter$Outbound = { - children: Array; isNegated: boolean; type: string; value: string; + children: Array; }; /** @internal */ @@ -103,10 +106,10 @@ export const StepFilter$outboundSchema: z.ZodType< z.ZodTypeDef, StepFilter > = z.object({ - children: z.array(FieldFilterPart$outboundSchema), isNegated: z.boolean(), type: StepFilterType$outboundSchema, value: Value$outboundSchema, + children: z.array(FieldFilterPart$outboundSchema), }); /** @@ -121,3 +124,17 @@ export namespace StepFilter$ { /** @deprecated use `StepFilter$Outbound` instead. */ export type Outbound = StepFilter$Outbound; } + +export function stepFilterToJSON(stepFilter: StepFilter): string { + return JSON.stringify(StepFilter$outboundSchema.parse(stepFilter)); +} + +export function stepFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StepFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StepFilter' from JSON`, + ); +} diff --git a/src/models/components/subscriberpayloaddto.ts b/src/models/components/subscriberpayloaddto.ts index 74e1ffe1..da926aad 100644 --- a/src/models/components/subscriberpayloaddto.ts +++ b/src/models/components/subscriberpayloaddto.ts @@ -3,55 +3,66 @@ */ 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 SubscriberPayloadDtoData = {}; +export type Data = {}; export type SubscriberPayloadDto = { /** - * An http url to the profile image of your subscriber + * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems */ - avatar?: string | undefined; - channels?: Array | undefined; - data?: SubscriberPayloadDtoData | undefined; + subscriberId: string; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; /** - * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + * An http url to the profile image of your subscriber */ - subscriberId: string; + avatar?: string | undefined; + locale?: string | undefined; + data?: Data | undefined; + channels?: Array | undefined; }; /** @internal */ -export const SubscriberPayloadDtoData$inboundSchema: z.ZodType< - SubscriberPayloadDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); +export const Data$inboundSchema: z.ZodType = z + .object({}); /** @internal */ -export type SubscriberPayloadDtoData$Outbound = {}; +export type Data$Outbound = {}; /** @internal */ -export const SubscriberPayloadDtoData$outboundSchema: z.ZodType< - SubscriberPayloadDtoData$Outbound, - z.ZodTypeDef, - SubscriberPayloadDtoData -> = z.object({}); +export const Data$outboundSchema: z.ZodType = + 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 SubscriberPayloadDtoData$ { - /** @deprecated use `SubscriberPayloadDtoData$inboundSchema` instead. */ - export const inboundSchema = SubscriberPayloadDtoData$inboundSchema; - /** @deprecated use `SubscriberPayloadDtoData$outboundSchema` instead. */ - export const outboundSchema = SubscriberPayloadDtoData$outboundSchema; - /** @deprecated use `SubscriberPayloadDtoData$Outbound` instead. */ - export type Outbound = SubscriberPayloadDtoData$Outbound; +export namespace Data$ { + /** @deprecated use `Data$inboundSchema` instead. */ + export const inboundSchema = Data$inboundSchema; + /** @deprecated use `Data$outboundSchema` instead. */ + export const outboundSchema = Data$outboundSchema; + /** @deprecated use `Data$Outbound` instead. */ + export type Outbound = Data$Outbound; +} + +export function dataToJSON(data: Data): string { + return JSON.stringify(Data$outboundSchema.parse(data)); +} + +export function dataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Data$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Data' from JSON`, + ); } /** @internal */ @@ -60,28 +71,28 @@ export const SubscriberPayloadDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => SubscriberPayloadDtoData$inboundSchema).optional(), + subscriberId: z.string(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), - subscriberId: z.string(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => Data$inboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @internal */ export type SubscriberPayloadDto$Outbound = { - avatar?: string | undefined; - channels?: Array | undefined; - data?: SubscriberPayloadDtoData$Outbound | undefined; + subscriberId: string; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; - subscriberId: string; + avatar?: string | undefined; + locale?: string | undefined; + data?: Data$Outbound | undefined; + channels?: Array | undefined; }; /** @internal */ @@ -90,15 +101,15 @@ export const SubscriberPayloadDto$outboundSchema: z.ZodType< z.ZodTypeDef, SubscriberPayloadDto > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => SubscriberPayloadDtoData$outboundSchema).optional(), + subscriberId: z.string(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), - subscriberId: z.string(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => Data$outboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @@ -113,3 +124,21 @@ export namespace SubscriberPayloadDto$ { /** @deprecated use `SubscriberPayloadDto$Outbound` instead. */ export type Outbound = SubscriberPayloadDto$Outbound; } + +export function subscriberPayloadDtoToJSON( + subscriberPayloadDto: SubscriberPayloadDto, +): string { + return JSON.stringify( + SubscriberPayloadDto$outboundSchema.parse(subscriberPayloadDto), + ); +} + +export function subscriberPayloadDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SubscriberPayloadDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SubscriberPayloadDto' from JSON`, + ); +} diff --git a/src/models/components/subscriberresponsedto.ts b/src/models/components/subscriberresponsedto.ts index 200f0616..24f069d6 100644 --- a/src/models/components/subscriberresponsedto.ts +++ b/src/models/components/subscriberresponsedto.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChannelSettings, ChannelSettings$inboundSchema, @@ -12,32 +15,36 @@ import { } from "./channelsettings.js"; export type SubscriberResponseDto = { - v?: number | undefined; - environmentId: string; /** * The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See `subscriberId` for that */ id?: string | undefined; - organizationId: string; - avatar?: string | undefined; - /** - * Channels settings for subscriber - */ - channels?: Array | undefined; - createdAt: string; - deleted: boolean; - email?: string | undefined; firstName?: string | undefined; - isOnline?: boolean | undefined; lastName?: string | undefined; - lastOnlineAt?: string | undefined; - locale?: string | undefined; + email?: string | undefined; phone?: string | undefined; + avatar?: string | undefined; + locale?: string | undefined; /** * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems */ subscriberId: string; + /** + * Channels settings for subscriber + */ + channels?: Array | undefined; + /** + * Topics that subscriber belongs to + */ + topics?: Array | undefined; + isOnline?: boolean | undefined; + lastOnlineAt?: string | undefined; + organizationId: string; + environmentId: string; + deleted: boolean; + createdAt: string; updatedAt: string; + v?: number | undefined; }; /** @internal */ @@ -46,51 +53,53 @@ export const SubscriberResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - __v: z.number().optional(), - _environmentId: z.string(), _id: z.string().optional(), - _organizationId: z.string(), - avatar: z.string().optional(), - channels: z.array(ChannelSettings$inboundSchema).optional(), - createdAt: z.string(), - deleted: z.boolean(), - email: z.string().optional(), firstName: z.string().optional(), - isOnline: z.boolean().optional(), lastName: z.string().optional(), - lastOnlineAt: z.string().optional(), - locale: z.string().optional(), + email: z.string().optional(), phone: z.string().optional(), + avatar: z.string().optional(), + locale: z.string().optional(), subscriberId: z.string(), + channels: z.array(ChannelSettings$inboundSchema).optional(), + topics: z.array(z.string()).optional(), + isOnline: z.boolean().optional(), + lastOnlineAt: z.string().optional(), + _organizationId: z.string(), + _environmentId: z.string(), + deleted: z.boolean(), + createdAt: z.string(), updatedAt: z.string(), + __v: z.number().optional(), }).transform((v) => { return remap$(v, { - "__v": "v", - "_environmentId": "environmentId", "_id": "id", "_organizationId": "organizationId", + "_environmentId": "environmentId", + "__v": "v", }); }); /** @internal */ export type SubscriberResponseDto$Outbound = { - __v?: number | undefined; - _environmentId: string; _id?: string | undefined; - _organizationId: string; - avatar?: string | undefined; - channels?: Array | undefined; - createdAt: string; - deleted: boolean; - email?: string | undefined; firstName?: string | undefined; - isOnline?: boolean | undefined; lastName?: string | undefined; - lastOnlineAt?: string | undefined; - locale?: string | undefined; + email?: string | undefined; phone?: string | undefined; + avatar?: string | undefined; + locale?: string | undefined; subscriberId: string; + channels?: Array | undefined; + topics?: Array | undefined; + isOnline?: boolean | undefined; + lastOnlineAt?: string | undefined; + _organizationId: string; + _environmentId: string; + deleted: boolean; + createdAt: string; updatedAt: string; + __v?: number | undefined; }; /** @internal */ @@ -99,29 +108,30 @@ export const SubscriberResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, SubscriberResponseDto > = z.object({ - v: z.number().optional(), - environmentId: z.string(), id: z.string().optional(), - organizationId: z.string(), - avatar: z.string().optional(), - channels: z.array(ChannelSettings$outboundSchema).optional(), - createdAt: z.string(), - deleted: z.boolean(), - email: z.string().optional(), firstName: z.string().optional(), - isOnline: z.boolean().optional(), lastName: z.string().optional(), - lastOnlineAt: z.string().optional(), - locale: z.string().optional(), + email: z.string().optional(), phone: z.string().optional(), + avatar: z.string().optional(), + locale: z.string().optional(), subscriberId: z.string(), + channels: z.array(ChannelSettings$outboundSchema).optional(), + topics: z.array(z.string()).optional(), + isOnline: z.boolean().optional(), + lastOnlineAt: z.string().optional(), + organizationId: z.string(), + environmentId: z.string(), + deleted: z.boolean(), + createdAt: z.string(), updatedAt: z.string(), + v: z.number().optional(), }).transform((v) => { return remap$(v, { - v: "__v", - environmentId: "_environmentId", id: "_id", organizationId: "_organizationId", + environmentId: "_environmentId", + v: "__v", }); }); @@ -137,3 +147,21 @@ export namespace SubscriberResponseDto$ { /** @deprecated use `SubscriberResponseDto$Outbound` instead. */ export type Outbound = SubscriberResponseDto$Outbound; } + +export function subscriberResponseDtoToJSON( + subscriberResponseDto: SubscriberResponseDto, +): string { + return JSON.stringify( + SubscriberResponseDto$outboundSchema.parse(subscriberResponseDto), + ); +} + +export function subscriberResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SubscriberResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SubscriberResponseDto' from JSON`, + ); +} diff --git a/src/models/components/templateresponse.ts b/src/models/components/templateresponse.ts index 042b992b..04894f27 100644 --- a/src/models/components/templateresponse.ts +++ b/src/models/components/templateresponse.ts @@ -4,20 +4,23 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TemplateResponse = { /** * Unique identifier of the workflow */ id: string; - /** - * Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen - */ - critical: boolean; /** * Name of the workflow */ name: string; + /** + * Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen + */ + critical: boolean; /** * Triggers are the events that will trigger the workflow. */ @@ -31,8 +34,8 @@ export const TemplateResponse$inboundSchema: z.ZodType< unknown > = z.object({ _id: z.string(), - critical: z.boolean(), name: z.string(), + critical: z.boolean(), triggers: z.array(z.string()), }).transform((v) => { return remap$(v, { @@ -43,8 +46,8 @@ export const TemplateResponse$inboundSchema: z.ZodType< /** @internal */ export type TemplateResponse$Outbound = { _id: string; - critical: boolean; name: string; + critical: boolean; triggers: Array; }; @@ -55,8 +58,8 @@ export const TemplateResponse$outboundSchema: z.ZodType< TemplateResponse > = z.object({ id: z.string(), - critical: z.boolean(), name: z.string(), + critical: z.boolean(), triggers: z.array(z.string()), }).transform((v) => { return remap$(v, { @@ -76,3 +79,21 @@ export namespace TemplateResponse$ { /** @deprecated use `TemplateResponse$Outbound` instead. */ export type Outbound = TemplateResponse$Outbound; } + +export function templateResponseToJSON( + templateResponse: TemplateResponse, +): string { + return JSON.stringify( + TemplateResponse$outboundSchema.parse(templateResponse), + ); +} + +export function templateResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TemplateResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TemplateResponse' from JSON`, + ); +} diff --git a/src/models/components/tenantpayloaddto.ts b/src/models/components/tenantpayloaddto.ts index 146daada..25a1ac9d 100644 --- a/src/models/components/tenantpayloaddto.ts +++ b/src/models/components/tenantpayloaddto.ts @@ -3,13 +3,16 @@ */ 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 TenantPayloadDtoData = {}; export type TenantPayloadDto = { - data?: TenantPayloadDtoData | undefined; identifier?: string | undefined; name?: string | undefined; + data?: TenantPayloadDtoData | undefined; }; /** @internal */ @@ -42,22 +45,40 @@ export namespace TenantPayloadDtoData$ { export type Outbound = TenantPayloadDtoData$Outbound; } +export function tenantPayloadDtoDataToJSON( + tenantPayloadDtoData: TenantPayloadDtoData, +): string { + return JSON.stringify( + TenantPayloadDtoData$outboundSchema.parse(tenantPayloadDtoData), + ); +} + +export function tenantPayloadDtoDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TenantPayloadDtoData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TenantPayloadDtoData' from JSON`, + ); +} + /** @internal */ export const TenantPayloadDto$inboundSchema: z.ZodType< TenantPayloadDto, z.ZodTypeDef, unknown > = z.object({ - data: z.lazy(() => TenantPayloadDtoData$inboundSchema).optional(), identifier: z.string().optional(), name: z.string().optional(), + data: z.lazy(() => TenantPayloadDtoData$inboundSchema).optional(), }); /** @internal */ export type TenantPayloadDto$Outbound = { - data?: TenantPayloadDtoData$Outbound | undefined; identifier?: string | undefined; name?: string | undefined; + data?: TenantPayloadDtoData$Outbound | undefined; }; /** @internal */ @@ -66,9 +87,9 @@ export const TenantPayloadDto$outboundSchema: z.ZodType< z.ZodTypeDef, TenantPayloadDto > = z.object({ - data: z.lazy(() => TenantPayloadDtoData$outboundSchema).optional(), identifier: z.string().optional(), name: z.string().optional(), + data: z.lazy(() => TenantPayloadDtoData$outboundSchema).optional(), }); /** @@ -83,3 +104,21 @@ export namespace TenantPayloadDto$ { /** @deprecated use `TenantPayloadDto$Outbound` instead. */ export type Outbound = TenantPayloadDto$Outbound; } + +export function tenantPayloadDtoToJSON( + tenantPayloadDto: TenantPayloadDto, +): string { + return JSON.stringify( + TenantPayloadDto$outboundSchema.parse(tenantPayloadDto), + ); +} + +export function tenantPayloadDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TenantPayloadDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TenantPayloadDto' from JSON`, + ); +} diff --git a/src/models/components/timedconfig.ts b/src/models/components/timedconfig.ts index b9cb534d..15330964 100644 --- a/src/models/components/timedconfig.ts +++ b/src/models/components/timedconfig.ts @@ -3,13 +3,21 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const MonthlyType = { - Each: "each", - On: "on", +export const WeekDays = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", } as const; -export type MonthlyType = ClosedEnum; +export type WeekDays = ClosedEnum; export const Ordinal = { One: "1", @@ -35,43 +43,38 @@ export const OrdinalValue = { } as const; export type OrdinalValue = ClosedEnum; -export const WeekDays = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", +export const MonthlyType = { + Each: "each", + On: "on", } as const; -export type WeekDays = ClosedEnum; +export type MonthlyType = ClosedEnum; export type TimedConfig = { atTime?: string | undefined; + weekDays?: Array | undefined; monthDays?: Array | undefined; - monthlyType?: MonthlyType | undefined; ordinal?: Ordinal | undefined; ordinalValue?: OrdinalValue | undefined; - weekDays?: Array | undefined; + monthlyType?: MonthlyType | undefined; }; /** @internal */ -export const MonthlyType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(MonthlyType); +export const WeekDays$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(WeekDays); /** @internal */ -export const MonthlyType$outboundSchema: z.ZodNativeEnum = - MonthlyType$inboundSchema; +export const WeekDays$outboundSchema: z.ZodNativeEnum = + WeekDays$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MonthlyType$ { - /** @deprecated use `MonthlyType$inboundSchema` instead. */ - export const inboundSchema = MonthlyType$inboundSchema; - /** @deprecated use `MonthlyType$outboundSchema` instead. */ - export const outboundSchema = MonthlyType$outboundSchema; +export namespace WeekDays$ { + /** @deprecated use `WeekDays$inboundSchema` instead. */ + export const inboundSchema = WeekDays$inboundSchema; + /** @deprecated use `WeekDays$outboundSchema` instead. */ + export const outboundSchema = WeekDays$outboundSchema; } /** @internal */ @@ -113,22 +116,22 @@ export namespace OrdinalValue$ { } /** @internal */ -export const WeekDays$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(WeekDays); +export const MonthlyType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(MonthlyType); /** @internal */ -export const WeekDays$outboundSchema: z.ZodNativeEnum = - WeekDays$inboundSchema; +export const MonthlyType$outboundSchema: z.ZodNativeEnum = + MonthlyType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace WeekDays$ { - /** @deprecated use `WeekDays$inboundSchema` instead. */ - export const inboundSchema = WeekDays$inboundSchema; - /** @deprecated use `WeekDays$outboundSchema` instead. */ - export const outboundSchema = WeekDays$outboundSchema; +export namespace MonthlyType$ { + /** @deprecated use `MonthlyType$inboundSchema` instead. */ + export const inboundSchema = MonthlyType$inboundSchema; + /** @deprecated use `MonthlyType$outboundSchema` instead. */ + export const outboundSchema = MonthlyType$outboundSchema; } /** @internal */ @@ -138,21 +141,21 @@ export const TimedConfig$inboundSchema: z.ZodType< unknown > = z.object({ atTime: z.string().optional(), + weekDays: z.array(WeekDays$inboundSchema).optional(), monthDays: z.array(z.string()).optional(), - monthlyType: MonthlyType$inboundSchema.optional(), ordinal: Ordinal$inboundSchema.optional(), ordinalValue: OrdinalValue$inboundSchema.optional(), - weekDays: z.array(WeekDays$inboundSchema).optional(), + monthlyType: MonthlyType$inboundSchema.optional(), }); /** @internal */ export type TimedConfig$Outbound = { atTime?: string | undefined; + weekDays?: Array | undefined; monthDays?: Array | undefined; - monthlyType?: string | undefined; ordinal?: string | undefined; ordinalValue?: string | undefined; - weekDays?: Array | undefined; + monthlyType?: string | undefined; }; /** @internal */ @@ -162,11 +165,11 @@ export const TimedConfig$outboundSchema: z.ZodType< TimedConfig > = z.object({ atTime: z.string().optional(), + weekDays: z.array(WeekDays$outboundSchema).optional(), monthDays: z.array(z.string()).optional(), - monthlyType: MonthlyType$outboundSchema.optional(), ordinal: Ordinal$outboundSchema.optional(), ordinalValue: OrdinalValue$outboundSchema.optional(), - weekDays: z.array(WeekDays$outboundSchema).optional(), + monthlyType: MonthlyType$outboundSchema.optional(), }); /** @@ -181,3 +184,17 @@ export namespace TimedConfig$ { /** @deprecated use `TimedConfig$Outbound` instead. */ export type Outbound = TimedConfig$Outbound; } + +export function timedConfigToJSON(timedConfig: TimedConfig): string { + return JSON.stringify(TimedConfig$outboundSchema.parse(timedConfig)); +} + +export function timedConfigFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TimedConfig$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TimedConfig' from JSON`, + ); +} diff --git a/src/models/components/topicdto.ts b/src/models/components/topicdto.ts index 0ba8c552..277aa072 100644 --- a/src/models/components/topicdto.ts +++ b/src/models/components/topicdto.ts @@ -4,11 +4,14 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TopicDto = { - environmentId: string; id?: string | undefined; organizationId: string; + environmentId: string; key: string; name: string; subscribers: Array; @@ -20,25 +23,25 @@ export const TopicDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _id: z.string().optional(), _organizationId: z.string(), + _environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_id": "id", "_organizationId": "organizationId", + "_environmentId": "environmentId", }); }); /** @internal */ export type TopicDto$Outbound = { - _environmentId: string; _id?: string | undefined; _organizationId: string; + _environmentId: string; key: string; name: string; subscribers: Array; @@ -50,17 +53,17 @@ export const TopicDto$outboundSchema: z.ZodType< z.ZodTypeDef, TopicDto > = z.object({ - environmentId: z.string(), id: z.string().optional(), organizationId: z.string(), + environmentId: z.string(), key: z.string(), name: z.string(), subscribers: z.array(z.string()), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", id: "_id", organizationId: "_organizationId", + environmentId: "_environmentId", }); }); @@ -76,3 +79,17 @@ export namespace TopicDto$ { /** @deprecated use `TopicDto$Outbound` instead. */ export type Outbound = TopicDto$Outbound; } + +export function topicDtoToJSON(topicDto: TopicDto): string { + return JSON.stringify(TopicDto$outboundSchema.parse(topicDto)); +} + +export function topicDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicDto' from JSON`, + ); +} diff --git a/src/models/components/topicpayloaddto.ts b/src/models/components/topicpayloaddto.ts index b1bc59c8..e23a509b 100644 --- a/src/models/components/topicpayloaddto.ts +++ b/src/models/components/topicpayloaddto.ts @@ -3,38 +3,40 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const TopicPayloadDtoType = { +export const Type = { Subscriber: "Subscriber", Topic: "Topic", } as const; -export type TopicPayloadDtoType = ClosedEnum; +export type Type = ClosedEnum; export type TopicPayloadDto = { topicKey: string; - type: TopicPayloadDtoType; + type: Type; }; /** @internal */ -export const TopicPayloadDtoType$inboundSchema: z.ZodNativeEnum< - typeof TopicPayloadDtoType -> = z.nativeEnum(TopicPayloadDtoType); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const TopicPayloadDtoType$outboundSchema: z.ZodNativeEnum< - typeof TopicPayloadDtoType -> = TopicPayloadDtoType$inboundSchema; +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace TopicPayloadDtoType$ { - /** @deprecated use `TopicPayloadDtoType$inboundSchema` instead. */ - export const inboundSchema = TopicPayloadDtoType$inboundSchema; - /** @deprecated use `TopicPayloadDtoType$outboundSchema` instead. */ - export const outboundSchema = TopicPayloadDtoType$outboundSchema; +export namespace Type$ { + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; } /** @internal */ @@ -44,7 +46,7 @@ export const TopicPayloadDto$inboundSchema: z.ZodType< unknown > = z.object({ topicKey: z.string(), - type: TopicPayloadDtoType$inboundSchema, + type: Type$inboundSchema, }); /** @internal */ @@ -60,7 +62,7 @@ export const TopicPayloadDto$outboundSchema: z.ZodType< TopicPayloadDto > = z.object({ topicKey: z.string(), - type: TopicPayloadDtoType$outboundSchema, + type: Type$outboundSchema, }); /** @@ -75,3 +77,19 @@ export namespace TopicPayloadDto$ { /** @deprecated use `TopicPayloadDto$Outbound` instead. */ export type Outbound = TopicPayloadDto$Outbound; } + +export function topicPayloadDtoToJSON( + topicPayloadDto: TopicPayloadDto, +): string { + return JSON.stringify(TopicPayloadDto$outboundSchema.parse(topicPayloadDto)); +} + +export function topicPayloadDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicPayloadDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicPayloadDto' from JSON`, + ); +} diff --git a/src/models/components/topicsubscriberdto.ts b/src/models/components/topicsubscriberdto.ts index 72a16f4a..974296fb 100644 --- a/src/models/components/topicsubscriberdto.ts +++ b/src/models/components/topicsubscriberdto.ts @@ -4,14 +4,17 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TopicSubscriberDto = { - environmentId: string; organizationId: string; + environmentId: string; subscriberId: string; topicId: string; - externalSubscriberId: string; topicKey: string; + externalSubscriberId: string; }; /** @internal */ @@ -20,16 +23,16 @@ export const TopicSubscriberDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - _environmentId: z.string(), _organizationId: z.string(), + _environmentId: z.string(), _subscriberId: z.string(), _topicId: z.string(), - externalSubscriberId: z.string(), topicKey: z.string(), + externalSubscriberId: z.string(), }).transform((v) => { return remap$(v, { - "_environmentId": "environmentId", "_organizationId": "organizationId", + "_environmentId": "environmentId", "_subscriberId": "subscriberId", "_topicId": "topicId", }); @@ -37,12 +40,12 @@ export const TopicSubscriberDto$inboundSchema: z.ZodType< /** @internal */ export type TopicSubscriberDto$Outbound = { - _environmentId: string; _organizationId: string; + _environmentId: string; _subscriberId: string; _topicId: string; - externalSubscriberId: string; topicKey: string; + externalSubscriberId: string; }; /** @internal */ @@ -51,16 +54,16 @@ export const TopicSubscriberDto$outboundSchema: z.ZodType< z.ZodTypeDef, TopicSubscriberDto > = z.object({ - environmentId: z.string(), organizationId: z.string(), + environmentId: z.string(), subscriberId: z.string(), topicId: z.string(), - externalSubscriberId: z.string(), topicKey: z.string(), + externalSubscriberId: z.string(), }).transform((v) => { return remap$(v, { - environmentId: "_environmentId", organizationId: "_organizationId", + environmentId: "_environmentId", subscriberId: "_subscriberId", topicId: "_topicId", }); @@ -78,3 +81,21 @@ export namespace TopicSubscriberDto$ { /** @deprecated use `TopicSubscriberDto$Outbound` instead. */ export type Outbound = TopicSubscriberDto$Outbound; } + +export function topicSubscriberDtoToJSON( + topicSubscriberDto: TopicSubscriberDto, +): string { + return JSON.stringify( + TopicSubscriberDto$outboundSchema.parse(topicSubscriberDto), + ); +} + +export function topicSubscriberDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicSubscriberDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicSubscriberDto' from JSON`, + ); +} diff --git a/src/models/components/triggereventrequestdto.ts b/src/models/components/triggereventrequestdto.ts index 608ff75e..6409a61a 100644 --- a/src/models/components/triggereventrequestdto.ts +++ b/src/models/components/triggereventrequestdto.ts @@ -3,6 +3,9 @@ */ 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"; import { SubscriberPayloadDto, SubscriberPayloadDto$inboundSchema, @@ -23,27 +26,27 @@ import { } from "./topicpayloaddto.js"; /** - * It is used to display the Avatar of the provided actor's subscriber id or actor object. + * The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. * * @remarks - * If a new actor object is provided, we will create a new subscriber in our system + * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. */ -export type Actor = SubscriberPayloadDto | string; - -export type Controls = {}; +export type Payload = {}; /** * This could be used to override provider specific configurations */ -export type TriggerEventRequestDtoOverrides = {}; +export type Overrides = {}; + +export type To = TopicPayloadDto | SubscriberPayloadDto | string; /** - * The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. + * It is used to display the Avatar of the provided actor's subscriber id or actor object. * * @remarks - * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + * If a new actor object is provided, we will create a new subscriber in our system */ -export type TriggerEventRequestDtoPayload = {}; +export type Actor = SubscriberPayloadDto | string; /** * It is used to specify a tenant context during trigger event. @@ -53,40 +56,24 @@ export type TriggerEventRequestDtoPayload = {}; */ export type Tenant = TenantPayloadDto | string; -export type To = TopicPayloadDto | SubscriberPayloadDto | string; +export type Controls = {}; export type TriggerEventRequestDto = { - /** - * It is used to display the Avatar of the provided actor's subscriber id or actor object. - * - * @remarks - * If a new actor object is provided, we will create a new subscriber in our system - */ - actor?: SubscriberPayloadDto | string | undefined; - bridgeUrl?: string | undefined; - controls?: Controls | undefined; /** * The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page. */ name: string; - /** - * This could be used to override provider specific configurations - */ - overrides?: TriggerEventRequestDtoOverrides | undefined; /** * The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. * * @remarks * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. */ - payload?: TriggerEventRequestDtoPayload | undefined; + payload?: Payload | undefined; /** - * It is used to specify a tenant context during trigger event. - * - * @remarks - * Existing tenants will be updated with the provided details. + * This could be used to override provider specific configurations */ - tenant?: TenantPayloadDto | string | undefined; + overrides?: Overrides | undefined; /** * The recipients list of people who will receive the notification. */ @@ -95,123 +82,196 @@ export type TriggerEventRequestDto = { * A unique identifier for this transaction, we will generated a UUID if not provided. */ transactionId?: string | undefined; + /** + * It is used to display the Avatar of the provided actor's subscriber id or actor object. + * + * @remarks + * If a new actor object is provided, we will create a new subscriber in our system + */ + actor?: SubscriberPayloadDto | string | undefined; + /** + * It is used to specify a tenant context during trigger event. + * + * @remarks + * Existing tenants will be updated with the provided details. + */ + tenant?: TenantPayloadDto | string | undefined; + bridgeUrl?: string | undefined; + controls?: Controls | undefined; }; /** @internal */ -export const Actor$inboundSchema: z.ZodType = z - .union([SubscriberPayloadDto$inboundSchema, z.string()]); +export const Payload$inboundSchema: z.ZodType = + z.object({}); /** @internal */ -export type Actor$Outbound = SubscriberPayloadDto$Outbound | string; +export type Payload$Outbound = {}; /** @internal */ -export const Actor$outboundSchema: z.ZodType< - Actor$Outbound, +export const Payload$outboundSchema: z.ZodType< + Payload$Outbound, z.ZodTypeDef, - Actor -> = z.union([SubscriberPayloadDto$outboundSchema, z.string()]); + Payload +> = 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 Actor$ { - /** @deprecated use `Actor$inboundSchema` instead. */ - export const inboundSchema = Actor$inboundSchema; - /** @deprecated use `Actor$outboundSchema` instead. */ - export const outboundSchema = Actor$outboundSchema; - /** @deprecated use `Actor$Outbound` instead. */ - export type Outbound = Actor$Outbound; +export namespace Payload$ { + /** @deprecated use `Payload$inboundSchema` instead. */ + export const inboundSchema = Payload$inboundSchema; + /** @deprecated use `Payload$outboundSchema` instead. */ + export const outboundSchema = Payload$outboundSchema; + /** @deprecated use `Payload$Outbound` instead. */ + export type Outbound = Payload$Outbound; +} + +export function payloadToJSON(payload: Payload): string { + return JSON.stringify(Payload$outboundSchema.parse(payload)); +} + +export function payloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Payload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Payload' from JSON`, + ); } /** @internal */ -export const Controls$inboundSchema: z.ZodType< - Controls, +export const Overrides$inboundSchema: z.ZodType< + Overrides, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type Controls$Outbound = {}; +export type Overrides$Outbound = {}; /** @internal */ -export const Controls$outboundSchema: z.ZodType< - Controls$Outbound, +export const Overrides$outboundSchema: z.ZodType< + Overrides$Outbound, z.ZodTypeDef, - Controls + Overrides > = 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 Controls$ { - /** @deprecated use `Controls$inboundSchema` instead. */ - export const inboundSchema = Controls$inboundSchema; - /** @deprecated use `Controls$outboundSchema` instead. */ - export const outboundSchema = Controls$outboundSchema; - /** @deprecated use `Controls$Outbound` instead. */ - export type Outbound = Controls$Outbound; +export namespace Overrides$ { + /** @deprecated use `Overrides$inboundSchema` instead. */ + export const inboundSchema = Overrides$inboundSchema; + /** @deprecated use `Overrides$outboundSchema` instead. */ + export const outboundSchema = Overrides$outboundSchema; + /** @deprecated use `Overrides$Outbound` instead. */ + export type Outbound = Overrides$Outbound; +} + +export function overridesToJSON(overrides: Overrides): string { + return JSON.stringify(Overrides$outboundSchema.parse(overrides)); +} + +export function overridesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Overrides$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Overrides' from JSON`, + ); } /** @internal */ -export const TriggerEventRequestDtoOverrides$inboundSchema: z.ZodType< - TriggerEventRequestDtoOverrides, - z.ZodTypeDef, - unknown -> = z.object({}); +export const To$inboundSchema: z.ZodType = z.union([ + TopicPayloadDto$inboundSchema, + SubscriberPayloadDto$inboundSchema, + z.string(), +]); /** @internal */ -export type TriggerEventRequestDtoOverrides$Outbound = {}; +export type To$Outbound = + | TopicPayloadDto$Outbound + | SubscriberPayloadDto$Outbound + | string; /** @internal */ -export const TriggerEventRequestDtoOverrides$outboundSchema: z.ZodType< - TriggerEventRequestDtoOverrides$Outbound, - z.ZodTypeDef, - TriggerEventRequestDtoOverrides -> = z.object({}); +export const To$outboundSchema: z.ZodType = z + .union([ + TopicPayloadDto$outboundSchema, + SubscriberPayloadDto$outboundSchema, + 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 TriggerEventRequestDtoOverrides$ { - /** @deprecated use `TriggerEventRequestDtoOverrides$inboundSchema` instead. */ - export const inboundSchema = TriggerEventRequestDtoOverrides$inboundSchema; - /** @deprecated use `TriggerEventRequestDtoOverrides$outboundSchema` instead. */ - export const outboundSchema = TriggerEventRequestDtoOverrides$outboundSchema; - /** @deprecated use `TriggerEventRequestDtoOverrides$Outbound` instead. */ - export type Outbound = TriggerEventRequestDtoOverrides$Outbound; +export namespace To$ { + /** @deprecated use `To$inboundSchema` instead. */ + export const inboundSchema = To$inboundSchema; + /** @deprecated use `To$outboundSchema` instead. */ + export const outboundSchema = To$outboundSchema; + /** @deprecated use `To$Outbound` instead. */ + export type Outbound = To$Outbound; +} + +export function toToJSON(to: To): string { + return JSON.stringify(To$outboundSchema.parse(to)); +} + +export function toFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => To$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'To' from JSON`, + ); } /** @internal */ -export const TriggerEventRequestDtoPayload$inboundSchema: z.ZodType< - TriggerEventRequestDtoPayload, - z.ZodTypeDef, - unknown -> = z.object({}); +export const Actor$inboundSchema: z.ZodType = z + .union([SubscriberPayloadDto$inboundSchema, z.string()]); /** @internal */ -export type TriggerEventRequestDtoPayload$Outbound = {}; +export type Actor$Outbound = SubscriberPayloadDto$Outbound | string; /** @internal */ -export const TriggerEventRequestDtoPayload$outboundSchema: z.ZodType< - TriggerEventRequestDtoPayload$Outbound, +export const Actor$outboundSchema: z.ZodType< + Actor$Outbound, z.ZodTypeDef, - TriggerEventRequestDtoPayload -> = z.object({}); + Actor +> = z.union([SubscriberPayloadDto$outboundSchema, 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 TriggerEventRequestDtoPayload$ { - /** @deprecated use `TriggerEventRequestDtoPayload$inboundSchema` instead. */ - export const inboundSchema = TriggerEventRequestDtoPayload$inboundSchema; - /** @deprecated use `TriggerEventRequestDtoPayload$outboundSchema` instead. */ - export const outboundSchema = TriggerEventRequestDtoPayload$outboundSchema; - /** @deprecated use `TriggerEventRequestDtoPayload$Outbound` instead. */ - export type Outbound = TriggerEventRequestDtoPayload$Outbound; +export namespace Actor$ { + /** @deprecated use `Actor$inboundSchema` instead. */ + export const inboundSchema = Actor$inboundSchema; + /** @deprecated use `Actor$outboundSchema` instead. */ + export const outboundSchema = Actor$outboundSchema; + /** @deprecated use `Actor$Outbound` instead. */ + export type Outbound = Actor$Outbound; +} + +export function actorToJSON(actor: Actor): string { + return JSON.stringify(Actor$outboundSchema.parse(actor)); +} + +export function actorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Actor$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Actor' from JSON`, + ); } /** @internal */ @@ -241,38 +301,62 @@ export namespace Tenant$ { export type Outbound = Tenant$Outbound; } +export function tenantToJSON(tenant: Tenant): string { + return JSON.stringify(Tenant$outboundSchema.parse(tenant)); +} + +export function tenantFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Tenant$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Tenant' from JSON`, + ); +} + /** @internal */ -export const To$inboundSchema: z.ZodType = z.union([ - TopicPayloadDto$inboundSchema, - SubscriberPayloadDto$inboundSchema, - z.string(), -]); +export const Controls$inboundSchema: z.ZodType< + Controls, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type To$Outbound = - | TopicPayloadDto$Outbound - | SubscriberPayloadDto$Outbound - | string; +export type Controls$Outbound = {}; /** @internal */ -export const To$outboundSchema: z.ZodType = z - .union([ - TopicPayloadDto$outboundSchema, - SubscriberPayloadDto$outboundSchema, - z.string(), - ]); +export const Controls$outboundSchema: z.ZodType< + Controls$Outbound, + z.ZodTypeDef, + Controls +> = 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 To$ { - /** @deprecated use `To$inboundSchema` instead. */ - export const inboundSchema = To$inboundSchema; - /** @deprecated use `To$outboundSchema` instead. */ - export const outboundSchema = To$outboundSchema; - /** @deprecated use `To$Outbound` instead. */ - export type Outbound = To$Outbound; +export namespace Controls$ { + /** @deprecated use `Controls$inboundSchema` instead. */ + export const inboundSchema = Controls$inboundSchema; + /** @deprecated use `Controls$outboundSchema` instead. */ + export const outboundSchema = Controls$outboundSchema; + /** @deprecated use `Controls$Outbound` instead. */ + export type Outbound = Controls$Outbound; +} + +export function controlsToJSON(controls: Controls): string { + return JSON.stringify(Controls$outboundSchema.parse(controls)); +} + +export function controlsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Controls$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Controls' from JSON`, + ); } /** @internal */ @@ -281,14 +365,9 @@ export const TriggerEventRequestDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - actor: z.union([SubscriberPayloadDto$inboundSchema, z.string()]).optional(), - bridgeUrl: z.string().optional(), - controls: z.lazy(() => Controls$inboundSchema).optional(), name: z.string(), - overrides: z.lazy(() => TriggerEventRequestDtoOverrides$inboundSchema) - .optional(), - payload: z.lazy(() => TriggerEventRequestDtoPayload$inboundSchema).optional(), - tenant: z.union([TenantPayloadDto$inboundSchema, z.string()]).optional(), + payload: z.lazy(() => Payload$inboundSchema).optional(), + overrides: z.lazy(() => Overrides$inboundSchema).optional(), to: z.array( z.union([ TopicPayloadDto$inboundSchema, @@ -297,19 +376,23 @@ export const TriggerEventRequestDto$inboundSchema: z.ZodType< ]), ), transactionId: z.string().optional(), + actor: z.union([SubscriberPayloadDto$inboundSchema, z.string()]).optional(), + tenant: z.union([TenantPayloadDto$inboundSchema, z.string()]).optional(), + bridgeUrl: z.string().optional(), + controls: z.lazy(() => Controls$inboundSchema).optional(), }); /** @internal */ export type TriggerEventRequestDto$Outbound = { - actor?: SubscriberPayloadDto$Outbound | string | undefined; - bridgeUrl?: string | undefined; - controls?: Controls$Outbound | undefined; name: string; - overrides?: TriggerEventRequestDtoOverrides$Outbound | undefined; - payload?: TriggerEventRequestDtoPayload$Outbound | undefined; - tenant?: TenantPayloadDto$Outbound | string | undefined; + payload?: Payload$Outbound | undefined; + overrides?: Overrides$Outbound | undefined; to: Array; transactionId?: string | undefined; + actor?: SubscriberPayloadDto$Outbound | string | undefined; + tenant?: TenantPayloadDto$Outbound | string | undefined; + bridgeUrl?: string | undefined; + controls?: Controls$Outbound | undefined; }; /** @internal */ @@ -318,15 +401,9 @@ export const TriggerEventRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, TriggerEventRequestDto > = z.object({ - actor: z.union([SubscriberPayloadDto$outboundSchema, z.string()]).optional(), - bridgeUrl: z.string().optional(), - controls: z.lazy(() => Controls$outboundSchema).optional(), name: z.string(), - overrides: z.lazy(() => TriggerEventRequestDtoOverrides$outboundSchema) - .optional(), - payload: z.lazy(() => TriggerEventRequestDtoPayload$outboundSchema) - .optional(), - tenant: z.union([TenantPayloadDto$outboundSchema, z.string()]).optional(), + payload: z.lazy(() => Payload$outboundSchema).optional(), + overrides: z.lazy(() => Overrides$outboundSchema).optional(), to: z.array( z.union([ TopicPayloadDto$outboundSchema, @@ -335,6 +412,10 @@ export const TriggerEventRequestDto$outboundSchema: z.ZodType< ]), ), transactionId: z.string().optional(), + actor: z.union([SubscriberPayloadDto$outboundSchema, z.string()]).optional(), + tenant: z.union([TenantPayloadDto$outboundSchema, z.string()]).optional(), + bridgeUrl: z.string().optional(), + controls: z.lazy(() => Controls$outboundSchema).optional(), }); /** @@ -349,3 +430,21 @@ export namespace TriggerEventRequestDto$ { /** @deprecated use `TriggerEventRequestDto$Outbound` instead. */ export type Outbound = TriggerEventRequestDto$Outbound; } + +export function triggerEventRequestDtoToJSON( + triggerEventRequestDto: TriggerEventRequestDto, +): string { + return JSON.stringify( + TriggerEventRequestDto$outboundSchema.parse(triggerEventRequestDto), + ); +} + +export function triggerEventRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TriggerEventRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventRequestDto' from JSON`, + ); +} diff --git a/src/models/components/triggereventresponsedto.ts b/src/models/components/triggereventresponsedto.ts index 5192c411..e29dd9df 100644 --- a/src/models/components/triggereventresponsedto.ts +++ b/src/models/components/triggereventresponsedto.ts @@ -3,7 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Status for trigger @@ -29,14 +32,14 @@ export type TriggerEventResponseDto = { * If trigger was acknowledged or not */ acknowledged: boolean; - /** - * In case of an error, this field will contain the error message - */ - error?: Array | undefined; /** * Status for trigger */ status: TriggerEventResponseDtoStatus; + /** + * In case of an error, this field will contain the error message + */ + error?: Array | undefined; /** * Transaction id for trigger */ @@ -71,16 +74,16 @@ export const TriggerEventResponseDto$inboundSchema: z.ZodType< unknown > = z.object({ acknowledged: z.boolean(), - error: z.array(z.string()).optional(), status: TriggerEventResponseDtoStatus$inboundSchema, + error: z.array(z.string()).optional(), transactionId: z.string().optional(), }); /** @internal */ export type TriggerEventResponseDto$Outbound = { acknowledged: boolean; - error?: Array | undefined; status: string; + error?: Array | undefined; transactionId?: string | undefined; }; @@ -91,8 +94,8 @@ export const TriggerEventResponseDto$outboundSchema: z.ZodType< TriggerEventResponseDto > = z.object({ acknowledged: z.boolean(), - error: z.array(z.string()).optional(), status: TriggerEventResponseDtoStatus$outboundSchema, + error: z.array(z.string()).optional(), transactionId: z.string().optional(), }); @@ -108,3 +111,21 @@ export namespace TriggerEventResponseDto$ { /** @deprecated use `TriggerEventResponseDto$Outbound` instead. */ export type Outbound = TriggerEventResponseDto$Outbound; } + +export function triggerEventResponseDtoToJSON( + triggerEventResponseDto: TriggerEventResponseDto, +): string { + return JSON.stringify( + TriggerEventResponseDto$outboundSchema.parse(triggerEventResponseDto), + ); +} + +export function triggerEventResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TriggerEventResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventResponseDto' from JSON`, + ); +} diff --git a/src/models/components/triggereventtoallrequestdto.ts b/src/models/components/triggereventtoallrequestdto.ts index 37525eed..991659bb 100644 --- a/src/models/components/triggereventtoallrequestdto.ts +++ b/src/models/components/triggereventtoallrequestdto.ts @@ -3,6 +3,9 @@ */ 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"; import { SubscriberPayloadDto, SubscriberPayloadDto$inboundSchema, @@ -17,12 +20,12 @@ import { } from "./tenantpayloaddto.js"; /** - * It is used to display the Avatar of the provided actor's subscriber id or actor object. + * The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. * * @remarks - * If a new actor object is provided, we will create a new subscriber in our system + * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. */ -export type TriggerEventToAllRequestDtoActor = SubscriberPayloadDto | string; +export type TriggerEventToAllRequestDtoPayload = {}; /** * This could be used to override provider specific configurations @@ -30,12 +33,12 @@ export type TriggerEventToAllRequestDtoActor = SubscriberPayloadDto | string; export type TriggerEventToAllRequestDtoOverrides = {}; /** - * The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. + * It is used to display the Avatar of the provided actor's subscriber id or actor object. * * @remarks - * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + * If a new actor object is provided, we will create a new subscriber in our system */ -export type TriggerEventToAllRequestDtoPayload = {}; +export type TriggerEventToAllRequestDtoActor = SubscriberPayloadDto | string; /** * It is used to specify a tenant context during trigger event. @@ -46,28 +49,32 @@ export type TriggerEventToAllRequestDtoPayload = {}; export type TriggerEventToAllRequestDtoTenant = TenantPayloadDto | string; export type TriggerEventToAllRequestDto = { - /** - * It is used to display the Avatar of the provided actor's subscriber id or actor object. - * - * @remarks - * If a new actor object is provided, we will create a new subscriber in our system - */ - actor?: SubscriberPayloadDto | string | undefined; /** * The trigger identifier associated for the template you wish to send. This identifier can be found on the template page. */ name: string; + /** + * The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. + * + * @remarks + * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + */ + payload: TriggerEventToAllRequestDtoPayload; /** * This could be used to override provider specific configurations */ overrides?: TriggerEventToAllRequestDtoOverrides | undefined; /** - * The payload object is used to pass additional custom information that could be used to render the template, or perform routing rules based on it. + * A unique identifier for this transaction, we will generated a UUID if not provided. + */ + transactionId?: string | undefined; + /** + * It is used to display the Avatar of the provided actor's subscriber id or actor object. * * @remarks - * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + * If a new actor object is provided, we will create a new subscriber in our system */ - payload: TriggerEventToAllRequestDtoPayload; + actor?: SubscriberPayloadDto | string | undefined; /** * It is used to specify a tenant context during trigger event. * @@ -75,42 +82,58 @@ export type TriggerEventToAllRequestDto = { * If a new tenant object is provided, we will create a new tenant. */ tenant?: TenantPayloadDto | string | undefined; - /** - * A unique identifier for this transaction, we will generated a UUID if not provided. - */ - transactionId?: string | undefined; }; /** @internal */ -export const TriggerEventToAllRequestDtoActor$inboundSchema: z.ZodType< - TriggerEventToAllRequestDtoActor, +export const TriggerEventToAllRequestDtoPayload$inboundSchema: z.ZodType< + TriggerEventToAllRequestDtoPayload, z.ZodTypeDef, unknown -> = z.union([SubscriberPayloadDto$inboundSchema, z.string()]); +> = z.object({}); /** @internal */ -export type TriggerEventToAllRequestDtoActor$Outbound = - | SubscriberPayloadDto$Outbound - | string; +export type TriggerEventToAllRequestDtoPayload$Outbound = {}; /** @internal */ -export const TriggerEventToAllRequestDtoActor$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoActor$Outbound, +export const TriggerEventToAllRequestDtoPayload$outboundSchema: z.ZodType< + TriggerEventToAllRequestDtoPayload$Outbound, z.ZodTypeDef, - TriggerEventToAllRequestDtoActor -> = z.union([SubscriberPayloadDto$outboundSchema, z.string()]); + TriggerEventToAllRequestDtoPayload +> = 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 TriggerEventToAllRequestDtoActor$ { - /** @deprecated use `TriggerEventToAllRequestDtoActor$inboundSchema` instead. */ - export const inboundSchema = TriggerEventToAllRequestDtoActor$inboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoActor$outboundSchema` instead. */ - export const outboundSchema = TriggerEventToAllRequestDtoActor$outboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoActor$Outbound` instead. */ - export type Outbound = TriggerEventToAllRequestDtoActor$Outbound; +export namespace TriggerEventToAllRequestDtoPayload$ { + /** @deprecated use `TriggerEventToAllRequestDtoPayload$inboundSchema` instead. */ + export const inboundSchema = TriggerEventToAllRequestDtoPayload$inboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoPayload$outboundSchema` instead. */ + export const outboundSchema = + TriggerEventToAllRequestDtoPayload$outboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoPayload$Outbound` instead. */ + export type Outbound = TriggerEventToAllRequestDtoPayload$Outbound; +} + +export function triggerEventToAllRequestDtoPayloadToJSON( + triggerEventToAllRequestDtoPayload: TriggerEventToAllRequestDtoPayload, +): string { + return JSON.stringify( + TriggerEventToAllRequestDtoPayload$outboundSchema.parse( + triggerEventToAllRequestDtoPayload, + ), + ); +} + +export function triggerEventToAllRequestDtoPayloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TriggerEventToAllRequestDtoPayload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventToAllRequestDtoPayload' from JSON`, + ); } /** @internal */ @@ -145,35 +168,77 @@ export namespace TriggerEventToAllRequestDtoOverrides$ { export type Outbound = TriggerEventToAllRequestDtoOverrides$Outbound; } +export function triggerEventToAllRequestDtoOverridesToJSON( + triggerEventToAllRequestDtoOverrides: TriggerEventToAllRequestDtoOverrides, +): string { + return JSON.stringify( + TriggerEventToAllRequestDtoOverrides$outboundSchema.parse( + triggerEventToAllRequestDtoOverrides, + ), + ); +} + +export function triggerEventToAllRequestDtoOverridesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TriggerEventToAllRequestDtoOverrides$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventToAllRequestDtoOverrides' from JSON`, + ); +} + /** @internal */ -export const TriggerEventToAllRequestDtoPayload$inboundSchema: z.ZodType< - TriggerEventToAllRequestDtoPayload, +export const TriggerEventToAllRequestDtoActor$inboundSchema: z.ZodType< + TriggerEventToAllRequestDtoActor, z.ZodTypeDef, unknown -> = z.object({}); +> = z.union([SubscriberPayloadDto$inboundSchema, z.string()]); /** @internal */ -export type TriggerEventToAllRequestDtoPayload$Outbound = {}; +export type TriggerEventToAllRequestDtoActor$Outbound = + | SubscriberPayloadDto$Outbound + | string; /** @internal */ -export const TriggerEventToAllRequestDtoPayload$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoPayload$Outbound, +export const TriggerEventToAllRequestDtoActor$outboundSchema: z.ZodType< + TriggerEventToAllRequestDtoActor$Outbound, z.ZodTypeDef, - TriggerEventToAllRequestDtoPayload -> = z.object({}); + TriggerEventToAllRequestDtoActor +> = z.union([SubscriberPayloadDto$outboundSchema, 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 TriggerEventToAllRequestDtoPayload$ { - /** @deprecated use `TriggerEventToAllRequestDtoPayload$inboundSchema` instead. */ - export const inboundSchema = TriggerEventToAllRequestDtoPayload$inboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoPayload$outboundSchema` instead. */ - export const outboundSchema = - TriggerEventToAllRequestDtoPayload$outboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoPayload$Outbound` instead. */ - export type Outbound = TriggerEventToAllRequestDtoPayload$Outbound; +export namespace TriggerEventToAllRequestDtoActor$ { + /** @deprecated use `TriggerEventToAllRequestDtoActor$inboundSchema` instead. */ + export const inboundSchema = TriggerEventToAllRequestDtoActor$inboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoActor$outboundSchema` instead. */ + export const outboundSchema = TriggerEventToAllRequestDtoActor$outboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoActor$Outbound` instead. */ + export type Outbound = TriggerEventToAllRequestDtoActor$Outbound; +} + +export function triggerEventToAllRequestDtoActorToJSON( + triggerEventToAllRequestDtoActor: TriggerEventToAllRequestDtoActor, +): string { + return JSON.stringify( + TriggerEventToAllRequestDtoActor$outboundSchema.parse( + triggerEventToAllRequestDtoActor, + ), + ); +} + +export function triggerEventToAllRequestDtoActorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TriggerEventToAllRequestDtoActor$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventToAllRequestDtoActor' from JSON`, + ); } /** @internal */ @@ -209,29 +274,49 @@ export namespace TriggerEventToAllRequestDtoTenant$ { export type Outbound = TriggerEventToAllRequestDtoTenant$Outbound; } +export function triggerEventToAllRequestDtoTenantToJSON( + triggerEventToAllRequestDtoTenant: TriggerEventToAllRequestDtoTenant, +): string { + return JSON.stringify( + TriggerEventToAllRequestDtoTenant$outboundSchema.parse( + triggerEventToAllRequestDtoTenant, + ), + ); +} + +export function triggerEventToAllRequestDtoTenantFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TriggerEventToAllRequestDtoTenant$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventToAllRequestDtoTenant' from JSON`, + ); +} + /** @internal */ export const TriggerEventToAllRequestDto$inboundSchema: z.ZodType< TriggerEventToAllRequestDto, z.ZodTypeDef, unknown > = z.object({ - actor: z.union([SubscriberPayloadDto$inboundSchema, z.string()]).optional(), name: z.string(), + payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$inboundSchema), overrides: z.lazy(() => TriggerEventToAllRequestDtoOverrides$inboundSchema) .optional(), - payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$inboundSchema), - tenant: z.union([TenantPayloadDto$inboundSchema, z.string()]).optional(), transactionId: z.string().optional(), + actor: z.union([SubscriberPayloadDto$inboundSchema, z.string()]).optional(), + tenant: z.union([TenantPayloadDto$inboundSchema, z.string()]).optional(), }); /** @internal */ export type TriggerEventToAllRequestDto$Outbound = { - actor?: SubscriberPayloadDto$Outbound | string | undefined; name: string; - overrides?: TriggerEventToAllRequestDtoOverrides$Outbound | undefined; payload: TriggerEventToAllRequestDtoPayload$Outbound; - tenant?: TenantPayloadDto$Outbound | string | undefined; + overrides?: TriggerEventToAllRequestDtoOverrides$Outbound | undefined; transactionId?: string | undefined; + actor?: SubscriberPayloadDto$Outbound | string | undefined; + tenant?: TenantPayloadDto$Outbound | string | undefined; }; /** @internal */ @@ -240,13 +325,13 @@ export const TriggerEventToAllRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, TriggerEventToAllRequestDto > = z.object({ - actor: z.union([SubscriberPayloadDto$outboundSchema, z.string()]).optional(), name: z.string(), + payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$outboundSchema), overrides: z.lazy(() => TriggerEventToAllRequestDtoOverrides$outboundSchema) .optional(), - payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$outboundSchema), - tenant: z.union([TenantPayloadDto$outboundSchema, z.string()]).optional(), transactionId: z.string().optional(), + actor: z.union([SubscriberPayloadDto$outboundSchema, z.string()]).optional(), + tenant: z.union([TenantPayloadDto$outboundSchema, z.string()]).optional(), }); /** @@ -261,3 +346,23 @@ export namespace TriggerEventToAllRequestDto$ { /** @deprecated use `TriggerEventToAllRequestDto$Outbound` instead. */ export type Outbound = TriggerEventToAllRequestDto$Outbound; } + +export function triggerEventToAllRequestDtoToJSON( + triggerEventToAllRequestDto: TriggerEventToAllRequestDto, +): string { + return JSON.stringify( + TriggerEventToAllRequestDto$outboundSchema.parse( + triggerEventToAllRequestDto, + ), + ); +} + +export function triggerEventToAllRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TriggerEventToAllRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TriggerEventToAllRequestDto' from JSON`, + ); +} diff --git a/src/models/components/unseencountresponse.ts b/src/models/components/unseencountresponse.ts index 23ee2b60..9964517e 100644 --- a/src/models/components/unseencountresponse.ts +++ b/src/models/components/unseencountresponse.ts @@ -3,6 +3,9 @@ */ 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 UnseenCountResponse = { count: number; @@ -43,3 +46,21 @@ export namespace UnseenCountResponse$ { /** @deprecated use `UnseenCountResponse$Outbound` instead. */ export type Outbound = UnseenCountResponse$Outbound; } + +export function unseenCountResponseToJSON( + unseenCountResponse: UnseenCountResponse, +): string { + return JSON.stringify( + UnseenCountResponse$outboundSchema.parse(unseenCountResponse), + ); +} + +export function unseenCountResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UnseenCountResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnseenCountResponse' from JSON`, + ); +} diff --git a/src/models/components/updatebrandingdetailsdto.ts b/src/models/components/updatebrandingdetailsdto.ts deleted file mode 100644 index c86e70b7..00000000 --- a/src/models/components/updatebrandingdetailsdto.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type UpdateBrandingDetailsDto = { - color: string; - contentBackground: string; - fontColor: string; - fontFamily?: string | undefined; - logo: string; -}; - -/** @internal */ -export const UpdateBrandingDetailsDto$inboundSchema: z.ZodType< - UpdateBrandingDetailsDto, - z.ZodTypeDef, - unknown -> = z.object({ - color: z.string(), - contentBackground: z.string(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: z.string(), -}); - -/** @internal */ -export type UpdateBrandingDetailsDto$Outbound = { - color: string; - contentBackground: string; - fontColor: string; - fontFamily?: string | undefined; - logo: string; -}; - -/** @internal */ -export const UpdateBrandingDetailsDto$outboundSchema: z.ZodType< - UpdateBrandingDetailsDto$Outbound, - z.ZodTypeDef, - UpdateBrandingDetailsDto -> = z.object({ - color: z.string(), - contentBackground: z.string(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: 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 UpdateBrandingDetailsDto$ { - /** @deprecated use `UpdateBrandingDetailsDto$inboundSchema` instead. */ - export const inboundSchema = UpdateBrandingDetailsDto$inboundSchema; - /** @deprecated use `UpdateBrandingDetailsDto$outboundSchema` instead. */ - export const outboundSchema = UpdateBrandingDetailsDto$outboundSchema; - /** @deprecated use `UpdateBrandingDetailsDto$Outbound` instead. */ - export type Outbound = UpdateBrandingDetailsDto$Outbound; -} diff --git a/src/models/components/updateintegrationrequestdto.ts b/src/models/components/updateintegrationrequestdto.ts index f26e006f..690ac742 100644 --- a/src/models/components/updateintegrationrequestdto.ts +++ b/src/models/components/updateintegrationrequestdto.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CredentialsDto, CredentialsDto$inboundSchema, @@ -18,20 +21,20 @@ import { } from "./stepfilter.js"; export type UpdateIntegrationRequestDto = { + name?: string | undefined; + identifier?: string | undefined; environmentId?: string | undefined; /** * If the integration is active the validation on the credentials field will run */ active?: boolean | undefined; - check?: boolean | undefined; - conditions?: Array | undefined; credentials?: CredentialsDto | undefined; - identifier?: string | undefined; - name?: string | undefined; /** * If true, the Novu branding will be removed from the Inbox component */ removeNovuBranding?: boolean | undefined; + check?: boolean | undefined; + conditions?: Array | undefined; }; /** @internal */ @@ -40,14 +43,14 @@ export const UpdateIntegrationRequestDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + name: z.string().optional(), + identifier: z.string().optional(), _environmentId: z.string().optional(), active: z.boolean().optional(), - check: z.boolean().optional(), - conditions: z.array(StepFilter$inboundSchema).optional(), credentials: CredentialsDto$inboundSchema.optional(), - identifier: z.string().optional(), - name: z.string().optional(), removeNovuBranding: z.boolean().optional(), + check: z.boolean().optional(), + conditions: z.array(StepFilter$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "_environmentId": "environmentId", @@ -56,14 +59,14 @@ export const UpdateIntegrationRequestDto$inboundSchema: z.ZodType< /** @internal */ export type UpdateIntegrationRequestDto$Outbound = { + name?: string | undefined; + identifier?: string | undefined; _environmentId?: string | undefined; active?: boolean | undefined; - check?: boolean | undefined; - conditions?: Array | undefined; credentials?: CredentialsDto$Outbound | undefined; - identifier?: string | undefined; - name?: string | undefined; removeNovuBranding?: boolean | undefined; + check?: boolean | undefined; + conditions?: Array | undefined; }; /** @internal */ @@ -72,14 +75,14 @@ export const UpdateIntegrationRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateIntegrationRequestDto > = z.object({ + name: z.string().optional(), + identifier: z.string().optional(), environmentId: z.string().optional(), active: z.boolean().optional(), - check: z.boolean().optional(), - conditions: z.array(StepFilter$outboundSchema).optional(), credentials: CredentialsDto$outboundSchema.optional(), - identifier: z.string().optional(), - name: z.string().optional(), removeNovuBranding: z.boolean().optional(), + check: z.boolean().optional(), + conditions: z.array(StepFilter$outboundSchema).optional(), }).transform((v) => { return remap$(v, { environmentId: "_environmentId", @@ -98,3 +101,23 @@ export namespace UpdateIntegrationRequestDto$ { /** @deprecated use `UpdateIntegrationRequestDto$Outbound` instead. */ export type Outbound = UpdateIntegrationRequestDto$Outbound; } + +export function updateIntegrationRequestDtoToJSON( + updateIntegrationRequestDto: UpdateIntegrationRequestDto, +): string { + return JSON.stringify( + UpdateIntegrationRequestDto$outboundSchema.parse( + updateIntegrationRequestDto, + ), + ); +} + +export function updateIntegrationRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIntegrationRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIntegrationRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatelayoutrequestdto.ts b/src/models/components/updatelayoutrequestdto.ts deleted file mode 100644 index dc810739..00000000 --- a/src/models/components/updatelayoutrequestdto.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -/** - * User defined variables to render in the layout placeholders. - */ -export type Variables = {}; - -export type UpdateLayoutRequestDto = { - /** - * User defined content for the layout. - */ - content?: string | undefined; - /** - * User defined description of the layout - */ - description?: string | undefined; - /** - * User defined custom key that will be a unique identifier for the Layout updated. - */ - identifier: string; - /** - * Variable that defines if the layout is chosen as default when creating a layout. - */ - isDefault?: boolean | undefined; - /** - * User defined custom name and provided by the user that will name the Layout updated. - */ - name?: string | undefined; - /** - * User defined variables to render in the layout placeholders. - */ - variables?: Variables | undefined; -}; - -/** @internal */ -export const Variables$inboundSchema: z.ZodType< - Variables, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type Variables$Outbound = {}; - -/** @internal */ -export const Variables$outboundSchema: z.ZodType< - Variables$Outbound, - z.ZodTypeDef, - Variables -> = 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 Variables$ { - /** @deprecated use `Variables$inboundSchema` instead. */ - export const inboundSchema = Variables$inboundSchema; - /** @deprecated use `Variables$outboundSchema` instead. */ - export const outboundSchema = Variables$outboundSchema; - /** @deprecated use `Variables$Outbound` instead. */ - export type Outbound = Variables$Outbound; -} - -/** @internal */ -export const UpdateLayoutRequestDto$inboundSchema: z.ZodType< - UpdateLayoutRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - content: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean().optional(), - name: z.string().optional(), - variables: z.lazy(() => Variables$inboundSchema).optional(), -}); - -/** @internal */ -export type UpdateLayoutRequestDto$Outbound = { - content?: string | undefined; - description?: string | undefined; - identifier: string; - isDefault?: boolean | undefined; - name?: string | undefined; - variables?: Variables$Outbound | undefined; -}; - -/** @internal */ -export const UpdateLayoutRequestDto$outboundSchema: z.ZodType< - UpdateLayoutRequestDto$Outbound, - z.ZodTypeDef, - UpdateLayoutRequestDto -> = z.object({ - content: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean().optional(), - name: z.string().optional(), - variables: z.lazy(() => Variables$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateLayoutRequestDto$ { - /** @deprecated use `UpdateLayoutRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateLayoutRequestDto$inboundSchema; - /** @deprecated use `UpdateLayoutRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateLayoutRequestDto$outboundSchema; - /** @deprecated use `UpdateLayoutRequestDto$Outbound` instead. */ - export type Outbound = UpdateLayoutRequestDto$Outbound; -} diff --git a/src/models/components/updatelayoutresponsedto.ts b/src/models/components/updatelayoutresponsedto.ts deleted file mode 100644 index 194cd34b..00000000 --- a/src/models/components/updatelayoutresponsedto.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { ClosedEnum } from "../../types/enums.js"; - -export const UpdateLayoutResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", -} as const; -export type UpdateLayoutResponseDtoChannel = ClosedEnum< - typeof UpdateLayoutResponseDtoChannel ->; - -export type UpdateLayoutResponseDto = { - creatorId: string; - environmentId: string; - id?: string | undefined; - organizationId: string; - parentId?: string | undefined; - channel: UpdateLayoutResponseDtoChannel; - content: string; - contentType: string; - createdAt?: string | undefined; - description?: string | undefined; - identifier: string; - isDefault: boolean; - isDeleted: boolean; - name: string; - updatedAt?: string | undefined; - variables?: Array | undefined; -}; - -/** @internal */ -export const UpdateLayoutResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof UpdateLayoutResponseDtoChannel -> = z.nativeEnum(UpdateLayoutResponseDtoChannel); - -/** @internal */ -export const UpdateLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof UpdateLayoutResponseDtoChannel -> = UpdateLayoutResponseDtoChannel$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateLayoutResponseDtoChannel$ { - /** @deprecated use `UpdateLayoutResponseDtoChannel$inboundSchema` instead. */ - export const inboundSchema = UpdateLayoutResponseDtoChannel$inboundSchema; - /** @deprecated use `UpdateLayoutResponseDtoChannel$outboundSchema` instead. */ - export const outboundSchema = UpdateLayoutResponseDtoChannel$outboundSchema; -} - -/** @internal */ -export const UpdateLayoutResponseDto$inboundSchema: z.ZodType< - UpdateLayoutResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _creatorId: z.string(), - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string().optional(), - channel: UpdateLayoutResponseDtoChannel$inboundSchema, - content: z.string(), - contentType: z.string(), - createdAt: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean(), - isDeleted: z.boolean(), - name: z.string(), - updatedAt: z.string().optional(), - variables: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "_creatorId": "creatorId", - "_environmentId": "environmentId", - "_id": "id", - "_organizationId": "organizationId", - "_parentId": "parentId", - }); -}); - -/** @internal */ -export type UpdateLayoutResponseDto$Outbound = { - _creatorId: string; - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - _parentId?: string | undefined; - channel: string; - content: string; - contentType: string; - createdAt?: string | undefined; - description?: string | undefined; - identifier: string; - isDefault: boolean; - isDeleted: boolean; - name: string; - updatedAt?: string | undefined; - variables?: Array | undefined; -}; - -/** @internal */ -export const UpdateLayoutResponseDto$outboundSchema: z.ZodType< - UpdateLayoutResponseDto$Outbound, - z.ZodTypeDef, - UpdateLayoutResponseDto -> = z.object({ - creatorId: z.string(), - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string().optional(), - channel: UpdateLayoutResponseDtoChannel$outboundSchema, - content: z.string(), - contentType: z.string(), - createdAt: z.string().optional(), - description: z.string().optional(), - identifier: z.string(), - isDefault: z.boolean(), - isDeleted: z.boolean(), - name: z.string(), - updatedAt: z.string().optional(), - variables: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - creatorId: "_creatorId", - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateLayoutResponseDto$ { - /** @deprecated use `UpdateLayoutResponseDto$inboundSchema` instead. */ - export const inboundSchema = UpdateLayoutResponseDto$inboundSchema; - /** @deprecated use `UpdateLayoutResponseDto$outboundSchema` instead. */ - export const outboundSchema = UpdateLayoutResponseDto$outboundSchema; - /** @deprecated use `UpdateLayoutResponseDto$Outbound` instead. */ - export type Outbound = UpdateLayoutResponseDto$Outbound; -} diff --git a/src/models/components/updatesubscriberchannelrequestdto.ts b/src/models/components/updatesubscriberchannelrequestdto.ts index 8ff74839..92418867 100644 --- a/src/models/components/updatesubscriberchannelrequestdto.ts +++ b/src/models/components/updatesubscriberchannelrequestdto.ts @@ -3,6 +3,10 @@ */ import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChannelCredentials, ChannelCredentials$inboundSchema, @@ -10,37 +14,89 @@ import { ChannelCredentials$outboundSchema, } from "./channelcredentials.js"; +/** + * The provider identifier for the credentials + */ +export const UpdateSubscriberChannelRequestDtoProviderId = { + Slack: "slack", + Discord: "discord", + Msteams: "msteams", + Mattermost: "mattermost", + Ryver: "ryver", + Zulip: "zulip", + GrafanaOnCall: "grafana-on-call", + Getstream: "getstream", + RocketChat: "rocket-chat", + WhatsappBusiness: "whatsapp-business", + Fcm: "fcm", + Apns: "apns", + Expo: "expo", + OneSignal: "one-signal", + Pushpad: "pushpad", + PushWebhook: "push-webhook", + PusherBeams: "pusher-beams", +} as const; +/** + * The provider identifier for the credentials + */ +export type UpdateSubscriberChannelRequestDtoProviderId = ClosedEnum< + typeof UpdateSubscriberChannelRequestDtoProviderId +>; + export type UpdateSubscriberChannelRequestDto = { /** - * Credentials payload for the specified provider + * The provider identifier for the credentials */ - credentials: ChannelCredentials; + providerId: UpdateSubscriberChannelRequestDtoProviderId; /** * The integration identifier */ integrationIdentifier?: string | undefined; /** - * The provider identifier for the credentials + * Credentials payload for the specified provider */ - providerId: number; + credentials: ChannelCredentials; }; +/** @internal */ +export const UpdateSubscriberChannelRequestDtoProviderId$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateSubscriberChannelRequestDtoProviderId); + +/** @internal */ +export const UpdateSubscriberChannelRequestDtoProviderId$outboundSchema: + z.ZodNativeEnum = + UpdateSubscriberChannelRequestDtoProviderId$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSubscriberChannelRequestDtoProviderId$ { + /** @deprecated use `UpdateSubscriberChannelRequestDtoProviderId$inboundSchema` instead. */ + export const inboundSchema = + UpdateSubscriberChannelRequestDtoProviderId$inboundSchema; + /** @deprecated use `UpdateSubscriberChannelRequestDtoProviderId$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberChannelRequestDtoProviderId$outboundSchema; +} + /** @internal */ export const UpdateSubscriberChannelRequestDto$inboundSchema: z.ZodType< UpdateSubscriberChannelRequestDto, z.ZodTypeDef, unknown > = z.object({ - credentials: ChannelCredentials$inboundSchema, + providerId: UpdateSubscriberChannelRequestDtoProviderId$inboundSchema, integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$inboundSchema, }); /** @internal */ export type UpdateSubscriberChannelRequestDto$Outbound = { - credentials: ChannelCredentials$Outbound; + providerId: string; integrationIdentifier?: string | undefined; - providerId: number; + credentials: ChannelCredentials$Outbound; }; /** @internal */ @@ -49,9 +105,9 @@ export const UpdateSubscriberChannelRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateSubscriberChannelRequestDto > = z.object({ - credentials: ChannelCredentials$outboundSchema, + providerId: UpdateSubscriberChannelRequestDtoProviderId$outboundSchema, integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$outboundSchema, }); /** @@ -67,3 +123,23 @@ export namespace UpdateSubscriberChannelRequestDto$ { /** @deprecated use `UpdateSubscriberChannelRequestDto$Outbound` instead. */ export type Outbound = UpdateSubscriberChannelRequestDto$Outbound; } + +export function updateSubscriberChannelRequestDtoToJSON( + updateSubscriberChannelRequestDto: UpdateSubscriberChannelRequestDto, +): string { + return JSON.stringify( + UpdateSubscriberChannelRequestDto$outboundSchema.parse( + updateSubscriberChannelRequestDto, + ), + ); +} + +export function updateSubscriberChannelRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSubscriberChannelRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberChannelRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts b/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts index 67d0fc82..b00510e0 100644 --- a/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts +++ b/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts @@ -3,6 +3,9 @@ */ 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"; import { ChannelPreference, ChannelPreference$inboundSchema, @@ -63,3 +66,30 @@ export namespace UpdateSubscriberGlobalPreferencesRequestDto$ { /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$Outbound` instead. */ export type Outbound = UpdateSubscriberGlobalPreferencesRequestDto$Outbound; } + +export function updateSubscriberGlobalPreferencesRequestDtoToJSON( + updateSubscriberGlobalPreferencesRequestDto: + UpdateSubscriberGlobalPreferencesRequestDto, +): string { + return JSON.stringify( + UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema.parse( + updateSubscriberGlobalPreferencesRequestDto, + ), + ); +} + +export function updateSubscriberGlobalPreferencesRequestDtoFromJSON( + jsonString: string, +): SafeParseResult< + UpdateSubscriberGlobalPreferencesRequestDto, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateSubscriberGlobalPreferencesRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatesubscriberonlineflagrequestdto.ts b/src/models/components/updatesubscriberonlineflagrequestdto.ts index 0008604f..5e3da370 100644 --- a/src/models/components/updatesubscriberonlineflagrequestdto.ts +++ b/src/models/components/updatesubscriberonlineflagrequestdto.ts @@ -3,6 +3,9 @@ */ 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 UpdateSubscriberOnlineFlagRequestDto = { isOnline: boolean; @@ -45,3 +48,24 @@ export namespace UpdateSubscriberOnlineFlagRequestDto$ { /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$Outbound` instead. */ export type Outbound = UpdateSubscriberOnlineFlagRequestDto$Outbound; } + +export function updateSubscriberOnlineFlagRequestDtoToJSON( + updateSubscriberOnlineFlagRequestDto: UpdateSubscriberOnlineFlagRequestDto, +): string { + return JSON.stringify( + UpdateSubscriberOnlineFlagRequestDto$outboundSchema.parse( + updateSubscriberOnlineFlagRequestDto, + ), + ); +} + +export function updateSubscriberOnlineFlagRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateSubscriberOnlineFlagRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberOnlineFlagRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatesubscriberpreferencerequestdto.ts b/src/models/components/updatesubscriberpreferencerequestdto.ts index 06f04d32..4ae4866e 100644 --- a/src/models/components/updatesubscriberpreferencerequestdto.ts +++ b/src/models/components/updatesubscriberpreferencerequestdto.ts @@ -3,6 +3,9 @@ */ 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"; import { ChannelPreference, ChannelPreference$inboundSchema, @@ -61,3 +64,24 @@ export namespace UpdateSubscriberPreferenceRequestDto$ { /** @deprecated use `UpdateSubscriberPreferenceRequestDto$Outbound` instead. */ export type Outbound = UpdateSubscriberPreferenceRequestDto$Outbound; } + +export function updateSubscriberPreferenceRequestDtoToJSON( + updateSubscriberPreferenceRequestDto: UpdateSubscriberPreferenceRequestDto, +): string { + return JSON.stringify( + UpdateSubscriberPreferenceRequestDto$outboundSchema.parse( + updateSubscriberPreferenceRequestDto, + ), + ); +} + +export function updateSubscriberPreferenceRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateSubscriberPreferenceRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberPreferenceRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatesubscriberpreferenceresponsedto.ts b/src/models/components/updatesubscriberpreferenceresponsedto.ts index adb6b83c..c0185123 100644 --- a/src/models/components/updatesubscriberpreferenceresponsedto.ts +++ b/src/models/components/updatesubscriberpreferenceresponsedto.ts @@ -3,6 +3,9 @@ */ 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"; import { Preference, Preference$inboundSchema, @@ -17,14 +20,14 @@ import { } from "./templateresponse.js"; export type UpdateSubscriberPreferenceResponseDto = { - /** - * The preferences of the subscriber regarding the related workflow - */ - preference: Preference; /** * The workflow information and if it is critical or not */ template: TemplateResponse; + /** + * The preferences of the subscriber regarding the related workflow + */ + preference: Preference; }; /** @internal */ @@ -33,14 +36,14 @@ export const UpdateSubscriberPreferenceResponseDto$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - preference: Preference$inboundSchema, template: TemplateResponse$inboundSchema, + preference: Preference$inboundSchema, }); /** @internal */ export type UpdateSubscriberPreferenceResponseDto$Outbound = { - preference: Preference$Outbound; template: TemplateResponse$Outbound; + preference: Preference$Outbound; }; /** @internal */ @@ -49,8 +52,8 @@ export const UpdateSubscriberPreferenceResponseDto$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateSubscriberPreferenceResponseDto > = z.object({ - preference: Preference$outboundSchema, template: TemplateResponse$outboundSchema, + preference: Preference$outboundSchema, }); /** @@ -67,3 +70,24 @@ export namespace UpdateSubscriberPreferenceResponseDto$ { /** @deprecated use `UpdateSubscriberPreferenceResponseDto$Outbound` instead. */ export type Outbound = UpdateSubscriberPreferenceResponseDto$Outbound; } + +export function updateSubscriberPreferenceResponseDtoToJSON( + updateSubscriberPreferenceResponseDto: UpdateSubscriberPreferenceResponseDto, +): string { + return JSON.stringify( + UpdateSubscriberPreferenceResponseDto$outboundSchema.parse( + updateSubscriberPreferenceResponseDto, + ), + ); +} + +export function updateSubscriberPreferenceResponseDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateSubscriberPreferenceResponseDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberPreferenceResponseDto' from JSON`, + ); +} diff --git a/src/models/components/updatesubscriberrequestdto.ts b/src/models/components/updatesubscriberrequestdto.ts index 9385a2f1..bd97d519 100644 --- a/src/models/components/updatesubscriberrequestdto.ts +++ b/src/models/components/updatesubscriberrequestdto.ts @@ -3,17 +3,21 @@ */ 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 UpdateSubscriberRequestDtoData = {}; export type UpdateSubscriberRequestDto = { - avatar?: string | undefined; - data?: UpdateSubscriberRequestDtoData | undefined; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; + avatar?: string | undefined; + locale?: string | undefined; + data?: UpdateSubscriberRequestDtoData | undefined; + channels?: Array | undefined; }; /** @internal */ @@ -46,30 +50,52 @@ export namespace UpdateSubscriberRequestDtoData$ { export type Outbound = UpdateSubscriberRequestDtoData$Outbound; } +export function updateSubscriberRequestDtoDataToJSON( + updateSubscriberRequestDtoData: UpdateSubscriberRequestDtoData, +): string { + return JSON.stringify( + UpdateSubscriberRequestDtoData$outboundSchema.parse( + updateSubscriberRequestDtoData, + ), + ); +} + +export function updateSubscriberRequestDtoDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSubscriberRequestDtoData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberRequestDtoData' from JSON`, + ); +} + /** @internal */ export const UpdateSubscriberRequestDto$inboundSchema: z.ZodType< UpdateSubscriberRequestDto, z.ZodTypeDef, unknown > = z.object({ - avatar: z.string().optional(), - data: z.lazy(() => UpdateSubscriberRequestDtoData$inboundSchema).optional(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => UpdateSubscriberRequestDtoData$inboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @internal */ export type UpdateSubscriberRequestDto$Outbound = { - avatar?: string | undefined; - data?: UpdateSubscriberRequestDtoData$Outbound | undefined; email?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; - locale?: string | undefined; phone?: string | undefined; + avatar?: string | undefined; + locale?: string | undefined; + data?: UpdateSubscriberRequestDtoData$Outbound | undefined; + channels?: Array | undefined; }; /** @internal */ @@ -78,13 +104,14 @@ export const UpdateSubscriberRequestDto$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateSubscriberRequestDto > = z.object({ - avatar: z.string().optional(), - data: z.lazy(() => UpdateSubscriberRequestDtoData$outboundSchema).optional(), email: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), - locale: z.string().optional(), phone: z.string().optional(), + avatar: z.string().optional(), + locale: z.string().optional(), + data: z.lazy(() => UpdateSubscriberRequestDtoData$outboundSchema).optional(), + channels: z.array(z.string()).optional(), }); /** @@ -99,3 +126,21 @@ export namespace UpdateSubscriberRequestDto$ { /** @deprecated use `UpdateSubscriberRequestDto$Outbound` instead. */ export type Outbound = UpdateSubscriberRequestDto$Outbound; } + +export function updateSubscriberRequestDtoToJSON( + updateSubscriberRequestDto: UpdateSubscriberRequestDto, +): string { + return JSON.stringify( + UpdateSubscriberRequestDto$outboundSchema.parse(updateSubscriberRequestDto), + ); +} + +export function updateSubscriberRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSubscriberRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSubscriberRequestDto' from JSON`, + ); +} diff --git a/src/models/components/updatetenantrequestdto.ts b/src/models/components/updatetenantrequestdto.ts deleted file mode 100644 index 126e3cd0..00000000 --- a/src/models/components/updatetenantrequestdto.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type UpdateTenantRequestDtoData = {}; - -export type UpdateTenantRequestDto = { - data?: UpdateTenantRequestDtoData | undefined; - identifier?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const UpdateTenantRequestDtoData$inboundSchema: z.ZodType< - UpdateTenantRequestDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type UpdateTenantRequestDtoData$Outbound = {}; - -/** @internal */ -export const UpdateTenantRequestDtoData$outboundSchema: z.ZodType< - UpdateTenantRequestDtoData$Outbound, - z.ZodTypeDef, - UpdateTenantRequestDtoData -> = 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 UpdateTenantRequestDtoData$ { - /** @deprecated use `UpdateTenantRequestDtoData$inboundSchema` instead. */ - export const inboundSchema = UpdateTenantRequestDtoData$inboundSchema; - /** @deprecated use `UpdateTenantRequestDtoData$outboundSchema` instead. */ - export const outboundSchema = UpdateTenantRequestDtoData$outboundSchema; - /** @deprecated use `UpdateTenantRequestDtoData$Outbound` instead. */ - export type Outbound = UpdateTenantRequestDtoData$Outbound; -} - -/** @internal */ -export const UpdateTenantRequestDto$inboundSchema: z.ZodType< - UpdateTenantRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.lazy(() => UpdateTenantRequestDtoData$inboundSchema).optional(), - identifier: z.string().optional(), - name: z.string().optional(), -}); - -/** @internal */ -export type UpdateTenantRequestDto$Outbound = { - data?: UpdateTenantRequestDtoData$Outbound | undefined; - identifier?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const UpdateTenantRequestDto$outboundSchema: z.ZodType< - UpdateTenantRequestDto$Outbound, - z.ZodTypeDef, - UpdateTenantRequestDto -> = z.object({ - data: z.lazy(() => UpdateTenantRequestDtoData$outboundSchema).optional(), - identifier: z.string().optional(), - name: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateTenantRequestDto$ { - /** @deprecated use `UpdateTenantRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateTenantRequestDto$inboundSchema; - /** @deprecated use `UpdateTenantRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateTenantRequestDto$outboundSchema; - /** @deprecated use `UpdateTenantRequestDto$Outbound` instead. */ - export type Outbound = UpdateTenantRequestDto$Outbound; -} diff --git a/src/models/components/updatetenantresponsedto.ts b/src/models/components/updatetenantresponsedto.ts deleted file mode 100644 index 242af071..00000000 --- a/src/models/components/updatetenantresponsedto.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; - -export type UpdateTenantResponseDtoData = {}; - -export type UpdateTenantResponseDto = { - environmentId: string; - id: string; - createdAt: string; - data?: UpdateTenantResponseDtoData | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const UpdateTenantResponseDtoData$inboundSchema: z.ZodType< - UpdateTenantResponseDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type UpdateTenantResponseDtoData$Outbound = {}; - -/** @internal */ -export const UpdateTenantResponseDtoData$outboundSchema: z.ZodType< - UpdateTenantResponseDtoData$Outbound, - z.ZodTypeDef, - UpdateTenantResponseDtoData -> = 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 UpdateTenantResponseDtoData$ { - /** @deprecated use `UpdateTenantResponseDtoData$inboundSchema` instead. */ - export const inboundSchema = UpdateTenantResponseDtoData$inboundSchema; - /** @deprecated use `UpdateTenantResponseDtoData$outboundSchema` instead. */ - export const outboundSchema = UpdateTenantResponseDtoData$outboundSchema; - /** @deprecated use `UpdateTenantResponseDtoData$Outbound` instead. */ - export type Outbound = UpdateTenantResponseDtoData$Outbound; -} - -/** @internal */ -export const UpdateTenantResponseDto$inboundSchema: z.ZodType< - UpdateTenantResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - _environmentId: z.string(), - _id: z.string(), - createdAt: z.string(), - data: z.lazy(() => UpdateTenantResponseDtoData$inboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - "_environmentId": "environmentId", - "_id": "id", - }); -}); - -/** @internal */ -export type UpdateTenantResponseDto$Outbound = { - _environmentId: string; - _id: string; - createdAt: string; - data?: UpdateTenantResponseDtoData$Outbound | undefined; - identifier: string; - name?: string | undefined; - updatedAt: string; -}; - -/** @internal */ -export const UpdateTenantResponseDto$outboundSchema: z.ZodType< - UpdateTenantResponseDto$Outbound, - z.ZodTypeDef, - UpdateTenantResponseDto -> = z.object({ - environmentId: z.string(), - id: z.string(), - createdAt: z.string(), - data: z.lazy(() => UpdateTenantResponseDtoData$outboundSchema).optional(), - identifier: z.string(), - name: z.string().optional(), - updatedAt: z.string(), -}).transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateTenantResponseDto$ { - /** @deprecated use `UpdateTenantResponseDto$inboundSchema` instead. */ - export const inboundSchema = UpdateTenantResponseDto$inboundSchema; - /** @deprecated use `UpdateTenantResponseDto$outboundSchema` instead. */ - export const outboundSchema = UpdateTenantResponseDto$outboundSchema; - /** @deprecated use `UpdateTenantResponseDto$Outbound` instead. */ - export type Outbound = UpdateTenantResponseDto$Outbound; -} diff --git a/src/models/components/updateworkflowrequestdto.ts b/src/models/components/updateworkflowrequestdto.ts deleted file mode 100644 index aa289d24..00000000 --- a/src/models/components/updateworkflowrequestdto.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, -} from "./preferencechannels.js"; - -export type UpdateWorkflowRequestDtoData = {}; - -export type UpdateWorkflowRequestDto = { - critical?: boolean | undefined; - data?: UpdateWorkflowRequestDtoData | undefined; - description?: string | undefined; - identifier?: string | undefined; - name: string; - notificationGroupId: string; - preferenceSettings?: PreferenceChannels | undefined; - steps?: Array | undefined; - tags?: Array | undefined; -}; - -/** @internal */ -export const UpdateWorkflowRequestDtoData$inboundSchema: z.ZodType< - UpdateWorkflowRequestDtoData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type UpdateWorkflowRequestDtoData$Outbound = {}; - -/** @internal */ -export const UpdateWorkflowRequestDtoData$outboundSchema: z.ZodType< - UpdateWorkflowRequestDtoData$Outbound, - z.ZodTypeDef, - UpdateWorkflowRequestDtoData -> = 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 UpdateWorkflowRequestDtoData$ { - /** @deprecated use `UpdateWorkflowRequestDtoData$inboundSchema` instead. */ - export const inboundSchema = UpdateWorkflowRequestDtoData$inboundSchema; - /** @deprecated use `UpdateWorkflowRequestDtoData$outboundSchema` instead. */ - export const outboundSchema = UpdateWorkflowRequestDtoData$outboundSchema; - /** @deprecated use `UpdateWorkflowRequestDtoData$Outbound` instead. */ - export type Outbound = UpdateWorkflowRequestDtoData$Outbound; -} - -/** @internal */ -export const UpdateWorkflowRequestDto$inboundSchema: z.ZodType< - UpdateWorkflowRequestDto, - z.ZodTypeDef, - unknown -> = z.object({ - critical: z.boolean().optional(), - data: z.lazy(() => UpdateWorkflowRequestDtoData$inboundSchema).optional(), - description: z.string().optional(), - identifier: z.string().optional(), - name: z.string(), - notificationGroupId: z.string(), - preferenceSettings: PreferenceChannels$inboundSchema.optional(), - steps: z.array(z.string()).optional(), - tags: z.array(z.string()).optional(), -}); - -/** @internal */ -export type UpdateWorkflowRequestDto$Outbound = { - critical?: boolean | undefined; - data?: UpdateWorkflowRequestDtoData$Outbound | undefined; - description?: string | undefined; - identifier?: string | undefined; - name: string; - notificationGroupId: string; - preferenceSettings?: PreferenceChannels$Outbound | undefined; - steps?: Array | undefined; - tags?: Array | undefined; -}; - -/** @internal */ -export const UpdateWorkflowRequestDto$outboundSchema: z.ZodType< - UpdateWorkflowRequestDto$Outbound, - z.ZodTypeDef, - UpdateWorkflowRequestDto -> = z.object({ - critical: z.boolean().optional(), - data: z.lazy(() => UpdateWorkflowRequestDtoData$outboundSchema).optional(), - description: z.string().optional(), - identifier: z.string().optional(), - name: z.string(), - notificationGroupId: z.string(), - preferenceSettings: PreferenceChannels$outboundSchema.optional(), - steps: z.array(z.string()).optional(), - tags: z.array(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateWorkflowRequestDto$ { - /** @deprecated use `UpdateWorkflowRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateWorkflowRequestDto$inboundSchema; - /** @deprecated use `UpdateWorkflowRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateWorkflowRequestDto$outboundSchema; - /** @deprecated use `UpdateWorkflowRequestDto$Outbound` instead. */ - export type Outbound = UpdateWorkflowRequestDto$Outbound; -} diff --git a/src/models/components/variablesresponsedto.ts b/src/models/components/variablesresponsedto.ts deleted file mode 100644 index 2cbba0f9..00000000 --- a/src/models/components/variablesresponsedto.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type System = {}; - -export type Translations = {}; - -export type VariablesResponseDto = { - system: System; - translations: Translations; -}; - -/** @internal */ -export const System$inboundSchema: z.ZodType = z - .object({}); - -/** @internal */ -export type System$Outbound = {}; - -/** @internal */ -export const System$outboundSchema: z.ZodType< - System$Outbound, - z.ZodTypeDef, - System -> = 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 System$ { - /** @deprecated use `System$inboundSchema` instead. */ - export const inboundSchema = System$inboundSchema; - /** @deprecated use `System$outboundSchema` instead. */ - export const outboundSchema = System$outboundSchema; - /** @deprecated use `System$Outbound` instead. */ - export type Outbound = System$Outbound; -} - -/** @internal */ -export const Translations$inboundSchema: z.ZodType< - Translations, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type Translations$Outbound = {}; - -/** @internal */ -export const Translations$outboundSchema: z.ZodType< - Translations$Outbound, - z.ZodTypeDef, - Translations -> = 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 Translations$ { - /** @deprecated use `Translations$inboundSchema` instead. */ - export const inboundSchema = Translations$inboundSchema; - /** @deprecated use `Translations$outboundSchema` instead. */ - export const outboundSchema = Translations$outboundSchema; - /** @deprecated use `Translations$Outbound` instead. */ - export type Outbound = Translations$Outbound; -} - -/** @internal */ -export const VariablesResponseDto$inboundSchema: z.ZodType< - VariablesResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - system: z.lazy(() => System$inboundSchema), - translations: z.lazy(() => Translations$inboundSchema), -}); - -/** @internal */ -export type VariablesResponseDto$Outbound = { - system: System$Outbound; - translations: Translations$Outbound; -}; - -/** @internal */ -export const VariablesResponseDto$outboundSchema: z.ZodType< - VariablesResponseDto$Outbound, - z.ZodTypeDef, - VariablesResponseDto -> = z.object({ - system: z.lazy(() => System$outboundSchema), - translations: z.lazy(() => Translations$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VariablesResponseDto$ { - /** @deprecated use `VariablesResponseDto$inboundSchema` instead. */ - export const inboundSchema = VariablesResponseDto$inboundSchema; - /** @deprecated use `VariablesResponseDto$outboundSchema` instead. */ - export const outboundSchema = VariablesResponseDto$outboundSchema; - /** @deprecated use `VariablesResponseDto$Outbound` instead. */ - export type Outbound = VariablesResponseDto$Outbound; -} diff --git a/src/models/components/workflowresponse.ts b/src/models/components/workflowresponse.ts index b94e92f8..45f31bdd 100644 --- a/src/models/components/workflowresponse.ts +++ b/src/models/components/workflowresponse.ts @@ -4,6 +4,9 @@ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { NotificationGroup, NotificationGroup$inboundSchema, @@ -34,26 +37,26 @@ export type WorkflowResponseData = {}; export type WorkflowIntegrationStatus = {}; export type WorkflowResponse = { + id?: string | undefined; + name: string; + description: string; + active: boolean; + draft: boolean; + preferenceSettings: PreferenceChannels; + critical: boolean; + tags: Array; + steps: Array; + organizationId: string; creatorId: string; environmentId: string; - id?: string | undefined; + triggers: Array; notificationGroupId: string; - organizationId: string; parentId?: string | undefined; - active: boolean; - critical: boolean; - data?: WorkflowResponseData | undefined; deleted: boolean; deletedAt: string; deletedBy: string; - description: string; - draft: boolean; - name: string; notificationGroup?: NotificationGroup | undefined; - preferenceSettings: PreferenceChannels; - steps: Array; - tags: Array; - triggers: Array; + data?: WorkflowResponseData | undefined; workflowIntegrationStatus?: WorkflowIntegrationStatus | undefined; }; @@ -87,6 +90,24 @@ export namespace WorkflowResponseData$ { export type Outbound = WorkflowResponseData$Outbound; } +export function workflowResponseDataToJSON( + workflowResponseData: WorkflowResponseData, +): string { + return JSON.stringify( + WorkflowResponseData$outboundSchema.parse(workflowResponseData), + ); +} + +export function workflowResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WorkflowResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WorkflowResponseData' from JSON`, + ); +} + /** @internal */ export const WorkflowIntegrationStatus$inboundSchema: z.ZodType< WorkflowIntegrationStatus, @@ -117,68 +138,86 @@ export namespace WorkflowIntegrationStatus$ { export type Outbound = WorkflowIntegrationStatus$Outbound; } +export function workflowIntegrationStatusToJSON( + workflowIntegrationStatus: WorkflowIntegrationStatus, +): string { + return JSON.stringify( + WorkflowIntegrationStatus$outboundSchema.parse(workflowIntegrationStatus), + ); +} + +export function workflowIntegrationStatusFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WorkflowIntegrationStatus$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WorkflowIntegrationStatus' from JSON`, + ); +} + /** @internal */ export const WorkflowResponse$inboundSchema: z.ZodType< WorkflowResponse, z.ZodTypeDef, unknown > = z.object({ + _id: z.string().optional(), + name: z.string(), + description: z.string(), + active: z.boolean(), + draft: z.boolean(), + preferenceSettings: PreferenceChannels$inboundSchema, + critical: z.boolean(), + tags: z.array(z.string()), + steps: z.array(NotificationStep$inboundSchema), + _organizationId: z.string(), _creatorId: z.string(), _environmentId: z.string(), - _id: z.string().optional(), + triggers: z.array(NotificationTrigger$inboundSchema), _notificationGroupId: z.string(), - _organizationId: z.string(), _parentId: z.string().optional(), - active: z.boolean(), - critical: z.boolean(), - data: z.lazy(() => WorkflowResponseData$inboundSchema).optional(), deleted: z.boolean(), deletedAt: z.string(), deletedBy: z.string(), - description: z.string(), - draft: z.boolean(), - name: z.string(), notificationGroup: NotificationGroup$inboundSchema.optional(), - preferenceSettings: PreferenceChannels$inboundSchema, - steps: z.array(NotificationStep$inboundSchema), - tags: z.array(z.string()), - triggers: z.array(NotificationTrigger$inboundSchema), + data: z.lazy(() => WorkflowResponseData$inboundSchema).optional(), workflowIntegrationStatus: z.lazy(() => WorkflowIntegrationStatus$inboundSchema ).optional(), }).transform((v) => { return remap$(v, { + "_id": "id", + "_organizationId": "organizationId", "_creatorId": "creatorId", "_environmentId": "environmentId", - "_id": "id", "_notificationGroupId": "notificationGroupId", - "_organizationId": "organizationId", "_parentId": "parentId", }); }); /** @internal */ export type WorkflowResponse$Outbound = { + _id?: string | undefined; + name: string; + description: string; + active: boolean; + draft: boolean; + preferenceSettings: PreferenceChannels$Outbound; + critical: boolean; + tags: Array; + steps: Array; + _organizationId: string; _creatorId: string; _environmentId: string; - _id?: string | undefined; + triggers: Array; _notificationGroupId: string; - _organizationId: string; _parentId?: string | undefined; - active: boolean; - critical: boolean; - data?: WorkflowResponseData$Outbound | undefined; deleted: boolean; deletedAt: string; deletedBy: string; - description: string; - draft: boolean; - name: string; notificationGroup?: NotificationGroup$Outbound | undefined; - preferenceSettings: PreferenceChannels$Outbound; - steps: Array; - tags: Array; - triggers: Array; + data?: WorkflowResponseData$Outbound | undefined; workflowIntegrationStatus?: WorkflowIntegrationStatus$Outbound | undefined; }; @@ -188,36 +227,36 @@ export const WorkflowResponse$outboundSchema: z.ZodType< z.ZodTypeDef, WorkflowResponse > = z.object({ + id: z.string().optional(), + name: z.string(), + description: z.string(), + active: z.boolean(), + draft: z.boolean(), + preferenceSettings: PreferenceChannels$outboundSchema, + critical: z.boolean(), + tags: z.array(z.string()), + steps: z.array(NotificationStep$outboundSchema), + organizationId: z.string(), creatorId: z.string(), environmentId: z.string(), - id: z.string().optional(), + triggers: z.array(NotificationTrigger$outboundSchema), notificationGroupId: z.string(), - organizationId: z.string(), parentId: z.string().optional(), - active: z.boolean(), - critical: z.boolean(), - data: z.lazy(() => WorkflowResponseData$outboundSchema).optional(), deleted: z.boolean(), deletedAt: z.string(), deletedBy: z.string(), - description: z.string(), - draft: z.boolean(), - name: z.string(), notificationGroup: NotificationGroup$outboundSchema.optional(), - preferenceSettings: PreferenceChannels$outboundSchema, - steps: z.array(NotificationStep$outboundSchema), - tags: z.array(z.string()), - triggers: z.array(NotificationTrigger$outboundSchema), + data: z.lazy(() => WorkflowResponseData$outboundSchema).optional(), workflowIntegrationStatus: z.lazy(() => WorkflowIntegrationStatus$outboundSchema ).optional(), }).transform((v) => { return remap$(v, { + id: "_id", + organizationId: "_organizationId", creatorId: "_creatorId", environmentId: "_environmentId", - id: "_id", notificationGroupId: "_notificationGroupId", - organizationId: "_organizationId", parentId: "_parentId", }); }); @@ -234,3 +273,21 @@ export namespace WorkflowResponse$ { /** @deprecated use `WorkflowResponse$Outbound` instead. */ export type Outbound = WorkflowResponse$Outbound; } + +export function workflowResponseToJSON( + workflowResponse: WorkflowResponse, +): string { + return JSON.stringify( + WorkflowResponse$outboundSchema.parse(workflowResponse), + ); +} + +export function workflowResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WorkflowResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WorkflowResponse' from JSON`, + ); +} diff --git a/src/models/components/workflowsresponsedto.ts b/src/models/components/workflowsresponsedto.ts deleted file mode 100644 index af8e74d6..00000000 --- a/src/models/components/workflowsresponsedto.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type WorkflowsResponseDto = { - data: Array; - page: number; - pageSize: number; - totalCount: number; -}; - -/** @internal */ -export const WorkflowsResponseDto$inboundSchema: z.ZodType< - WorkflowsResponseDto, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), -}); - -/** @internal */ -export type WorkflowsResponseDto$Outbound = { - data: Array; - page: number; - pageSize: number; - totalCount: number; -}; - -/** @internal */ -export const WorkflowsResponseDto$outboundSchema: z.ZodType< - WorkflowsResponseDto$Outbound, - z.ZodTypeDef, - WorkflowsResponseDto -> = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WorkflowsResponseDto$ { - /** @deprecated use `WorkflowsResponseDto$inboundSchema` instead. */ - export const inboundSchema = WorkflowsResponseDto$inboundSchema; - /** @deprecated use `WorkflowsResponseDto$outboundSchema` instead. */ - export const outboundSchema = WorkflowsResponseDto$outboundSchema; - /** @deprecated use `WorkflowsResponseDto$Outbound` instead. */ - export type Outbound = WorkflowsResponseDto$Outbound; -} diff --git a/src/models/operations/changescontrollerapplydiff.ts b/src/models/operations/changescontrollerapplydiff.ts deleted file mode 100644 index 45467b86..00000000 --- a/src/models/operations/changescontrollerapplydiff.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type ChangesControllerApplyDiffRequest = { - changeId: string; -}; - -/** @internal */ -export const ChangesControllerApplyDiffRequest$inboundSchema: z.ZodType< - ChangesControllerApplyDiffRequest, - z.ZodTypeDef, - unknown -> = z.object({ - changeId: z.string(), -}); - -/** @internal */ -export type ChangesControllerApplyDiffRequest$Outbound = { - changeId: string; -}; - -/** @internal */ -export const ChangesControllerApplyDiffRequest$outboundSchema: z.ZodType< - ChangesControllerApplyDiffRequest$Outbound, - z.ZodTypeDef, - ChangesControllerApplyDiffRequest -> = z.object({ - changeId: 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 ChangesControllerApplyDiffRequest$ { - /** @deprecated use `ChangesControllerApplyDiffRequest$inboundSchema` instead. */ - export const inboundSchema = ChangesControllerApplyDiffRequest$inboundSchema; - /** @deprecated use `ChangesControllerApplyDiffRequest$outboundSchema` instead. */ - export const outboundSchema = - ChangesControllerApplyDiffRequest$outboundSchema; - /** @deprecated use `ChangesControllerApplyDiffRequest$Outbound` instead. */ - export type Outbound = ChangesControllerApplyDiffRequest$Outbound; -} diff --git a/src/models/operations/changescontrollergetchanges.ts b/src/models/operations/changescontrollergetchanges.ts deleted file mode 100644 index fc7ab666..00000000 --- a/src/models/operations/changescontrollergetchanges.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type ChangesControllerGetChangesRequest = { - page?: number | undefined; - limit?: number | undefined; - promoted?: string | undefined; -}; - -/** @internal */ -export const ChangesControllerGetChangesRequest$inboundSchema: z.ZodType< - ChangesControllerGetChangesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - promoted: z.string().default("false"), -}); - -/** @internal */ -export type ChangesControllerGetChangesRequest$Outbound = { - page?: number | undefined; - limit: number; - promoted: string; -}; - -/** @internal */ -export const ChangesControllerGetChangesRequest$outboundSchema: z.ZodType< - ChangesControllerGetChangesRequest$Outbound, - z.ZodTypeDef, - ChangesControllerGetChangesRequest -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - promoted: z.string().default("false"), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangesControllerGetChangesRequest$ { - /** @deprecated use `ChangesControllerGetChangesRequest$inboundSchema` instead. */ - export const inboundSchema = ChangesControllerGetChangesRequest$inboundSchema; - /** @deprecated use `ChangesControllerGetChangesRequest$outboundSchema` instead. */ - export const outboundSchema = - ChangesControllerGetChangesRequest$outboundSchema; - /** @deprecated use `ChangesControllerGetChangesRequest$Outbound` instead. */ - export type Outbound = ChangesControllerGetChangesRequest$Outbound; -} diff --git a/src/models/operations/environmentscontrollerv1getcurrentenvironment.ts b/src/models/operations/environmentscontrollerv1getcurrentenvironment.ts new file mode 100644 index 00000000..a80d8b06 --- /dev/null +++ b/src/models/operations/environmentscontrollerv1getcurrentenvironment.ts @@ -0,0 +1,96 @@ +/* + * 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 EnvironmentsControllerV1GetCurrentEnvironmentResponse = { + headers: { [k: string]: Array }; + result: components.EnvironmentResponseDto; +}; + +/** @internal */ +export const EnvironmentsControllerV1GetCurrentEnvironmentResponse$inboundSchema: + z.ZodType< + EnvironmentsControllerV1GetCurrentEnvironmentResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.EnvironmentResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type EnvironmentsControllerV1GetCurrentEnvironmentResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.EnvironmentResponseDto$Outbound; +}; + +/** @internal */ +export const EnvironmentsControllerV1GetCurrentEnvironmentResponse$outboundSchema: + z.ZodType< + EnvironmentsControllerV1GetCurrentEnvironmentResponse$Outbound, + z.ZodTypeDef, + EnvironmentsControllerV1GetCurrentEnvironmentResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.EnvironmentResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnvironmentsControllerV1GetCurrentEnvironmentResponse$ { + /** @deprecated use `EnvironmentsControllerV1GetCurrentEnvironmentResponse$inboundSchema` instead. */ + export const inboundSchema = + EnvironmentsControllerV1GetCurrentEnvironmentResponse$inboundSchema; + /** @deprecated use `EnvironmentsControllerV1GetCurrentEnvironmentResponse$outboundSchema` instead. */ + export const outboundSchema = + EnvironmentsControllerV1GetCurrentEnvironmentResponse$outboundSchema; + /** @deprecated use `EnvironmentsControllerV1GetCurrentEnvironmentResponse$Outbound` instead. */ + export type Outbound = + EnvironmentsControllerV1GetCurrentEnvironmentResponse$Outbound; +} + +export function environmentsControllerV1GetCurrentEnvironmentResponseToJSON( + environmentsControllerV1GetCurrentEnvironmentResponse: + EnvironmentsControllerV1GetCurrentEnvironmentResponse, +): string { + return JSON.stringify( + EnvironmentsControllerV1GetCurrentEnvironmentResponse$outboundSchema.parse( + environmentsControllerV1GetCurrentEnvironmentResponse, + ), + ); +} + +export function environmentsControllerV1GetCurrentEnvironmentResponseFromJSON( + jsonString: string, +): SafeParseResult< + EnvironmentsControllerV1GetCurrentEnvironmentResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + EnvironmentsControllerV1GetCurrentEnvironmentResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'EnvironmentsControllerV1GetCurrentEnvironmentResponse' from JSON`, + ); +} diff --git a/src/models/operations/environmentscontrollerv1listmyenvironments.ts b/src/models/operations/environmentscontrollerv1listmyenvironments.ts new file mode 100644 index 00000000..c2892d2f --- /dev/null +++ b/src/models/operations/environmentscontrollerv1listmyenvironments.ts @@ -0,0 +1,96 @@ +/* + * 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 EnvironmentsControllerV1ListMyEnvironmentsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const EnvironmentsControllerV1ListMyEnvironmentsResponse$inboundSchema: + z.ZodType< + EnvironmentsControllerV1ListMyEnvironmentsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.EnvironmentResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type EnvironmentsControllerV1ListMyEnvironmentsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const EnvironmentsControllerV1ListMyEnvironmentsResponse$outboundSchema: + z.ZodType< + EnvironmentsControllerV1ListMyEnvironmentsResponse$Outbound, + z.ZodTypeDef, + EnvironmentsControllerV1ListMyEnvironmentsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.EnvironmentResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnvironmentsControllerV1ListMyEnvironmentsResponse$ { + /** @deprecated use `EnvironmentsControllerV1ListMyEnvironmentsResponse$inboundSchema` instead. */ + export const inboundSchema = + EnvironmentsControllerV1ListMyEnvironmentsResponse$inboundSchema; + /** @deprecated use `EnvironmentsControllerV1ListMyEnvironmentsResponse$outboundSchema` instead. */ + export const outboundSchema = + EnvironmentsControllerV1ListMyEnvironmentsResponse$outboundSchema; + /** @deprecated use `EnvironmentsControllerV1ListMyEnvironmentsResponse$Outbound` instead. */ + export type Outbound = + EnvironmentsControllerV1ListMyEnvironmentsResponse$Outbound; +} + +export function environmentsControllerV1ListMyEnvironmentsResponseToJSON( + environmentsControllerV1ListMyEnvironmentsResponse: + EnvironmentsControllerV1ListMyEnvironmentsResponse, +): string { + return JSON.stringify( + EnvironmentsControllerV1ListMyEnvironmentsResponse$outboundSchema.parse( + environmentsControllerV1ListMyEnvironmentsResponse, + ), + ); +} + +export function environmentsControllerV1ListMyEnvironmentsResponseFromJSON( + jsonString: string, +): SafeParseResult< + EnvironmentsControllerV1ListMyEnvironmentsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + EnvironmentsControllerV1ListMyEnvironmentsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'EnvironmentsControllerV1ListMyEnvironmentsResponse' from JSON`, + ); +} diff --git a/src/models/operations/environmentscontrollerv1listorganizationapikeys.ts b/src/models/operations/environmentscontrollerv1listorganizationapikeys.ts new file mode 100644 index 00000000..d34a04cf --- /dev/null +++ b/src/models/operations/environmentscontrollerv1listorganizationapikeys.ts @@ -0,0 +1,94 @@ +/* + * 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 EnvironmentsControllerV1ListOrganizationApiKeysResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const EnvironmentsControllerV1ListOrganizationApiKeysResponse$inboundSchema: + z.ZodType< + EnvironmentsControllerV1ListOrganizationApiKeysResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.ApiKey$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type EnvironmentsControllerV1ListOrganizationApiKeysResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const EnvironmentsControllerV1ListOrganizationApiKeysResponse$outboundSchema: + z.ZodType< + EnvironmentsControllerV1ListOrganizationApiKeysResponse$Outbound, + z.ZodTypeDef, + EnvironmentsControllerV1ListOrganizationApiKeysResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.ApiKey$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnvironmentsControllerV1ListOrganizationApiKeysResponse$ { + /** @deprecated use `EnvironmentsControllerV1ListOrganizationApiKeysResponse$inboundSchema` instead. */ + export const inboundSchema = + EnvironmentsControllerV1ListOrganizationApiKeysResponse$inboundSchema; + /** @deprecated use `EnvironmentsControllerV1ListOrganizationApiKeysResponse$outboundSchema` instead. */ + export const outboundSchema = + EnvironmentsControllerV1ListOrganizationApiKeysResponse$outboundSchema; + /** @deprecated use `EnvironmentsControllerV1ListOrganizationApiKeysResponse$Outbound` instead. */ + export type Outbound = + EnvironmentsControllerV1ListOrganizationApiKeysResponse$Outbound; +} + +export function environmentsControllerV1ListOrganizationApiKeysResponseToJSON( + environmentsControllerV1ListOrganizationApiKeysResponse: + EnvironmentsControllerV1ListOrganizationApiKeysResponse, +): string { + return JSON.stringify( + EnvironmentsControllerV1ListOrganizationApiKeysResponse$outboundSchema + .parse(environmentsControllerV1ListOrganizationApiKeysResponse), + ); +} + +export function environmentsControllerV1ListOrganizationApiKeysResponseFromJSON( + jsonString: string, +): SafeParseResult< + EnvironmentsControllerV1ListOrganizationApiKeysResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + EnvironmentsControllerV1ListOrganizationApiKeysResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'EnvironmentsControllerV1ListOrganizationApiKeysResponse' from JSON`, + ); +} diff --git a/src/models/operations/eventscontrollerbroadcasteventtoall.ts b/src/models/operations/eventscontrollerbroadcasteventtoall.ts new file mode 100644 index 00000000..fe501917 --- /dev/null +++ b/src/models/operations/eventscontrollerbroadcasteventtoall.ts @@ -0,0 +1,95 @@ +/* + * 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 EventsControllerBroadcastEventToAllResponse = { + headers: { [k: string]: Array }; + result: components.TriggerEventResponseDto; +}; + +/** @internal */ +export const EventsControllerBroadcastEventToAllResponse$inboundSchema: + z.ZodType< + EventsControllerBroadcastEventToAllResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.TriggerEventResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type EventsControllerBroadcastEventToAllResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.TriggerEventResponseDto$Outbound; +}; + +/** @internal */ +export const EventsControllerBroadcastEventToAllResponse$outboundSchema: + z.ZodType< + EventsControllerBroadcastEventToAllResponse$Outbound, + z.ZodTypeDef, + EventsControllerBroadcastEventToAllResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.TriggerEventResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EventsControllerBroadcastEventToAllResponse$ { + /** @deprecated use `EventsControllerBroadcastEventToAllResponse$inboundSchema` instead. */ + export const inboundSchema = + EventsControllerBroadcastEventToAllResponse$inboundSchema; + /** @deprecated use `EventsControllerBroadcastEventToAllResponse$outboundSchema` instead. */ + export const outboundSchema = + EventsControllerBroadcastEventToAllResponse$outboundSchema; + /** @deprecated use `EventsControllerBroadcastEventToAllResponse$Outbound` instead. */ + export type Outbound = EventsControllerBroadcastEventToAllResponse$Outbound; +} + +export function eventsControllerBroadcastEventToAllResponseToJSON( + eventsControllerBroadcastEventToAllResponse: + EventsControllerBroadcastEventToAllResponse, +): string { + return JSON.stringify( + EventsControllerBroadcastEventToAllResponse$outboundSchema.parse( + eventsControllerBroadcastEventToAllResponse, + ), + ); +} + +export function eventsControllerBroadcastEventToAllResponseFromJSON( + jsonString: string, +): SafeParseResult< + EventsControllerBroadcastEventToAllResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + EventsControllerBroadcastEventToAllResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'EventsControllerBroadcastEventToAllResponse' from JSON`, + ); +} diff --git a/src/models/operations/eventscontrollercancel.ts b/src/models/operations/eventscontrollercancel.ts index 742e1681..1eed1469 100644 --- a/src/models/operations/eventscontrollercancel.ts +++ b/src/models/operations/eventscontrollercancel.ts @@ -3,11 +3,21 @@ */ 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 EventsControllerCancelRequest = { transactionId: string; }; +export type EventsControllerCancelResponse = { + headers: { [k: string]: Array }; + result: components.DataBooleanDto; +}; + /** @internal */ export const EventsControllerCancelRequest$inboundSchema: z.ZodType< EventsControllerCancelRequest, @@ -43,3 +53,92 @@ export namespace EventsControllerCancelRequest$ { /** @deprecated use `EventsControllerCancelRequest$Outbound` instead. */ export type Outbound = EventsControllerCancelRequest$Outbound; } + +export function eventsControllerCancelRequestToJSON( + eventsControllerCancelRequest: EventsControllerCancelRequest, +): string { + return JSON.stringify( + EventsControllerCancelRequest$outboundSchema.parse( + eventsControllerCancelRequest, + ), + ); +} + +export function eventsControllerCancelRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventsControllerCancelRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventsControllerCancelRequest' from JSON`, + ); +} + +/** @internal */ +export const EventsControllerCancelResponse$inboundSchema: z.ZodType< + EventsControllerCancelResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.DataBooleanDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type EventsControllerCancelResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.DataBooleanDto$Outbound; +}; + +/** @internal */ +export const EventsControllerCancelResponse$outboundSchema: z.ZodType< + EventsControllerCancelResponse$Outbound, + z.ZodTypeDef, + EventsControllerCancelResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.DataBooleanDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EventsControllerCancelResponse$ { + /** @deprecated use `EventsControllerCancelResponse$inboundSchema` instead. */ + export const inboundSchema = EventsControllerCancelResponse$inboundSchema; + /** @deprecated use `EventsControllerCancelResponse$outboundSchema` instead. */ + export const outboundSchema = EventsControllerCancelResponse$outboundSchema; + /** @deprecated use `EventsControllerCancelResponse$Outbound` instead. */ + export type Outbound = EventsControllerCancelResponse$Outbound; +} + +export function eventsControllerCancelResponseToJSON( + eventsControllerCancelResponse: EventsControllerCancelResponse, +): string { + return JSON.stringify( + EventsControllerCancelResponse$outboundSchema.parse( + eventsControllerCancelResponse, + ), + ); +} + +export function eventsControllerCancelResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventsControllerCancelResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventsControllerCancelResponse' from JSON`, + ); +} diff --git a/src/models/operations/eventscontrollertrigger.ts b/src/models/operations/eventscontrollertrigger.ts new file mode 100644 index 00000000..25a5fcaa --- /dev/null +++ b/src/models/operations/eventscontrollertrigger.ts @@ -0,0 +1,84 @@ +/* + * 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 EventsControllerTriggerResponse = { + headers: { [k: string]: Array }; + result: components.TriggerEventResponseDto; +}; + +/** @internal */ +export const EventsControllerTriggerResponse$inboundSchema: z.ZodType< + EventsControllerTriggerResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.TriggerEventResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type EventsControllerTriggerResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.TriggerEventResponseDto$Outbound; +}; + +/** @internal */ +export const EventsControllerTriggerResponse$outboundSchema: z.ZodType< + EventsControllerTriggerResponse$Outbound, + z.ZodTypeDef, + EventsControllerTriggerResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.TriggerEventResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EventsControllerTriggerResponse$ { + /** @deprecated use `EventsControllerTriggerResponse$inboundSchema` instead. */ + export const inboundSchema = EventsControllerTriggerResponse$inboundSchema; + /** @deprecated use `EventsControllerTriggerResponse$outboundSchema` instead. */ + export const outboundSchema = EventsControllerTriggerResponse$outboundSchema; + /** @deprecated use `EventsControllerTriggerResponse$Outbound` instead. */ + export type Outbound = EventsControllerTriggerResponse$Outbound; +} + +export function eventsControllerTriggerResponseToJSON( + eventsControllerTriggerResponse: EventsControllerTriggerResponse, +): string { + return JSON.stringify( + EventsControllerTriggerResponse$outboundSchema.parse( + eventsControllerTriggerResponse, + ), + ); +} + +export function eventsControllerTriggerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventsControllerTriggerResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventsControllerTriggerResponse' from JSON`, + ); +} diff --git a/src/models/operations/eventscontrollertriggerbulk.ts b/src/models/operations/eventscontrollertriggerbulk.ts new file mode 100644 index 00000000..45aa1492 --- /dev/null +++ b/src/models/operations/eventscontrollertriggerbulk.ts @@ -0,0 +1,87 @@ +/* + * 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 EventsControllerTriggerBulkResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const EventsControllerTriggerBulkResponse$inboundSchema: z.ZodType< + EventsControllerTriggerBulkResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.TriggerEventResponseDto$inboundSchema), +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type EventsControllerTriggerBulkResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const EventsControllerTriggerBulkResponse$outboundSchema: z.ZodType< + EventsControllerTriggerBulkResponse$Outbound, + z.ZodTypeDef, + EventsControllerTriggerBulkResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.TriggerEventResponseDto$outboundSchema), +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EventsControllerTriggerBulkResponse$ { + /** @deprecated use `EventsControllerTriggerBulkResponse$inboundSchema` instead. */ + export const inboundSchema = + EventsControllerTriggerBulkResponse$inboundSchema; + /** @deprecated use `EventsControllerTriggerBulkResponse$outboundSchema` instead. */ + export const outboundSchema = + EventsControllerTriggerBulkResponse$outboundSchema; + /** @deprecated use `EventsControllerTriggerBulkResponse$Outbound` instead. */ + export type Outbound = EventsControllerTriggerBulkResponse$Outbound; +} + +export function eventsControllerTriggerBulkResponseToJSON( + eventsControllerTriggerBulkResponse: EventsControllerTriggerBulkResponse, +): string { + return JSON.stringify( + EventsControllerTriggerBulkResponse$outboundSchema.parse( + eventsControllerTriggerBulkResponse, + ), + ); +} + +export function eventsControllerTriggerBulkResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + EventsControllerTriggerBulkResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventsControllerTriggerBulkResponse' from JSON`, + ); +} diff --git a/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts b/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts index dc547765..75dbbf34 100644 --- a/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts +++ b/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts @@ -3,6 +3,11 @@ */ 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 ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { @@ -10,6 +15,12 @@ export type ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest subscriberId: string; }; +export type ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse = + { + headers: { [k: string]: Array }; + result: Array; + }; + /** @internal */ export const ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema: z.ZodType< @@ -54,3 +65,112 @@ export namespace ExecutionDetailsControllerGetExecutionDetailsForNotificationReq export type Outbound = ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound; } + +export function executionDetailsControllerGetExecutionDetailsForNotificationRequestToJSON( + executionDetailsControllerGetExecutionDetailsForNotificationRequest: + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest, +): string { + return JSON.stringify( + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema + .parse( + executionDetailsControllerGetExecutionDetailsForNotificationRequest, + ), + ); +} + +export function executionDetailsControllerGetExecutionDetailsForNotificationRequestFromJSON( + jsonString: string, +): SafeParseResult< + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest' from JSON`, + ); +} + +/** @internal */ +export const ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$inboundSchema: + z.ZodType< + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.ExecutionDetailsResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: Array; + }; + +/** @internal */ +export const ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$outboundSchema: + z.ZodType< + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$Outbound, + z.ZodTypeDef, + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.ExecutionDetailsResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$ { + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$inboundSchema` instead. */ + export const inboundSchema = + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$inboundSchema; + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$outboundSchema` instead. */ + export const outboundSchema = + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$outboundSchema; + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$Outbound` instead. */ + export type Outbound = + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$Outbound; +} + +export function executionDetailsControllerGetExecutionDetailsForNotificationResponseToJSON( + executionDetailsControllerGetExecutionDetailsForNotificationResponse: + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse, +): string { + return JSON.stringify( + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$outboundSchema + .parse( + executionDetailsControllerGetExecutionDetailsForNotificationResponse, + ), + ); +} + +export function executionDetailsControllerGetExecutionDetailsForNotificationResponseFromJSON( + jsonString: string, +): SafeParseResult< + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse' from JSON`, + ); +} diff --git a/src/models/operations/feedscontrollerdeletefeedbyid.ts b/src/models/operations/feedscontrollerdeletefeedbyid.ts deleted file mode 100644 index 0524d351..00000000 --- a/src/models/operations/feedscontrollerdeletefeedbyid.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type FeedsControllerDeleteFeedByIdRequest = { - feedId: string; -}; - -/** @internal */ -export const FeedsControllerDeleteFeedByIdRequest$inboundSchema: z.ZodType< - FeedsControllerDeleteFeedByIdRequest, - z.ZodTypeDef, - unknown -> = z.object({ - feedId: z.string(), -}); - -/** @internal */ -export type FeedsControllerDeleteFeedByIdRequest$Outbound = { - feedId: string; -}; - -/** @internal */ -export const FeedsControllerDeleteFeedByIdRequest$outboundSchema: z.ZodType< - FeedsControllerDeleteFeedByIdRequest$Outbound, - z.ZodTypeDef, - FeedsControllerDeleteFeedByIdRequest -> = z.object({ - feedId: 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 FeedsControllerDeleteFeedByIdRequest$ { - /** @deprecated use `FeedsControllerDeleteFeedByIdRequest$inboundSchema` instead. */ - export const inboundSchema = - FeedsControllerDeleteFeedByIdRequest$inboundSchema; - /** @deprecated use `FeedsControllerDeleteFeedByIdRequest$outboundSchema` instead. */ - export const outboundSchema = - FeedsControllerDeleteFeedByIdRequest$outboundSchema; - /** @deprecated use `FeedsControllerDeleteFeedByIdRequest$Outbound` instead. */ - export type Outbound = FeedsControllerDeleteFeedByIdRequest$Outbound; -} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index daf49eb4..5d8c728f 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -2,31 +2,37 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./changescontrollerapplydiff.js"; -export * from "./changescontrollergetchanges.js"; +export * from "./environmentscontrollerv1getcurrentenvironment.js"; +export * from "./environmentscontrollerv1listmyenvironments.js"; +export * from "./environmentscontrollerv1listorganizationapikeys.js"; +export * from "./eventscontrollerbroadcasteventtoall.js"; export * from "./eventscontrollercancel.js"; +export * from "./eventscontrollertrigger.js"; +export * from "./eventscontrollertriggerbulk.js"; export * from "./executiondetailscontrollergetexecutiondetailsfornotification.js"; -export * from "./feedscontrollerdeletefeedbyid.js"; +export * from "./integrationscontrollercreateintegration.js"; +export * from "./integrationscontrollergetactiveintegrations.js"; export * from "./integrationscontrollergetwebhooksupportstatus.js"; +export * from "./integrationscontrollerlistintegrations.js"; export * from "./integrationscontrollerremoveintegration.js"; export * from "./integrationscontrollersetintegrationasprimary.js"; export * from "./integrationscontrollerupdateintegrationbyid.js"; -export * from "./layoutscontrollerdeletelayout.js"; -export * from "./layoutscontrollergetlayout.js"; -export * from "./layoutscontrollerlistlayouts.js"; -export * from "./layoutscontrollersetdefaultlayout.js"; -export * from "./layoutscontrollerupdatelayout.js"; export * from "./messagescontrollerdeletemessage.js"; export * from "./messagescontrollerdeletemessagesbytransactionid.js"; export * from "./messagescontrollergetmessages.js"; +export * from "./notificationgroupscontrollercreatenotificationgroup.js"; export * from "./notificationgroupscontrollerdeletenotificationgroup.js"; export * from "./notificationgroupscontrollergetnotificationgroup.js"; +export * from "./notificationgroupscontrollerlistnotificationgroups.js"; export * from "./notificationgroupscontrollerupdatenotificationgroup.js"; export * from "./notificationscontrollergetactivitygraphstats.js"; +export * from "./notificationscontrollergetactivitystats.js"; export * from "./notificationscontrollergetnotification.js"; export * from "./notificationscontrollerlistnotifications.js"; +export * from "./subscriberscontrollerbulkcreatesubscribers.js"; export * from "./subscriberscontrollerchataccessoauth.js"; export * from "./subscriberscontrollerchatoauthcallback.js"; +export * from "./subscriberscontrollercreatesubscriber.js"; export * from "./subscriberscontrollerdeletesubscribercredentials.js"; export * from "./subscriberscontrollergetnotificationsfeed.js"; export * from "./subscriberscontrollergetsubscriber.js"; @@ -44,19 +50,11 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js"; export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js"; export * from "./subscriberscontrollerupdatesubscriberonlineflag.js"; export * from "./subscriberscontrollerupdatesubscriberpreference.js"; -export * from "./tenantcontrollergettenantbyid.js"; -export * from "./tenantcontrollerlisttenants.js"; -export * from "./tenantcontrollerremovetenant.js"; -export * from "./tenantcontrollerupdatetenant.js"; export * from "./topicscontrolleraddsubscribers.js"; +export * from "./topicscontrollercreatetopic.js"; export * from "./topicscontrollerdeletetopic.js"; export * from "./topicscontrollergettopic.js"; export * from "./topicscontrollergettopicsubscriber.js"; export * from "./topicscontrollerlisttopics.js"; export * from "./topicscontrollerremovesubscribers.js"; export * from "./topicscontrollerrenametopic.js"; -export * from "./workflowcontrollerdeleteworkflowbyid.js"; -export * from "./workflowcontrollergetworkflowbyid.js"; -export * from "./workflowcontrollerlistworkflows.js"; -export * from "./workflowcontrollerupdateactivestatus.js"; -export * from "./workflowcontrollerupdateworkflowbyid.js"; diff --git a/src/models/operations/integrationscontrollercreateintegration.ts b/src/models/operations/integrationscontrollercreateintegration.ts new file mode 100644 index 00000000..8e603d05 --- /dev/null +++ b/src/models/operations/integrationscontrollercreateintegration.ts @@ -0,0 +1,96 @@ +/* + * 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 IntegrationsControllerCreateIntegrationResponse = { + headers: { [k: string]: Array }; + result: components.IntegrationResponseDto; +}; + +/** @internal */ +export const IntegrationsControllerCreateIntegrationResponse$inboundSchema: + z.ZodType< + IntegrationsControllerCreateIntegrationResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.IntegrationResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerCreateIntegrationResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.IntegrationResponseDto$Outbound; +}; + +/** @internal */ +export const IntegrationsControllerCreateIntegrationResponse$outboundSchema: + z.ZodType< + IntegrationsControllerCreateIntegrationResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerCreateIntegrationResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.IntegrationResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerCreateIntegrationResponse$ { + /** @deprecated use `IntegrationsControllerCreateIntegrationResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerCreateIntegrationResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerCreateIntegrationResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerCreateIntegrationResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerCreateIntegrationResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerCreateIntegrationResponse$Outbound; +} + +export function integrationsControllerCreateIntegrationResponseToJSON( + integrationsControllerCreateIntegrationResponse: + IntegrationsControllerCreateIntegrationResponse, +): string { + return JSON.stringify( + IntegrationsControllerCreateIntegrationResponse$outboundSchema.parse( + integrationsControllerCreateIntegrationResponse, + ), + ); +} + +export function integrationsControllerCreateIntegrationResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerCreateIntegrationResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerCreateIntegrationResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerCreateIntegrationResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollergetactiveintegrations.ts b/src/models/operations/integrationscontrollergetactiveintegrations.ts new file mode 100644 index 00000000..44eab8ee --- /dev/null +++ b/src/models/operations/integrationscontrollergetactiveintegrations.ts @@ -0,0 +1,96 @@ +/* + * 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 IntegrationsControllerGetActiveIntegrationsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const IntegrationsControllerGetActiveIntegrationsResponse$inboundSchema: + z.ZodType< + IntegrationsControllerGetActiveIntegrationsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.IntegrationResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerGetActiveIntegrationsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const IntegrationsControllerGetActiveIntegrationsResponse$outboundSchema: + z.ZodType< + IntegrationsControllerGetActiveIntegrationsResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerGetActiveIntegrationsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.IntegrationResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerGetActiveIntegrationsResponse$ { + /** @deprecated use `IntegrationsControllerGetActiveIntegrationsResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerGetActiveIntegrationsResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerGetActiveIntegrationsResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerGetActiveIntegrationsResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerGetActiveIntegrationsResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerGetActiveIntegrationsResponse$Outbound; +} + +export function integrationsControllerGetActiveIntegrationsResponseToJSON( + integrationsControllerGetActiveIntegrationsResponse: + IntegrationsControllerGetActiveIntegrationsResponse, +): string { + return JSON.stringify( + IntegrationsControllerGetActiveIntegrationsResponse$outboundSchema.parse( + integrationsControllerGetActiveIntegrationsResponse, + ), + ); +} + +export function integrationsControllerGetActiveIntegrationsResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerGetActiveIntegrationsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerGetActiveIntegrationsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerGetActiveIntegrationsResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts b/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts index 3bec0d80..326ed208 100644 --- a/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts +++ b/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts @@ -3,11 +3,20 @@ */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IntegrationsControllerGetWebhookSupportStatusRequest = { providerOrIntegrationId: string; }; +export type IntegrationsControllerGetWebhookSupportStatusResponse = { + headers: { [k: string]: Array }; + result: boolean; +}; + /** @internal */ export const IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema: z.ZodType< @@ -48,3 +57,111 @@ export namespace IntegrationsControllerGetWebhookSupportStatusRequest$ { export type Outbound = IntegrationsControllerGetWebhookSupportStatusRequest$Outbound; } + +export function integrationsControllerGetWebhookSupportStatusRequestToJSON( + integrationsControllerGetWebhookSupportStatusRequest: + IntegrationsControllerGetWebhookSupportStatusRequest, +): string { + return JSON.stringify( + IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema.parse( + integrationsControllerGetWebhookSupportStatusRequest, + ), + ); +} + +export function integrationsControllerGetWebhookSupportStatusRequestFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerGetWebhookSupportStatusRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerGetWebhookSupportStatusRequest' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsControllerGetWebhookSupportStatusResponse$inboundSchema: + z.ZodType< + IntegrationsControllerGetWebhookSupportStatusResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.boolean(), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerGetWebhookSupportStatusResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: boolean; +}; + +/** @internal */ +export const IntegrationsControllerGetWebhookSupportStatusResponse$outboundSchema: + z.ZodType< + IntegrationsControllerGetWebhookSupportStatusResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerGetWebhookSupportStatusResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.boolean(), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerGetWebhookSupportStatusResponse$ { + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerGetWebhookSupportStatusResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerGetWebhookSupportStatusResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerGetWebhookSupportStatusResponse$Outbound; +} + +export function integrationsControllerGetWebhookSupportStatusResponseToJSON( + integrationsControllerGetWebhookSupportStatusResponse: + IntegrationsControllerGetWebhookSupportStatusResponse, +): string { + return JSON.stringify( + IntegrationsControllerGetWebhookSupportStatusResponse$outboundSchema.parse( + integrationsControllerGetWebhookSupportStatusResponse, + ), + ); +} + +export function integrationsControllerGetWebhookSupportStatusResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerGetWebhookSupportStatusResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerGetWebhookSupportStatusResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerGetWebhookSupportStatusResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollerlistintegrations.ts b/src/models/operations/integrationscontrollerlistintegrations.ts new file mode 100644 index 00000000..6b0b65f9 --- /dev/null +++ b/src/models/operations/integrationscontrollerlistintegrations.ts @@ -0,0 +1,96 @@ +/* + * 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 IntegrationsControllerListIntegrationsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const IntegrationsControllerListIntegrationsResponse$inboundSchema: + z.ZodType< + IntegrationsControllerListIntegrationsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.IntegrationResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerListIntegrationsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const IntegrationsControllerListIntegrationsResponse$outboundSchema: + z.ZodType< + IntegrationsControllerListIntegrationsResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerListIntegrationsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.IntegrationResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerListIntegrationsResponse$ { + /** @deprecated use `IntegrationsControllerListIntegrationsResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerListIntegrationsResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerListIntegrationsResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerListIntegrationsResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerListIntegrationsResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerListIntegrationsResponse$Outbound; +} + +export function integrationsControllerListIntegrationsResponseToJSON( + integrationsControllerListIntegrationsResponse: + IntegrationsControllerListIntegrationsResponse, +): string { + return JSON.stringify( + IntegrationsControllerListIntegrationsResponse$outboundSchema.parse( + integrationsControllerListIntegrationsResponse, + ), + ); +} + +export function integrationsControllerListIntegrationsResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerListIntegrationsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerListIntegrationsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerListIntegrationsResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollerremoveintegration.ts b/src/models/operations/integrationscontrollerremoveintegration.ts index cd3eeaa8..bcdec774 100644 --- a/src/models/operations/integrationscontrollerremoveintegration.ts +++ b/src/models/operations/integrationscontrollerremoveintegration.ts @@ -3,11 +3,21 @@ */ 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 IntegrationsControllerRemoveIntegrationRequest = { integrationId: string; }; +export type IntegrationsControllerRemoveIntegrationResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + /** @internal */ export const IntegrationsControllerRemoveIntegrationRequest$inboundSchema: z.ZodType< @@ -48,3 +58,111 @@ export namespace IntegrationsControllerRemoveIntegrationRequest$ { export type Outbound = IntegrationsControllerRemoveIntegrationRequest$Outbound; } + +export function integrationsControllerRemoveIntegrationRequestToJSON( + integrationsControllerRemoveIntegrationRequest: + IntegrationsControllerRemoveIntegrationRequest, +): string { + return JSON.stringify( + IntegrationsControllerRemoveIntegrationRequest$outboundSchema.parse( + integrationsControllerRemoveIntegrationRequest, + ), + ); +} + +export function integrationsControllerRemoveIntegrationRequestFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerRemoveIntegrationRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerRemoveIntegrationRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerRemoveIntegrationRequest' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsControllerRemoveIntegrationResponse$inboundSchema: + z.ZodType< + IntegrationsControllerRemoveIntegrationResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.IntegrationResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerRemoveIntegrationResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const IntegrationsControllerRemoveIntegrationResponse$outboundSchema: + z.ZodType< + IntegrationsControllerRemoveIntegrationResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerRemoveIntegrationResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.IntegrationResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerRemoveIntegrationResponse$ { + /** @deprecated use `IntegrationsControllerRemoveIntegrationResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerRemoveIntegrationResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerRemoveIntegrationResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerRemoveIntegrationResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerRemoveIntegrationResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerRemoveIntegrationResponse$Outbound; +} + +export function integrationsControllerRemoveIntegrationResponseToJSON( + integrationsControllerRemoveIntegrationResponse: + IntegrationsControllerRemoveIntegrationResponse, +): string { + return JSON.stringify( + IntegrationsControllerRemoveIntegrationResponse$outboundSchema.parse( + integrationsControllerRemoveIntegrationResponse, + ), + ); +} + +export function integrationsControllerRemoveIntegrationResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerRemoveIntegrationResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerRemoveIntegrationResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerRemoveIntegrationResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollersetintegrationasprimary.ts b/src/models/operations/integrationscontrollersetintegrationasprimary.ts index 0a2011fd..454f8440 100644 --- a/src/models/operations/integrationscontrollersetintegrationasprimary.ts +++ b/src/models/operations/integrationscontrollersetintegrationasprimary.ts @@ -3,11 +3,21 @@ */ 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 IntegrationsControllerSetIntegrationAsPrimaryRequest = { integrationId: string; }; +export type IntegrationsControllerSetIntegrationAsPrimaryResponse = { + headers: { [k: string]: Array }; + result: components.IntegrationResponseDto; +}; + /** @internal */ export const IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema: z.ZodType< @@ -48,3 +58,111 @@ export namespace IntegrationsControllerSetIntegrationAsPrimaryRequest$ { export type Outbound = IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound; } + +export function integrationsControllerSetIntegrationAsPrimaryRequestToJSON( + integrationsControllerSetIntegrationAsPrimaryRequest: + IntegrationsControllerSetIntegrationAsPrimaryRequest, +): string { + return JSON.stringify( + IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema.parse( + integrationsControllerSetIntegrationAsPrimaryRequest, + ), + ); +} + +export function integrationsControllerSetIntegrationAsPrimaryRequestFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerSetIntegrationAsPrimaryRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerSetIntegrationAsPrimaryRequest' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsControllerSetIntegrationAsPrimaryResponse$inboundSchema: + z.ZodType< + IntegrationsControllerSetIntegrationAsPrimaryResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.IntegrationResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerSetIntegrationAsPrimaryResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.IntegrationResponseDto$Outbound; +}; + +/** @internal */ +export const IntegrationsControllerSetIntegrationAsPrimaryResponse$outboundSchema: + z.ZodType< + IntegrationsControllerSetIntegrationAsPrimaryResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerSetIntegrationAsPrimaryResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.IntegrationResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerSetIntegrationAsPrimaryResponse$ { + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerSetIntegrationAsPrimaryResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerSetIntegrationAsPrimaryResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerSetIntegrationAsPrimaryResponse$Outbound; +} + +export function integrationsControllerSetIntegrationAsPrimaryResponseToJSON( + integrationsControllerSetIntegrationAsPrimaryResponse: + IntegrationsControllerSetIntegrationAsPrimaryResponse, +): string { + return JSON.stringify( + IntegrationsControllerSetIntegrationAsPrimaryResponse$outboundSchema.parse( + integrationsControllerSetIntegrationAsPrimaryResponse, + ), + ); +} + +export function integrationsControllerSetIntegrationAsPrimaryResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerSetIntegrationAsPrimaryResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerSetIntegrationAsPrimaryResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerSetIntegrationAsPrimaryResponse' from JSON`, + ); +} diff --git a/src/models/operations/integrationscontrollerupdateintegrationbyid.ts b/src/models/operations/integrationscontrollerupdateintegrationbyid.ts index 3c76a2c5..f3bd1193 100644 --- a/src/models/operations/integrationscontrollerupdateintegrationbyid.ts +++ b/src/models/operations/integrationscontrollerupdateintegrationbyid.ts @@ -4,13 +4,21 @@ 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 IntegrationsControllerUpdateIntegrationByIdRequest = { integrationId: string; updateIntegrationRequestDto: components.UpdateIntegrationRequestDto; }; +export type IntegrationsControllerUpdateIntegrationByIdResponse = { + headers: { [k: string]: Array }; + result: components.IntegrationResponseDto; +}; + /** @internal */ export const IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema: z.ZodType< @@ -64,3 +72,111 @@ export namespace IntegrationsControllerUpdateIntegrationByIdRequest$ { export type Outbound = IntegrationsControllerUpdateIntegrationByIdRequest$Outbound; } + +export function integrationsControllerUpdateIntegrationByIdRequestToJSON( + integrationsControllerUpdateIntegrationByIdRequest: + IntegrationsControllerUpdateIntegrationByIdRequest, +): string { + return JSON.stringify( + IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema.parse( + integrationsControllerUpdateIntegrationByIdRequest, + ), + ); +} + +export function integrationsControllerUpdateIntegrationByIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerUpdateIntegrationByIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerUpdateIntegrationByIdRequest' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsControllerUpdateIntegrationByIdResponse$inboundSchema: + z.ZodType< + IntegrationsControllerUpdateIntegrationByIdResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.IntegrationResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type IntegrationsControllerUpdateIntegrationByIdResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.IntegrationResponseDto$Outbound; +}; + +/** @internal */ +export const IntegrationsControllerUpdateIntegrationByIdResponse$outboundSchema: + z.ZodType< + IntegrationsControllerUpdateIntegrationByIdResponse$Outbound, + z.ZodTypeDef, + IntegrationsControllerUpdateIntegrationByIdResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.IntegrationResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsControllerUpdateIntegrationByIdResponse$ { + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdResponse$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerUpdateIntegrationByIdResponse$inboundSchema; + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdResponse$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerUpdateIntegrationByIdResponse$outboundSchema; + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdResponse$Outbound` instead. */ + export type Outbound = + IntegrationsControllerUpdateIntegrationByIdResponse$Outbound; +} + +export function integrationsControllerUpdateIntegrationByIdResponseToJSON( + integrationsControllerUpdateIntegrationByIdResponse: + IntegrationsControllerUpdateIntegrationByIdResponse, +): string { + return JSON.stringify( + IntegrationsControllerUpdateIntegrationByIdResponse$outboundSchema.parse( + integrationsControllerUpdateIntegrationByIdResponse, + ), + ); +} + +export function integrationsControllerUpdateIntegrationByIdResponseFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsControllerUpdateIntegrationByIdResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsControllerUpdateIntegrationByIdResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsControllerUpdateIntegrationByIdResponse' from JSON`, + ); +} diff --git a/src/models/operations/layoutscontrollerdeletelayout.ts b/src/models/operations/layoutscontrollerdeletelayout.ts deleted file mode 100644 index a9f863fc..00000000 --- a/src/models/operations/layoutscontrollerdeletelayout.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type LayoutsControllerDeleteLayoutRequest = { - /** - * The layout id - */ - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerDeleteLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerDeleteLayoutRequest, - z.ZodTypeDef, - unknown -> = z.object({ - layoutId: z.string(), -}); - -/** @internal */ -export type LayoutsControllerDeleteLayoutRequest$Outbound = { - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerDeleteLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerDeleteLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerDeleteLayoutRequest -> = z.object({ - layoutId: 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 LayoutsControllerDeleteLayoutRequest$ { - /** @deprecated use `LayoutsControllerDeleteLayoutRequest$inboundSchema` instead. */ - export const inboundSchema = - LayoutsControllerDeleteLayoutRequest$inboundSchema; - /** @deprecated use `LayoutsControllerDeleteLayoutRequest$outboundSchema` instead. */ - export const outboundSchema = - LayoutsControllerDeleteLayoutRequest$outboundSchema; - /** @deprecated use `LayoutsControllerDeleteLayoutRequest$Outbound` instead. */ - export type Outbound = LayoutsControllerDeleteLayoutRequest$Outbound; -} diff --git a/src/models/operations/layoutscontrollergetlayout.ts b/src/models/operations/layoutscontrollergetlayout.ts deleted file mode 100644 index 972044e8..00000000 --- a/src/models/operations/layoutscontrollergetlayout.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type LayoutsControllerGetLayoutRequest = { - /** - * The layout id - */ - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerGetLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerGetLayoutRequest, - z.ZodTypeDef, - unknown -> = z.object({ - layoutId: z.string(), -}); - -/** @internal */ -export type LayoutsControllerGetLayoutRequest$Outbound = { - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerGetLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerGetLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerGetLayoutRequest -> = z.object({ - layoutId: 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 LayoutsControllerGetLayoutRequest$ { - /** @deprecated use `LayoutsControllerGetLayoutRequest$inboundSchema` instead. */ - export const inboundSchema = LayoutsControllerGetLayoutRequest$inboundSchema; - /** @deprecated use `LayoutsControllerGetLayoutRequest$outboundSchema` instead. */ - export const outboundSchema = - LayoutsControllerGetLayoutRequest$outboundSchema; - /** @deprecated use `LayoutsControllerGetLayoutRequest$Outbound` instead. */ - export type Outbound = LayoutsControllerGetLayoutRequest$Outbound; -} diff --git a/src/models/operations/layoutscontrollerlistlayouts.ts b/src/models/operations/layoutscontrollerlistlayouts.ts deleted file mode 100644 index 3d7e1a80..00000000 --- a/src/models/operations/layoutscontrollerlistlayouts.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../../types/enums.js"; - -/** - * Direction of the sorting query param - */ -export const OrderBy = { - Asc: "ASC", - Desc: "DESC", -} as const; -/** - * Direction of the sorting query param - */ -export type OrderBy = ClosedEnum; - -export type LayoutsControllerListLayoutsRequest = { - /** - * Number of page for pagination - */ - page?: number | undefined; - /** - * Size of page for pagination - */ - pageSize?: number | undefined; - /** - * Sort field. Currently only supported `createdAt` - */ - sortBy?: string | undefined; - /** - * Direction of the sorting query param - */ - orderBy?: OrderBy | undefined; -}; - -/** @internal */ -export const OrderBy$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(OrderBy); - -/** @internal */ -export const OrderBy$outboundSchema: z.ZodNativeEnum = - OrderBy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OrderBy$ { - /** @deprecated use `OrderBy$inboundSchema` instead. */ - export const inboundSchema = OrderBy$inboundSchema; - /** @deprecated use `OrderBy$outboundSchema` instead. */ - export const outboundSchema = OrderBy$outboundSchema; -} - -/** @internal */ -export const LayoutsControllerListLayoutsRequest$inboundSchema: z.ZodType< - LayoutsControllerListLayoutsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().optional(), - pageSize: z.number().optional(), - sortBy: z.string().optional(), - orderBy: OrderBy$inboundSchema.optional(), -}); - -/** @internal */ -export type LayoutsControllerListLayoutsRequest$Outbound = { - page?: number | undefined; - pageSize?: number | undefined; - sortBy?: string | undefined; - orderBy?: string | undefined; -}; - -/** @internal */ -export const LayoutsControllerListLayoutsRequest$outboundSchema: z.ZodType< - LayoutsControllerListLayoutsRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerListLayoutsRequest -> = z.object({ - page: z.number().optional(), - pageSize: z.number().optional(), - sortBy: z.string().optional(), - orderBy: OrderBy$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace LayoutsControllerListLayoutsRequest$ { - /** @deprecated use `LayoutsControllerListLayoutsRequest$inboundSchema` instead. */ - export const inboundSchema = - LayoutsControllerListLayoutsRequest$inboundSchema; - /** @deprecated use `LayoutsControllerListLayoutsRequest$outboundSchema` instead. */ - export const outboundSchema = - LayoutsControllerListLayoutsRequest$outboundSchema; - /** @deprecated use `LayoutsControllerListLayoutsRequest$Outbound` instead. */ - export type Outbound = LayoutsControllerListLayoutsRequest$Outbound; -} diff --git a/src/models/operations/layoutscontrollersetdefaultlayout.ts b/src/models/operations/layoutscontrollersetdefaultlayout.ts deleted file mode 100644 index e0c014cb..00000000 --- a/src/models/operations/layoutscontrollersetdefaultlayout.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type LayoutsControllerSetDefaultLayoutRequest = { - /** - * The layout id - */ - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerSetDefaultLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerSetDefaultLayoutRequest, - z.ZodTypeDef, - unknown -> = z.object({ - layoutId: z.string(), -}); - -/** @internal */ -export type LayoutsControllerSetDefaultLayoutRequest$Outbound = { - layoutId: string; -}; - -/** @internal */ -export const LayoutsControllerSetDefaultLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerSetDefaultLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerSetDefaultLayoutRequest -> = z.object({ - layoutId: 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 LayoutsControllerSetDefaultLayoutRequest$ { - /** @deprecated use `LayoutsControllerSetDefaultLayoutRequest$inboundSchema` instead. */ - export const inboundSchema = - LayoutsControllerSetDefaultLayoutRequest$inboundSchema; - /** @deprecated use `LayoutsControllerSetDefaultLayoutRequest$outboundSchema` instead. */ - export const outboundSchema = - LayoutsControllerSetDefaultLayoutRequest$outboundSchema; - /** @deprecated use `LayoutsControllerSetDefaultLayoutRequest$Outbound` instead. */ - export type Outbound = LayoutsControllerSetDefaultLayoutRequest$Outbound; -} diff --git a/src/models/operations/layoutscontrollerupdatelayout.ts b/src/models/operations/layoutscontrollerupdatelayout.ts deleted file mode 100644 index 9891dd3d..00000000 --- a/src/models/operations/layoutscontrollerupdatelayout.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import * as components from "../components/index.js"; - -export type LayoutsControllerUpdateLayoutRequest = { - /** - * The layout id - */ - layoutId: string; - updateLayoutRequestDto: components.UpdateLayoutRequestDto; -}; - -/** @internal */ -export const LayoutsControllerUpdateLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerUpdateLayoutRequest, - z.ZodTypeDef, - unknown -> = z.object({ - layoutId: z.string(), - UpdateLayoutRequestDto: components.UpdateLayoutRequestDto$inboundSchema, -}).transform((v) => { - return remap$(v, { - "UpdateLayoutRequestDto": "updateLayoutRequestDto", - }); -}); - -/** @internal */ -export type LayoutsControllerUpdateLayoutRequest$Outbound = { - layoutId: string; - UpdateLayoutRequestDto: components.UpdateLayoutRequestDto$Outbound; -}; - -/** @internal */ -export const LayoutsControllerUpdateLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerUpdateLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerUpdateLayoutRequest -> = z.object({ - layoutId: z.string(), - updateLayoutRequestDto: components.UpdateLayoutRequestDto$outboundSchema, -}).transform((v) => { - return remap$(v, { - updateLayoutRequestDto: "UpdateLayoutRequestDto", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace LayoutsControllerUpdateLayoutRequest$ { - /** @deprecated use `LayoutsControllerUpdateLayoutRequest$inboundSchema` instead. */ - export const inboundSchema = - LayoutsControllerUpdateLayoutRequest$inboundSchema; - /** @deprecated use `LayoutsControllerUpdateLayoutRequest$outboundSchema` instead. */ - export const outboundSchema = - LayoutsControllerUpdateLayoutRequest$outboundSchema; - /** @deprecated use `LayoutsControllerUpdateLayoutRequest$Outbound` instead. */ - export type Outbound = LayoutsControllerUpdateLayoutRequest$Outbound; -} diff --git a/src/models/operations/messagescontrollerdeletemessage.ts b/src/models/operations/messagescontrollerdeletemessage.ts index 7785ee8e..fc4b81d6 100644 --- a/src/models/operations/messagescontrollerdeletemessage.ts +++ b/src/models/operations/messagescontrollerdeletemessage.ts @@ -3,11 +3,21 @@ */ 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 MessagesControllerDeleteMessageRequest = { messageId: string; }; +export type MessagesControllerDeleteMessageResponse = { + headers: { [k: string]: Array }; + result: components.DeleteMessageResponseDto; +}; + /** @internal */ export const MessagesControllerDeleteMessageRequest$inboundSchema: z.ZodType< MessagesControllerDeleteMessageRequest, @@ -45,3 +55,103 @@ export namespace MessagesControllerDeleteMessageRequest$ { /** @deprecated use `MessagesControllerDeleteMessageRequest$Outbound` instead. */ export type Outbound = MessagesControllerDeleteMessageRequest$Outbound; } + +export function messagesControllerDeleteMessageRequestToJSON( + messagesControllerDeleteMessageRequest: + MessagesControllerDeleteMessageRequest, +): string { + return JSON.stringify( + MessagesControllerDeleteMessageRequest$outboundSchema.parse( + messagesControllerDeleteMessageRequest, + ), + ); +} + +export function messagesControllerDeleteMessageRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + MessagesControllerDeleteMessageRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessagesControllerDeleteMessageRequest' from JSON`, + ); +} + +/** @internal */ +export const MessagesControllerDeleteMessageResponse$inboundSchema: z.ZodType< + MessagesControllerDeleteMessageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.DeleteMessageResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type MessagesControllerDeleteMessageResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.DeleteMessageResponseDto$Outbound; +}; + +/** @internal */ +export const MessagesControllerDeleteMessageResponse$outboundSchema: z.ZodType< + MessagesControllerDeleteMessageResponse$Outbound, + z.ZodTypeDef, + MessagesControllerDeleteMessageResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.DeleteMessageResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MessagesControllerDeleteMessageResponse$ { + /** @deprecated use `MessagesControllerDeleteMessageResponse$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerDeleteMessageResponse$inboundSchema; + /** @deprecated use `MessagesControllerDeleteMessageResponse$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerDeleteMessageResponse$outboundSchema; + /** @deprecated use `MessagesControllerDeleteMessageResponse$Outbound` instead. */ + export type Outbound = MessagesControllerDeleteMessageResponse$Outbound; +} + +export function messagesControllerDeleteMessageResponseToJSON( + messagesControllerDeleteMessageResponse: + MessagesControllerDeleteMessageResponse, +): string { + return JSON.stringify( + MessagesControllerDeleteMessageResponse$outboundSchema.parse( + messagesControllerDeleteMessageResponse, + ), + ); +} + +export function messagesControllerDeleteMessageResponseFromJSON( + jsonString: string, +): SafeParseResult< + MessagesControllerDeleteMessageResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + MessagesControllerDeleteMessageResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'MessagesControllerDeleteMessageResponse' from JSON`, + ); +} diff --git a/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts b/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts index f9e0d735..57a6607c 100644 --- a/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts +++ b/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts @@ -3,12 +3,16 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The channel of the message to be deleted */ -export const Channel = { +export const QueryParamChannel = { InApp: "in_app", Email: "email", Sms: "sms", @@ -18,33 +22,39 @@ export const Channel = { /** * The channel of the message to be deleted */ -export type Channel = ClosedEnum; +export type QueryParamChannel = ClosedEnum; export type MessagesControllerDeleteMessagesByTransactionIdRequest = { /** * The channel of the message to be deleted */ - channel?: Channel | undefined; + channel?: QueryParamChannel | undefined; transactionId: string; }; +export type MessagesControllerDeleteMessagesByTransactionIdResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ -export const Channel$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Channel); +export const QueryParamChannel$inboundSchema: z.ZodNativeEnum< + typeof QueryParamChannel +> = z.nativeEnum(QueryParamChannel); /** @internal */ -export const Channel$outboundSchema: z.ZodNativeEnum = - Channel$inboundSchema; +export const QueryParamChannel$outboundSchema: z.ZodNativeEnum< + typeof QueryParamChannel +> = QueryParamChannel$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Channel$ { - /** @deprecated use `Channel$inboundSchema` instead. */ - export const inboundSchema = Channel$inboundSchema; - /** @deprecated use `Channel$outboundSchema` instead. */ - export const outboundSchema = Channel$outboundSchema; +export namespace QueryParamChannel$ { + /** @deprecated use `QueryParamChannel$inboundSchema` instead. */ + export const inboundSchema = QueryParamChannel$inboundSchema; + /** @deprecated use `QueryParamChannel$outboundSchema` instead. */ + export const outboundSchema = QueryParamChannel$outboundSchema; } /** @internal */ @@ -54,7 +64,7 @@ export const MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchem z.ZodTypeDef, unknown > = z.object({ - channel: Channel$inboundSchema.optional(), + channel: QueryParamChannel$inboundSchema.optional(), transactionId: z.string(), }); @@ -71,7 +81,7 @@ export const MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSche z.ZodTypeDef, MessagesControllerDeleteMessagesByTransactionIdRequest > = z.object({ - channel: Channel$outboundSchema.optional(), + channel: QueryParamChannel$outboundSchema.optional(), transactionId: z.string(), }); @@ -90,3 +100,103 @@ export namespace MessagesControllerDeleteMessagesByTransactionIdRequest$ { export type Outbound = MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound; } + +export function messagesControllerDeleteMessagesByTransactionIdRequestToJSON( + messagesControllerDeleteMessagesByTransactionIdRequest: + MessagesControllerDeleteMessagesByTransactionIdRequest, +): string { + return JSON.stringify( + MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema.parse( + messagesControllerDeleteMessagesByTransactionIdRequest, + ), + ); +} + +export function messagesControllerDeleteMessagesByTransactionIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + MessagesControllerDeleteMessagesByTransactionIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'MessagesControllerDeleteMessagesByTransactionIdRequest' from JSON`, + ); +} + +/** @internal */ +export const MessagesControllerDeleteMessagesByTransactionIdResponse$inboundSchema: + z.ZodType< + MessagesControllerDeleteMessagesByTransactionIdResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); + }); + +/** @internal */ +export type MessagesControllerDeleteMessagesByTransactionIdResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const MessagesControllerDeleteMessagesByTransactionIdResponse$outboundSchema: + z.ZodType< + MessagesControllerDeleteMessagesByTransactionIdResponse$Outbound, + z.ZodTypeDef, + MessagesControllerDeleteMessagesByTransactionIdResponse + > = z.object({ + headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MessagesControllerDeleteMessagesByTransactionIdResponse$ { + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdResponse$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerDeleteMessagesByTransactionIdResponse$inboundSchema; + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdResponse$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerDeleteMessagesByTransactionIdResponse$outboundSchema; + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdResponse$Outbound` instead. */ + export type Outbound = + MessagesControllerDeleteMessagesByTransactionIdResponse$Outbound; +} + +export function messagesControllerDeleteMessagesByTransactionIdResponseToJSON( + messagesControllerDeleteMessagesByTransactionIdResponse: + MessagesControllerDeleteMessagesByTransactionIdResponse, +): string { + return JSON.stringify( + MessagesControllerDeleteMessagesByTransactionIdResponse$outboundSchema + .parse(messagesControllerDeleteMessagesByTransactionIdResponse), + ); +} + +export function messagesControllerDeleteMessagesByTransactionIdResponseFromJSON( + jsonString: string, +): SafeParseResult< + MessagesControllerDeleteMessagesByTransactionIdResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + MessagesControllerDeleteMessagesByTransactionIdResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'MessagesControllerDeleteMessagesByTransactionIdResponse' from JSON`, + ); +} diff --git a/src/models/operations/messagescontrollergetmessages.ts b/src/models/operations/messagescontrollergetmessages.ts index bd77fc5d..4b0ab8e2 100644 --- a/src/models/operations/messagescontrollergetmessages.ts +++ b/src/models/operations/messagescontrollergetmessages.ts @@ -3,44 +3,52 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const QueryParamChannel = { +export const Channel = { InApp: "in_app", Email: "email", Sms: "sms", Chat: "chat", Push: "push", } as const; -export type QueryParamChannel = ClosedEnum; +export type Channel = ClosedEnum; export type MessagesControllerGetMessagesRequest = { - channel?: QueryParamChannel | undefined; + channel?: Channel | undefined; subscriberId?: string | undefined; transactionId?: Array | undefined; page?: number | undefined; limit?: number | undefined; }; +export type MessagesControllerGetMessagesResponse = { + headers: { [k: string]: Array }; + result: components.ActivitiesResponseDto; +}; + /** @internal */ -export const QueryParamChannel$inboundSchema: z.ZodNativeEnum< - typeof QueryParamChannel -> = z.nativeEnum(QueryParamChannel); +export const Channel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channel); /** @internal */ -export const QueryParamChannel$outboundSchema: z.ZodNativeEnum< - typeof QueryParamChannel -> = QueryParamChannel$inboundSchema; +export const Channel$outboundSchema: z.ZodNativeEnum = + Channel$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamChannel$ { - /** @deprecated use `QueryParamChannel$inboundSchema` instead. */ - export const inboundSchema = QueryParamChannel$inboundSchema; - /** @deprecated use `QueryParamChannel$outboundSchema` instead. */ - export const outboundSchema = QueryParamChannel$outboundSchema; +export namespace Channel$ { + /** @deprecated use `Channel$inboundSchema` instead. */ + export const inboundSchema = Channel$inboundSchema; + /** @deprecated use `Channel$outboundSchema` instead. */ + export const outboundSchema = Channel$outboundSchema; } /** @internal */ @@ -49,7 +57,7 @@ export const MessagesControllerGetMessagesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - channel: QueryParamChannel$inboundSchema.optional(), + channel: Channel$inboundSchema.optional(), subscriberId: z.string().optional(), transactionId: z.array(z.string()).optional(), page: z.number().default(0), @@ -71,7 +79,7 @@ export const MessagesControllerGetMessagesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, MessagesControllerGetMessagesRequest > = z.object({ - channel: QueryParamChannel$outboundSchema.optional(), + channel: Channel$outboundSchema.optional(), subscriberId: z.string().optional(), transactionId: z.array(z.string()).optional(), page: z.number().default(0), @@ -92,3 +100,96 @@ export namespace MessagesControllerGetMessagesRequest$ { /** @deprecated use `MessagesControllerGetMessagesRequest$Outbound` instead. */ export type Outbound = MessagesControllerGetMessagesRequest$Outbound; } + +export function messagesControllerGetMessagesRequestToJSON( + messagesControllerGetMessagesRequest: MessagesControllerGetMessagesRequest, +): string { + return JSON.stringify( + MessagesControllerGetMessagesRequest$outboundSchema.parse( + messagesControllerGetMessagesRequest, + ), + ); +} + +export function messagesControllerGetMessagesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + MessagesControllerGetMessagesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessagesControllerGetMessagesRequest' from JSON`, + ); +} + +/** @internal */ +export const MessagesControllerGetMessagesResponse$inboundSchema: z.ZodType< + MessagesControllerGetMessagesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.ActivitiesResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type MessagesControllerGetMessagesResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.ActivitiesResponseDto$Outbound; +}; + +/** @internal */ +export const MessagesControllerGetMessagesResponse$outboundSchema: z.ZodType< + MessagesControllerGetMessagesResponse$Outbound, + z.ZodTypeDef, + MessagesControllerGetMessagesResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.ActivitiesResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MessagesControllerGetMessagesResponse$ { + /** @deprecated use `MessagesControllerGetMessagesResponse$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerGetMessagesResponse$inboundSchema; + /** @deprecated use `MessagesControllerGetMessagesResponse$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerGetMessagesResponse$outboundSchema; + /** @deprecated use `MessagesControllerGetMessagesResponse$Outbound` instead. */ + export type Outbound = MessagesControllerGetMessagesResponse$Outbound; +} + +export function messagesControllerGetMessagesResponseToJSON( + messagesControllerGetMessagesResponse: MessagesControllerGetMessagesResponse, +): string { + return JSON.stringify( + MessagesControllerGetMessagesResponse$outboundSchema.parse( + messagesControllerGetMessagesResponse, + ), + ); +} + +export function messagesControllerGetMessagesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + MessagesControllerGetMessagesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MessagesControllerGetMessagesResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationgroupscontrollercreatenotificationgroup.ts b/src/models/operations/notificationgroupscontrollercreatenotificationgroup.ts new file mode 100644 index 00000000..df21b7d2 --- /dev/null +++ b/src/models/operations/notificationgroupscontrollercreatenotificationgroup.ts @@ -0,0 +1,95 @@ +/* + * 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 NotificationGroupsControllerCreateNotificationGroupResponse = { + headers: { [k: string]: Array }; + result: components.NotificationGroupResponseDto; +}; + +/** @internal */ +export const NotificationGroupsControllerCreateNotificationGroupResponse$inboundSchema: + z.ZodType< + NotificationGroupsControllerCreateNotificationGroupResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.NotificationGroupResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationGroupsControllerCreateNotificationGroupResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: components.NotificationGroupResponseDto$Outbound; + }; + +/** @internal */ +export const NotificationGroupsControllerCreateNotificationGroupResponse$outboundSchema: + z.ZodType< + NotificationGroupsControllerCreateNotificationGroupResponse$Outbound, + z.ZodTypeDef, + NotificationGroupsControllerCreateNotificationGroupResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.NotificationGroupResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationGroupsControllerCreateNotificationGroupResponse$ { + /** @deprecated use `NotificationGroupsControllerCreateNotificationGroupResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerCreateNotificationGroupResponse$inboundSchema; + /** @deprecated use `NotificationGroupsControllerCreateNotificationGroupResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerCreateNotificationGroupResponse$outboundSchema; + /** @deprecated use `NotificationGroupsControllerCreateNotificationGroupResponse$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerCreateNotificationGroupResponse$Outbound; +} + +export function notificationGroupsControllerCreateNotificationGroupResponseToJSON( + notificationGroupsControllerCreateNotificationGroupResponse: + NotificationGroupsControllerCreateNotificationGroupResponse, +): string { + return JSON.stringify( + NotificationGroupsControllerCreateNotificationGroupResponse$outboundSchema + .parse(notificationGroupsControllerCreateNotificationGroupResponse), + ); +} + +export function notificationGroupsControllerCreateNotificationGroupResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerCreateNotificationGroupResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerCreateNotificationGroupResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerCreateNotificationGroupResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts b/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts index 2a456ee2..505fb746 100644 --- a/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts @@ -3,11 +3,21 @@ */ 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 NotificationGroupsControllerDeleteNotificationGroupRequest = { id: string; }; +export type NotificationGroupsControllerDeleteNotificationGroupResponse = { + headers: { [k: string]: Array }; + result: components.DeleteNotificationGroupResponseDto; +}; + /** @internal */ export const NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema: z.ZodType< @@ -49,3 +59,108 @@ export namespace NotificationGroupsControllerDeleteNotificationGroupRequest$ { export type Outbound = NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound; } + +export function notificationGroupsControllerDeleteNotificationGroupRequestToJSON( + notificationGroupsControllerDeleteNotificationGroupRequest: + NotificationGroupsControllerDeleteNotificationGroupRequest, +): string { + return JSON.stringify( + NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema + .parse(notificationGroupsControllerDeleteNotificationGroupRequest), + ); +} + +export function notificationGroupsControllerDeleteNotificationGroupRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerDeleteNotificationGroupRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerDeleteNotificationGroupRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationGroupsControllerDeleteNotificationGroupResponse$inboundSchema: + z.ZodType< + NotificationGroupsControllerDeleteNotificationGroupResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.DeleteNotificationGroupResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationGroupsControllerDeleteNotificationGroupResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: components.DeleteNotificationGroupResponseDto$Outbound; + }; + +/** @internal */ +export const NotificationGroupsControllerDeleteNotificationGroupResponse$outboundSchema: + z.ZodType< + NotificationGroupsControllerDeleteNotificationGroupResponse$Outbound, + z.ZodTypeDef, + NotificationGroupsControllerDeleteNotificationGroupResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.DeleteNotificationGroupResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationGroupsControllerDeleteNotificationGroupResponse$ { + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerDeleteNotificationGroupResponse$inboundSchema; + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerDeleteNotificationGroupResponse$outboundSchema; + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupResponse$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerDeleteNotificationGroupResponse$Outbound; +} + +export function notificationGroupsControllerDeleteNotificationGroupResponseToJSON( + notificationGroupsControllerDeleteNotificationGroupResponse: + NotificationGroupsControllerDeleteNotificationGroupResponse, +): string { + return JSON.stringify( + NotificationGroupsControllerDeleteNotificationGroupResponse$outboundSchema + .parse(notificationGroupsControllerDeleteNotificationGroupResponse), + ); +} + +export function notificationGroupsControllerDeleteNotificationGroupResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerDeleteNotificationGroupResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerDeleteNotificationGroupResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerDeleteNotificationGroupResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts b/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts index ed8870f6..8f66a911 100644 --- a/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts @@ -3,11 +3,21 @@ */ 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 NotificationGroupsControllerGetNotificationGroupRequest = { id: string; }; +export type NotificationGroupsControllerGetNotificationGroupResponse = { + headers: { [k: string]: Array }; + result: components.NotificationGroupResponseDto; +}; + /** @internal */ export const NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema: z.ZodType< @@ -48,3 +58,108 @@ export namespace NotificationGroupsControllerGetNotificationGroupRequest$ { export type Outbound = NotificationGroupsControllerGetNotificationGroupRequest$Outbound; } + +export function notificationGroupsControllerGetNotificationGroupRequestToJSON( + notificationGroupsControllerGetNotificationGroupRequest: + NotificationGroupsControllerGetNotificationGroupRequest, +): string { + return JSON.stringify( + NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema + .parse(notificationGroupsControllerGetNotificationGroupRequest), + ); +} + +export function notificationGroupsControllerGetNotificationGroupRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerGetNotificationGroupRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerGetNotificationGroupRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationGroupsControllerGetNotificationGroupResponse$inboundSchema: + z.ZodType< + NotificationGroupsControllerGetNotificationGroupResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.NotificationGroupResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationGroupsControllerGetNotificationGroupResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: components.NotificationGroupResponseDto$Outbound; + }; + +/** @internal */ +export const NotificationGroupsControllerGetNotificationGroupResponse$outboundSchema: + z.ZodType< + NotificationGroupsControllerGetNotificationGroupResponse$Outbound, + z.ZodTypeDef, + NotificationGroupsControllerGetNotificationGroupResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.NotificationGroupResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationGroupsControllerGetNotificationGroupResponse$ { + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerGetNotificationGroupResponse$inboundSchema; + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerGetNotificationGroupResponse$outboundSchema; + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupResponse$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerGetNotificationGroupResponse$Outbound; +} + +export function notificationGroupsControllerGetNotificationGroupResponseToJSON( + notificationGroupsControllerGetNotificationGroupResponse: + NotificationGroupsControllerGetNotificationGroupResponse, +): string { + return JSON.stringify( + NotificationGroupsControllerGetNotificationGroupResponse$outboundSchema + .parse(notificationGroupsControllerGetNotificationGroupResponse), + ); +} + +export function notificationGroupsControllerGetNotificationGroupResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerGetNotificationGroupResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerGetNotificationGroupResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerGetNotificationGroupResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationgroupscontrollerlistnotificationgroups.ts b/src/models/operations/notificationgroupscontrollerlistnotificationgroups.ts new file mode 100644 index 00000000..6c51dad2 --- /dev/null +++ b/src/models/operations/notificationgroupscontrollerlistnotificationgroups.ts @@ -0,0 +1,95 @@ +/* + * 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 NotificationGroupsControllerListNotificationGroupsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + +/** @internal */ +export const NotificationGroupsControllerListNotificationGroupsResponse$inboundSchema: + z.ZodType< + NotificationGroupsControllerListNotificationGroupsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.NotificationGroupResponseDto$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationGroupsControllerListNotificationGroupsResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: Array; + }; + +/** @internal */ +export const NotificationGroupsControllerListNotificationGroupsResponse$outboundSchema: + z.ZodType< + NotificationGroupsControllerListNotificationGroupsResponse$Outbound, + z.ZodTypeDef, + NotificationGroupsControllerListNotificationGroupsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.NotificationGroupResponseDto$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationGroupsControllerListNotificationGroupsResponse$ { + /** @deprecated use `NotificationGroupsControllerListNotificationGroupsResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerListNotificationGroupsResponse$inboundSchema; + /** @deprecated use `NotificationGroupsControllerListNotificationGroupsResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerListNotificationGroupsResponse$outboundSchema; + /** @deprecated use `NotificationGroupsControllerListNotificationGroupsResponse$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerListNotificationGroupsResponse$Outbound; +} + +export function notificationGroupsControllerListNotificationGroupsResponseToJSON( + notificationGroupsControllerListNotificationGroupsResponse: + NotificationGroupsControllerListNotificationGroupsResponse, +): string { + return JSON.stringify( + NotificationGroupsControllerListNotificationGroupsResponse$outboundSchema + .parse(notificationGroupsControllerListNotificationGroupsResponse), + ); +} + +export function notificationGroupsControllerListNotificationGroupsResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerListNotificationGroupsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerListNotificationGroupsResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerListNotificationGroupsResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts b/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts index ca99c034..5a7b80d0 100644 --- a/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts @@ -4,7 +4,10 @@ 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 NotificationGroupsControllerUpdateNotificationGroupRequest = { id: string; @@ -12,6 +15,11 @@ export type NotificationGroupsControllerUpdateNotificationGroupRequest = { components.CreateNotificationGroupRequestDto; }; +export type NotificationGroupsControllerUpdateNotificationGroupResponse = { + headers: { [k: string]: Array }; + result: components.NotificationGroupResponseDto; +}; + /** @internal */ export const NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema: z.ZodType< @@ -67,3 +75,108 @@ export namespace NotificationGroupsControllerUpdateNotificationGroupRequest$ { export type Outbound = NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound; } + +export function notificationGroupsControllerUpdateNotificationGroupRequestToJSON( + notificationGroupsControllerUpdateNotificationGroupRequest: + NotificationGroupsControllerUpdateNotificationGroupRequest, +): string { + return JSON.stringify( + NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema + .parse(notificationGroupsControllerUpdateNotificationGroupRequest), + ); +} + +export function notificationGroupsControllerUpdateNotificationGroupRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerUpdateNotificationGroupRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerUpdateNotificationGroupRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationGroupsControllerUpdateNotificationGroupResponse$inboundSchema: + z.ZodType< + NotificationGroupsControllerUpdateNotificationGroupResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.NotificationGroupResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationGroupsControllerUpdateNotificationGroupResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: components.NotificationGroupResponseDto$Outbound; + }; + +/** @internal */ +export const NotificationGroupsControllerUpdateNotificationGroupResponse$outboundSchema: + z.ZodType< + NotificationGroupsControllerUpdateNotificationGroupResponse$Outbound, + z.ZodTypeDef, + NotificationGroupsControllerUpdateNotificationGroupResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.NotificationGroupResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationGroupsControllerUpdateNotificationGroupResponse$ { + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerUpdateNotificationGroupResponse$inboundSchema; + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerUpdateNotificationGroupResponse$outboundSchema; + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupResponse$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerUpdateNotificationGroupResponse$Outbound; +} + +export function notificationGroupsControllerUpdateNotificationGroupResponseToJSON( + notificationGroupsControllerUpdateNotificationGroupResponse: + NotificationGroupsControllerUpdateNotificationGroupResponse, +): string { + return JSON.stringify( + NotificationGroupsControllerUpdateNotificationGroupResponse$outboundSchema + .parse(notificationGroupsControllerUpdateNotificationGroupResponse), + ); +} + +export function notificationGroupsControllerUpdateNotificationGroupResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationGroupsControllerUpdateNotificationGroupResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationGroupsControllerUpdateNotificationGroupResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NotificationGroupsControllerUpdateNotificationGroupResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationscontrollergetactivitygraphstats.ts b/src/models/operations/notificationscontrollergetactivitygraphstats.ts index cc0814dd..e392a033 100644 --- a/src/models/operations/notificationscontrollergetactivitygraphstats.ts +++ b/src/models/operations/notificationscontrollergetactivitygraphstats.ts @@ -3,11 +3,21 @@ */ 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 NotificationsControllerGetActivityGraphStatsRequest = { days?: number | undefined; }; +export type NotificationsControllerGetActivityGraphStatsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + /** @internal */ export const NotificationsControllerGetActivityGraphStatsRequest$inboundSchema: z.ZodType< @@ -48,3 +58,111 @@ export namespace NotificationsControllerGetActivityGraphStatsRequest$ { export type Outbound = NotificationsControllerGetActivityGraphStatsRequest$Outbound; } + +export function notificationsControllerGetActivityGraphStatsRequestToJSON( + notificationsControllerGetActivityGraphStatsRequest: + NotificationsControllerGetActivityGraphStatsRequest, +): string { + return JSON.stringify( + NotificationsControllerGetActivityGraphStatsRequest$outboundSchema.parse( + notificationsControllerGetActivityGraphStatsRequest, + ), + ); +} + +export function notificationsControllerGetActivityGraphStatsRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerGetActivityGraphStatsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerGetActivityGraphStatsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerGetActivityGraphStatsRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationsControllerGetActivityGraphStatsResponse$inboundSchema: + z.ZodType< + NotificationsControllerGetActivityGraphStatsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.ActivityGraphStatesResponse$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationsControllerGetActivityGraphStatsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const NotificationsControllerGetActivityGraphStatsResponse$outboundSchema: + z.ZodType< + NotificationsControllerGetActivityGraphStatsResponse$Outbound, + z.ZodTypeDef, + NotificationsControllerGetActivityGraphStatsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.ActivityGraphStatesResponse$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationsControllerGetActivityGraphStatsResponse$ { + /** @deprecated use `NotificationsControllerGetActivityGraphStatsResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerGetActivityGraphStatsResponse$inboundSchema; + /** @deprecated use `NotificationsControllerGetActivityGraphStatsResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerGetActivityGraphStatsResponse$outboundSchema; + /** @deprecated use `NotificationsControllerGetActivityGraphStatsResponse$Outbound` instead. */ + export type Outbound = + NotificationsControllerGetActivityGraphStatsResponse$Outbound; +} + +export function notificationsControllerGetActivityGraphStatsResponseToJSON( + notificationsControllerGetActivityGraphStatsResponse: + NotificationsControllerGetActivityGraphStatsResponse, +): string { + return JSON.stringify( + NotificationsControllerGetActivityGraphStatsResponse$outboundSchema.parse( + notificationsControllerGetActivityGraphStatsResponse, + ), + ); +} + +export function notificationsControllerGetActivityGraphStatsResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerGetActivityGraphStatsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerGetActivityGraphStatsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerGetActivityGraphStatsResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationscontrollergetactivitystats.ts b/src/models/operations/notificationscontrollergetactivitystats.ts new file mode 100644 index 00000000..49af179c --- /dev/null +++ b/src/models/operations/notificationscontrollergetactivitystats.ts @@ -0,0 +1,96 @@ +/* + * 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 NotificationsControllerGetActivityStatsResponse = { + headers: { [k: string]: Array }; + result: components.ActivityStatsResponseDto; +}; + +/** @internal */ +export const NotificationsControllerGetActivityStatsResponse$inboundSchema: + z.ZodType< + NotificationsControllerGetActivityStatsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.ActivityStatsResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationsControllerGetActivityStatsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.ActivityStatsResponseDto$Outbound; +}; + +/** @internal */ +export const NotificationsControllerGetActivityStatsResponse$outboundSchema: + z.ZodType< + NotificationsControllerGetActivityStatsResponse$Outbound, + z.ZodTypeDef, + NotificationsControllerGetActivityStatsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.ActivityStatsResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationsControllerGetActivityStatsResponse$ { + /** @deprecated use `NotificationsControllerGetActivityStatsResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerGetActivityStatsResponse$inboundSchema; + /** @deprecated use `NotificationsControllerGetActivityStatsResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerGetActivityStatsResponse$outboundSchema; + /** @deprecated use `NotificationsControllerGetActivityStatsResponse$Outbound` instead. */ + export type Outbound = + NotificationsControllerGetActivityStatsResponse$Outbound; +} + +export function notificationsControllerGetActivityStatsResponseToJSON( + notificationsControllerGetActivityStatsResponse: + NotificationsControllerGetActivityStatsResponse, +): string { + return JSON.stringify( + NotificationsControllerGetActivityStatsResponse$outboundSchema.parse( + notificationsControllerGetActivityStatsResponse, + ), + ); +} + +export function notificationsControllerGetActivityStatsResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerGetActivityStatsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerGetActivityStatsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerGetActivityStatsResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationscontrollergetnotification.ts b/src/models/operations/notificationscontrollergetnotification.ts index 1f7fa92b..12ae293d 100644 --- a/src/models/operations/notificationscontrollergetnotification.ts +++ b/src/models/operations/notificationscontrollergetnotification.ts @@ -3,11 +3,21 @@ */ 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 NotificationsControllerGetNotificationRequest = { notificationId: string; }; +export type NotificationsControllerGetNotificationResponse = { + headers: { [k: string]: Array }; + result: components.ActivityNotificationResponseDto; +}; + /** @internal */ export const NotificationsControllerGetNotificationRequest$inboundSchema: z.ZodType< @@ -47,3 +57,111 @@ export namespace NotificationsControllerGetNotificationRequest$ { /** @deprecated use `NotificationsControllerGetNotificationRequest$Outbound` instead. */ export type Outbound = NotificationsControllerGetNotificationRequest$Outbound; } + +export function notificationsControllerGetNotificationRequestToJSON( + notificationsControllerGetNotificationRequest: + NotificationsControllerGetNotificationRequest, +): string { + return JSON.stringify( + NotificationsControllerGetNotificationRequest$outboundSchema.parse( + notificationsControllerGetNotificationRequest, + ), + ); +} + +export function notificationsControllerGetNotificationRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerGetNotificationRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerGetNotificationRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerGetNotificationRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationsControllerGetNotificationResponse$inboundSchema: + z.ZodType< + NotificationsControllerGetNotificationResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.ActivityNotificationResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationsControllerGetNotificationResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.ActivityNotificationResponseDto$Outbound; +}; + +/** @internal */ +export const NotificationsControllerGetNotificationResponse$outboundSchema: + z.ZodType< + NotificationsControllerGetNotificationResponse$Outbound, + z.ZodTypeDef, + NotificationsControllerGetNotificationResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.ActivityNotificationResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationsControllerGetNotificationResponse$ { + /** @deprecated use `NotificationsControllerGetNotificationResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerGetNotificationResponse$inboundSchema; + /** @deprecated use `NotificationsControllerGetNotificationResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerGetNotificationResponse$outboundSchema; + /** @deprecated use `NotificationsControllerGetNotificationResponse$Outbound` instead. */ + export type Outbound = + NotificationsControllerGetNotificationResponse$Outbound; +} + +export function notificationsControllerGetNotificationResponseToJSON( + notificationsControllerGetNotificationResponse: + NotificationsControllerGetNotificationResponse, +): string { + return JSON.stringify( + NotificationsControllerGetNotificationResponse$outboundSchema.parse( + notificationsControllerGetNotificationResponse, + ), + ); +} + +export function notificationsControllerGetNotificationResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerGetNotificationResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerGetNotificationResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerGetNotificationResponse' from JSON`, + ); +} diff --git a/src/models/operations/notificationscontrollerlistnotifications.ts b/src/models/operations/notificationscontrollerlistnotifications.ts index e7d953a6..3643a26d 100644 --- a/src/models/operations/notificationscontrollerlistnotifications.ts +++ b/src/models/operations/notificationscontrollerlistnotifications.ts @@ -3,7 +3,12 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const Channels = { InApp: "in_app", @@ -27,6 +32,11 @@ export type NotificationsControllerListNotificationsRequest = { transactionId?: string | undefined; }; +export type NotificationsControllerListNotificationsResponse = { + headers: { [k: string]: Array }; + result: components.ActivitiesResponseDto; +}; + /** @internal */ export const Channels$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Channels); @@ -104,3 +114,111 @@ export namespace NotificationsControllerListNotificationsRequest$ { export type Outbound = NotificationsControllerListNotificationsRequest$Outbound; } + +export function notificationsControllerListNotificationsRequestToJSON( + notificationsControllerListNotificationsRequest: + NotificationsControllerListNotificationsRequest, +): string { + return JSON.stringify( + NotificationsControllerListNotificationsRequest$outboundSchema.parse( + notificationsControllerListNotificationsRequest, + ), + ); +} + +export function notificationsControllerListNotificationsRequestFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerListNotificationsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerListNotificationsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerListNotificationsRequest' from JSON`, + ); +} + +/** @internal */ +export const NotificationsControllerListNotificationsResponse$inboundSchema: + z.ZodType< + NotificationsControllerListNotificationsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.ActivitiesResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type NotificationsControllerListNotificationsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.ActivitiesResponseDto$Outbound; +}; + +/** @internal */ +export const NotificationsControllerListNotificationsResponse$outboundSchema: + z.ZodType< + NotificationsControllerListNotificationsResponse$Outbound, + z.ZodTypeDef, + NotificationsControllerListNotificationsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.ActivitiesResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationsControllerListNotificationsResponse$ { + /** @deprecated use `NotificationsControllerListNotificationsResponse$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerListNotificationsResponse$inboundSchema; + /** @deprecated use `NotificationsControllerListNotificationsResponse$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerListNotificationsResponse$outboundSchema; + /** @deprecated use `NotificationsControllerListNotificationsResponse$Outbound` instead. */ + export type Outbound = + NotificationsControllerListNotificationsResponse$Outbound; +} + +export function notificationsControllerListNotificationsResponseToJSON( + notificationsControllerListNotificationsResponse: + NotificationsControllerListNotificationsResponse, +): string { + return JSON.stringify( + NotificationsControllerListNotificationsResponse$outboundSchema.parse( + notificationsControllerListNotificationsResponse, + ), + ); +} + +export function notificationsControllerListNotificationsResponseFromJSON( + jsonString: string, +): SafeParseResult< + NotificationsControllerListNotificationsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NotificationsControllerListNotificationsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NotificationsControllerListNotificationsResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerbulkcreatesubscribers.ts b/src/models/operations/subscriberscontrollerbulkcreatesubscribers.ts new file mode 100644 index 00000000..bf66b66f --- /dev/null +++ b/src/models/operations/subscriberscontrollerbulkcreatesubscribers.ts @@ -0,0 +1,89 @@ +/* + * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SubscribersControllerBulkCreateSubscribersResponse = { + headers: { [k: string]: Array }; +}; + +/** @internal */ +export const SubscribersControllerBulkCreateSubscribersResponse$inboundSchema: + z.ZodType< + SubscribersControllerBulkCreateSubscribersResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); + }); + +/** @internal */ +export type SubscribersControllerBulkCreateSubscribersResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const SubscribersControllerBulkCreateSubscribersResponse$outboundSchema: + z.ZodType< + SubscribersControllerBulkCreateSubscribersResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerBulkCreateSubscribersResponse + > = z.object({ + headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerBulkCreateSubscribersResponse$ { + /** @deprecated use `SubscribersControllerBulkCreateSubscribersResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerBulkCreateSubscribersResponse$inboundSchema; + /** @deprecated use `SubscribersControllerBulkCreateSubscribersResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerBulkCreateSubscribersResponse$outboundSchema; + /** @deprecated use `SubscribersControllerBulkCreateSubscribersResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerBulkCreateSubscribersResponse$Outbound; +} + +export function subscribersControllerBulkCreateSubscribersResponseToJSON( + subscribersControllerBulkCreateSubscribersResponse: + SubscribersControllerBulkCreateSubscribersResponse, +): string { + return JSON.stringify( + SubscribersControllerBulkCreateSubscribersResponse$outboundSchema.parse( + subscribersControllerBulkCreateSubscribersResponse, + ), + ); +} + +export function subscribersControllerBulkCreateSubscribersResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerBulkCreateSubscribersResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerBulkCreateSubscribersResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerBulkCreateSubscribersResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerchataccessoauth.ts b/src/models/operations/subscriberscontrollerchataccessoauth.ts index e22a6cd8..384465b7 100644 --- a/src/models/operations/subscriberscontrollerchataccessoauth.ts +++ b/src/models/operations/subscriberscontrollerchataccessoauth.ts @@ -3,6 +3,10 @@ */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SubscribersControllerChatAccessOauthRequest = { subscriberId: string; @@ -12,6 +16,10 @@ export type SubscribersControllerChatAccessOauthRequest = { integrationIdentifier?: string | undefined; }; +export type SubscribersControllerChatAccessOauthResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ export const SubscribersControllerChatAccessOauthRequest$inboundSchema: z.ZodType< @@ -63,3 +71,105 @@ export namespace SubscribersControllerChatAccessOauthRequest$ { /** @deprecated use `SubscribersControllerChatAccessOauthRequest$Outbound` instead. */ export type Outbound = SubscribersControllerChatAccessOauthRequest$Outbound; } + +export function subscribersControllerChatAccessOauthRequestToJSON( + subscribersControllerChatAccessOauthRequest: + SubscribersControllerChatAccessOauthRequest, +): string { + return JSON.stringify( + SubscribersControllerChatAccessOauthRequest$outboundSchema.parse( + subscribersControllerChatAccessOauthRequest, + ), + ); +} + +export function subscribersControllerChatAccessOauthRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerChatAccessOauthRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerChatAccessOauthRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerChatAccessOauthRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerChatAccessOauthResponse$inboundSchema: + z.ZodType< + SubscribersControllerChatAccessOauthResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); + }); + +/** @internal */ +export type SubscribersControllerChatAccessOauthResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const SubscribersControllerChatAccessOauthResponse$outboundSchema: + z.ZodType< + SubscribersControllerChatAccessOauthResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerChatAccessOauthResponse + > = z.object({ + headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerChatAccessOauthResponse$ { + /** @deprecated use `SubscribersControllerChatAccessOauthResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerChatAccessOauthResponse$inboundSchema; + /** @deprecated use `SubscribersControllerChatAccessOauthResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerChatAccessOauthResponse$outboundSchema; + /** @deprecated use `SubscribersControllerChatAccessOauthResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerChatAccessOauthResponse$Outbound; +} + +export function subscribersControllerChatAccessOauthResponseToJSON( + subscribersControllerChatAccessOauthResponse: + SubscribersControllerChatAccessOauthResponse, +): string { + return JSON.stringify( + SubscribersControllerChatAccessOauthResponse$outboundSchema.parse( + subscribersControllerChatAccessOauthResponse, + ), + ); +} + +export function subscribersControllerChatAccessOauthResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerChatAccessOauthResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerChatAccessOauthResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerChatAccessOauthResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerchatoauthcallback.ts b/src/models/operations/subscriberscontrollerchatoauthcallback.ts index 5b03acc8..8f1b742e 100644 --- a/src/models/operations/subscriberscontrollerchatoauthcallback.ts +++ b/src/models/operations/subscriberscontrollerchatoauthcallback.ts @@ -3,6 +3,10 @@ */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SubscribersControllerChatOauthCallbackRequest = { subscriberId: string; @@ -15,6 +19,11 @@ export type SubscribersControllerChatOauthCallbackRequest = { export type SubscribersControllerChatOauthCallbackResponseBody = {}; +export type SubscribersControllerChatOauthCallbackResponse = { + headers: { [k: string]: Array }; + result: SubscribersControllerChatOauthCallbackResponseBody; +}; + /** @internal */ export const SubscribersControllerChatOauthCallbackRequest$inboundSchema: z.ZodType< @@ -70,6 +79,33 @@ export namespace SubscribersControllerChatOauthCallbackRequest$ { export type Outbound = SubscribersControllerChatOauthCallbackRequest$Outbound; } +export function subscribersControllerChatOauthCallbackRequestToJSON( + subscribersControllerChatOauthCallbackRequest: + SubscribersControllerChatOauthCallbackRequest, +): string { + return JSON.stringify( + SubscribersControllerChatOauthCallbackRequest$outboundSchema.parse( + subscribersControllerChatOauthCallbackRequest, + ), + ); +} + +export function subscribersControllerChatOauthCallbackRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerChatOauthCallbackRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerChatOauthCallbackRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerChatOauthCallbackRequest' from JSON`, + ); +} + /** @internal */ export const SubscribersControllerChatOauthCallbackResponseBody$inboundSchema: z.ZodType< @@ -104,3 +140,115 @@ export namespace SubscribersControllerChatOauthCallbackResponseBody$ { export type Outbound = SubscribersControllerChatOauthCallbackResponseBody$Outbound; } + +export function subscribersControllerChatOauthCallbackResponseBodyToJSON( + subscribersControllerChatOauthCallbackResponseBody: + SubscribersControllerChatOauthCallbackResponseBody, +): string { + return JSON.stringify( + SubscribersControllerChatOauthCallbackResponseBody$outboundSchema.parse( + subscribersControllerChatOauthCallbackResponseBody, + ), + ); +} + +export function subscribersControllerChatOauthCallbackResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerChatOauthCallbackResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerChatOauthCallbackResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerChatOauthCallbackResponseBody' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerChatOauthCallbackResponse$inboundSchema: + z.ZodType< + SubscribersControllerChatOauthCallbackResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.lazy(() => + SubscribersControllerChatOauthCallbackResponseBody$inboundSchema + ), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerChatOauthCallbackResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: SubscribersControllerChatOauthCallbackResponseBody$Outbound; +}; + +/** @internal */ +export const SubscribersControllerChatOauthCallbackResponse$outboundSchema: + z.ZodType< + SubscribersControllerChatOauthCallbackResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerChatOauthCallbackResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.lazy(() => + SubscribersControllerChatOauthCallbackResponseBody$outboundSchema + ), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerChatOauthCallbackResponse$ { + /** @deprecated use `SubscribersControllerChatOauthCallbackResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerChatOauthCallbackResponse$inboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerChatOauthCallbackResponse$outboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerChatOauthCallbackResponse$Outbound; +} + +export function subscribersControllerChatOauthCallbackResponseToJSON( + subscribersControllerChatOauthCallbackResponse: + SubscribersControllerChatOauthCallbackResponse, +): string { + return JSON.stringify( + SubscribersControllerChatOauthCallbackResponse$outboundSchema.parse( + subscribersControllerChatOauthCallbackResponse, + ), + ); +} + +export function subscribersControllerChatOauthCallbackResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerChatOauthCallbackResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerChatOauthCallbackResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerChatOauthCallbackResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollercreatesubscriber.ts b/src/models/operations/subscriberscontrollercreatesubscriber.ts new file mode 100644 index 00000000..b2565f10 --- /dev/null +++ b/src/models/operations/subscriberscontrollercreatesubscriber.ts @@ -0,0 +1,95 @@ +/* + * 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 SubscribersControllerCreateSubscriberResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; +}; + +/** @internal */ +export const SubscribersControllerCreateSubscriberResponse$inboundSchema: + z.ZodType< + SubscribersControllerCreateSubscriberResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerCreateSubscriberResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerCreateSubscriberResponse$outboundSchema: + z.ZodType< + SubscribersControllerCreateSubscriberResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerCreateSubscriberResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerCreateSubscriberResponse$ { + /** @deprecated use `SubscribersControllerCreateSubscriberResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerCreateSubscriberResponse$inboundSchema; + /** @deprecated use `SubscribersControllerCreateSubscriberResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerCreateSubscriberResponse$outboundSchema; + /** @deprecated use `SubscribersControllerCreateSubscriberResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerCreateSubscriberResponse$Outbound; +} + +export function subscribersControllerCreateSubscriberResponseToJSON( + subscribersControllerCreateSubscriberResponse: + SubscribersControllerCreateSubscriberResponse, +): string { + return JSON.stringify( + SubscribersControllerCreateSubscriberResponse$outboundSchema.parse( + subscribersControllerCreateSubscriberResponse, + ), + ); +} + +export function subscribersControllerCreateSubscriberResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerCreateSubscriberResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerCreateSubscriberResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerCreateSubscriberResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts b/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts index f9bfc547..b8f06c77 100644 --- a/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts +++ b/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts @@ -3,12 +3,20 @@ */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SubscribersControllerDeleteSubscriberCredentialsRequest = { subscriberId: string; providerId: string; }; +export type SubscribersControllerDeleteSubscriberCredentialsResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ export const SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema: z.ZodType< @@ -52,3 +60,103 @@ export namespace SubscribersControllerDeleteSubscriberCredentialsRequest$ { export type Outbound = SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound; } + +export function subscribersControllerDeleteSubscriberCredentialsRequestToJSON( + subscribersControllerDeleteSubscriberCredentialsRequest: + SubscribersControllerDeleteSubscriberCredentialsRequest, +): string { + return JSON.stringify( + SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema + .parse(subscribersControllerDeleteSubscriberCredentialsRequest), + ); +} + +export function subscribersControllerDeleteSubscriberCredentialsRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerDeleteSubscriberCredentialsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerDeleteSubscriberCredentialsRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerDeleteSubscriberCredentialsResponse$inboundSchema: + z.ZodType< + SubscribersControllerDeleteSubscriberCredentialsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); + }); + +/** @internal */ +export type SubscribersControllerDeleteSubscriberCredentialsResponse$Outbound = + { + Headers: { [k: string]: Array }; + }; + +/** @internal */ +export const SubscribersControllerDeleteSubscriberCredentialsResponse$outboundSchema: + z.ZodType< + SubscribersControllerDeleteSubscriberCredentialsResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerDeleteSubscriberCredentialsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerDeleteSubscriberCredentialsResponse$ { + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerDeleteSubscriberCredentialsResponse$inboundSchema; + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerDeleteSubscriberCredentialsResponse$outboundSchema; + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerDeleteSubscriberCredentialsResponse$Outbound; +} + +export function subscribersControllerDeleteSubscriberCredentialsResponseToJSON( + subscribersControllerDeleteSubscriberCredentialsResponse: + SubscribersControllerDeleteSubscriberCredentialsResponse, +): string { + return JSON.stringify( + SubscribersControllerDeleteSubscriberCredentialsResponse$outboundSchema + .parse(subscribersControllerDeleteSubscriberCredentialsResponse), + ); +} + +export function subscribersControllerDeleteSubscriberCredentialsResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerDeleteSubscriberCredentialsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerDeleteSubscriberCredentialsResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerDeleteSubscriberCredentialsResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollergetnotificationsfeed.ts b/src/models/operations/subscriberscontrollergetnotificationsfeed.ts index 47dbd4d7..8775dc61 100644 --- a/src/models/operations/subscriberscontrollergetnotificationsfeed.ts +++ b/src/models/operations/subscriberscontrollergetnotificationsfeed.ts @@ -3,7 +3,11 @@ */ 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 SubscribersControllerGetNotificationsFeedRequest = { subscriberId: string; @@ -18,19 +22,24 @@ export type SubscribersControllerGetNotificationsFeedRequest = { }; export type SubscribersControllerGetNotificationsFeedResponseBody = { - data: Array; - /** - * Does the list have more items to fetch - */ - hasMore: boolean; /** * The current page of the paginated response */ page: number; + /** + * Does the list have more items to fetch + */ + hasMore: boolean; /** * Number of items on each page */ pageSize: number; + data: Array; +}; + +export type SubscribersControllerGetNotificationsFeedResponse = { + headers: { [k: string]: Array }; + result: SubscribersControllerGetNotificationsFeedResponseBody; }; /** @internal */ @@ -89,6 +98,33 @@ export namespace SubscribersControllerGetNotificationsFeedRequest$ { SubscribersControllerGetNotificationsFeedRequest$Outbound; } +export function subscribersControllerGetNotificationsFeedRequestToJSON( + subscribersControllerGetNotificationsFeedRequest: + SubscribersControllerGetNotificationsFeedRequest, +): string { + return JSON.stringify( + SubscribersControllerGetNotificationsFeedRequest$outboundSchema.parse( + subscribersControllerGetNotificationsFeedRequest, + ), + ); +} + +export function subscribersControllerGetNotificationsFeedRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetNotificationsFeedRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetNotificationsFeedRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetNotificationsFeedRequest' from JSON`, + ); +} + /** @internal */ export const SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema: z.ZodType< @@ -96,18 +132,18 @@ export const SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema z.ZodTypeDef, unknown > = z.object({ - data: z.array(components.FeedResponseDto$inboundSchema), - hasMore: z.boolean(), page: z.number(), + hasMore: z.boolean(), pageSize: z.number(), + data: z.array(components.FeedResponseDto$inboundSchema), }); /** @internal */ export type SubscribersControllerGetNotificationsFeedResponseBody$Outbound = { - data: Array; - hasMore: boolean; page: number; + hasMore: boolean; pageSize: number; + data: Array; }; /** @internal */ @@ -117,10 +153,10 @@ export const SubscribersControllerGetNotificationsFeedResponseBody$outboundSchem z.ZodTypeDef, SubscribersControllerGetNotificationsFeedResponseBody > = z.object({ - data: z.array(components.FeedResponseDto$outboundSchema), - hasMore: z.boolean(), page: z.number(), + hasMore: z.boolean(), pageSize: z.number(), + data: z.array(components.FeedResponseDto$outboundSchema), }); /** @@ -138,3 +174,115 @@ export namespace SubscribersControllerGetNotificationsFeedResponseBody$ { export type Outbound = SubscribersControllerGetNotificationsFeedResponseBody$Outbound; } + +export function subscribersControllerGetNotificationsFeedResponseBodyToJSON( + subscribersControllerGetNotificationsFeedResponseBody: + SubscribersControllerGetNotificationsFeedResponseBody, +): string { + return JSON.stringify( + SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema.parse( + subscribersControllerGetNotificationsFeedResponseBody, + ), + ); +} + +export function subscribersControllerGetNotificationsFeedResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetNotificationsFeedResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetNotificationsFeedResponseBody' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerGetNotificationsFeedResponse$inboundSchema: + z.ZodType< + SubscribersControllerGetNotificationsFeedResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.lazy(() => + SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema + ), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerGetNotificationsFeedResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: SubscribersControllerGetNotificationsFeedResponseBody$Outbound; +}; + +/** @internal */ +export const SubscribersControllerGetNotificationsFeedResponse$outboundSchema: + z.ZodType< + SubscribersControllerGetNotificationsFeedResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerGetNotificationsFeedResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.lazy(() => + SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema + ), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerGetNotificationsFeedResponse$ { + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetNotificationsFeedResponse$inboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetNotificationsFeedResponse$outboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerGetNotificationsFeedResponse$Outbound; +} + +export function subscribersControllerGetNotificationsFeedResponseToJSON( + subscribersControllerGetNotificationsFeedResponse: + SubscribersControllerGetNotificationsFeedResponse, +): string { + return JSON.stringify( + SubscribersControllerGetNotificationsFeedResponse$outboundSchema.parse( + subscribersControllerGetNotificationsFeedResponse, + ), + ); +} + +export function subscribersControllerGetNotificationsFeedResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetNotificationsFeedResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetNotificationsFeedResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetNotificationsFeedResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollergetsubscriber.ts b/src/models/operations/subscriberscontrollergetsubscriber.ts index fb99b213..f82b76ad 100644 --- a/src/models/operations/subscriberscontrollergetsubscriber.ts +++ b/src/models/operations/subscriberscontrollergetsubscriber.ts @@ -3,9 +3,23 @@ */ 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 SubscribersControllerGetSubscriberRequest = { subscriberId: string; + /** + * Includes the topics associated with the subscriber + */ + includeTopics?: string | undefined; +}; + +export type SubscribersControllerGetSubscriberResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; }; /** @internal */ @@ -15,11 +29,13 @@ export const SubscribersControllerGetSubscriberRequest$inboundSchema: z.ZodType< unknown > = z.object({ subscriberId: z.string(), + includeTopics: z.string().optional(), }); /** @internal */ export type SubscribersControllerGetSubscriberRequest$Outbound = { subscriberId: string; + includeTopics?: string | undefined; }; /** @internal */ @@ -30,6 +46,7 @@ export const SubscribersControllerGetSubscriberRequest$outboundSchema: SubscribersControllerGetSubscriberRequest > = z.object({ subscriberId: z.string(), + includeTopics: z.string().optional(), }); /** @@ -46,3 +63,107 @@ export namespace SubscribersControllerGetSubscriberRequest$ { /** @deprecated use `SubscribersControllerGetSubscriberRequest$Outbound` instead. */ export type Outbound = SubscribersControllerGetSubscriberRequest$Outbound; } + +export function subscribersControllerGetSubscriberRequestToJSON( + subscribersControllerGetSubscriberRequest: + SubscribersControllerGetSubscriberRequest, +): string { + return JSON.stringify( + SubscribersControllerGetSubscriberRequest$outboundSchema.parse( + subscribersControllerGetSubscriberRequest, + ), + ); +} + +export function subscribersControllerGetSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetSubscriberRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetSubscriberRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetSubscriberRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerGetSubscriberResponse$inboundSchema: + z.ZodType = + z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerGetSubscriberResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerGetSubscriberResponse$outboundSchema: + z.ZodType< + SubscribersControllerGetSubscriberResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerGetSubscriberResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerGetSubscriberResponse$ { + /** @deprecated use `SubscribersControllerGetSubscriberResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetSubscriberResponse$inboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetSubscriberResponse$outboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerGetSubscriberResponse$Outbound; +} + +export function subscribersControllerGetSubscriberResponseToJSON( + subscribersControllerGetSubscriberResponse: + SubscribersControllerGetSubscriberResponse, +): string { + return JSON.stringify( + SubscribersControllerGetSubscriberResponse$outboundSchema.parse( + subscribersControllerGetSubscriberResponse, + ), + ); +} + +export function subscribersControllerGetSubscriberResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetSubscriberResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetSubscriberResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetSubscriberResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts b/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts index 15386fd2..bb683d78 100644 --- a/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts +++ b/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts @@ -3,28 +3,42 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** - * the preferences level to be retrieved( Subscriber / Topic) + * the preferences level to be retrieved (template / global) */ export const Parameter = { - Subscriber: "Subscriber", - Topic: "Topic", + Global: "global", + Template: "template", } as const; /** - * the preferences level to be retrieved( Subscriber / Topic) + * the preferences level to be retrieved (template / global) */ export type Parameter = ClosedEnum; export type SubscribersControllerGetSubscriberPreferenceByLevelRequest = { /** - * the preferences level to be retrieved( Subscriber / Topic) + * A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + */ + includeInactiveChannels?: boolean | undefined; + /** + * the preferences level to be retrieved (template / global) */ parameter: Parameter; subscriberId: string; }; +export type SubscribersControllerGetSubscriberPreferenceByLevelResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + /** @internal */ export const Parameter$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Parameter); @@ -51,6 +65,7 @@ export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundS z.ZodTypeDef, unknown > = z.object({ + includeInactiveChannels: z.boolean().optional(), parameter: Parameter$inboundSchema, subscriberId: z.string(), }); @@ -58,6 +73,7 @@ export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundS /** @internal */ export type SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound = { + includeInactiveChannels?: boolean | undefined; parameter: string; subscriberId: string; }; @@ -69,6 +85,7 @@ export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$outbound z.ZodTypeDef, SubscribersControllerGetSubscriberPreferenceByLevelRequest > = z.object({ + includeInactiveChannels: z.boolean().optional(), parameter: Parameter$outboundSchema, subscriberId: z.string(), }); @@ -88,3 +105,112 @@ export namespace SubscribersControllerGetSubscriberPreferenceByLevelRequest$ { export type Outbound = SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound; } + +export function subscribersControllerGetSubscriberPreferenceByLevelRequestToJSON( + subscribersControllerGetSubscriberPreferenceByLevelRequest: + SubscribersControllerGetSubscriberPreferenceByLevelRequest, +): string { + return JSON.stringify( + SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema + .parse(subscribersControllerGetSubscriberPreferenceByLevelRequest), + ); +} + +export function subscribersControllerGetSubscriberPreferenceByLevelRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetSubscriberPreferenceByLevelRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerGetSubscriberPreferenceByLevelRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema: + z.ZodType< + SubscribersControllerGetSubscriberPreferenceByLevelResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array( + components.GetSubscriberPreferencesResponseDto$inboundSchema, + ), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerGetSubscriberPreferenceByLevelResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: Array; + }; + +/** @internal */ +export const SubscribersControllerGetSubscriberPreferenceByLevelResponse$outboundSchema: + z.ZodType< + SubscribersControllerGetSubscriberPreferenceByLevelResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerGetSubscriberPreferenceByLevelResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array( + components.GetSubscriberPreferencesResponseDto$outboundSchema, + ), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerGetSubscriberPreferenceByLevelResponse$ { + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetSubscriberPreferenceByLevelResponse$outboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerGetSubscriberPreferenceByLevelResponse$Outbound; +} + +export function subscribersControllerGetSubscriberPreferenceByLevelResponseToJSON( + subscribersControllerGetSubscriberPreferenceByLevelResponse: + SubscribersControllerGetSubscriberPreferenceByLevelResponse, +): string { + return JSON.stringify( + SubscribersControllerGetSubscriberPreferenceByLevelResponse$outboundSchema + .parse(subscribersControllerGetSubscriberPreferenceByLevelResponse), + ); +} + +export function subscribersControllerGetSubscriberPreferenceByLevelResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetSubscriberPreferenceByLevelResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetSubscriberPreferenceByLevelResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerGetSubscriberPreferenceByLevelResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollergetunseencount.ts b/src/models/operations/subscriberscontrollergetunseencount.ts index fc9e6dc4..00f9dbd6 100644 --- a/src/models/operations/subscriberscontrollergetunseencount.ts +++ b/src/models/operations/subscriberscontrollergetunseencount.ts @@ -3,6 +3,11 @@ */ 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 SubscribersControllerGetUnseenCountRequest = { seen: boolean; @@ -10,6 +15,11 @@ export type SubscribersControllerGetUnseenCountRequest = { limit: number; }; +export type SubscribersControllerGetUnseenCountResponse = { + headers: { [k: string]: Array }; + result: components.UnseenCountResponse; +}; + /** @internal */ export const SubscribersControllerGetUnseenCountRequest$inboundSchema: z.ZodType = @@ -52,3 +62,110 @@ export namespace SubscribersControllerGetUnseenCountRequest$ { /** @deprecated use `SubscribersControllerGetUnseenCountRequest$Outbound` instead. */ export type Outbound = SubscribersControllerGetUnseenCountRequest$Outbound; } + +export function subscribersControllerGetUnseenCountRequestToJSON( + subscribersControllerGetUnseenCountRequest: + SubscribersControllerGetUnseenCountRequest, +): string { + return JSON.stringify( + SubscribersControllerGetUnseenCountRequest$outboundSchema.parse( + subscribersControllerGetUnseenCountRequest, + ), + ); +} + +export function subscribersControllerGetUnseenCountRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetUnseenCountRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetUnseenCountRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetUnseenCountRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerGetUnseenCountResponse$inboundSchema: + z.ZodType< + SubscribersControllerGetUnseenCountResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.UnseenCountResponse$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerGetUnseenCountResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.UnseenCountResponse$Outbound; +}; + +/** @internal */ +export const SubscribersControllerGetUnseenCountResponse$outboundSchema: + z.ZodType< + SubscribersControllerGetUnseenCountResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerGetUnseenCountResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.UnseenCountResponse$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerGetUnseenCountResponse$ { + /** @deprecated use `SubscribersControllerGetUnseenCountResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetUnseenCountResponse$inboundSchema; + /** @deprecated use `SubscribersControllerGetUnseenCountResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetUnseenCountResponse$outboundSchema; + /** @deprecated use `SubscribersControllerGetUnseenCountResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerGetUnseenCountResponse$Outbound; +} + +export function subscribersControllerGetUnseenCountResponseToJSON( + subscribersControllerGetUnseenCountResponse: + SubscribersControllerGetUnseenCountResponse, +): string { + return JSON.stringify( + SubscribersControllerGetUnseenCountResponse$outboundSchema.parse( + subscribersControllerGetUnseenCountResponse, + ), + ); +} + +export function subscribersControllerGetUnseenCountResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerGetUnseenCountResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerGetUnseenCountResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerGetUnseenCountResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts b/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts index 2fef7144..b59385b5 100644 --- a/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts +++ b/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts @@ -3,9 +3,23 @@ */ 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 SubscribersControllerListSubscriberPreferencesRequest = { subscriberId: string; + /** + * A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true + */ + includeInactiveChannels?: boolean | undefined; +}; + +export type SubscribersControllerListSubscriberPreferencesResponse = { + headers: { [k: string]: Array }; + result: Array; }; /** @internal */ @@ -16,11 +30,13 @@ export const SubscribersControllerListSubscriberPreferencesRequest$inboundSchema unknown > = z.object({ subscriberId: z.string(), + includeInactiveChannels: z.boolean().optional(), }); /** @internal */ export type SubscribersControllerListSubscriberPreferencesRequest$Outbound = { subscriberId: string; + includeInactiveChannels?: boolean | undefined; }; /** @internal */ @@ -31,6 +47,7 @@ export const SubscribersControllerListSubscriberPreferencesRequest$outboundSchem SubscribersControllerListSubscriberPreferencesRequest > = z.object({ subscriberId: z.string(), + includeInactiveChannels: z.boolean().optional(), }); /** @@ -48,3 +65,114 @@ export namespace SubscribersControllerListSubscriberPreferencesRequest$ { export type Outbound = SubscribersControllerListSubscriberPreferencesRequest$Outbound; } + +export function subscribersControllerListSubscriberPreferencesRequestToJSON( + subscribersControllerListSubscriberPreferencesRequest: + SubscribersControllerListSubscriberPreferencesRequest, +): string { + return JSON.stringify( + SubscribersControllerListSubscriberPreferencesRequest$outboundSchema.parse( + subscribersControllerListSubscriberPreferencesRequest, + ), + ); +} + +export function subscribersControllerListSubscriberPreferencesRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerListSubscriberPreferencesRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerListSubscriberPreferencesRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerListSubscriberPreferencesRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerListSubscriberPreferencesResponse$inboundSchema: + z.ZodType< + SubscribersControllerListSubscriberPreferencesResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array( + components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + ), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerListSubscriberPreferencesResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const SubscribersControllerListSubscriberPreferencesResponse$outboundSchema: + z.ZodType< + SubscribersControllerListSubscriberPreferencesResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerListSubscriberPreferencesResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array( + components.UpdateSubscriberPreferenceResponseDto$outboundSchema, + ), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerListSubscriberPreferencesResponse$ { + /** @deprecated use `SubscribersControllerListSubscriberPreferencesResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerListSubscriberPreferencesResponse$inboundSchema; + /** @deprecated use `SubscribersControllerListSubscriberPreferencesResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerListSubscriberPreferencesResponse$outboundSchema; + /** @deprecated use `SubscribersControllerListSubscriberPreferencesResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerListSubscriberPreferencesResponse$Outbound; +} + +export function subscribersControllerListSubscriberPreferencesResponseToJSON( + subscribersControllerListSubscriberPreferencesResponse: + SubscribersControllerListSubscriberPreferencesResponse, +): string { + return JSON.stringify( + SubscribersControllerListSubscriberPreferencesResponse$outboundSchema.parse( + subscribersControllerListSubscriberPreferencesResponse, + ), + ); +} + +export function subscribersControllerListSubscriberPreferencesResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerListSubscriberPreferencesResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerListSubscriberPreferencesResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerListSubscriberPreferencesResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerlistsubscribers.ts b/src/models/operations/subscriberscontrollerlistsubscribers.ts index f4118442..0da6264b 100644 --- a/src/models/operations/subscriberscontrollerlistsubscribers.ts +++ b/src/models/operations/subscriberscontrollerlistsubscribers.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerListSubscribersRequest = { page?: number | undefined; @@ -12,22 +15,23 @@ export type SubscribersControllerListSubscribersRequest = { }; export type SubscribersControllerListSubscribersResponseBody = { - data: Array; - /** - * Does the list have more items to fetch - */ - hasMore: boolean; /** * The current page of the paginated response */ page: number; + /** + * Does the list have more items to fetch + */ + hasMore: boolean; /** * Number of items on each page */ pageSize: number; + data: Array; }; export type SubscribersControllerListSubscribersResponse = { + headers: { [k: string]: Array }; result: SubscribersControllerListSubscribersResponseBody; }; @@ -74,6 +78,33 @@ export namespace SubscribersControllerListSubscribersRequest$ { export type Outbound = SubscribersControllerListSubscribersRequest$Outbound; } +export function subscribersControllerListSubscribersRequestToJSON( + subscribersControllerListSubscribersRequest: + SubscribersControllerListSubscribersRequest, +): string { + return JSON.stringify( + SubscribersControllerListSubscribersRequest$outboundSchema.parse( + subscribersControllerListSubscribersRequest, + ), + ); +} + +export function subscribersControllerListSubscribersRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerListSubscribersRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerListSubscribersRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerListSubscribersRequest' from JSON`, + ); +} + /** @internal */ export const SubscribersControllerListSubscribersResponseBody$inboundSchema: z.ZodType< @@ -81,18 +112,18 @@ export const SubscribersControllerListSubscribersResponseBody$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - data: z.array(components.SubscriberResponseDto$inboundSchema), - hasMore: z.boolean(), page: z.number(), + hasMore: z.boolean(), pageSize: z.number(), + data: z.array(components.SubscriberResponseDto$inboundSchema), }); /** @internal */ export type SubscribersControllerListSubscribersResponseBody$Outbound = { - data: Array; - hasMore: boolean; page: number; + hasMore: boolean; pageSize: number; + data: Array; }; /** @internal */ @@ -102,10 +133,10 @@ export const SubscribersControllerListSubscribersResponseBody$outboundSchema: z.ZodTypeDef, SubscribersControllerListSubscribersResponseBody > = z.object({ - data: z.array(components.SubscriberResponseDto$outboundSchema), - hasMore: z.boolean(), page: z.number(), + hasMore: z.boolean(), pageSize: z.number(), + data: z.array(components.SubscriberResponseDto$outboundSchema), }); /** @@ -124,6 +155,33 @@ export namespace SubscribersControllerListSubscribersResponseBody$ { SubscribersControllerListSubscribersResponseBody$Outbound; } +export function subscribersControllerListSubscribersResponseBodyToJSON( + subscribersControllerListSubscribersResponseBody: + SubscribersControllerListSubscribersResponseBody, +): string { + return JSON.stringify( + SubscribersControllerListSubscribersResponseBody$outboundSchema.parse( + subscribersControllerListSubscribersResponseBody, + ), + ); +} + +export function subscribersControllerListSubscribersResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerListSubscribersResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerListSubscribersResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerListSubscribersResponseBody' from JSON`, + ); +} + /** @internal */ export const SubscribersControllerListSubscribersResponse$inboundSchema: z.ZodType< @@ -131,17 +189,20 @@ export const SubscribersControllerListSubscribersResponse$inboundSchema: z.ZodTypeDef, unknown > = z.object({ + Headers: z.record(z.array(z.string())), Result: z.lazy(() => SubscribersControllerListSubscribersResponseBody$inboundSchema ), }).transform((v) => { return remap$(v, { + "Headers": "headers", "Result": "result", }); }); /** @internal */ export type SubscribersControllerListSubscribersResponse$Outbound = { + Headers: { [k: string]: Array }; Result: SubscribersControllerListSubscribersResponseBody$Outbound; }; @@ -152,11 +213,13 @@ export const SubscribersControllerListSubscribersResponse$outboundSchema: z.ZodTypeDef, SubscribersControllerListSubscribersResponse > = z.object({ + headers: z.record(z.array(z.string())), result: z.lazy(() => SubscribersControllerListSubscribersResponseBody$outboundSchema ), }).transform((v) => { return remap$(v, { + headers: "Headers", result: "Result", }); }); @@ -175,3 +238,30 @@ export namespace SubscribersControllerListSubscribersResponse$ { /** @deprecated use `SubscribersControllerListSubscribersResponse$Outbound` instead. */ export type Outbound = SubscribersControllerListSubscribersResponse$Outbound; } + +export function subscribersControllerListSubscribersResponseToJSON( + subscribersControllerListSubscribersResponse: + SubscribersControllerListSubscribersResponse, +): string { + return JSON.stringify( + SubscribersControllerListSubscribersResponse$outboundSchema.parse( + subscribersControllerListSubscribersResponse, + ), + ); +} + +export function subscribersControllerListSubscribersResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerListSubscribersResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerListSubscribersResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerListSubscribersResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollermarkactionasseen.ts b/src/models/operations/subscriberscontrollermarkactionasseen.ts index 34ddca26..92e6a715 100644 --- a/src/models/operations/subscriberscontrollermarkactionasseen.ts +++ b/src/models/operations/subscriberscontrollermarkactionasseen.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerMarkActionAsSeenRequest = { messageId: string; @@ -13,6 +16,11 @@ export type SubscribersControllerMarkActionAsSeenRequest = { markMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto; }; +export type SubscribersControllerMarkActionAsSeenResponse = { + headers: { [k: string]: Array }; + result: components.MessageResponseDto; +}; + /** @internal */ export const SubscribersControllerMarkActionAsSeenRequest$inboundSchema: z.ZodType< @@ -71,3 +79,110 @@ export namespace SubscribersControllerMarkActionAsSeenRequest$ { /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$Outbound` instead. */ export type Outbound = SubscribersControllerMarkActionAsSeenRequest$Outbound; } + +export function subscribersControllerMarkActionAsSeenRequestToJSON( + subscribersControllerMarkActionAsSeenRequest: + SubscribersControllerMarkActionAsSeenRequest, +): string { + return JSON.stringify( + SubscribersControllerMarkActionAsSeenRequest$outboundSchema.parse( + subscribersControllerMarkActionAsSeenRequest, + ), + ); +} + +export function subscribersControllerMarkActionAsSeenRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkActionAsSeenRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkActionAsSeenRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkActionAsSeenRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerMarkActionAsSeenResponse$inboundSchema: + z.ZodType< + SubscribersControllerMarkActionAsSeenResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.MessageResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerMarkActionAsSeenResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.MessageResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerMarkActionAsSeenResponse$outboundSchema: + z.ZodType< + SubscribersControllerMarkActionAsSeenResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerMarkActionAsSeenResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.MessageResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerMarkActionAsSeenResponse$ { + /** @deprecated use `SubscribersControllerMarkActionAsSeenResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkActionAsSeenResponse$inboundSchema; + /** @deprecated use `SubscribersControllerMarkActionAsSeenResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkActionAsSeenResponse$outboundSchema; + /** @deprecated use `SubscribersControllerMarkActionAsSeenResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerMarkActionAsSeenResponse$Outbound; +} + +export function subscribersControllerMarkActionAsSeenResponseToJSON( + subscribersControllerMarkActionAsSeenResponse: + SubscribersControllerMarkActionAsSeenResponse, +): string { + return JSON.stringify( + SubscribersControllerMarkActionAsSeenResponse$outboundSchema.parse( + subscribersControllerMarkActionAsSeenResponse, + ), + ); +} + +export function subscribersControllerMarkActionAsSeenResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkActionAsSeenResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkActionAsSeenResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkActionAsSeenResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollermarkallunreadasread.ts b/src/models/operations/subscriberscontrollermarkallunreadasread.ts index b6d74664..8207c829 100644 --- a/src/models/operations/subscriberscontrollermarkallunreadasread.ts +++ b/src/models/operations/subscriberscontrollermarkallunreadasread.ts @@ -4,13 +4,21 @@ 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 SubscribersControllerMarkAllUnreadAsReadRequest = { subscriberId: string; markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto; }; +export type SubscribersControllerMarkAllUnreadAsReadResponse = { + headers: { [k: string]: Array }; + result: number; +}; + /** @internal */ export const SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema: z.ZodType< @@ -64,3 +72,111 @@ export namespace SubscribersControllerMarkAllUnreadAsReadRequest$ { export type Outbound = SubscribersControllerMarkAllUnreadAsReadRequest$Outbound; } + +export function subscribersControllerMarkAllUnreadAsReadRequestToJSON( + subscribersControllerMarkAllUnreadAsReadRequest: + SubscribersControllerMarkAllUnreadAsReadRequest, +): string { + return JSON.stringify( + SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema.parse( + subscribersControllerMarkAllUnreadAsReadRequest, + ), + ); +} + +export function subscribersControllerMarkAllUnreadAsReadRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkAllUnreadAsReadRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkAllUnreadAsReadRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema: + z.ZodType< + SubscribersControllerMarkAllUnreadAsReadResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.number(), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerMarkAllUnreadAsReadResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: number; +}; + +/** @internal */ +export const SubscribersControllerMarkAllUnreadAsReadResponse$outboundSchema: + z.ZodType< + SubscribersControllerMarkAllUnreadAsReadResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerMarkAllUnreadAsReadResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.number(), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerMarkAllUnreadAsReadResponse$ { + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema; + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkAllUnreadAsReadResponse$outboundSchema; + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerMarkAllUnreadAsReadResponse$Outbound; +} + +export function subscribersControllerMarkAllUnreadAsReadResponseToJSON( + subscribersControllerMarkAllUnreadAsReadResponse: + SubscribersControllerMarkAllUnreadAsReadResponse, +): string { + return JSON.stringify( + SubscribersControllerMarkAllUnreadAsReadResponse$outboundSchema.parse( + subscribersControllerMarkAllUnreadAsReadResponse, + ), + ); +} + +export function subscribersControllerMarkAllUnreadAsReadResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkAllUnreadAsReadResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkAllUnreadAsReadResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkAllUnreadAsReadResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollermarkmessagesas.ts b/src/models/operations/subscriberscontrollermarkmessagesas.ts index 150f17f3..7b27932e 100644 --- a/src/models/operations/subscriberscontrollermarkmessagesas.ts +++ b/src/models/operations/subscriberscontrollermarkmessagesas.ts @@ -4,13 +4,21 @@ 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 SubscribersControllerMarkMessagesAsRequest = { subscriberId: string; messageMarkAsRequestDto: components.MessageMarkAsRequestDto; }; +export type SubscribersControllerMarkMessagesAsResponse = { + headers: { [k: string]: Array }; + result: Array; +}; + /** @internal */ export const SubscribersControllerMarkMessagesAsRequest$inboundSchema: z.ZodType = @@ -58,3 +66,110 @@ export namespace SubscribersControllerMarkMessagesAsRequest$ { /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$Outbound` instead. */ export type Outbound = SubscribersControllerMarkMessagesAsRequest$Outbound; } + +export function subscribersControllerMarkMessagesAsRequestToJSON( + subscribersControllerMarkMessagesAsRequest: + SubscribersControllerMarkMessagesAsRequest, +): string { + return JSON.stringify( + SubscribersControllerMarkMessagesAsRequest$outboundSchema.parse( + subscribersControllerMarkMessagesAsRequest, + ), + ); +} + +export function subscribersControllerMarkMessagesAsRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkMessagesAsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkMessagesAsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkMessagesAsRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerMarkMessagesAsResponse$inboundSchema: + z.ZodType< + SubscribersControllerMarkMessagesAsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: z.array(components.MessageEntity$inboundSchema), + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerMarkMessagesAsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: Array; +}; + +/** @internal */ +export const SubscribersControllerMarkMessagesAsResponse$outboundSchema: + z.ZodType< + SubscribersControllerMarkMessagesAsResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerMarkMessagesAsResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: z.array(components.MessageEntity$outboundSchema), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerMarkMessagesAsResponse$ { + /** @deprecated use `SubscribersControllerMarkMessagesAsResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkMessagesAsResponse$inboundSchema; + /** @deprecated use `SubscribersControllerMarkMessagesAsResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkMessagesAsResponse$outboundSchema; + /** @deprecated use `SubscribersControllerMarkMessagesAsResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerMarkMessagesAsResponse$Outbound; +} + +export function subscribersControllerMarkMessagesAsResponseToJSON( + subscribersControllerMarkMessagesAsResponse: + SubscribersControllerMarkMessagesAsResponse, +): string { + return JSON.stringify( + SubscribersControllerMarkMessagesAsResponse$outboundSchema.parse( + subscribersControllerMarkMessagesAsResponse, + ), + ); +} + +export function subscribersControllerMarkMessagesAsResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerMarkMessagesAsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerMarkMessagesAsResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerMarkMessagesAsResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts b/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts index a2b29050..86746e6a 100644 --- a/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts +++ b/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerModifySubscriberChannelRequest = { subscriberId: string; @@ -12,6 +15,11 @@ export type SubscribersControllerModifySubscriberChannelRequest = { components.UpdateSubscriberChannelRequestDto; }; +export type SubscribersControllerModifySubscriberChannelResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; +}; + /** @internal */ export const SubscribersControllerModifySubscriberChannelRequest$inboundSchema: z.ZodType< @@ -66,3 +74,111 @@ export namespace SubscribersControllerModifySubscriberChannelRequest$ { export type Outbound = SubscribersControllerModifySubscriberChannelRequest$Outbound; } + +export function subscribersControllerModifySubscriberChannelRequestToJSON( + subscribersControllerModifySubscriberChannelRequest: + SubscribersControllerModifySubscriberChannelRequest, +): string { + return JSON.stringify( + SubscribersControllerModifySubscriberChannelRequest$outboundSchema.parse( + subscribersControllerModifySubscriberChannelRequest, + ), + ); +} + +export function subscribersControllerModifySubscriberChannelRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerModifySubscriberChannelRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerModifySubscriberChannelRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerModifySubscriberChannelRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerModifySubscriberChannelResponse$inboundSchema: + z.ZodType< + SubscribersControllerModifySubscriberChannelResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerModifySubscriberChannelResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerModifySubscriberChannelResponse$outboundSchema: + z.ZodType< + SubscribersControllerModifySubscriberChannelResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerModifySubscriberChannelResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerModifySubscriberChannelResponse$ { + /** @deprecated use `SubscribersControllerModifySubscriberChannelResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerModifySubscriberChannelResponse$inboundSchema; + /** @deprecated use `SubscribersControllerModifySubscriberChannelResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerModifySubscriberChannelResponse$outboundSchema; + /** @deprecated use `SubscribersControllerModifySubscriberChannelResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerModifySubscriberChannelResponse$Outbound; +} + +export function subscribersControllerModifySubscriberChannelResponseToJSON( + subscribersControllerModifySubscriberChannelResponse: + SubscribersControllerModifySubscriberChannelResponse, +): string { + return JSON.stringify( + SubscribersControllerModifySubscriberChannelResponse$outboundSchema.parse( + subscribersControllerModifySubscriberChannelResponse, + ), + ); +} + +export function subscribersControllerModifySubscriberChannelResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerModifySubscriberChannelResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerModifySubscriberChannelResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerModifySubscriberChannelResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerremovesubscriber.ts b/src/models/operations/subscriberscontrollerremovesubscriber.ts index f5e9a0f4..13a1fa1c 100644 --- a/src/models/operations/subscriberscontrollerremovesubscriber.ts +++ b/src/models/operations/subscriberscontrollerremovesubscriber.ts @@ -3,11 +3,21 @@ */ 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 SubscribersControllerRemoveSubscriberRequest = { subscriberId: string; }; +export type SubscribersControllerRemoveSubscriberResponse = { + headers: { [k: string]: Array }; + result: components.DeleteSubscriberResponseDto; +}; + /** @internal */ export const SubscribersControllerRemoveSubscriberRequest$inboundSchema: z.ZodType< @@ -47,3 +57,110 @@ export namespace SubscribersControllerRemoveSubscriberRequest$ { /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$Outbound` instead. */ export type Outbound = SubscribersControllerRemoveSubscriberRequest$Outbound; } + +export function subscribersControllerRemoveSubscriberRequestToJSON( + subscribersControllerRemoveSubscriberRequest: + SubscribersControllerRemoveSubscriberRequest, +): string { + return JSON.stringify( + SubscribersControllerRemoveSubscriberRequest$outboundSchema.parse( + subscribersControllerRemoveSubscriberRequest, + ), + ); +} + +export function subscribersControllerRemoveSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerRemoveSubscriberRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerRemoveSubscriberRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerRemoveSubscriberRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerRemoveSubscriberResponse$inboundSchema: + z.ZodType< + SubscribersControllerRemoveSubscriberResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.DeleteSubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerRemoveSubscriberResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.DeleteSubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerRemoveSubscriberResponse$outboundSchema: + z.ZodType< + SubscribersControllerRemoveSubscriberResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerRemoveSubscriberResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.DeleteSubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerRemoveSubscriberResponse$ { + /** @deprecated use `SubscribersControllerRemoveSubscriberResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerRemoveSubscriberResponse$inboundSchema; + /** @deprecated use `SubscribersControllerRemoveSubscriberResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerRemoveSubscriberResponse$outboundSchema; + /** @deprecated use `SubscribersControllerRemoveSubscriberResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerRemoveSubscriberResponse$Outbound; +} + +export function subscribersControllerRemoveSubscriberResponseToJSON( + subscribersControllerRemoveSubscriberResponse: + SubscribersControllerRemoveSubscriberResponse, +): string { + return JSON.stringify( + SubscribersControllerRemoveSubscriberResponse$outboundSchema.parse( + subscribersControllerRemoveSubscriberResponse, + ), + ); +} + +export function subscribersControllerRemoveSubscriberResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerRemoveSubscriberResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerRemoveSubscriberResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerRemoveSubscriberResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerupdatesubscriber.ts b/src/models/operations/subscriberscontrollerupdatesubscriber.ts index 55db5a72..204dc193 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriber.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriber.ts @@ -4,13 +4,21 @@ 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 SubscribersControllerUpdateSubscriberRequest = { subscriberId: string; updateSubscriberRequestDto: components.UpdateSubscriberRequestDto; }; +export type SubscribersControllerUpdateSubscriberResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; +}; + /** @internal */ export const SubscribersControllerUpdateSubscriberRequest$inboundSchema: z.ZodType< @@ -63,3 +71,110 @@ export namespace SubscribersControllerUpdateSubscriberRequest$ { /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$Outbound` instead. */ export type Outbound = SubscribersControllerUpdateSubscriberRequest$Outbound; } + +export function subscribersControllerUpdateSubscriberRequestToJSON( + subscribersControllerUpdateSubscriberRequest: + SubscribersControllerUpdateSubscriberRequest, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberRequest$outboundSchema.parse( + subscribersControllerUpdateSubscriberRequest, + ), + ); +} + +export function subscribersControllerUpdateSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerUpdateSubscriberRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerUpdateSubscriberResponse$inboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerUpdateSubscriberResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerUpdateSubscriberResponse$outboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerUpdateSubscriberResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerUpdateSubscriberResponse$ { + /** @deprecated use `SubscribersControllerUpdateSubscriberResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberResponse$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberResponse$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerUpdateSubscriberResponse$Outbound; +} + +export function subscribersControllerUpdateSubscriberResponseToJSON( + subscribersControllerUpdateSubscriberResponse: + SubscribersControllerUpdateSubscriberResponse, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberResponse$outboundSchema.parse( + subscribersControllerUpdateSubscriberResponse, + ), + ); +} + +export function subscribersControllerUpdateSubscriberResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerUpdateSubscriberResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts b/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts index 0bb4df05..df9e40d7 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerUpdateSubscriberChannelRequest = { subscriberId: string; @@ -12,6 +15,11 @@ export type SubscribersControllerUpdateSubscriberChannelRequest = { components.UpdateSubscriberChannelRequestDto; }; +export type SubscribersControllerUpdateSubscriberChannelResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; +}; + /** @internal */ export const SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema: z.ZodType< @@ -66,3 +74,111 @@ export namespace SubscribersControllerUpdateSubscriberChannelRequest$ { export type Outbound = SubscribersControllerUpdateSubscriberChannelRequest$Outbound; } + +export function subscribersControllerUpdateSubscriberChannelRequestToJSON( + subscribersControllerUpdateSubscriberChannelRequest: + SubscribersControllerUpdateSubscriberChannelRequest, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema.parse( + subscribersControllerUpdateSubscriberChannelRequest, + ), + ); +} + +export function subscribersControllerUpdateSubscriberChannelRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberChannelRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerUpdateSubscriberChannelRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerUpdateSubscriberChannelResponse$inboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberChannelResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerUpdateSubscriberChannelResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerUpdateSubscriberChannelResponse$outboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberChannelResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerUpdateSubscriberChannelResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerUpdateSubscriberChannelResponse$ { + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberChannelResponse$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberChannelResponse$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberChannelResponse$Outbound; +} + +export function subscribersControllerUpdateSubscriberChannelResponseToJSON( + subscribersControllerUpdateSubscriberChannelResponse: + SubscribersControllerUpdateSubscriberChannelResponse, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberChannelResponse$outboundSchema.parse( + subscribersControllerUpdateSubscriberChannelResponse, + ), + ); +} + +export function subscribersControllerUpdateSubscriberChannelResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberChannelResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberChannelResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SubscribersControllerUpdateSubscriberChannelResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts b/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts index bb76cda5..7499d408 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { subscriberId: string; @@ -12,6 +15,11 @@ export type SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { components.UpdateSubscriberGlobalPreferencesRequestDto; }; +export type SubscribersControllerUpdateSubscriberGlobalPreferencesResponse = { + headers: { [k: string]: Array }; + result: components.UpdateSubscriberPreferenceResponseDto; +}; + /** @internal */ export const SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema: z.ZodType< @@ -69,3 +77,108 @@ export namespace SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$ export type Outbound = SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound; } + +export function subscribersControllerUpdateSubscriberGlobalPreferencesRequestToJSON( + subscribersControllerUpdateSubscriberGlobalPreferencesRequest: + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema + .parse(subscribersControllerUpdateSubscriberGlobalPreferencesRequest), + ); +} + +export function subscribersControllerUpdateSubscriberGlobalPreferencesRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberGlobalPreferencesRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$Outbound = + { + Headers: { [k: string]: Array }; + Result: components.UpdateSubscriberPreferenceResponseDto$Outbound; + }; + +/** @internal */ +export const SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$outboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.UpdateSubscriberPreferenceResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$ { + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$Outbound; +} + +export function subscribersControllerUpdateSubscriberGlobalPreferencesResponseToJSON( + subscribersControllerUpdateSubscriberGlobalPreferencesResponse: + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$outboundSchema + .parse(subscribersControllerUpdateSubscriberGlobalPreferencesResponse), + ); +} + +export function subscribersControllerUpdateSubscriberGlobalPreferencesResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberGlobalPreferencesResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberGlobalPreferencesResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts b/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts index b5e2c970..fcd33653 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerUpdateSubscriberOnlineFlagRequest = { subscriberId: string; @@ -12,6 +15,11 @@ export type SubscribersControllerUpdateSubscriberOnlineFlagRequest = { components.UpdateSubscriberOnlineFlagRequestDto; }; +export type SubscribersControllerUpdateSubscriberOnlineFlagResponse = { + headers: { [k: string]: Array }; + result: components.SubscriberResponseDto; +}; + /** @internal */ export const SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema: z.ZodType< @@ -68,3 +76,108 @@ export namespace SubscribersControllerUpdateSubscriberOnlineFlagRequest$ { export type Outbound = SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound; } + +export function subscribersControllerUpdateSubscriberOnlineFlagRequestToJSON( + subscribersControllerUpdateSubscriberOnlineFlagRequest: + SubscribersControllerUpdateSubscriberOnlineFlagRequest, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema.parse( + subscribersControllerUpdateSubscriberOnlineFlagRequest, + ), + ); +} + +export function subscribersControllerUpdateSubscriberOnlineFlagRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberOnlineFlagRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberOnlineFlagRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberOnlineFlagResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.SubscriberResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerUpdateSubscriberOnlineFlagResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.SubscriberResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerUpdateSubscriberOnlineFlagResponse$outboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberOnlineFlagResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerUpdateSubscriberOnlineFlagResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.SubscriberResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerUpdateSubscriberOnlineFlagResponse$ { + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberOnlineFlagResponse$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberOnlineFlagResponse$Outbound; +} + +export function subscribersControllerUpdateSubscriberOnlineFlagResponseToJSON( + subscribersControllerUpdateSubscriberOnlineFlagResponse: + SubscribersControllerUpdateSubscriberOnlineFlagResponse, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberOnlineFlagResponse$outboundSchema + .parse(subscribersControllerUpdateSubscriberOnlineFlagResponse), + ); +} + +export function subscribersControllerUpdateSubscriberOnlineFlagResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberOnlineFlagResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberOnlineFlagResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberOnlineFlagResponse' from JSON`, + ); +} diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts b/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts index d38173ac..8e1c86cf 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts @@ -4,7 +4,10 @@ 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 SubscribersControllerUpdateSubscriberPreferenceRequest = { subscriberId: string; @@ -13,6 +16,11 @@ export type SubscribersControllerUpdateSubscriberPreferenceRequest = { components.UpdateSubscriberPreferenceRequestDto; }; +export type SubscribersControllerUpdateSubscriberPreferenceResponse = { + headers: { [k: string]: Array }; + result: components.UpdateSubscriberPreferenceResponseDto; +}; + /** @internal */ export const SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema: z.ZodType< @@ -72,3 +80,108 @@ export namespace SubscribersControllerUpdateSubscriberPreferenceRequest$ { export type Outbound = SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound; } + +export function subscribersControllerUpdateSubscriberPreferenceRequestToJSON( + subscribersControllerUpdateSubscriberPreferenceRequest: + SubscribersControllerUpdateSubscriberPreferenceRequest, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema.parse( + subscribersControllerUpdateSubscriberPreferenceRequest, + ), + ); +} + +export function subscribersControllerUpdateSubscriberPreferenceRequestFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberPreferenceRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberPreferenceRequest' from JSON`, + ); +} + +/** @internal */ +export const SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberPreferenceResponse, + z.ZodTypeDef, + unknown + > = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type SubscribersControllerUpdateSubscriberPreferenceResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.UpdateSubscriberPreferenceResponseDto$Outbound; +}; + +/** @internal */ +export const SubscribersControllerUpdateSubscriberPreferenceResponse$outboundSchema: + z.ZodType< + SubscribersControllerUpdateSubscriberPreferenceResponse$Outbound, + z.ZodTypeDef, + SubscribersControllerUpdateSubscriberPreferenceResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.UpdateSubscriberPreferenceResponseDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscribersControllerUpdateSubscriberPreferenceResponse$ { + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberPreferenceResponse$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceResponse$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberPreferenceResponse$Outbound; +} + +export function subscribersControllerUpdateSubscriberPreferenceResponseToJSON( + subscribersControllerUpdateSubscriberPreferenceResponse: + SubscribersControllerUpdateSubscriberPreferenceResponse, +): string { + return JSON.stringify( + SubscribersControllerUpdateSubscriberPreferenceResponse$outboundSchema + .parse(subscribersControllerUpdateSubscriberPreferenceResponse), + ); +} + +export function subscribersControllerUpdateSubscriberPreferenceResponseFromJSON( + jsonString: string, +): SafeParseResult< + SubscribersControllerUpdateSubscriberPreferenceResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SubscribersControllerUpdateSubscriberPreferenceResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'SubscribersControllerUpdateSubscriberPreferenceResponse' from JSON`, + ); +} diff --git a/src/models/operations/tenantcontrollergettenantbyid.ts b/src/models/operations/tenantcontrollergettenantbyid.ts deleted file mode 100644 index 0fce80f3..00000000 --- a/src/models/operations/tenantcontrollergettenantbyid.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type TenantControllerGetTenantByIdRequest = { - identifier: string; -}; - -/** @internal */ -export const TenantControllerGetTenantByIdRequest$inboundSchema: z.ZodType< - TenantControllerGetTenantByIdRequest, - z.ZodTypeDef, - unknown -> = z.object({ - identifier: z.string(), -}); - -/** @internal */ -export type TenantControllerGetTenantByIdRequest$Outbound = { - identifier: string; -}; - -/** @internal */ -export const TenantControllerGetTenantByIdRequest$outboundSchema: z.ZodType< - TenantControllerGetTenantByIdRequest$Outbound, - z.ZodTypeDef, - TenantControllerGetTenantByIdRequest -> = z.object({ - identifier: 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 TenantControllerGetTenantByIdRequest$ { - /** @deprecated use `TenantControllerGetTenantByIdRequest$inboundSchema` instead. */ - export const inboundSchema = - TenantControllerGetTenantByIdRequest$inboundSchema; - /** @deprecated use `TenantControllerGetTenantByIdRequest$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerGetTenantByIdRequest$outboundSchema; - /** @deprecated use `TenantControllerGetTenantByIdRequest$Outbound` instead. */ - export type Outbound = TenantControllerGetTenantByIdRequest$Outbound; -} diff --git a/src/models/operations/tenantcontrollerlisttenants.ts b/src/models/operations/tenantcontrollerlisttenants.ts deleted file mode 100644 index b1673a50..00000000 --- a/src/models/operations/tenantcontrollerlisttenants.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import * as components from "../components/index.js"; - -export type TenantControllerListTenantsRequest = { - page?: number | undefined; - limit?: number | undefined; -}; - -export type TenantControllerListTenantsResponseBody = { - data: Array; - /** - * Does the list have more items to fetch - */ - hasMore: boolean; - /** - * The current page of the paginated response - */ - page: number; - /** - * Number of items on each page - */ - pageSize: number; -}; - -export type TenantControllerListTenantsResponse = { - result: TenantControllerListTenantsResponseBody; -}; - -/** @internal */ -export const TenantControllerListTenantsRequest$inboundSchema: z.ZodType< - TenantControllerListTenantsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), -}); - -/** @internal */ -export type TenantControllerListTenantsRequest$Outbound = { - page?: number | undefined; - limit: number; -}; - -/** @internal */ -export const TenantControllerListTenantsRequest$outboundSchema: z.ZodType< - TenantControllerListTenantsRequest$Outbound, - z.ZodTypeDef, - TenantControllerListTenantsRequest -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TenantControllerListTenantsRequest$ { - /** @deprecated use `TenantControllerListTenantsRequest$inboundSchema` instead. */ - export const inboundSchema = TenantControllerListTenantsRequest$inboundSchema; - /** @deprecated use `TenantControllerListTenantsRequest$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerListTenantsRequest$outboundSchema; - /** @deprecated use `TenantControllerListTenantsRequest$Outbound` instead. */ - export type Outbound = TenantControllerListTenantsRequest$Outbound; -} - -/** @internal */ -export const TenantControllerListTenantsResponseBody$inboundSchema: z.ZodType< - TenantControllerListTenantsResponseBody, - z.ZodTypeDef, - unknown -> = z.object({ - data: z.array(components.GetTenantResponseDto$inboundSchema), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), -}); - -/** @internal */ -export type TenantControllerListTenantsResponseBody$Outbound = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; -}; - -/** @internal */ -export const TenantControllerListTenantsResponseBody$outboundSchema: z.ZodType< - TenantControllerListTenantsResponseBody$Outbound, - z.ZodTypeDef, - TenantControllerListTenantsResponseBody -> = z.object({ - data: z.array(components.GetTenantResponseDto$outboundSchema), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TenantControllerListTenantsResponseBody$ { - /** @deprecated use `TenantControllerListTenantsResponseBody$inboundSchema` instead. */ - export const inboundSchema = - TenantControllerListTenantsResponseBody$inboundSchema; - /** @deprecated use `TenantControllerListTenantsResponseBody$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerListTenantsResponseBody$outboundSchema; - /** @deprecated use `TenantControllerListTenantsResponseBody$Outbound` instead. */ - export type Outbound = TenantControllerListTenantsResponseBody$Outbound; -} - -/** @internal */ -export const TenantControllerListTenantsResponse$inboundSchema: z.ZodType< - TenantControllerListTenantsResponse, - z.ZodTypeDef, - unknown -> = z.object({ - Result: z.lazy(() => TenantControllerListTenantsResponseBody$inboundSchema), -}).transform((v) => { - return remap$(v, { - "Result": "result", - }); -}); - -/** @internal */ -export type TenantControllerListTenantsResponse$Outbound = { - Result: TenantControllerListTenantsResponseBody$Outbound; -}; - -/** @internal */ -export const TenantControllerListTenantsResponse$outboundSchema: z.ZodType< - TenantControllerListTenantsResponse$Outbound, - z.ZodTypeDef, - TenantControllerListTenantsResponse -> = z.object({ - result: z.lazy(() => TenantControllerListTenantsResponseBody$outboundSchema), -}).transform((v) => { - return remap$(v, { - result: "Result", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TenantControllerListTenantsResponse$ { - /** @deprecated use `TenantControllerListTenantsResponse$inboundSchema` instead. */ - export const inboundSchema = - TenantControllerListTenantsResponse$inboundSchema; - /** @deprecated use `TenantControllerListTenantsResponse$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerListTenantsResponse$outboundSchema; - /** @deprecated use `TenantControllerListTenantsResponse$Outbound` instead. */ - export type Outbound = TenantControllerListTenantsResponse$Outbound; -} diff --git a/src/models/operations/tenantcontrollerremovetenant.ts b/src/models/operations/tenantcontrollerremovetenant.ts deleted file mode 100644 index 1febb16f..00000000 --- a/src/models/operations/tenantcontrollerremovetenant.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type TenantControllerRemoveTenantRequest = { - identifier: string; -}; - -/** @internal */ -export const TenantControllerRemoveTenantRequest$inboundSchema: z.ZodType< - TenantControllerRemoveTenantRequest, - z.ZodTypeDef, - unknown -> = z.object({ - identifier: z.string(), -}); - -/** @internal */ -export type TenantControllerRemoveTenantRequest$Outbound = { - identifier: string; -}; - -/** @internal */ -export const TenantControllerRemoveTenantRequest$outboundSchema: z.ZodType< - TenantControllerRemoveTenantRequest$Outbound, - z.ZodTypeDef, - TenantControllerRemoveTenantRequest -> = z.object({ - identifier: 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 TenantControllerRemoveTenantRequest$ { - /** @deprecated use `TenantControllerRemoveTenantRequest$inboundSchema` instead. */ - export const inboundSchema = - TenantControllerRemoveTenantRequest$inboundSchema; - /** @deprecated use `TenantControllerRemoveTenantRequest$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerRemoveTenantRequest$outboundSchema; - /** @deprecated use `TenantControllerRemoveTenantRequest$Outbound` instead. */ - export type Outbound = TenantControllerRemoveTenantRequest$Outbound; -} diff --git a/src/models/operations/tenantcontrollerupdatetenant.ts b/src/models/operations/tenantcontrollerupdatetenant.ts deleted file mode 100644 index c0c99bf5..00000000 --- a/src/models/operations/tenantcontrollerupdatetenant.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import * as components from "../components/index.js"; - -export type TenantControllerUpdateTenantRequest = { - identifier: string; - updateTenantRequestDto: components.UpdateTenantRequestDto; -}; - -/** @internal */ -export const TenantControllerUpdateTenantRequest$inboundSchema: z.ZodType< - TenantControllerUpdateTenantRequest, - z.ZodTypeDef, - unknown -> = z.object({ - identifier: z.string(), - UpdateTenantRequestDto: components.UpdateTenantRequestDto$inboundSchema, -}).transform((v) => { - return remap$(v, { - "UpdateTenantRequestDto": "updateTenantRequestDto", - }); -}); - -/** @internal */ -export type TenantControllerUpdateTenantRequest$Outbound = { - identifier: string; - UpdateTenantRequestDto: components.UpdateTenantRequestDto$Outbound; -}; - -/** @internal */ -export const TenantControllerUpdateTenantRequest$outboundSchema: z.ZodType< - TenantControllerUpdateTenantRequest$Outbound, - z.ZodTypeDef, - TenantControllerUpdateTenantRequest -> = z.object({ - identifier: z.string(), - updateTenantRequestDto: components.UpdateTenantRequestDto$outboundSchema, -}).transform((v) => { - return remap$(v, { - updateTenantRequestDto: "UpdateTenantRequestDto", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TenantControllerUpdateTenantRequest$ { - /** @deprecated use `TenantControllerUpdateTenantRequest$inboundSchema` instead. */ - export const inboundSchema = - TenantControllerUpdateTenantRequest$inboundSchema; - /** @deprecated use `TenantControllerUpdateTenantRequest$outboundSchema` instead. */ - export const outboundSchema = - TenantControllerUpdateTenantRequest$outboundSchema; - /** @deprecated use `TenantControllerUpdateTenantRequest$Outbound` instead. */ - export type Outbound = TenantControllerUpdateTenantRequest$Outbound; -} diff --git a/src/models/operations/topicscontrolleraddsubscribers.ts b/src/models/operations/topicscontrolleraddsubscribers.ts index 56df0864..080fc60a 100644 --- a/src/models/operations/topicscontrolleraddsubscribers.ts +++ b/src/models/operations/topicscontrolleraddsubscribers.ts @@ -4,7 +4,10 @@ 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 TopicsControllerAddSubscribersRequest = { /** @@ -14,6 +17,10 @@ export type TopicsControllerAddSubscribersRequest = { addSubscribersRequestDto: components.AddSubscribersRequestDto; }; +export type TopicsControllerAddSubscribersResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ export const TopicsControllerAddSubscribersRequest$inboundSchema: z.ZodType< TopicsControllerAddSubscribersRequest, @@ -62,3 +69,92 @@ export namespace TopicsControllerAddSubscribersRequest$ { /** @deprecated use `TopicsControllerAddSubscribersRequest$Outbound` instead. */ export type Outbound = TopicsControllerAddSubscribersRequest$Outbound; } + +export function topicsControllerAddSubscribersRequestToJSON( + topicsControllerAddSubscribersRequest: TopicsControllerAddSubscribersRequest, +): string { + return JSON.stringify( + TopicsControllerAddSubscribersRequest$outboundSchema.parse( + topicsControllerAddSubscribersRequest, + ), + ); +} + +export function topicsControllerAddSubscribersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerAddSubscribersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerAddSubscribersRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerAddSubscribersResponse$inboundSchema: z.ZodType< + TopicsControllerAddSubscribersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); +}); + +/** @internal */ +export type TopicsControllerAddSubscribersResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const TopicsControllerAddSubscribersResponse$outboundSchema: z.ZodType< + TopicsControllerAddSubscribersResponse$Outbound, + z.ZodTypeDef, + TopicsControllerAddSubscribersResponse +> = z.object({ + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + headers: "Headers", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerAddSubscribersResponse$ { + /** @deprecated use `TopicsControllerAddSubscribersResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerAddSubscribersResponse$inboundSchema; + /** @deprecated use `TopicsControllerAddSubscribersResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerAddSubscribersResponse$outboundSchema; + /** @deprecated use `TopicsControllerAddSubscribersResponse$Outbound` instead. */ + export type Outbound = TopicsControllerAddSubscribersResponse$Outbound; +} + +export function topicsControllerAddSubscribersResponseToJSON( + topicsControllerAddSubscribersResponse: + TopicsControllerAddSubscribersResponse, +): string { + return JSON.stringify( + TopicsControllerAddSubscribersResponse$outboundSchema.parse( + topicsControllerAddSubscribersResponse, + ), + ); +} + +export function topicsControllerAddSubscribersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerAddSubscribersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerAddSubscribersResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollercreatetopic.ts b/src/models/operations/topicscontrollercreatetopic.ts new file mode 100644 index 00000000..e26599ab --- /dev/null +++ b/src/models/operations/topicscontrollercreatetopic.ts @@ -0,0 +1,87 @@ +/* + * 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 TopicsControllerCreateTopicResponse = { + headers: { [k: string]: Array }; + result: components.CreateTopicResponseDto; +}; + +/** @internal */ +export const TopicsControllerCreateTopicResponse$inboundSchema: z.ZodType< + TopicsControllerCreateTopicResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.CreateTopicResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type TopicsControllerCreateTopicResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.CreateTopicResponseDto$Outbound; +}; + +/** @internal */ +export const TopicsControllerCreateTopicResponse$outboundSchema: z.ZodType< + TopicsControllerCreateTopicResponse$Outbound, + z.ZodTypeDef, + TopicsControllerCreateTopicResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.CreateTopicResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerCreateTopicResponse$ { + /** @deprecated use `TopicsControllerCreateTopicResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerCreateTopicResponse$inboundSchema; + /** @deprecated use `TopicsControllerCreateTopicResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerCreateTopicResponse$outboundSchema; + /** @deprecated use `TopicsControllerCreateTopicResponse$Outbound` instead. */ + export type Outbound = TopicsControllerCreateTopicResponse$Outbound; +} + +export function topicsControllerCreateTopicResponseToJSON( + topicsControllerCreateTopicResponse: TopicsControllerCreateTopicResponse, +): string { + return JSON.stringify( + TopicsControllerCreateTopicResponse$outboundSchema.parse( + topicsControllerCreateTopicResponse, + ), + ); +} + +export function topicsControllerCreateTopicResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerCreateTopicResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerCreateTopicResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollerdeletetopic.ts b/src/models/operations/topicscontrollerdeletetopic.ts index 33d96424..7e2f2e0a 100644 --- a/src/models/operations/topicscontrollerdeletetopic.ts +++ b/src/models/operations/topicscontrollerdeletetopic.ts @@ -3,6 +3,10 @@ */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type TopicsControllerDeleteTopicRequest = { /** @@ -11,6 +15,10 @@ export type TopicsControllerDeleteTopicRequest = { topicKey: string; }; +export type TopicsControllerDeleteTopicResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ export const TopicsControllerDeleteTopicRequest$inboundSchema: z.ZodType< TopicsControllerDeleteTopicRequest, @@ -47,3 +55,91 @@ export namespace TopicsControllerDeleteTopicRequest$ { /** @deprecated use `TopicsControllerDeleteTopicRequest$Outbound` instead. */ export type Outbound = TopicsControllerDeleteTopicRequest$Outbound; } + +export function topicsControllerDeleteTopicRequestToJSON( + topicsControllerDeleteTopicRequest: TopicsControllerDeleteTopicRequest, +): string { + return JSON.stringify( + TopicsControllerDeleteTopicRequest$outboundSchema.parse( + topicsControllerDeleteTopicRequest, + ), + ); +} + +export function topicsControllerDeleteTopicRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerDeleteTopicRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerDeleteTopicRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerDeleteTopicResponse$inboundSchema: z.ZodType< + TopicsControllerDeleteTopicResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); +}); + +/** @internal */ +export type TopicsControllerDeleteTopicResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const TopicsControllerDeleteTopicResponse$outboundSchema: z.ZodType< + TopicsControllerDeleteTopicResponse$Outbound, + z.ZodTypeDef, + TopicsControllerDeleteTopicResponse +> = z.object({ + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + headers: "Headers", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerDeleteTopicResponse$ { + /** @deprecated use `TopicsControllerDeleteTopicResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerDeleteTopicResponse$inboundSchema; + /** @deprecated use `TopicsControllerDeleteTopicResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerDeleteTopicResponse$outboundSchema; + /** @deprecated use `TopicsControllerDeleteTopicResponse$Outbound` instead. */ + export type Outbound = TopicsControllerDeleteTopicResponse$Outbound; +} + +export function topicsControllerDeleteTopicResponseToJSON( + topicsControllerDeleteTopicResponse: TopicsControllerDeleteTopicResponse, +): string { + return JSON.stringify( + TopicsControllerDeleteTopicResponse$outboundSchema.parse( + topicsControllerDeleteTopicResponse, + ), + ); +} + +export function topicsControllerDeleteTopicResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerDeleteTopicResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerDeleteTopicResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollergettopic.ts b/src/models/operations/topicscontrollergettopic.ts index 370d4066..017b4120 100644 --- a/src/models/operations/topicscontrollergettopic.ts +++ b/src/models/operations/topicscontrollergettopic.ts @@ -3,6 +3,11 @@ */ 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 TopicsControllerGetTopicRequest = { /** @@ -11,6 +16,11 @@ export type TopicsControllerGetTopicRequest = { topicKey: string; }; +export type TopicsControllerGetTopicResponse = { + headers: { [k: string]: Array }; + result: components.GetTopicResponseDto; +}; + /** @internal */ export const TopicsControllerGetTopicRequest$inboundSchema: z.ZodType< TopicsControllerGetTopicRequest, @@ -46,3 +56,92 @@ export namespace TopicsControllerGetTopicRequest$ { /** @deprecated use `TopicsControllerGetTopicRequest$Outbound` instead. */ export type Outbound = TopicsControllerGetTopicRequest$Outbound; } + +export function topicsControllerGetTopicRequestToJSON( + topicsControllerGetTopicRequest: TopicsControllerGetTopicRequest, +): string { + return JSON.stringify( + TopicsControllerGetTopicRequest$outboundSchema.parse( + topicsControllerGetTopicRequest, + ), + ); +} + +export function topicsControllerGetTopicRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicsControllerGetTopicRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerGetTopicRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerGetTopicResponse$inboundSchema: z.ZodType< + TopicsControllerGetTopicResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.GetTopicResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type TopicsControllerGetTopicResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.GetTopicResponseDto$Outbound; +}; + +/** @internal */ +export const TopicsControllerGetTopicResponse$outboundSchema: z.ZodType< + TopicsControllerGetTopicResponse$Outbound, + z.ZodTypeDef, + TopicsControllerGetTopicResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.GetTopicResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerGetTopicResponse$ { + /** @deprecated use `TopicsControllerGetTopicResponse$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerGetTopicResponse$inboundSchema; + /** @deprecated use `TopicsControllerGetTopicResponse$outboundSchema` instead. */ + export const outboundSchema = TopicsControllerGetTopicResponse$outboundSchema; + /** @deprecated use `TopicsControllerGetTopicResponse$Outbound` instead. */ + export type Outbound = TopicsControllerGetTopicResponse$Outbound; +} + +export function topicsControllerGetTopicResponseToJSON( + topicsControllerGetTopicResponse: TopicsControllerGetTopicResponse, +): string { + return JSON.stringify( + TopicsControllerGetTopicResponse$outboundSchema.parse( + topicsControllerGetTopicResponse, + ), + ); +} + +export function topicsControllerGetTopicResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicsControllerGetTopicResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerGetTopicResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollergettopicsubscriber.ts b/src/models/operations/topicscontrollergettopicsubscriber.ts index e70132d9..d9fd3fac 100644 --- a/src/models/operations/topicscontrollergettopicsubscriber.ts +++ b/src/models/operations/topicscontrollergettopicsubscriber.ts @@ -3,6 +3,11 @@ */ 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 TopicsControllerGetTopicSubscriberRequest = { /** @@ -15,6 +20,11 @@ export type TopicsControllerGetTopicSubscriberRequest = { topicKey: string; }; +export type TopicsControllerGetTopicSubscriberResponse = { + headers: { [k: string]: Array }; + result: components.TopicSubscriberDto; +}; + /** @internal */ export const TopicsControllerGetTopicSubscriberRequest$inboundSchema: z.ZodType< TopicsControllerGetTopicSubscriberRequest, @@ -56,3 +66,107 @@ export namespace TopicsControllerGetTopicSubscriberRequest$ { /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$Outbound` instead. */ export type Outbound = TopicsControllerGetTopicSubscriberRequest$Outbound; } + +export function topicsControllerGetTopicSubscriberRequestToJSON( + topicsControllerGetTopicSubscriberRequest: + TopicsControllerGetTopicSubscriberRequest, +): string { + return JSON.stringify( + TopicsControllerGetTopicSubscriberRequest$outboundSchema.parse( + topicsControllerGetTopicSubscriberRequest, + ), + ); +} + +export function topicsControllerGetTopicSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult< + TopicsControllerGetTopicSubscriberRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + TopicsControllerGetTopicSubscriberRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'TopicsControllerGetTopicSubscriberRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerGetTopicSubscriberResponse$inboundSchema: + z.ZodType = + z.object({ + Headers: z.record(z.array(z.string())), + Result: components.TopicSubscriberDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); + }); + +/** @internal */ +export type TopicsControllerGetTopicSubscriberResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.TopicSubscriberDto$Outbound; +}; + +/** @internal */ +export const TopicsControllerGetTopicSubscriberResponse$outboundSchema: + z.ZodType< + TopicsControllerGetTopicSubscriberResponse$Outbound, + z.ZodTypeDef, + TopicsControllerGetTopicSubscriberResponse + > = z.object({ + headers: z.record(z.array(z.string())), + result: components.TopicSubscriberDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerGetTopicSubscriberResponse$ { + /** @deprecated use `TopicsControllerGetTopicSubscriberResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerGetTopicSubscriberResponse$inboundSchema; + /** @deprecated use `TopicsControllerGetTopicSubscriberResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerGetTopicSubscriberResponse$outboundSchema; + /** @deprecated use `TopicsControllerGetTopicSubscriberResponse$Outbound` instead. */ + export type Outbound = TopicsControllerGetTopicSubscriberResponse$Outbound; +} + +export function topicsControllerGetTopicSubscriberResponseToJSON( + topicsControllerGetTopicSubscriberResponse: + TopicsControllerGetTopicSubscriberResponse, +): string { + return JSON.stringify( + TopicsControllerGetTopicSubscriberResponse$outboundSchema.parse( + topicsControllerGetTopicSubscriberResponse, + ), + ); +} + +export function topicsControllerGetTopicSubscriberResponseFromJSON( + jsonString: string, +): SafeParseResult< + TopicsControllerGetTopicSubscriberResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + TopicsControllerGetTopicSubscriberResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'TopicsControllerGetTopicSubscriberResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollerlisttopics.ts b/src/models/operations/topicscontrollerlisttopics.ts index 935077ad..f98fe53f 100644 --- a/src/models/operations/topicscontrollerlisttopics.ts +++ b/src/models/operations/topicscontrollerlisttopics.ts @@ -3,6 +3,11 @@ */ 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 TopicsControllerListTopicsRequest = { /** @@ -19,6 +24,11 @@ export type TopicsControllerListTopicsRequest = { key?: string | undefined; }; +export type TopicsControllerListTopicsResponse = { + headers: { [k: string]: Array }; + result: components.FilterTopicsResponseDto; +}; + /** @internal */ export const TopicsControllerListTopicsRequest$inboundSchema: z.ZodType< TopicsControllerListTopicsRequest, @@ -61,3 +71,94 @@ export namespace TopicsControllerListTopicsRequest$ { /** @deprecated use `TopicsControllerListTopicsRequest$Outbound` instead. */ export type Outbound = TopicsControllerListTopicsRequest$Outbound; } + +export function topicsControllerListTopicsRequestToJSON( + topicsControllerListTopicsRequest: TopicsControllerListTopicsRequest, +): string { + return JSON.stringify( + TopicsControllerListTopicsRequest$outboundSchema.parse( + topicsControllerListTopicsRequest, + ), + ); +} + +export function topicsControllerListTopicsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TopicsControllerListTopicsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerListTopicsRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerListTopicsResponse$inboundSchema: z.ZodType< + TopicsControllerListTopicsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.FilterTopicsResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type TopicsControllerListTopicsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.FilterTopicsResponseDto$Outbound; +}; + +/** @internal */ +export const TopicsControllerListTopicsResponse$outboundSchema: z.ZodType< + TopicsControllerListTopicsResponse$Outbound, + z.ZodTypeDef, + TopicsControllerListTopicsResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.FilterTopicsResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerListTopicsResponse$ { + /** @deprecated use `TopicsControllerListTopicsResponse$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerListTopicsResponse$inboundSchema; + /** @deprecated use `TopicsControllerListTopicsResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerListTopicsResponse$outboundSchema; + /** @deprecated use `TopicsControllerListTopicsResponse$Outbound` instead. */ + export type Outbound = TopicsControllerListTopicsResponse$Outbound; +} + +export function topicsControllerListTopicsResponseToJSON( + topicsControllerListTopicsResponse: TopicsControllerListTopicsResponse, +): string { + return JSON.stringify( + TopicsControllerListTopicsResponse$outboundSchema.parse( + topicsControllerListTopicsResponse, + ), + ); +} + +export function topicsControllerListTopicsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerListTopicsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerListTopicsResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollerremovesubscribers.ts b/src/models/operations/topicscontrollerremovesubscribers.ts index c5f8df15..8d84aadf 100644 --- a/src/models/operations/topicscontrollerremovesubscribers.ts +++ b/src/models/operations/topicscontrollerremovesubscribers.ts @@ -4,7 +4,10 @@ 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 TopicsControllerRemoveSubscribersRequest = { /** @@ -14,6 +17,10 @@ export type TopicsControllerRemoveSubscribersRequest = { removeSubscribersRequestDto: components.RemoveSubscribersRequestDto; }; +export type TopicsControllerRemoveSubscribersResponse = { + headers: { [k: string]: Array }; +}; + /** @internal */ export const TopicsControllerRemoveSubscribersRequest$inboundSchema: z.ZodType< TopicsControllerRemoveSubscribersRequest, @@ -64,3 +71,104 @@ export namespace TopicsControllerRemoveSubscribersRequest$ { /** @deprecated use `TopicsControllerRemoveSubscribersRequest$Outbound` instead. */ export type Outbound = TopicsControllerRemoveSubscribersRequest$Outbound; } + +export function topicsControllerRemoveSubscribersRequestToJSON( + topicsControllerRemoveSubscribersRequest: + TopicsControllerRemoveSubscribersRequest, +): string { + return JSON.stringify( + TopicsControllerRemoveSubscribersRequest$outboundSchema.parse( + topicsControllerRemoveSubscribersRequest, + ), + ); +} + +export function topicsControllerRemoveSubscribersRequestFromJSON( + jsonString: string, +): SafeParseResult< + TopicsControllerRemoveSubscribersRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + TopicsControllerRemoveSubscribersRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'TopicsControllerRemoveSubscribersRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerRemoveSubscribersResponse$inboundSchema: z.ZodType< + TopicsControllerRemoveSubscribersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + }); +}); + +/** @internal */ +export type TopicsControllerRemoveSubscribersResponse$Outbound = { + Headers: { [k: string]: Array }; +}; + +/** @internal */ +export const TopicsControllerRemoveSubscribersResponse$outboundSchema: + z.ZodType< + TopicsControllerRemoveSubscribersResponse$Outbound, + z.ZodTypeDef, + TopicsControllerRemoveSubscribersResponse + > = z.object({ + headers: z.record(z.array(z.string())), + }).transform((v) => { + return remap$(v, { + headers: "Headers", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerRemoveSubscribersResponse$ { + /** @deprecated use `TopicsControllerRemoveSubscribersResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerRemoveSubscribersResponse$inboundSchema; + /** @deprecated use `TopicsControllerRemoveSubscribersResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerRemoveSubscribersResponse$outboundSchema; + /** @deprecated use `TopicsControllerRemoveSubscribersResponse$Outbound` instead. */ + export type Outbound = TopicsControllerRemoveSubscribersResponse$Outbound; +} + +export function topicsControllerRemoveSubscribersResponseToJSON( + topicsControllerRemoveSubscribersResponse: + TopicsControllerRemoveSubscribersResponse, +): string { + return JSON.stringify( + TopicsControllerRemoveSubscribersResponse$outboundSchema.parse( + topicsControllerRemoveSubscribersResponse, + ), + ); +} + +export function topicsControllerRemoveSubscribersResponseFromJSON( + jsonString: string, +): SafeParseResult< + TopicsControllerRemoveSubscribersResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + TopicsControllerRemoveSubscribersResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'TopicsControllerRemoveSubscribersResponse' from JSON`, + ); +} diff --git a/src/models/operations/topicscontrollerrenametopic.ts b/src/models/operations/topicscontrollerrenametopic.ts index aa0489f6..3f033892 100644 --- a/src/models/operations/topicscontrollerrenametopic.ts +++ b/src/models/operations/topicscontrollerrenametopic.ts @@ -4,7 +4,10 @@ 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 TopicsControllerRenameTopicRequest = { /** @@ -14,6 +17,11 @@ export type TopicsControllerRenameTopicRequest = { renameTopicRequestDto: components.RenameTopicRequestDto; }; +export type TopicsControllerRenameTopicResponse = { + headers: { [k: string]: Array }; + result: components.RenameTopicResponseDto; +}; + /** @internal */ export const TopicsControllerRenameTopicRequest$inboundSchema: z.ZodType< TopicsControllerRenameTopicRequest, @@ -61,3 +69,96 @@ export namespace TopicsControllerRenameTopicRequest$ { /** @deprecated use `TopicsControllerRenameTopicRequest$Outbound` instead. */ export type Outbound = TopicsControllerRenameTopicRequest$Outbound; } + +export function topicsControllerRenameTopicRequestToJSON( + topicsControllerRenameTopicRequest: TopicsControllerRenameTopicRequest, +): string { + return JSON.stringify( + TopicsControllerRenameTopicRequest$outboundSchema.parse( + topicsControllerRenameTopicRequest, + ), + ); +} + +export function topicsControllerRenameTopicRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerRenameTopicRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerRenameTopicRequest' from JSON`, + ); +} + +/** @internal */ +export const TopicsControllerRenameTopicResponse$inboundSchema: z.ZodType< + TopicsControllerRenameTopicResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())), + Result: components.RenameTopicResponseDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Headers": "headers", + "Result": "result", + }); +}); + +/** @internal */ +export type TopicsControllerRenameTopicResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.RenameTopicResponseDto$Outbound; +}; + +/** @internal */ +export const TopicsControllerRenameTopicResponse$outboundSchema: z.ZodType< + TopicsControllerRenameTopicResponse$Outbound, + z.ZodTypeDef, + TopicsControllerRenameTopicResponse +> = z.object({ + headers: z.record(z.array(z.string())), + result: components.RenameTopicResponseDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TopicsControllerRenameTopicResponse$ { + /** @deprecated use `TopicsControllerRenameTopicResponse$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerRenameTopicResponse$inboundSchema; + /** @deprecated use `TopicsControllerRenameTopicResponse$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerRenameTopicResponse$outboundSchema; + /** @deprecated use `TopicsControllerRenameTopicResponse$Outbound` instead. */ + export type Outbound = TopicsControllerRenameTopicResponse$Outbound; +} + +export function topicsControllerRenameTopicResponseToJSON( + topicsControllerRenameTopicResponse: TopicsControllerRenameTopicResponse, +): string { + return JSON.stringify( + TopicsControllerRenameTopicResponse$outboundSchema.parse( + topicsControllerRenameTopicResponse, + ), + ); +} + +export function topicsControllerRenameTopicResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TopicsControllerRenameTopicResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TopicsControllerRenameTopicResponse' from JSON`, + ); +} diff --git a/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts b/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts deleted file mode 100644 index 46f43e69..00000000 --- a/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: string; -}; - -/** @internal */ -export const WorkflowControllerDeleteWorkflowByIdRequest$inboundSchema: - z.ZodType< - WorkflowControllerDeleteWorkflowByIdRequest, - z.ZodTypeDef, - unknown - > = z.object({ - workflowId: z.string(), - }); - -/** @internal */ -export type WorkflowControllerDeleteWorkflowByIdRequest$Outbound = { - workflowId: string; -}; - -/** @internal */ -export const WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema: - z.ZodType< - WorkflowControllerDeleteWorkflowByIdRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerDeleteWorkflowByIdRequest - > = z.object({ - workflowId: 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 WorkflowControllerDeleteWorkflowByIdRequest$ { - /** @deprecated use `WorkflowControllerDeleteWorkflowByIdRequest$inboundSchema` instead. */ - export const inboundSchema = - WorkflowControllerDeleteWorkflowByIdRequest$inboundSchema; - /** @deprecated use `WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema` instead. */ - export const outboundSchema = - WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema; - /** @deprecated use `WorkflowControllerDeleteWorkflowByIdRequest$Outbound` instead. */ - export type Outbound = WorkflowControllerDeleteWorkflowByIdRequest$Outbound; -} diff --git a/src/models/operations/workflowcontrollergetworkflowbyid.ts b/src/models/operations/workflowcontrollergetworkflowbyid.ts deleted file mode 100644 index 65d9419f..00000000 --- a/src/models/operations/workflowcontrollergetworkflowbyid.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type WorkflowControllerGetWorkflowByIdRequest = { - workflowId: string; -}; - -/** @internal */ -export const WorkflowControllerGetWorkflowByIdRequest$inboundSchema: z.ZodType< - WorkflowControllerGetWorkflowByIdRequest, - z.ZodTypeDef, - unknown -> = z.object({ - workflowId: z.string(), -}); - -/** @internal */ -export type WorkflowControllerGetWorkflowByIdRequest$Outbound = { - workflowId: string; -}; - -/** @internal */ -export const WorkflowControllerGetWorkflowByIdRequest$outboundSchema: z.ZodType< - WorkflowControllerGetWorkflowByIdRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerGetWorkflowByIdRequest -> = z.object({ - workflowId: 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 WorkflowControllerGetWorkflowByIdRequest$ { - /** @deprecated use `WorkflowControllerGetWorkflowByIdRequest$inboundSchema` instead. */ - export const inboundSchema = - WorkflowControllerGetWorkflowByIdRequest$inboundSchema; - /** @deprecated use `WorkflowControllerGetWorkflowByIdRequest$outboundSchema` instead. */ - export const outboundSchema = - WorkflowControllerGetWorkflowByIdRequest$outboundSchema; - /** @deprecated use `WorkflowControllerGetWorkflowByIdRequest$Outbound` instead. */ - export type Outbound = WorkflowControllerGetWorkflowByIdRequest$Outbound; -} diff --git a/src/models/operations/workflowcontrollerlistworkflows.ts b/src/models/operations/workflowcontrollerlistworkflows.ts deleted file mode 100644 index fbbeb038..00000000 --- a/src/models/operations/workflowcontrollerlistworkflows.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; - -export type WorkflowControllerListWorkflowsRequest = { - page?: number | undefined; - limit?: number | undefined; - /** - * A query string to filter the results. It allows filtering based on either the name or trigger identifier of the workflow items. - */ - query?: string | undefined; -}; - -/** @internal */ -export const WorkflowControllerListWorkflowsRequest$inboundSchema: z.ZodType< - WorkflowControllerListWorkflowsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - query: z.string().optional(), -}); - -/** @internal */ -export type WorkflowControllerListWorkflowsRequest$Outbound = { - page?: number | undefined; - limit: number; - query?: string | undefined; -}; - -/** @internal */ -export const WorkflowControllerListWorkflowsRequest$outboundSchema: z.ZodType< - WorkflowControllerListWorkflowsRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerListWorkflowsRequest -> = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - query: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WorkflowControllerListWorkflowsRequest$ { - /** @deprecated use `WorkflowControllerListWorkflowsRequest$inboundSchema` instead. */ - export const inboundSchema = - WorkflowControllerListWorkflowsRequest$inboundSchema; - /** @deprecated use `WorkflowControllerListWorkflowsRequest$outboundSchema` instead. */ - export const outboundSchema = - WorkflowControllerListWorkflowsRequest$outboundSchema; - /** @deprecated use `WorkflowControllerListWorkflowsRequest$Outbound` instead. */ - export type Outbound = WorkflowControllerListWorkflowsRequest$Outbound; -} diff --git a/src/models/operations/workflowcontrollerupdateactivestatus.ts b/src/models/operations/workflowcontrollerupdateactivestatus.ts deleted file mode 100644 index 0ed440bf..00000000 --- a/src/models/operations/workflowcontrollerupdateactivestatus.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import * as components from "../components/index.js"; - -export type WorkflowControllerUpdateActiveStatusRequest = { - workflowId: string; - changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto; -}; - -/** @internal */ -export const WorkflowControllerUpdateActiveStatusRequest$inboundSchema: - z.ZodType< - WorkflowControllerUpdateActiveStatusRequest, - z.ZodTypeDef, - unknown - > = z.object({ - workflowId: z.string(), - ChangeWorkflowStatusRequestDto: - components.ChangeWorkflowStatusRequestDto$inboundSchema, - }).transform((v) => { - return remap$(v, { - "ChangeWorkflowStatusRequestDto": "changeWorkflowStatusRequestDto", - }); - }); - -/** @internal */ -export type WorkflowControllerUpdateActiveStatusRequest$Outbound = { - workflowId: string; - ChangeWorkflowStatusRequestDto: - components.ChangeWorkflowStatusRequestDto$Outbound; -}; - -/** @internal */ -export const WorkflowControllerUpdateActiveStatusRequest$outboundSchema: - z.ZodType< - WorkflowControllerUpdateActiveStatusRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerUpdateActiveStatusRequest - > = z.object({ - workflowId: z.string(), - changeWorkflowStatusRequestDto: - components.ChangeWorkflowStatusRequestDto$outboundSchema, - }).transform((v) => { - return remap$(v, { - changeWorkflowStatusRequestDto: "ChangeWorkflowStatusRequestDto", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WorkflowControllerUpdateActiveStatusRequest$ { - /** @deprecated use `WorkflowControllerUpdateActiveStatusRequest$inboundSchema` instead. */ - export const inboundSchema = - WorkflowControllerUpdateActiveStatusRequest$inboundSchema; - /** @deprecated use `WorkflowControllerUpdateActiveStatusRequest$outboundSchema` instead. */ - export const outboundSchema = - WorkflowControllerUpdateActiveStatusRequest$outboundSchema; - /** @deprecated use `WorkflowControllerUpdateActiveStatusRequest$Outbound` instead. */ - export type Outbound = WorkflowControllerUpdateActiveStatusRequest$Outbound; -} diff --git a/src/models/operations/workflowcontrollerupdateworkflowbyid.ts b/src/models/operations/workflowcontrollerupdateworkflowbyid.ts deleted file mode 100644 index 3cac92a4..00000000 --- a/src/models/operations/workflowcontrollerupdateworkflowbyid.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import * as components from "../components/index.js"; - -export type WorkflowControllerUpdateWorkflowByIdRequest = { - workflowId: string; - updateWorkflowRequestDto: components.UpdateWorkflowRequestDto; -}; - -/** @internal */ -export const WorkflowControllerUpdateWorkflowByIdRequest$inboundSchema: - z.ZodType< - WorkflowControllerUpdateWorkflowByIdRequest, - z.ZodTypeDef, - unknown - > = z.object({ - workflowId: z.string(), - UpdateWorkflowRequestDto: components.UpdateWorkflowRequestDto$inboundSchema, - }).transform((v) => { - return remap$(v, { - "UpdateWorkflowRequestDto": "updateWorkflowRequestDto", - }); - }); - -/** @internal */ -export type WorkflowControllerUpdateWorkflowByIdRequest$Outbound = { - workflowId: string; - UpdateWorkflowRequestDto: components.UpdateWorkflowRequestDto$Outbound; -}; - -/** @internal */ -export const WorkflowControllerUpdateWorkflowByIdRequest$outboundSchema: - z.ZodType< - WorkflowControllerUpdateWorkflowByIdRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerUpdateWorkflowByIdRequest - > = z.object({ - workflowId: z.string(), - updateWorkflowRequestDto: - components.UpdateWorkflowRequestDto$outboundSchema, - }).transform((v) => { - return remap$(v, { - updateWorkflowRequestDto: "UpdateWorkflowRequestDto", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WorkflowControllerUpdateWorkflowByIdRequest$ { - /** @deprecated use `WorkflowControllerUpdateWorkflowByIdRequest$inboundSchema` instead. */ - export const inboundSchema = - WorkflowControllerUpdateWorkflowByIdRequest$inboundSchema; - /** @deprecated use `WorkflowControllerUpdateWorkflowByIdRequest$outboundSchema` instead. */ - export const outboundSchema = - WorkflowControllerUpdateWorkflowByIdRequest$outboundSchema; - /** @deprecated use `WorkflowControllerUpdateWorkflowByIdRequest$Outbound` instead. */ - export type Outbound = WorkflowControllerUpdateWorkflowByIdRequest$Outbound; -} diff --git a/src/sdk/apikeys.ts b/src/sdk/apikeys.ts index f2ca05d7..62daa88c 100644 --- a/src/sdk/apikeys.ts +++ b/src/sdk/apikeys.ts @@ -4,7 +4,7 @@ import { environmentsApiKeysList } from "../funcs/environmentsApiKeysList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ApiKeys extends ClientSDK { @@ -13,7 +13,9 @@ export class ApiKeys extends ClientSDK { */ async list( options?: RequestOptions, - ): Promise> { + ): Promise< + operations.EnvironmentsControllerV1ListOrganizationApiKeysResponse + > { return unwrapAsync(environmentsApiKeysList( this, options, diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index 6d078cde..992a9625 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -10,13 +10,13 @@ import { unwrapAsync } from "../types/fp.js"; export class Authentication extends ClientSDK { /** - * Handle chat oauth + * Handle providers oauth redirect */ - async chatAccessOauth( - request: operations.SubscribersControllerChatAccessOauthRequest, + async chatAccessOauthCallBack( + request: operations.SubscribersControllerChatOauthCallbackRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersAuthenticationChatAccessOauth( + ): Promise { + return unwrapAsync(subscribersAuthenticationChatAccessOauthCallBack( this, request, options, @@ -24,13 +24,15 @@ export class Authentication extends ClientSDK { } /** - * Handle providers oauth redirect + * Handle chat oauth */ - async chatAccessOauthCallBack( - request: operations.SubscribersControllerChatOauthCallbackRequest, + async chatAccessOauth( + request: operations.SubscribersControllerChatAccessOauthRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersAuthenticationChatAccessOauthCallBack( + ): Promise< + operations.SubscribersControllerChatAccessOauthResponse | undefined + > { + return unwrapAsync(subscribersAuthenticationChatAccessOauth( this, request, options, diff --git a/src/sdk/changes.ts b/src/sdk/changes.ts deleted file mode 100644 index 45bacac7..00000000 --- a/src/sdk/changes.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { changesApply } from "../funcs/changesApply.js"; -import { changesApplyBulk } from "../funcs/changesApplyBulk.js"; -import { changesCount } from "../funcs/changesCount.js"; -import { changesRetrieve } from "../funcs/changesRetrieve.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Changes extends ClientSDK { - /** - * Apply change - */ - async apply( - changeId: string, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(changesApply( - this, - changeId, - options, - )); - } - - /** - * Apply changes - */ - async applyBulk( - request: components.BulkApplyChangeDto, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(changesApplyBulk( - this, - request, - options, - )); - } - - /** - * Get changes count - */ - async count( - options?: RequestOptions, - ): Promise { - return unwrapAsync(changesCount( - this, - options, - )); - } - - /** - * Get changes - */ - async retrieve( - request: operations.ChangesControllerGetChangesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(changesRetrieve( - this, - request, - options, - )); - } -} diff --git a/src/sdk/credentials.ts b/src/sdk/credentials.ts index 27a591af..2ac9307f 100644 --- a/src/sdk/credentials.ts +++ b/src/sdk/credentials.ts @@ -7,65 +7,70 @@ import { subscribersCredentialsDelete } from "../funcs/subscribersCredentialsDel import { subscribersCredentialsUpdate } from "../funcs/subscribersCredentialsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Credentials extends ClientSDK { /** - * Modify subscriber credentials + * Update subscriber credentials * * @remarks * Subscriber credentials associated to the delivery methods such as slack and push tokens. - * This endpoint appends provided credentials and deviceTokens to the existing ones. */ - async append( - subscriberId: string, + async update( updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, + subscriberId: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersCredentialsAppend( + ): Promise { + return unwrapAsync(subscribersCredentialsUpdate( this, - subscriberId, updateSubscriberChannelRequestDto, + subscriberId, options, )); } /** - * Delete subscriber credentials by providerId + * Modify subscriber credentials * * @remarks - * Delete subscriber credentials such as slack and expo tokens. + * Subscriber credentials associated to the delivery methods such as slack and push tokens. + * + * This endpoint appends provided credentials and deviceTokens to the existing ones. */ - async delete( + async append( + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto, subscriberId: string, - providerId: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersCredentialsDelete( + ): Promise { + return unwrapAsync(subscribersCredentialsAppend( this, + updateSubscriberChannelRequestDto, subscriberId, - providerId, options, )); } /** - * Update subscriber credentials + * Delete subscriber credentials by providerId * * @remarks - * Subscriber credentials associated to the delivery methods such as slack and push tokens. + * Delete subscriber credentials such as slack and expo tokens. */ - async update( + async delete( subscriberId: string, - updateSubscriberChannelRequestDto: - components.UpdateSubscriberChannelRequestDto, + providerId: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersCredentialsUpdate( + ): Promise< + | operations.SubscribersControllerDeleteSubscriberCredentialsResponse + | undefined + > { + return unwrapAsync(subscribersCredentialsDelete( this, subscriberId, - updateSubscriberChannelRequestDto, + providerId, options, )); } diff --git a/src/sdk/environments.ts b/src/sdk/environments.ts index 39009c6f..ba0cf44f 100644 --- a/src/sdk/environments.ts +++ b/src/sdk/environments.ts @@ -5,35 +5,35 @@ import { environmentsList } from "../funcs/environmentsList.js"; import { environmentsRetrieve } from "../funcs/environmentsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { ApiKeys } from "./apikeys.js"; export class Environments extends ClientSDK { private _apiKeys?: ApiKeys; get apiKeys(): ApiKeys { - return (this._apiKeys ??= new ApiKeys(this.options$)); + return (this._apiKeys ??= new ApiKeys(this._options)); } /** - * Get environments + * Get current environment */ - async list( + async retrieve( options?: RequestOptions, - ): Promise> { - return unwrapAsync(environmentsList( + ): Promise { + return unwrapAsync(environmentsRetrieve( this, options, )); } /** - * Get current environment + * Get environments */ - async retrieve( + async list( options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsRetrieve( + ): Promise { + return unwrapAsync(environmentsList( this, options, )); diff --git a/src/sdk/executiondetails.ts b/src/sdk/executiondetails.ts index 0d223d3a..ab136faa 100644 --- a/src/sdk/executiondetails.ts +++ b/src/sdk/executiondetails.ts @@ -4,7 +4,7 @@ import { executionDetailsRetrieve } from "../funcs/executionDetailsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ExecutionDetails extends ClientSDK { @@ -15,7 +15,9 @@ export class ExecutionDetails extends ClientSDK { notificationId: string, subscriberId: string, options?: RequestOptions, - ): Promise> { + ): Promise< + operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationResponse + > { return unwrapAsync(executionDetailsRetrieve( this, notificationId, diff --git a/src/sdk/feeds.ts b/src/sdk/feeds.ts deleted file mode 100644 index 39ceb000..00000000 --- a/src/sdk/feeds.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { feedsCreate } from "../funcs/feedsCreate.js"; -import { feedsDelete } from "../funcs/feedsDelete.js"; -import { feedsRetrieve } from "../funcs/feedsRetrieve.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Feeds extends ClientSDK { - /** - * Create feed - */ - async create( - request: components.CreateFeedRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(feedsCreate( - this, - request, - options, - )); - } - - /** - * Delete feed - */ - async delete( - feedId: string, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(feedsDelete( - this, - feedId, - options, - )); - } - - /** - * Get feeds - */ - async retrieve( - options?: RequestOptions, - ): Promise> { - return unwrapAsync(feedsRetrieve( - this, - options, - )); - } -} diff --git a/src/sdk/integrations.ts b/src/sdk/integrations.ts index 6702c4f1..11dfece3 100644 --- a/src/sdk/integrations.ts +++ b/src/sdk/integrations.ts @@ -10,84 +10,87 @@ import { integrationsSetAsPrimary } from "../funcs/integrationsSetAsPrimary.js"; import { integrationsUpdate } from "../funcs/integrationsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { Webhooks } from "./webhooks.js"; export class Integrations extends ClientSDK { private _webhooks?: Webhooks; get webhooks(): Webhooks { - return (this._webhooks ??= new Webhooks(this.options$)); + return (this._webhooks ??= new Webhooks(this._options)); } /** - * Create integration + * Get integrations * * @remarks - * Create an integration for the current environment the user is based on the API key provided + * Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change */ - async create( - request: components.CreateIntegrationRequestDto, + async list( options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsCreate( + ): Promise { + return unwrapAsync(integrationsList( this, - request, options, )); } /** - * Delete integration + * Create integration + * + * @remarks + * Create an integration for the current environment the user is based on the API key provided */ - async delete( - integrationId: string, + async create( + request: components.CreateIntegrationRequestDto, options?: RequestOptions, - ): Promise> { - return unwrapAsync(integrationsDelete( + ): Promise { + return unwrapAsync(integrationsCreate( this, - integrationId, + request, options, )); } /** - * Get integrations + * Get active integrations * * @remarks - * Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + * Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change */ - async list( + async listActive( options?: RequestOptions, - ): Promise> { - return unwrapAsync(integrationsList( + ): Promise { + return unwrapAsync(integrationsListActive( this, options, )); } /** - * Get active integrations - * - * @remarks - * Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + * Update integration */ - async listActive( + async update( + updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, + integrationId: string, options?: RequestOptions, - ): Promise> { - return unwrapAsync(integrationsListActive( + ): Promise { + return unwrapAsync(integrationsUpdate( this, + updateIntegrationRequestDto, + integrationId, options, )); } /** - * Set integration as primary + * Delete integration */ - async setAsPrimary( + async delete( integrationId: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsSetAsPrimary( + ): Promise { + return unwrapAsync(integrationsDelete( this, integrationId, options, @@ -95,17 +98,15 @@ export class Integrations extends ClientSDK { } /** - * Update integration + * Set integration as primary */ - async update( + async setAsPrimary( integrationId: string, - updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsUpdate( + ): Promise { + return unwrapAsync(integrationsSetAsPrimary( this, integrationId, - updateIntegrationRequestDto, options, )); } diff --git a/src/sdk/layouts.ts b/src/sdk/layouts.ts deleted file mode 100644 index b50b418a..00000000 --- a/src/sdk/layouts.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { layoutsCreate } from "../funcs/layoutsCreate.js"; -import { layoutsDelete } from "../funcs/layoutsDelete.js"; -import { layoutsList } from "../funcs/layoutsList.js"; -import { layoutsRetrieve } from "../funcs/layoutsRetrieve.js"; -import { layoutsSetAsDefault } from "../funcs/layoutsSetAsDefault.js"; -import { layoutsUpdate } from "../funcs/layoutsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Layouts extends ClientSDK { - /** - * Layout creation - * - * @remarks - * Create a layout - */ - async create( - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsCreate( - this, - options, - )); - } - - /** - * Delete layout - * - * @remarks - * Execute a soft delete of a layout given a certain ID. - */ - async delete( - layoutId: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsDelete( - this, - layoutId, - options, - )); - } - - /** - * Filter layouts - * - * @remarks - * Returns a list of layouts that can be paginated using the `page` query parameter and filtered by the environment where it is executed from the organization the user belongs to. - */ - async list( - request: operations.LayoutsControllerListLayoutsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsList( - this, - request, - options, - )); - } - - /** - * Get layout - * - * @remarks - * Get a layout by its ID - */ - async retrieve( - layoutId: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsRetrieve( - this, - layoutId, - options, - )); - } - - /** - * Set default layout - * - * @remarks - * Sets the default layout for the environment and updates to non default to the existing default layout (if any). - */ - async setAsDefault( - layoutId: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsSetAsDefault( - this, - layoutId, - options, - )); - } - - /** - * Update a layout - * - * @remarks - * Update the name, content and variables of a layout. Also change it to be default or no. - */ - async update( - layoutId: string, - updateLayoutRequestDto: components.UpdateLayoutRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(layoutsUpdate( - this, - layoutId, - updateLayoutRequestDto, - options, - )); - } -} diff --git a/src/sdk/messages.ts b/src/sdk/messages.ts index eb7d0541..bc23e83e 100644 --- a/src/sdk/messages.ts +++ b/src/sdk/messages.ts @@ -6,11 +6,27 @@ import { messagesDelete } from "../funcs/messagesDelete.js"; import { messagesDeleteByTransactionId } from "../funcs/messagesDeleteByTransactionId.js"; import { messagesRetrieve } from "../funcs/messagesRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Messages extends ClientSDK { + /** + * Get messages + * + * @remarks + * Returns a list of messages, could paginate using the `page` query parameter + */ + async retrieve( + request: operations.MessagesControllerGetMessagesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(messagesRetrieve( + this, + request, + options, + )); + } + /** * Delete message * @@ -20,7 +36,7 @@ export class Messages extends ClientSDK { async delete( messageId: string, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(messagesDelete( this, messageId, @@ -36,9 +52,12 @@ export class Messages extends ClientSDK { */ async deleteByTransactionId( transactionId: string, - channel?: operations.Channel | undefined, + channel?: operations.QueryParamChannel | undefined, options?: RequestOptions, - ): Promise { + ): Promise< + | operations.MessagesControllerDeleteMessagesByTransactionIdResponse + | undefined + > { return unwrapAsync(messagesDeleteByTransactionId( this, transactionId, @@ -46,21 +65,4 @@ export class Messages extends ClientSDK { options, )); } - - /** - * Get messages - * - * @remarks - * Returns a list of messages, could paginate using the `page` query parameter - */ - async retrieve( - request: operations.MessagesControllerGetMessagesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(messagesRetrieve( - this, - request, - options, - )); - } } diff --git a/src/sdk/notifications.ts b/src/sdk/notifications.ts index ec0b8b2c..bbfe0d85 100644 --- a/src/sdk/notifications.ts +++ b/src/sdk/notifications.ts @@ -5,7 +5,6 @@ import { notificationsList } from "../funcs/notificationsList.js"; import { notificationsRetrieve } from "../funcs/notificationsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { Stats } from "./stats.js"; @@ -13,7 +12,7 @@ import { Stats } from "./stats.js"; export class Notifications extends ClientSDK { private _stats?: Stats; get stats(): Stats { - return (this._stats ??= new Stats(this.options$)); + return (this._stats ??= new Stats(this._options)); } /** @@ -22,7 +21,7 @@ export class Notifications extends ClientSDK { async list( request: operations.NotificationsControllerListNotificationsRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(notificationsList( this, request, @@ -36,7 +35,7 @@ export class Notifications extends ClientSDK { async retrieve( notificationId: string, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(notificationsRetrieve( this, notificationId, diff --git a/src/sdk/novumessages.ts b/src/sdk/novumessages.ts index 6a8e9f01..b8eb5333 100644 --- a/src/sdk/novumessages.ts +++ b/src/sdk/novumessages.ts @@ -12,33 +12,33 @@ import { unwrapAsync } from "../types/fp.js"; export class NovuMessages extends ClientSDK { /** - * Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. + * Mark a subscriber messages as seen, read, unseen or unread */ - async markAll( + async markAllAs( + messageMarkAsRequestDto: components.MessageMarkAsRequestDto, subscriberId: string, - markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersMessagesMarkAll( + ): Promise { + return unwrapAsync(subscribersMessagesMarkAllAs( this, + messageMarkAsRequestDto, subscriberId, - markAllMessageAsRequestDto, options, )); } /** - * Mark a subscriber messages as seen, read, unseen or unread + * Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. */ - async markAllAs( + async markAll( + markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, subscriberId: string, - messageMarkAsRequestDto: components.MessageMarkAsRequestDto, options?: RequestOptions, - ): Promise> { - return unwrapAsync(subscribersMessagesMarkAllAs( + ): Promise { + return unwrapAsync(subscribersMessagesMarkAll( this, + markAllMessageAsRequestDto, subscriberId, - messageMarkAsRequestDto, options, )); } @@ -49,7 +49,7 @@ export class NovuMessages extends ClientSDK { async updateAsSeen( request: operations.SubscribersControllerMarkActionAsSeenRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(subscribersMessagesUpdateAsSeen( this, request, diff --git a/src/sdk/novunotifications.ts b/src/sdk/novunotifications.ts index dfaecb0d..32e3be09 100644 --- a/src/sdk/novunotifications.ts +++ b/src/sdk/novunotifications.ts @@ -5,7 +5,6 @@ import { subscribersNotificationsRetrieve } from "../funcs/subscribersNotificationsRetrieve.js"; import { subscribersNotificationsUnseenCount } from "../funcs/subscribersNotificationsUnseenCount.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; @@ -16,7 +15,7 @@ export class NovuNotifications extends ClientSDK { async retrieve( request: operations.SubscribersControllerGetNotificationsFeedRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(subscribersNotificationsRetrieve( this, request, @@ -30,7 +29,7 @@ export class NovuNotifications extends ClientSDK { async unseenCount( request: operations.SubscribersControllerGetUnseenCountRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(subscribersNotificationsUnseenCount( this, request, diff --git a/src/sdk/novusubscribers.ts b/src/sdk/novusubscribers.ts index 4bd49a05..b78fb169 100644 --- a/src/sdk/novusubscribers.ts +++ b/src/sdk/novusubscribers.ts @@ -7,6 +7,7 @@ import { topicsSubscribersDelete } from "../funcs/topicsSubscribersDelete.js"; import { topicsSubscribersRetrieve } from "../funcs/topicsSubscribersRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class NovuSubscribers extends ClientSDK { @@ -17,51 +18,51 @@ export class NovuSubscribers extends ClientSDK { * Add subscribers to a topic by key */ async assign( - topicKey: string, addSubscribersRequestDto: components.AddSubscribersRequestDto, + topicKey: string, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(topicsSubscribersAssign( this, - topicKey, addSubscribersRequestDto, + topicKey, options, )); } /** - * Subscribers removal + * Check topic subscriber * * @remarks - * Remove subscribers from a topic + * Check if a subscriber belongs to a certain topic */ - async delete( + async retrieve( + externalSubscriberId: string, topicKey: string, - removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(topicsSubscribersDelete( + ): Promise { + return unwrapAsync(topicsSubscribersRetrieve( this, + externalSubscriberId, topicKey, - removeSubscribersRequestDto, options, )); } /** - * Check topic subscriber + * Subscribers removal * * @remarks - * Check if a subscriber belongs to a certain topic + * Remove subscribers from a topic */ - async retrieve( - externalSubscriberId: string, + async delete( + removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, topicKey: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(topicsSubscribersRetrieve( + ): Promise { + return unwrapAsync(topicsSubscribersDelete( this, - externalSubscriberId, + removeSubscribersRequestDto, topicKey, options, )); diff --git a/src/sdk/organizations.ts b/src/sdk/organizations.ts deleted file mode 100644 index 2670269d..00000000 --- a/src/sdk/organizations.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { organizationsEEOrganizationControllerRenameOrganization } from "../funcs/organizationsEEOrganizationControllerRenameOrganization.js"; -import { organizationsRetrieve } from "../funcs/organizationsRetrieve.js"; -import { organizationsUpdate } from "../funcs/organizationsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Organizations extends ClientSDK { - /** - * Rename organization name - */ - async eeOrganizationControllerRenameOrganization( - request: components.RenameOrganizationDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(organizationsEEOrganizationControllerRenameOrganization( - this, - request, - options, - )); - } - - /** - * Fetch current organization details - */ - async retrieve( - options?: RequestOptions, - ): Promise { - return unwrapAsync(organizationsRetrieve( - this, - options, - )); - } - - /** - * Update organization branding details - */ - async update( - request: components.UpdateBrandingDetailsDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(organizationsUpdate( - this, - request, - options, - )); - } -} diff --git a/src/sdk/preferences.ts b/src/sdk/preferences.ts index c7652ddb..1b089387 100644 --- a/src/sdk/preferences.ts +++ b/src/sdk/preferences.ts @@ -17,39 +17,49 @@ export class Preferences extends ClientSDK { */ async list( subscriberId: string, + includeInactiveChannels?: boolean | undefined, options?: RequestOptions, - ): Promise> { + ): Promise< + operations.SubscribersControllerListSubscriberPreferencesResponse + > { return unwrapAsync(subscribersPreferencesList( this, subscriberId, + includeInactiveChannels, options, )); } /** - * Get subscriber preferences by level + * Update subscriber global preferences */ - async retrieveByLevel( - parameter: operations.Parameter, + async updateGlobal( + updateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto, subscriberId: string, options?: RequestOptions, - ): Promise> { - return unwrapAsync(subscribersPreferencesRetrieveByLevel( + ): Promise< + operations.SubscribersControllerUpdateSubscriberGlobalPreferencesResponse + > { + return unwrapAsync(subscribersPreferencesUpdateGlobal( this, - parameter, + updateSubscriberGlobalPreferencesRequestDto, subscriberId, options, )); } /** - * Update subscriber preference + * Get subscriber preferences by level */ - async update( - request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, + async retrieveByLevel( + request: + operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersPreferencesUpdate( + ): Promise< + operations.SubscribersControllerGetSubscriberPreferenceByLevelResponse + > { + return unwrapAsync(subscribersPreferencesRetrieveByLevel( this, request, options, @@ -57,18 +67,17 @@ export class Preferences extends ClientSDK { } /** - * Update subscriber global preferences + * Update subscriber preference */ - async updateGlobal( - subscriberId: string, - updateSubscriberGlobalPreferencesRequestDto: - components.UpdateSubscriberGlobalPreferencesRequestDto, + async update( + request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersPreferencesUpdateGlobal( + ): Promise< + operations.SubscribersControllerUpdateSubscriberPreferenceResponse + > { + return unwrapAsync(subscribersPreferencesUpdate( this, - subscriberId, - updateSubscriberGlobalPreferencesRequestDto, + request, options, )); } diff --git a/src/sdk/properties.ts b/src/sdk/properties.ts index 1948ae52..f2e4bed0 100644 --- a/src/sdk/properties.ts +++ b/src/sdk/properties.ts @@ -5,6 +5,7 @@ import { subscribersPropertiesUpdateOnlineFlag } from "../funcs/subscribersPropertiesUpdateOnlineFlag.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Properties extends ClientSDK { @@ -15,15 +16,17 @@ export class Properties extends ClientSDK { * Used to update the subscriber isOnline flag. */ async updateOnlineFlag( - subscriberId: string, updateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto, + subscriberId: string, options?: RequestOptions, - ): Promise { + ): Promise< + operations.SubscribersControllerUpdateSubscriberOnlineFlagResponse + > { return unwrapAsync(subscribersPropertiesUpdateOnlineFlag( this, - subscriberId, updateSubscriberOnlineFlagRequestDto, + subscriberId, options, )); } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 98c805ff..7f057cee 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -8,126 +8,91 @@ import { triggerBroadcast } from "../funcs/triggerBroadcast.js"; import { triggerBulk } from "../funcs/triggerBulk.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; -import { Changes } from "./changes.js"; import { Environments } from "./environments.js"; import { ExecutionDetails } from "./executiondetails.js"; -import { Feeds } from "./feeds.js"; import { Integrations } from "./integrations.js"; -import { Layouts } from "./layouts.js"; import { Messages } from "./messages.js"; import { Notifications } from "./notifications.js"; -import { Organizations } from "./organizations.js"; import { Subscribers } from "./subscribers.js"; -import { Tenants } from "./tenants.js"; import { Topics } from "./topics.js"; import { WorkflowGroups } from "./workflowgroups.js"; -import { Workflows } from "./workflows.js"; export class Novu extends ClientSDK { - private _changes?: Changes; - get changes(): Changes { - return (this._changes ??= new Changes(this.options$)); - } - private _environments?: Environments; get environments(): Environments { - return (this._environments ??= new Environments(this.options$)); + return (this._environments ??= new Environments(this._options)); } private _executionDetails?: ExecutionDetails; get executionDetails(): ExecutionDetails { - return (this._executionDetails ??= new ExecutionDetails(this.options$)); + return (this._executionDetails ??= new ExecutionDetails(this._options)); } - private _feeds?: Feeds; - get feeds(): Feeds { - return (this._feeds ??= new Feeds(this.options$)); - } - - private _integrations?: Integrations; - get integrations(): Integrations { - return (this._integrations ??= new Integrations(this.options$)); - } - - private _layouts?: Layouts; - get layouts(): Layouts { - return (this._layouts ??= new Layouts(this.options$)); - } - - private _messages?: Messages; - get messages(): Messages { - return (this._messages ??= new Messages(this.options$)); + private _notifications?: Notifications; + get notifications(): Notifications { + return (this._notifications ??= new Notifications(this._options)); } private _workflowGroups?: WorkflowGroups; get workflowGroups(): WorkflowGroups { - return (this._workflowGroups ??= new WorkflowGroups(this.options$)); - } - - private _notifications?: Notifications; - get notifications(): Notifications { - return (this._notifications ??= new Notifications(this.options$)); + return (this._workflowGroups ??= new WorkflowGroups(this._options)); } - private _organizations?: Organizations; - get organizations(): Organizations { - return (this._organizations ??= new Organizations(this.options$)); + private _integrations?: Integrations; + get integrations(): Integrations { + return (this._integrations ??= new Integrations(this._options)); } private _subscribers?: Subscribers; get subscribers(): Subscribers { - return (this._subscribers ??= new Subscribers(this.options$)); + return (this._subscribers ??= new Subscribers(this._options)); } - private _tenants?: Tenants; - get tenants(): Tenants { - return (this._tenants ??= new Tenants(this.options$)); + private _messages?: Messages; + get messages(): Messages { + return (this._messages ??= new Messages(this._options)); } private _topics?: Topics; get topics(): Topics { - return (this._topics ??= new Topics(this.options$)); - } - - private _workflows?: Workflows; - get workflows(): Workflows { - return (this._workflows ??= new Workflows(this.options$)); + return (this._topics ??= new Topics(this._options)); } /** - * Cancel triggered event + * Trigger event * * @remarks * - * Using a previously generated transactionId during the event trigger, - * will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... + * Trigger event is the main (and only) way to send notifications to subscribers. + * The trigger identifier is used to match the particular workflow associated with it. + * Additional information can be passed according the body interface below. */ - async cancel( - transactionId: string, + async trigger( + request: components.TriggerEventRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(cancel( + ): Promise { + return unwrapAsync(trigger( this, - transactionId, + request, options, )); } /** - * Trigger event + * Bulk trigger event * * @remarks * - * Trigger event is the main (and only) way to send notifications to subscribers. - * The trigger identifier is used to match the particular workflow associated with it. - * Additional information can be passed according the body interface below. + * Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. + * The bulk API is limited to 100 events per request. */ - async trigger( - request: components.TriggerEventRequestDto, + async triggerBulk( + request: components.BulkTriggerEventDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(trigger( + ): Promise { + return unwrapAsync(triggerBulk( this, request, options, @@ -139,12 +104,13 @@ export class Novu extends ClientSDK { * * @remarks * Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. + * * In the future could be used to trigger events to a subset of subscribers based on defined filters. */ async triggerBroadcast( request: components.TriggerEventToAllRequestDto, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(triggerBroadcast( this, request, @@ -153,20 +119,20 @@ export class Novu extends ClientSDK { } /** - * Bulk trigger event + * Cancel triggered event * * @remarks * - * Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. - * The bulk API is limited to 100 events per request. + * Using a previously generated transactionId during the event trigger, + * will cancel any active or pending workflows. This is useful to cancel active digests, delays etc... */ - async triggerBulk( - request: components.BulkTriggerEventDto, + async cancel( + transactionId: string, options?: RequestOptions, - ): Promise> { - return unwrapAsync(triggerBulk( + ): Promise { + return unwrapAsync(cancel( this, - request, + transactionId, options, )); } diff --git a/src/sdk/stats.ts b/src/sdk/stats.ts index 4656836b..dd2e3d8e 100644 --- a/src/sdk/stats.ts +++ b/src/sdk/stats.ts @@ -5,32 +5,32 @@ import { notificationsStatsGraph } from "../funcs/notificationsStatsGraph.js"; import { notificationsStatsRetrieve } from "../funcs/notificationsStatsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Stats extends ClientSDK { /** - * Get notification graph statistics + * Get notification statistics */ - async graph( - days?: number | undefined, + async retrieve( options?: RequestOptions, - ): Promise> { - return unwrapAsync(notificationsStatsGraph( + ): Promise { + return unwrapAsync(notificationsStatsRetrieve( this, - days, options, )); } /** - * Get notification statistics + * Get notification graph statistics */ - async retrieve( + async graph( + days?: number | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(notificationsStatsRetrieve( + ): Promise { + return unwrapAsync(notificationsStatsGraph( this, + days, options, )); } diff --git a/src/sdk/status.ts b/src/sdk/status.ts deleted file mode 100644 index 80730e30..00000000 --- a/src/sdk/status.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { workflowsStatusUpdate } from "../funcs/workflowsStatusUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Status extends ClientSDK { - /** - * Update workflow status - * - * @remarks - * Workflow was previously named notification template - */ - async update( - workflowId: string, - changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsStatusUpdate( - this, - workflowId, - changeWorkflowStatusRequestDto, - options, - )); - } -} diff --git a/src/sdk/subscribers.ts b/src/sdk/subscribers.ts index dcfe25e3..c0865190 100644 --- a/src/sdk/subscribers.ts +++ b/src/sdk/subscribers.ts @@ -23,64 +23,66 @@ import { Properties } from "./properties.js"; export class Subscribers extends ClientSDK { private _credentials?: Credentials; get credentials(): Credentials { - return (this._credentials ??= new Credentials(this.options$)); + return (this._credentials ??= new Credentials(this._options)); } - private _authentication?: Authentication; - get authentication(): Authentication { - return (this._authentication ??= new Authentication(this.options$)); + private _properties?: Properties; + get properties(): Properties { + return (this._properties ??= new Properties(this._options)); } - private _messages?: NovuMessages; - get messages(): NovuMessages { - return (this._messages ??= new NovuMessages(this.options$)); + private _preferences?: Preferences; + get preferences(): Preferences { + return (this._preferences ??= new Preferences(this._options)); } private _notifications?: NovuNotifications; get notifications(): NovuNotifications { - return (this._notifications ??= new NovuNotifications(this.options$)); + return (this._notifications ??= new NovuNotifications(this._options)); } - private _properties?: Properties; - get properties(): Properties { - return (this._properties ??= new Properties(this.options$)); + private _messages?: NovuMessages; + get messages(): NovuMessages { + return (this._messages ??= new NovuMessages(this._options)); } - private _preferences?: Preferences; - get preferences(): Preferences { - return (this._preferences ??= new Preferences(this.options$)); + private _authentication?: Authentication; + get authentication(): Authentication { + return (this._authentication ??= new Authentication(this._options)); } /** - * Create subscriber + * Get subscribers * * @remarks - * Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. + * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter */ - async create( - request: components.CreateSubscriberRequestDto, + async list( + page?: number | undefined, + limit?: number | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersCreate( + ): Promise< + PageIterator + > { + return unwrapResultIterator(subscribersList( this, - request, + page, + limit, options, )); } /** - * Bulk create subscribers + * Create subscriber * * @remarks - * - * Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API. - * The bulk API is limited to 500 subscribers per request. + * Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity. */ - async createBulk( - request: components.BulkSubscriberCreateDto, + async create( + request: components.CreateSubscriberRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersCreateBulk( + ): Promise { + return unwrapAsync(subscribersCreate( this, request, options, @@ -88,54 +90,54 @@ export class Subscribers extends ClientSDK { } /** - * Delete subscriber + * Get subscriber * * @remarks - * Deletes a subscriber entity from the Novu platform + * Get subscriber by your internal id used to identify the subscriber */ - async delete( + async retrieve( subscriberId: string, + includeTopics?: string | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersDelete( + ): Promise { + return unwrapAsync(subscribersRetrieve( this, subscriberId, + includeTopics, options, )); } /** - * Get subscribers + * Update subscriber * * @remarks - * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter + * Used to update the subscriber entity with new information */ - async list( - page?: number | undefined, - limit?: number | undefined, + async update( + updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, + subscriberId: string, options?: RequestOptions, - ): Promise< - PageIterator - > { - return unwrapResultIterator(subscribersList( + ): Promise { + return unwrapAsync(subscribersUpdate( this, - page, - limit, + updateSubscriberRequestDto, + subscriberId, options, )); } /** - * Get subscriber + * Delete subscriber * * @remarks - * Get subscriber by your internal id used to identify the subscriber + * Deletes a subscriber entity from the Novu platform */ - async retrieve( + async delete( subscriberId: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersRetrieve( + ): Promise { + return unwrapAsync(subscribersDelete( this, subscriberId, options, @@ -143,20 +145,22 @@ export class Subscribers extends ClientSDK { } /** - * Update subscriber + * Bulk create subscribers * * @remarks - * Used to update the subscriber entity with new information + * + * Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API. + * The bulk API is limited to 500 subscribers per request. */ - async update( - subscriberId: string, - updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, + async createBulk( + request: components.BulkSubscriberCreateDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(subscribersUpdate( + ): Promise< + operations.SubscribersControllerBulkCreateSubscribersResponse | undefined + > { + return unwrapAsync(subscribersCreateBulk( this, - subscriberId, - updateSubscriberRequestDto, + request, options, )); } diff --git a/src/sdk/tenants.ts b/src/sdk/tenants.ts deleted file mode 100644 index b2f070f6..00000000 --- a/src/sdk/tenants.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { tenantsCreate } from "../funcs/tenantsCreate.js"; -import { tenantsDelete } from "../funcs/tenantsDelete.js"; -import { tenantsList } from "../funcs/tenantsList.js"; -import { tenantsRetrieve } from "../funcs/tenantsRetrieve.js"; -import { tenantsUpdate } from "../funcs/tenantsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; -import { PageIterator, unwrapResultIterator } from "../types/operations.js"; - -export class Tenants extends ClientSDK { - /** - * Create tenant - * - * @remarks - * Create tenant under the current environment Tenants is not supported in code first version of the API. - */ - async create( - request: components.CreateTenantRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(tenantsCreate( - this, - request, - options, - )); - } - - /** - * Delete tenant - * - * @remarks - * Deletes a tenant entity from the Novu platform. Tenants is not supported in code first version of the API. - */ - async delete( - identifier: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(tenantsDelete( - this, - identifier, - options, - )); - } - - /** - * Get tenants - * - * @remarks - * Returns a list of tenants, could paginated using the `page` and `limit` query parameter. Tenants is not supported in code first version of the API. - */ - async list( - page?: number | undefined, - limit?: number | undefined, - options?: RequestOptions, - ): Promise> { - return unwrapResultIterator(tenantsList( - this, - page, - limit, - options, - )); - } - - /** - * Get tenant - * - * @remarks - * Get tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - */ - async retrieve( - identifier: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(tenantsRetrieve( - this, - identifier, - options, - )); - } - - /** - * Update tenant - * - * @remarks - * Update tenant by your internal id used to identify the tenant Tenants is not supported in code first version of the API. - */ - async update( - identifier: string, - updateTenantRequestDto: components.UpdateTenantRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(tenantsUpdate( - this, - identifier, - updateTenantRequestDto, - options, - )); - } -} diff --git a/src/sdk/topics.ts b/src/sdk/topics.ts index a7a1f39f..1c6c17c3 100644 --- a/src/sdk/topics.ts +++ b/src/sdk/topics.ts @@ -16,7 +16,7 @@ import { NovuSubscribers } from "./novusubscribers.js"; export class Topics extends ClientSDK { private _subscribers?: NovuSubscribers; get subscribers(): NovuSubscribers { - return (this._subscribers ??= new NovuSubscribers(this.options$)); + return (this._subscribers ??= new NovuSubscribers(this._options)); } /** @@ -28,7 +28,7 @@ export class Topics extends ClientSDK { async create( request: components.CreateTopicRequestDto, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(topicsCreate( this, request, @@ -36,23 +36,6 @@ export class Topics extends ClientSDK { )); } - /** - * Delete topic - * - * @remarks - * Delete a topic by its topic key if it has no subscribers - */ - async delete( - topicKey: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(topicsDelete( - this, - topicKey, - options, - )); - } - /** * Filter topics * @@ -62,7 +45,7 @@ export class Topics extends ClientSDK { async list( request: operations.TopicsControllerListTopicsRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(topicsList( this, request, @@ -71,20 +54,18 @@ export class Topics extends ClientSDK { } /** - * Rename a topic + * Delete topic * * @remarks - * Rename a topic by providing a new name + * Delete a topic by its topic key if it has no subscribers */ - async rename( + async delete( topicKey: string, - renameTopicRequestDto: components.RenameTopicRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(topicsRename( + ): Promise { + return unwrapAsync(topicsDelete( this, topicKey, - renameTopicRequestDto, options, )); } @@ -98,11 +79,30 @@ export class Topics extends ClientSDK { async retrieve( topicKey: string, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(topicsRetrieve( this, topicKey, options, )); } + + /** + * Rename a topic + * + * @remarks + * Rename a topic by providing a new name + */ + async rename( + renameTopicRequestDto: components.RenameTopicRequestDto, + topicKey: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsRename( + this, + renameTopicRequestDto, + topicKey, + options, + )); + } } diff --git a/src/sdk/variables.ts b/src/sdk/variables.ts deleted file mode 100644 index 019a3b88..00000000 --- a/src/sdk/variables.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { workflowsVariablesRetrieve } from "../funcs/workflowsVariablesRetrieve.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Variables extends ClientSDK { - /** - * Get available variables - * - * @remarks - * Get the variables that can be used in the workflow - */ - async retrieve( - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsVariablesRetrieve( - this, - options, - )); - } -} diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index d456c74a..563aae20 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -4,6 +4,7 @@ import { integrationsWebhooksRetrieve } from "../funcs/integrationsWebhooksRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Webhooks extends ClientSDK { @@ -16,7 +17,7 @@ export class Webhooks extends ClientSDK { async retrieve( providerOrIntegrationId: string, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(integrationsWebhooksRetrieve( this, providerOrIntegrationId, diff --git a/src/sdk/workflowgroups.ts b/src/sdk/workflowgroups.ts index 74c45305..6bb5d9c1 100644 --- a/src/sdk/workflowgroups.ts +++ b/src/sdk/workflowgroups.ts @@ -9,6 +9,7 @@ import { workflowGroupsRetrieve } from "../funcs/workflowGroupsRetrieve.js"; import { workflowGroupsUpdate } from "../funcs/workflowGroupsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class WorkflowGroups extends ClientSDK { @@ -21,7 +22,9 @@ export class WorkflowGroups extends ClientSDK { async create( request: components.CreateNotificationGroupRequestDto, options?: RequestOptions, - ): Promise { + ): Promise< + operations.NotificationGroupsControllerCreateNotificationGroupResponse + > { return unwrapAsync(workflowGroupsCreate( this, request, @@ -30,70 +33,78 @@ export class WorkflowGroups extends ClientSDK { } /** - * Delete workflow group + * Get workflow groups * * @remarks * workflow group was previously named notification group */ - async delete( - id: string, + async list( options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowGroupsDelete( + ): Promise< + operations.NotificationGroupsControllerListNotificationGroupsResponse + > { + return unwrapAsync(workflowGroupsList( this, - id, options, )); } /** - * Get workflow groups + * Get workflow group * * @remarks * workflow group was previously named notification group */ - async list( + async retrieve( + id: string, options?: RequestOptions, - ): Promise> { - return unwrapAsync(workflowGroupsList( + ): Promise< + operations.NotificationGroupsControllerGetNotificationGroupResponse + > { + return unwrapAsync(workflowGroupsRetrieve( this, + id, options, )); } /** - * Get workflow group + * Update workflow group * * @remarks * workflow group was previously named notification group */ - async retrieve( + async update( + createNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto, id: string, options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowGroupsRetrieve( + ): Promise< + operations.NotificationGroupsControllerUpdateNotificationGroupResponse + > { + return unwrapAsync(workflowGroupsUpdate( this, + createNotificationGroupRequestDto, id, options, )); } /** - * Update workflow group + * Delete workflow group * * @remarks * workflow group was previously named notification group */ - async update( + async delete( id: string, - createNotificationGroupRequestDto: - components.CreateNotificationGroupRequestDto, options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowGroupsUpdate( + ): Promise< + operations.NotificationGroupsControllerDeleteNotificationGroupResponse + > { + return unwrapAsync(workflowGroupsDelete( this, id, - createNotificationGroupRequestDto, options, )); } diff --git a/src/sdk/workflows.ts b/src/sdk/workflows.ts deleted file mode 100644 index fd9fc629..00000000 --- a/src/sdk/workflows.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { workflowsCreate } from "../funcs/workflowsCreate.js"; -import { workflowsDelete } from "../funcs/workflowsDelete.js"; -import { workflowsList } from "../funcs/workflowsList.js"; -import { workflowsRetrieve } from "../funcs/workflowsRetrieve.js"; -import { workflowsUpdate } from "../funcs/workflowsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; -import { Status } from "./status.js"; -import { Variables } from "./variables.js"; - -export class Workflows extends ClientSDK { - private _variables?: Variables; - get variables(): Variables { - return (this._variables ??= new Variables(this.options$)); - } - - private _status?: Status; - get status(): Status { - return (this._status ??= new Status(this.options$)); - } - - /** - * Create workflow - * - * @remarks - * Workflow was previously named notification template - */ - async create( - request: components.CreateWorkflowRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsCreate( - this, - request, - options, - )); - } - - /** - * Delete workflow - * - * @remarks - * Workflow was previously named notification template - */ - async delete( - workflowId: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsDelete( - this, - workflowId, - options, - )); - } - - /** - * Get workflows - * - * @remarks - * Workflows were previously named notification templates - */ - async list( - request: operations.WorkflowControllerListWorkflowsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsList( - this, - request, - options, - )); - } - - /** - * Get workflow - * - * @remarks - * Workflow was previously named notification template - */ - async retrieve( - workflowId: string, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsRetrieve( - this, - workflowId, - options, - )); - } - - /** - * Update workflow - * - * @remarks - * Workflow was previously named notification template - */ - async update( - workflowId: string, - updateWorkflowRequestDto: components.UpdateWorkflowRequestDto, - options?: RequestOptions, - ): Promise { - return unwrapAsync(workflowsUpdate( - this, - workflowId, - updateWorkflowRequestDto, - options, - )); - } -}