diff --git a/.gitignore b/.gitignore index 3dea90f1..09c4b62a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/__tests__ /funcs /core.* /esm diff --git a/.npmignore b/.npmignore index 3ef05d12..06cd8abf 100644 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,4 @@ /cjs /.tshy /.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9859d70f..d221b422 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f50499c4-d106-4975-983f-ead3a386ec53 management: - docChecksum: 354d2525ed35586556a73e611be4287c + docChecksum: d35f4f2287646adf6b222b56b786719d docVersion: "1.0" - speakeasyVersion: 1.386.0 - generationVersion: 2.407.2 - releaseVersion: 0.0.1-alpha.10 - configChecksum: 6c89568ad5bb1893767117b0a04ea113 + 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 published: true @@ -14,9 +14,10 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.14.2 + core: 3.17.4 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 + enumUnions: 0.1.0 envVarSecurityUsage: 0.1.1 examples: 2.81.4 flattening: 2.81.1 @@ -33,608 +34,1228 @@ features: sdkHooks: 0.1.0 unions: 2.85.7 generatedFiles: - - src/funcs/cancel.ts - - src/funcs/trigger.ts - - src/funcs/triggerBroadcast.ts - - src/funcs/triggerBulk.ts - - src/funcs/changesApply.ts - - src/funcs/changesApplyBulk.ts - - src/funcs/changesCount.ts - - src/funcs/changesRetrieve.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 - - src/funcs/integrationsListActive.ts - - src/funcs/integrationsSetAsPrimary.ts - - src/funcs/integrationsUpdate.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 - - src/funcs/workflowGroupsCreate.ts - - src/funcs/workflowGroupsDelete.ts - - src/funcs/workflowGroupsList.ts - - src/funcs/workflowGroupsRetrieve.ts - - src/funcs/workflowGroupsUpdate.ts - - src/funcs/notificationsList.ts - - src/funcs/notificationsRetrieve.ts - - src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts - - src/funcs/organizationsRetrieve.ts - - src/funcs/organizationsUpdate.ts - - src/funcs/subscribersCreate.ts - - src/funcs/subscribersCreateBulk.ts - - src/funcs/subscribersDelete.ts - - src/funcs/subscribersList.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 - - src/funcs/topicsRename.ts - - src/funcs/topicsRetrieve.ts - - src/funcs/workflowsCreate.ts - - src/funcs/workflowsDelete.ts - - src/funcs/workflowsList.ts - - src/funcs/workflowsRetrieve.ts - - src/funcs/workflowsUpdate.ts - - src/funcs/environmentsApiKeysList.ts - - src/funcs/integrationsWebhooksRetrieve.ts - - src/funcs/notificationsStatsGraph.ts - - src/funcs/notificationsStatsRetrieve.ts - - src/funcs/subscribersCredentialsAppend.ts - - src/funcs/subscribersCredentialsDelete.ts - - src/funcs/subscribersCredentialsUpdate.ts - - src/funcs/subscribersAuthenticationChatAccessOauth.ts - - src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts - - src/funcs/subscribersMessagesMarkAll.ts - - src/funcs/subscribersMessagesMarkAllAs.ts - - src/funcs/subscribersMessagesUpdateAsSeen.ts - - src/funcs/subscribersNotificationsRetrieve.ts - - src/funcs/subscribersNotificationsUnseenCount.ts - - src/funcs/subscribersPropertiesUpdateOnlineFlag.ts - - src/funcs/subscribersPreferencesList.ts - - src/funcs/subscribersPreferencesRetrieveByLevel.ts - - src/funcs/subscribersPreferencesUpdate.ts - - src/funcs/subscribersPreferencesUpdateGlobal.ts - - src/funcs/topicsSubscribersAssign.ts - - src/funcs/topicsSubscribersDelete.ts - - src/funcs/topicsSubscribersRetrieve.ts - - src/funcs/workflowsVariablesRetrieve.ts - - src/funcs/workflowsStatusUpdate.ts - - src/sdk/changes.ts - - src/sdk/apikeys.ts - - src/sdk/environments.ts - - src/sdk/executiondetails.ts - - src/sdk/feeds.ts - - src/sdk/webhooks.ts - - src/sdk/integrations.ts - - src/sdk/layouts.ts - - src/sdk/messages.ts - - src/sdk/workflowgroups.ts - - src/sdk/stats.ts - - src/sdk/notifications.ts - - src/sdk/organizations.ts - - src/sdk/credentials.ts - - src/sdk/authentication.ts - - src/sdk/novumessages.ts - - src/sdk/novunotifications.ts - - src/sdk/properties.ts - - src/sdk/preferences.ts - - src/sdk/subscribers.ts - - src/sdk/tenants.ts - - src/sdk/novusubscribers.ts - - src/sdk/topics.ts - - src/sdk/variables.ts - - src/sdk/status.ts - - src/sdk/workflows.ts - - src/sdk/sdk.ts - .eslintrc.cjs + - .gitattributes - .npmignore + - CONTRIBUTING.md - FUNCTIONS.md - RUNTIMES.md - - jsr.json - - package.json - - src/core.ts - - src/index.ts - - src/lib/base64.ts - - src/lib/config.ts - - src/lib/dlv.ts - - src/lib/encodings.ts - - src/lib/http.ts - - src/lib/is-plain-object.ts - - src/lib/logger.ts - - src/lib/matchers.ts - - src/lib/primitives.ts - - src/lib/retries.ts - - src/lib/schemas.ts - - src/lib/sdks.ts - - src/lib/security.ts - - src/lib/url.ts - - src/sdk/index.ts - - src/models/errors/httpclienterrors.ts - - src/models/errors/sdkerror.ts - - src/models/errors/sdkvalidationerror.ts - - src/types/blobs.ts - - src/types/constdatetime.ts - - src/types/enums.ts - - src/types/fp.ts - - src/types/index.ts - - src/types/operations.ts - - src/types/rfcdate.ts - - tsconfig.json - - src/models/components/databooleandto.ts - - src/models/components/triggereventresponsedto.ts - - src/models/components/triggereventrequestdto.ts - - src/models/components/subscriberpayloaddto.ts - - src/models/components/topicpayloaddto.ts - - src/models/components/tenantpayloaddto.ts - - src/models/components/triggereventtoallrequestdto.ts - - src/models/components/bulktriggereventdto.ts - - src/models/components/changeresponsedto.ts - - src/models/components/bulkapplychangedto.ts - - src/models/components/datanumberdto.ts - - src/models/components/changesresponsedto.ts - - src/models/components/environmentresponsedto.ts - - src/models/components/apikey.ts - - src/models/components/executiondetailsresponsedto.ts - - src/models/components/feedresponsedto.ts - - src/models/components/createfeedrequestdto.ts - - src/models/components/integrationresponsedto.ts - - src/models/components/credentialsdto.ts - - src/models/components/stepfilter.ts - - src/models/components/fieldfilterpart.ts - - src/models/components/createintegrationrequestdto.ts - - src/models/components/updateintegrationrequestdto.ts - - src/models/components/createlayoutresponsedto.ts - - src/models/components/getlayoutresponsedto.ts - - src/models/components/updatelayoutresponsedto.ts - - src/models/components/updatelayoutrequestdto.ts - - src/models/components/deletemessageresponsedto.ts - - src/models/components/activitiesresponsedto.ts - - src/models/components/notificationgroupresponsedto.ts - - src/models/components/createnotificationgrouprequestdto.ts - - src/models/components/deletenotificationgroupresponsedto.ts - - src/models/components/activitynotificationresponsedto.ts - - src/models/components/activitynotificationtemplateresponsedto.ts - - src/models/components/activitynotificationsubscriberresponsedto.ts - - src/models/components/activitygraphstatesresponse.ts - - src/models/components/activitystatsresponsedto.ts - - src/models/components/renameorganizationdto.ts - - src/models/components/organizationresponsedto.ts - - src/models/components/organizationbrandingresponsedto.ts - - src/models/components/updatebrandingdetailsdto.ts - - src/models/components/subscriberresponsedto.ts - - src/models/components/channelsettings.ts - - src/models/components/channelcredentials.ts - - src/models/components/createsubscriberrequestdto.ts - - src/models/components/bulksubscribercreatedto.ts - - src/models/components/deletesubscriberresponsedto.ts - - src/models/components/updatesubscriberrequestdto.ts - - src/models/components/updatesubscriberchannelrequestdto.ts - - src/models/components/markallmessageasrequestdto.ts - - src/models/components/messageentity.ts - - src/models/components/messagemarkasrequestdto.ts - - src/models/components/messageresponsedto.ts - - src/models/components/workflowresponse.ts - - src/models/components/notificationtrigger.ts - - src/models/components/notificationtriggervariable.ts - - src/models/components/notificationstep.ts - - src/models/components/notificationstepvariant.ts - - src/models/components/messagetemplate.ts - - src/models/components/digestregularmetadata.ts - - src/models/components/digesttimedmetadata.ts - - src/models/components/timedconfig.ts - - src/models/components/delayregularmetadata.ts - - src/models/components/delayscheduledmetadata.ts - - src/models/components/preferencechannels.ts - - src/models/components/notificationgroup.ts - - src/models/components/messagecta.ts - - src/models/components/messagectadata.ts - - src/models/components/messageaction.ts - - src/models/components/messageactionresult.ts - - src/models/components/messagebutton.ts - - src/models/components/emailblock.ts - - src/models/components/emailblockstyles.ts - - src/models/components/markmessageactionasseendto.ts - - src/models/components/unseencountresponse.ts - - src/models/components/updatesubscriberonlineflagrequestdto.ts - - src/models/components/updatesubscriberpreferenceresponsedto.ts - - src/models/components/templateresponse.ts - - src/models/components/preference.ts - - src/models/components/getsubscriberpreferencesresponsedto.ts - - src/models/components/updatesubscriberpreferencerequestdto.ts - - src/models/components/channelpreference.ts - - src/models/components/updatesubscriberglobalpreferencesrequestdto.ts - - src/models/components/createtenantresponsedto.ts - - src/models/components/createtenantrequestdto.ts - - src/models/components/gettenantresponsedto.ts - - src/models/components/updatetenantresponsedto.ts - - src/models/components/updatetenantrequestdto.ts - - src/models/components/createtopicresponsedto.ts - - src/models/components/createtopicrequestdto.ts - - src/models/components/filtertopicsresponsedto.ts - - src/models/components/topicdto.ts - - src/models/components/renametopicresponsedto.ts - - src/models/components/renametopicrequestdto.ts - - src/models/components/gettopicresponsedto.ts - - src/models/components/addsubscribersrequestdto.ts - - src/models/components/removesubscribersrequestdto.ts - - src/models/components/topicsubscriberdto.ts - - src/models/components/createworkflowrequestdto.ts - - src/models/components/workflowsresponsedto.ts - - src/models/components/updateworkflowrequestdto.ts - - src/models/components/variablesresponsedto.ts - - src/models/components/changeworkflowstatusrequestdto.ts - - src/models/components/security.ts - - src/models/operations/eventscontrollercancel.ts - - src/models/operations/changescontrollerapplydiff.ts - - src/models/operations/changescontrollergetchanges.ts - - src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts - - src/models/operations/feedscontrollerdeletefeedbyid.ts - - src/models/operations/integrationscontrollerremoveintegration.ts - - src/models/operations/integrationscontrollersetintegrationasprimary.ts - - src/models/operations/integrationscontrollerupdateintegrationbyid.ts - - src/models/operations/integrationscontrollergetwebhooksupportstatus.ts - - src/models/operations/layoutscontrollerdeletelayout.ts - - src/models/operations/layoutscontrollerlistlayouts.ts - - src/models/operations/layoutscontrollergetlayout.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/notificationgroupscontrollerdeletenotificationgroup.ts - - src/models/operations/notificationgroupscontrollergetnotificationgroup.ts - - src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts - - src/models/operations/notificationscontrollerlistnotifications.ts - - src/models/operations/notificationscontrollergetnotification.ts - - src/models/operations/notificationscontrollergetactivitygraphstats.ts - - src/models/operations/subscriberscontrollerremovesubscriber.ts - - src/models/operations/subscriberscontrollerlistsubscribers.ts - - src/models/operations/subscriberscontrollergetsubscriber.ts - - src/models/operations/subscriberscontrollerupdatesubscriber.ts - - src/models/operations/subscriberscontrollermodifysubscriberchannel.ts - - src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts - - src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts - - src/models/operations/subscriberscontrollerchataccessoauth.ts - - src/models/operations/subscriberscontrollerchatoauthcallback.ts - - src/models/operations/subscriberscontrollermarkallunreadasread.ts - - src/models/operations/subscriberscontrollermarkmessagesas.ts - - src/models/operations/subscriberscontrollermarkactionasseen.ts - - src/models/operations/subscriberscontrollergetnotificationsfeed.ts - - src/models/operations/subscriberscontrollergetunseencount.ts - - src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts - - src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts - - src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts - - src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts - - src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts - - src/models/operations/tenantcontrollerremovetenant.ts - - src/models/operations/tenantcontrollerlisttenants.ts - - src/models/operations/tenantcontrollergettenantbyid.ts - - src/models/operations/tenantcontrollerupdatetenant.ts - - src/models/operations/topicscontrollerdeletetopic.ts - - src/models/operations/topicscontrollerlisttopics.ts - - src/models/operations/topicscontrollerrenametopic.ts - - src/models/operations/topicscontrollergettopic.ts - - src/models/operations/topicscontrolleraddsubscribers.ts - - src/models/operations/topicscontrollerremovesubscribers.ts - - src/models/operations/topicscontrollergettopicsubscriber.ts - - src/models/operations/workflowcontrollerdeleteworkflowbyid.ts - - src/models/operations/workflowcontrollerlistworkflows.ts - - src/models/operations/workflowcontrollergetworkflowbyid.ts - - src/models/operations/workflowcontrollerupdateworkflowbyid.ts - - src/models/operations/workflowcontrollerupdateactivestatus.ts - - src/models/errors/index.ts - - src/models/components/index.ts - - src/models/operations/index.ts - - docs/models/components/databooleandto.md - - docs/models/components/triggereventresponsedtostatus.md - - docs/models/components/triggereventresponsedto.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/models/components/activitiesresponsedto.md + - docs/models/components/activitygraphstatesresponse.md + - docs/models/components/activitynotificationresponsedto.md + - docs/models/components/activitynotificationresponsedtochannels.md + - docs/models/components/activitynotificationsubscriberresponsedto.md + - docs/models/components/activitynotificationtemplateresponsedto.md + - docs/models/components/activitystatsresponsedto.md - docs/models/components/actor.md - - docs/models/components/controls.md - - docs/models/components/triggereventrequestdtooverrides.md - - docs/models/components/triggereventrequestdtopayload.md - - docs/models/components/tenant.md - - docs/models/components/to.md - - docs/models/components/triggereventrequestdto.md - - docs/models/components/subscriberpayloaddtodata.md - - docs/models/components/subscriberpayloaddto.md - - docs/models/components/topicpayloaddtotype.md - - docs/models/components/topicpayloaddto.md - - docs/models/components/tenantpayloaddtodata.md - - docs/models/components/tenantpayloaddto.md - - docs/models/components/triggereventtoallrequestdtoactor.md - - docs/models/components/triggereventtoallrequestdtooverrides.md - - docs/models/components/triggereventtoallrequestdtopayload.md - - docs/models/components/triggereventtoallrequestdtotenant.md - - docs/models/components/triggereventtoallrequestdto.md + - 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/type.md - docs/models/components/changeresponsedto.md - - docs/models/components/bulkapplychangedto.md - - docs/models/components/datanumberdto.md - docs/models/components/changesresponsedto.md - - docs/models/components/environmentresponsedto.md - - docs/models/components/apikey.md - - docs/models/components/executiondetailsresponsedtochannel.md - - docs/models/components/source.md - - docs/models/components/executiondetailsresponsedtostatus.md - - docs/models/components/executiondetailsresponsedto.md - - docs/models/components/feedresponsedto.md - - docs/models/components/createfeedrequestdto.md - - docs/models/components/integrationresponsedtochannel.md - - docs/models/components/integrationresponsedto.md - - docs/models/components/tlsoptions.md - - docs/models/components/credentialsdto.md - - docs/models/components/stepfiltertype.md - - docs/models/components/value.md - - docs/models/components/stepfilter.md - - docs/models/components/on.md - - docs/models/components/operator.md - - docs/models/components/fieldfilterpart.md + - docs/models/components/changeworkflowstatusrequestdto.md - docs/models/components/channel.md + - docs/models/components/channelcredentials.md + - docs/models/components/channelpreference.md + - docs/models/components/channelpreferencetype.md + - docs/models/components/channels.md + - 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/updateintegrationrequestdto.md - docs/models/components/createlayoutresponsedto.md - - docs/models/components/getlayoutresponsedtochannel.md - - docs/models/components/getlayoutresponsedto.md - - docs/models/components/updatelayoutresponsedtochannel.md - - docs/models/components/updatelayoutresponsedto.md - - docs/models/components/variables.md - - docs/models/components/updatelayoutrequestdto.md - - docs/models/components/status.md - - docs/models/components/deletemessageresponsedto.md - - docs/models/components/activitiesresponsedto.md - - docs/models/components/notificationgroupresponsedto.md - docs/models/components/createnotificationgrouprequestdto.md - - docs/models/components/deletenotificationgroupresponsedtostatus.md - - docs/models/components/deletenotificationgroupresponsedto.md - - docs/models/components/activitynotificationresponsedtochannels.md - - docs/models/components/activitynotificationresponsedto.md - - docs/models/components/activitynotificationtemplateresponsedto.md - - docs/models/components/activitynotificationsubscriberresponsedto.md - - docs/models/components/channels.md - - docs/models/components/activitygraphstatesresponse.md - - docs/models/components/activitystatsresponsedto.md - - docs/models/components/renameorganizationdto.md - - docs/models/components/organizationresponsedto.md - - docs/models/components/direction.md - - docs/models/components/organizationbrandingresponsedto.md - - docs/models/components/updatebrandingdetailsdto.md - - docs/models/components/subscriberresponsedto.md - - docs/models/components/channelsettings.md - - docs/models/components/channelcredentials.md - - docs/models/components/data.md - docs/models/components/createsubscriberrequestdto.md - - docs/models/components/bulksubscribercreatedto.md - - docs/models/components/deletesubscriberresponsedtostatus.md + - docs/models/components/createtenantrequestdto.md + - docs/models/components/createtenantrequestdtodata.md + - docs/models/components/createtenantresponsedto.md + - docs/models/components/createtenantresponsedtodata.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/delayscheduledmetadata.md + - docs/models/components/delayscheduledmetadatatype.md + - docs/models/components/deletemessageresponsedto.md + - docs/models/components/deletenotificationgroupresponsedto.md + - docs/models/components/deletenotificationgroupresponsedtostatus.md - docs/models/components/deletesubscriberresponsedto.md - - docs/models/components/updatesubscriberrequestdtodata.md - - docs/models/components/updatesubscriberrequestdto.md - - docs/models/components/updatesubscriberchannelrequestdto.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/markas.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/markas.md + - docs/models/components/markmessageactionasseendto.md + - docs/models/components/markmessageactionasseendtostatus.md + - docs/models/components/messageaction.md + - docs/models/components/messageactionresult.md + - docs/models/components/messageactionresultpayload.md + - docs/models/components/messageactionresulttype.md + - docs/models/components/messageactionstatus.md + - docs/models/components/messagebutton.md + - docs/models/components/messagebuttontype.md + - docs/models/components/messagecta.md + - docs/models/components/messagectadata.md + - docs/models/components/messagectatype.md - docs/models/components/messageentity.md - - docs/models/components/messagemarkasrequestdtomarkas.md - docs/models/components/messageid.md - docs/models/components/messagemarkasrequestdto.md - - docs/models/components/feedid.md + - docs/models/components/messagemarkasrequestdtomarkas.md + - docs/models/components/messageresponsedto.md - docs/models/components/messageresponsedtochannel.md - - docs/models/components/content.md - - docs/models/components/overrides.md - docs/models/components/messageresponsedtopayload.md - docs/models/components/messageresponsedtostatus.md - - docs/models/components/messageresponsedto.md - - docs/models/components/workflowresponsedata.md - - docs/models/components/workflowintegrationstatus.md - - docs/models/components/workflowresponse.md - - docs/models/components/notificationtriggertype.md - - docs/models/components/notificationtrigger.md - - docs/models/components/notificationtriggervariable.md - - docs/models/components/parentid.md + - docs/models/components/messagetemplate.md - docs/models/components/metadata.md - - docs/models/components/replycallback.md + - docs/models/components/monthlytype.md + - docs/models/components/notificationgroup.md + - docs/models/components/notificationgroupresponsedto.md - docs/models/components/notificationstep.md - - docs/models/components/notificationstepvariantparentid.md + - docs/models/components/notificationstepvariant.md - docs/models/components/notificationstepvariantmetadata.md + - docs/models/components/notificationstepvariantparentid.md - docs/models/components/notificationstepvariantreplycallback.md - - docs/models/components/notificationstepvariant.md - - docs/models/components/messagetemplate.md - - docs/models/components/backoffunit.md - - docs/models/components/digestregularmetadatatype.md - - docs/models/components/digestregularmetadataunit.md - - docs/models/components/digestregularmetadata.md - - docs/models/components/digesttimedmetadatatype.md - - docs/models/components/digesttimedmetadataunit.md - - docs/models/components/digesttimedmetadata.md - - docs/models/components/monthlytype.md + - docs/models/components/notificationtrigger.md + - docs/models/components/notificationtriggertype.md + - docs/models/components/notificationtriggervariable.md + - docs/models/components/on.md + - docs/models/components/operator.md - docs/models/components/ordinal.md - docs/models/components/ordinalvalue.md - - docs/models/components/weekdays.md - - docs/models/components/timedconfig.md - - docs/models/components/delayregularmetadatatype.md - - docs/models/components/unit.md - - docs/models/components/delayregularmetadata.md - - docs/models/components/delayscheduledmetadatatype.md - - docs/models/components/delayscheduledmetadata.md - - docs/models/components/preferencechannels.md - - docs/models/components/notificationgroup.md - - docs/models/components/messagectatype.md - - docs/models/components/messagecta.md - - docs/models/components/messagectadata.md - - docs/models/components/messageactionstatus.md - - docs/models/components/messageaction.md - - docs/models/components/messageactionresultpayload.md - - docs/models/components/messageactionresulttype.md - - docs/models/components/messageactionresult.md - - docs/models/components/messagebuttontype.md - - docs/models/components/messagebutton.md - - docs/models/components/emailblocktype.md - - docs/models/components/emailblock.md - - docs/models/components/textalign.md - - docs/models/components/emailblockstyles.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/markmessageactionasseendtostatus.md - - docs/models/components/markmessageactionasseendto.md + - docs/models/components/preference.md + - docs/models/components/preferencechannels.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 + - docs/models/components/security.md + - docs/models/components/source.md + - docs/models/components/status.md + - 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 + - docs/models/components/tenantpayloaddtodata.md + - docs/models/components/textalign.md + - docs/models/components/timedconfig.md + - docs/models/components/tlsoptions.md + - 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 + - docs/models/components/triggereventtoallrequestdtoactor.md + - docs/models/components/triggereventtoallrequestdtooverrides.md + - docs/models/components/triggereventtoallrequestdtopayload.md + - docs/models/components/triggereventtoallrequestdtotenant.md + - 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/updatesubscriberglobalpreferencesrequestdto.md - docs/models/components/updatesubscriberonlineflagrequestdto.md - - docs/models/components/updatesubscriberpreferenceresponsedto.md - - docs/models/components/templateresponse.md - - docs/models/components/preference.md - - docs/models/components/getsubscriberpreferencesresponsedto.md - docs/models/components/updatesubscriberpreferencerequestdto.md - - docs/models/components/channelpreferencetype.md - - docs/models/components/channelpreference.md - - docs/models/components/updatesubscriberglobalpreferencesrequestdto.md - - docs/models/components/createtenantresponsedtodata.md - - docs/models/components/createtenantresponsedto.md - - docs/models/components/createtenantrequestdtodata.md - - docs/models/components/createtenantrequestdto.md - - docs/models/components/gettenantresponsedtodata.md - - docs/models/components/gettenantresponsedto.md - - docs/models/components/updatetenantresponsedtodata.md - - docs/models/components/updatetenantresponsedto.md - - docs/models/components/updatetenantrequestdtodata.md + - docs/models/components/updatesubscriberpreferenceresponsedto.md + - docs/models/components/updatesubscriberrequestdto.md + - docs/models/components/updatesubscriberrequestdtodata.md - docs/models/components/updatetenantrequestdto.md - - docs/models/components/createtopicresponsedto.md - - docs/models/components/createtopicrequestdto.md - - docs/models/components/filtertopicsresponsedto.md - - docs/models/components/topicdto.md - - docs/models/components/renametopicresponsedto.md - - docs/models/components/renametopicrequestdto.md - - docs/models/components/gettopicresponsedto.md - - docs/models/components/addsubscribersrequestdto.md - - docs/models/components/removesubscribersrequestdto.md - - docs/models/components/topicsubscriberdto.md - - docs/models/components/createworkflowrequestdtodata.md - - docs/models/components/createworkflowrequestdtonotificationgroup.md - - docs/models/components/createworkflowrequestdto.md - - docs/models/components/workflowsresponsedto.md - - docs/models/components/updateworkflowrequestdtodata.md + - docs/models/components/updatetenantrequestdtodata.md + - docs/models/components/updatetenantresponsedto.md + - docs/models/components/updatetenantresponsedtodata.md - docs/models/components/updateworkflowrequestdto.md - - docs/models/components/system.md - - docs/models/components/translations.md + - docs/models/components/updateworkflowrequestdtodata.md + - docs/models/components/value.md + - docs/models/components/variables.md - docs/models/components/variablesresponsedto.md - - docs/models/components/changeworkflowstatusrequestdto.md - - docs/models/components/security.md - - docs/models/operations/eventscontrollercancelrequest.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/eventscontrollercancelrequest.md - docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md - docs/models/operations/feedscontrollerdeletefeedbyidrequest.md + - docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md - docs/models/operations/integrationscontrollerremoveintegrationrequest.md - docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md - docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md - - docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md - docs/models/operations/layoutscontrollerdeletelayoutrequest.md - - docs/models/operations/orderby.md - - docs/models/operations/layoutscontrollerlistlayoutsrequest.md - docs/models/operations/layoutscontrollergetlayoutrequest.md + - docs/models/operations/layoutscontrollerlistlayoutsrequest.md - docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md - docs/models/operations/layoutscontrollerupdatelayoutrequest.md - docs/models/operations/messagescontrollerdeletemessagerequest.md - - docs/models/operations/channel.md - docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md - - docs/models/operations/queryparamchannel.md - docs/models/operations/messagescontrollergetmessagesrequest.md - docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md - docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md - docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md - - docs/models/operations/channels.md - - docs/models/operations/notificationscontrollerlistnotificationsrequest.md - - docs/models/operations/notificationscontrollergetnotificationrequest.md - docs/models/operations/notificationscontrollergetactivitygraphstatsrequest.md - - docs/models/operations/subscriberscontrollerremovesubscriberrequest.md - - docs/models/operations/subscriberscontrollerlistsubscribersrequest.md - - docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md - - docs/models/operations/subscriberscontrollerlistsubscribersresponse.md - - docs/models/operations/subscriberscontrollergetsubscriberrequest.md - - docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md - - docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md - - docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md - - docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md + - docs/models/operations/notificationscontrollergetnotificationrequest.md + - docs/models/operations/notificationscontrollerlistnotificationsrequest.md + - docs/models/operations/orderby.md + - docs/models/operations/parameter.md + - docs/models/operations/queryparamchannel.md - docs/models/operations/subscriberscontrollerchataccessoauthrequest.md - docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md - docs/models/operations/subscriberscontrollerchatoauthcallbackresponsebody.md - - docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md - - docs/models/operations/subscriberscontrollermarkmessagesasrequest.md - - docs/models/operations/subscriberscontrollermarkactionasseenrequest.md + - docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md - docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md - docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md + - docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md + - docs/models/operations/subscriberscontrollergetsubscriberrequest.md - docs/models/operations/subscriberscontrollergetunseencountrequest.md - - docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md - docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md - - docs/models/operations/parameter.md - - docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md - - docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md + - docs/models/operations/subscriberscontrollerlistsubscribersrequest.md + - docs/models/operations/subscriberscontrollerlistsubscribersresponse.md + - docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md + - docs/models/operations/subscriberscontrollermarkactionasseenrequest.md + - docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md + - docs/models/operations/subscriberscontrollermarkmessagesasrequest.md + - docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md + - docs/models/operations/subscriberscontrollerremovesubscriberrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md - docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md - - docs/models/operations/tenantcontrollerremovetenantrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md + - docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md + - docs/models/operations/tenantcontrollergettenantbyidrequest.md - docs/models/operations/tenantcontrollerlisttenantsrequest.md - - docs/models/operations/tenantcontrollerlisttenantsresponsebody.md - docs/models/operations/tenantcontrollerlisttenantsresponse.md - - docs/models/operations/tenantcontrollergettenantbyidrequest.md + - docs/models/operations/tenantcontrollerlisttenantsresponsebody.md + - docs/models/operations/tenantcontrollerremovetenantrequest.md - docs/models/operations/tenantcontrollerupdatetenantrequest.md + - docs/models/operations/topicscontrolleraddsubscribersrequest.md - docs/models/operations/topicscontrollerdeletetopicrequest.md - - docs/models/operations/topicscontrollerlisttopicsrequest.md - - docs/models/operations/topicscontrollerrenametopicrequest.md - docs/models/operations/topicscontrollergettopicrequest.md - - docs/models/operations/topicscontrolleraddsubscribersrequest.md - - docs/models/operations/topicscontrollerremovesubscribersrequest.md - docs/models/operations/topicscontrollergettopicsubscriberrequest.md + - docs/models/operations/topicscontrollerlisttopicsrequest.md + - docs/models/operations/topicscontrollerremovesubscribersrequest.md + - docs/models/operations/topicscontrollerrenametopicrequest.md - docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md - - docs/models/operations/workflowcontrollerlistworkflowsrequest.md - docs/models/operations/workflowcontrollergetworkflowbyidrequest.md - - docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md + - docs/models/operations/workflowcontrollerlistworkflowsrequest.md - docs/models/operations/workflowcontrollerupdateactivestatusrequest.md - - docs/lib/utils/retryconfig.md - - docs/sdks/novu/README.md + - docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.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/apikeys/README.md - docs/sdks/executiondetails/README.md - docs/sdks/feeds/README.md - docs/sdks/integrations/README.md - - docs/sdks/webhooks/README.md - docs/sdks/layouts/README.md - docs/sdks/messages/README.md - - docs/sdks/workflowgroups/README.md - docs/sdks/notifications/README.md - - docs/sdks/stats/README.md - - docs/sdks/organizations/README.md - - docs/sdks/subscribers/README.md - - docs/sdks/credentials/README.md - - docs/sdks/authentication/README.md + - docs/sdks/novu/README.md - docs/sdks/novumessages/README.md - docs/sdks/novunotifications/README.md - - docs/sdks/properties/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/novusubscribers/README.md - - docs/sdks/workflows/README.md - docs/sdks/variables/README.md - - docs/sdks/status/README.md - - USAGE.md - - .gitattributes - - src/hooks/hooks.ts - - src/hooks/types.ts - - src/hooks/index.ts - - CONTRIBUTING.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 + - src/funcs/integrationsListActive.ts + - 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 + - src/funcs/notificationsList.ts + - 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 + - src/funcs/subscribersCreateBulk.ts + - src/funcs/subscribersCredentialsAppend.ts + - src/funcs/subscribersCredentialsDelete.ts + - src/funcs/subscribersCredentialsUpdate.ts + - src/funcs/subscribersDelete.ts + - src/funcs/subscribersList.ts + - src/funcs/subscribersMessagesMarkAll.ts + - src/funcs/subscribersMessagesMarkAllAs.ts + - src/funcs/subscribersMessagesUpdateAsSeen.ts + - src/funcs/subscribersNotificationsRetrieve.ts + - src/funcs/subscribersNotificationsUnseenCount.ts + - src/funcs/subscribersPreferencesList.ts + - src/funcs/subscribersPreferencesRetrieveByLevel.ts + - src/funcs/subscribersPreferencesUpdate.ts + - src/funcs/subscribersPreferencesUpdateGlobal.ts + - 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 + - src/funcs/topicsRename.ts + - src/funcs/topicsRetrieve.ts + - src/funcs/topicsSubscribersAssign.ts + - src/funcs/topicsSubscribersDelete.ts + - src/funcs/topicsSubscribersRetrieve.ts + - src/funcs/trigger.ts + - src/funcs/triggerBroadcast.ts + - src/funcs/triggerBulk.ts + - src/funcs/workflowGroupsCreate.ts + - src/funcs/workflowGroupsDelete.ts + - 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 + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/models/components/activitiesresponsedto.ts + - src/models/components/activitygraphstatesresponse.ts + - src/models/components/activitynotificationresponsedto.ts + - src/models/components/activitynotificationsubscriberresponsedto.ts + - src/models/components/activitynotificationtemplateresponsedto.ts + - 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 + - src/models/components/deletenotificationgroupresponsedto.ts + - src/models/components/deletesubscriberresponsedto.ts + - src/models/components/digestregularmetadata.ts + - src/models/components/digesttimedmetadata.ts + - src/models/components/emailblock.ts + - src/models/components/emailblockstyles.ts + - src/models/components/environmentresponsedto.ts + - src/models/components/executiondetailsresponsedto.ts + - 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 + - src/models/components/markallmessageasrequestdto.ts + - src/models/components/markmessageactionasseendto.ts + - src/models/components/messageaction.ts + - src/models/components/messageactionresult.ts + - src/models/components/messagebutton.ts + - src/models/components/messagecta.ts + - src/models/components/messagectadata.ts + - src/models/components/messageentity.ts + - src/models/components/messagemarkasrequestdto.ts + - src/models/components/messageresponsedto.ts + - src/models/components/messagetemplate.ts + - src/models/components/notificationgroup.ts + - src/models/components/notificationgroupresponsedto.ts + - src/models/components/notificationstep.ts + - 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 + - src/models/components/stepfilter.ts + - src/models/components/subscriberpayloaddto.ts + - src/models/components/subscriberresponsedto.ts + - src/models/components/templateresponse.ts + - src/models/components/tenantpayloaddto.ts + - src/models/components/timedconfig.ts + - src/models/components/topicdto.ts + - src/models/components/topicpayloaddto.ts + - src/models/components/topicsubscriberdto.ts + - src/models/components/triggereventrequestdto.ts + - 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/eventscontrollercancel.ts + - src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts + - src/models/operations/feedscontrollerdeletefeedbyid.ts + - src/models/operations/index.ts + - src/models/operations/integrationscontrollergetwebhooksupportstatus.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/notificationgroupscontrollerdeletenotificationgroup.ts + - src/models/operations/notificationgroupscontrollergetnotificationgroup.ts + - src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts + - src/models/operations/notificationscontrollergetactivitygraphstats.ts + - src/models/operations/notificationscontrollergetnotification.ts + - src/models/operations/notificationscontrollerlistnotifications.ts + - src/models/operations/subscriberscontrollerchataccessoauth.ts + - src/models/operations/subscriberscontrollerchatoauthcallback.ts + - src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts + - src/models/operations/subscriberscontrollergetnotificationsfeed.ts + - src/models/operations/subscriberscontrollergetsubscriber.ts + - src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts + - src/models/operations/subscriberscontrollergetunseencount.ts + - src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts + - src/models/operations/subscriberscontrollerlistsubscribers.ts + - src/models/operations/subscriberscontrollermarkactionasseen.ts + - src/models/operations/subscriberscontrollermarkallunreadasread.ts + - src/models/operations/subscriberscontrollermarkmessagesas.ts + - src/models/operations/subscriberscontrollermodifysubscriberchannel.ts + - src/models/operations/subscriberscontrollerremovesubscriber.ts + - src/models/operations/subscriberscontrollerupdatesubscriber.ts + - src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts + - 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/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 + - src/types/fp.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - 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": []} + 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"} + 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: "" + responses: + "201": + application/json: [] + ChangesController_bulkApplyDiff: + speakeasy-default-changes-controller-bulk-apply-diff: + requestBody: + application/json: {"changeIds": []} + responses: + "201": + application/json: [] + ChangesController_getChangesCount: + speakeasy-default-changes-controller-get-changes-count: + responses: + "200": + application/json: {"data": "2641.66"} + ChangesController_getChanges: + speakeasy-default-changes-controller-get-changes: + parameters: + query: + promoted: "false" + responses: + "200": + application/json: {"data": [], "page": "3704.56", "pageSize": "9451.91", "totalCount": "9198.31"} + EnvironmentsController_listMyEnvironments: + speakeasy-default-environments-controller-list-my-environments: + responses: + "200": + application/json: [] + EnvironmentsController_getCurrentEnvironment: + speakeasy-default-environments-controller-get-current-environment: + responses: + "200": + application/json: {"_organizationId": "", "_parentId": "", "identifier": "", "name": ""} + EnvironmentsController_listOrganizationApiKeys: + speakeasy-default-environments-controller-list-organization-api-keys: + responses: + "200": + application/json: [] + ExecutionDetailsController_getExecutionDetailsForNotification: + speakeasy-default-execution-details-controller-get-execution-details-for-notification: + parameters: + query: + 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: + parameters: + path: + layoutId: "" + 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: + parameters: + path: + layoutId: "" + requestBody: + application/json: {"identifier": ""} + 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: "" + 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: + responses: + "200": + application/json: {"data": [], "hasMore": false, "page": "9451.91", "pageSize": "9198.31"} + 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"} + NotificationGroupsController_listNotificationGroups: + speakeasy-default-notification-groups-controller-list-notification-groups: + responses: + "200": + application/json: [] + NotificationGroupsController_getNotificationGroup: + speakeasy-default-notification-groups-controller-get-notification-group: + parameters: + path: + id: "" + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "name": ""} + NotificationGroupsController_updateNotificationGroup: + speakeasy-default-notification-groups-controller-update-notification-group: + parameters: + path: + id: "" + requestBody: + 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: + parameters: + path: + notificationId: "" + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "transactionId": ""} + NotificationsController_getActivityGraphStats: + speakeasy-default-notifications-controller-get-activity-graph-stats: + responses: + "200": + application/json: [] + NotificationsController_getActivityStats: + speakeasy-default-notifications-controller-get-activity-stats: + responses: + "200": + application/json: {"monthlySent": "3704.56", "weeklySent": "9451.91"} + EEOrganizationController_renameOrganization: + speakeasy-default-EE-organization-controller-rename-organization: + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"name": ""} + EEOrganizationController_getMyOrganization: + speakeasy-default-EE-organization-controller-get-my-organization: + 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": ""} + responses: + "200": + application/json: {"color": "red", "contentBackground": "", "fontColor": "", "logo": ""} + SubscribersController_createSubscriber: + speakeasy-default-subscribers-controller-create-subscriber: + requestBody: + application/json: {"subscriberId": ""} + 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: + parameters: + path: + subscriberId: "" + responses: + "200": + application/json: {"acknowledged": true, "status": "deleted"} + SubscribersController_listSubscribers: + speakeasy-default-subscribers-controller-list-subscribers: + responses: + "200": + application/json: {"data": [], "hasMore": false, "page": "998.95", "pageSize": "5472.72"} + SubscribersController_getSubscriber: + speakeasy-default-subscribers-controller-get-subscriber: + parameters: + path: + subscriberId: "" + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} + SubscribersController_updateSubscriber: + speakeasy-default-subscribers-controller-update-subscriber: + parameters: + path: + subscriberId: "" + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} + SubscribersController_modifySubscriberChannel: + speakeasy-default-subscribers-controller-modify-subscriber-channel: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {"credentials": {"webhookUrl": ""}, "providerId": "3462.44"} + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": false, "subscriberId": "", "updatedAt": ""} + SubscribersController_deleteSubscriberCredentials: + speakeasy-default-subscribers-controller-delete-subscriber-credentials: + parameters: + path: + subscriberId: "" + providerId: "" + SubscribersController_updateSubscriberChannel: + speakeasy-default-subscribers-controller-update-subscriber-channel: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {"credentials": {"webhookUrl": ""}, "providerId": "8574.78"} + 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: + parameters: + path: + messageId: "" + type: "" + 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=" + responses: + "200": + application/json: {"data": [], "hasMore": false, "page": "9451.91", "pageSize": "9198.31"} + SubscribersController_getUnseenCount: + speakeasy-default-subscribers-controller-get-unseen-count: + parameters: + path: + subscriberId: "" + query: + seen: true + limit: "4322.81" + responses: + "200": + application/json: {"count": "4327.98"} + SubscribersController_updateSubscriberOnlineFlag: + speakeasy-default-subscribers-controller-update-subscriber-online-flag: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {"isOnline": false} + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "createdAt": "", "deleted": true, "subscriberId": "", "updatedAt": ""} + SubscribersController_listSubscriberPreferences: + speakeasy-default-subscribers-controller-list-subscriber-preferences: + parameters: + path: + subscriberId: "" + responses: + "200": + application/json: [] + SubscribersController_getSubscriberPreferenceByLevel: + speakeasy-default-subscribers-controller-get-subscriber-preference-by-level: + parameters: + path: + parameter: "Topic" + subscriberId: "" + responses: + "200": + application/json: [] + SubscribersController_updateSubscriberPreference: + speakeasy-default-subscribers-controller-update-subscriber-preference: + parameters: + path: + 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: + parameters: + path: + subscriberId: "" + responses: + "200": + application/json: {"preference": {"enabled": false}, "template": {"_id": "", "critical": false, "name": "", "triggers": []}} + TenantController_createTenant: + speakeasy-default-tenant-controller-create-tenant: + requestBody: + application/json: {"identifier": "", "name": ""} + responses: + "200": + application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} + TenantController_removeTenant: + speakeasy-default-tenant-controller-remove-tenant: + parameters: + path: + identifier: "" + TenantController_listTenants: + speakeasy-default-tenant-controller-list-tenants: + responses: + "200": + application/json: {"data": [], "hasMore": false, "page": "998.95", "pageSize": "5472.72"} + TenantController_getTenantById: + speakeasy-default-tenant-controller-get-tenant-by-id: + parameters: + path: + identifier: "" + responses: + "200": + application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} + TenantController_updateTenant: + speakeasy-default-tenant-controller-update-tenant: + parameters: + path: + identifier: "" + responses: + "200": + application/json: {"_environmentId": "", "_id": "", "createdAt": "", "identifier": "", "updatedAt": ""} + TopicsController_createTopic: + speakeasy-default-topics-controller-create-topic: + requestBody: + application/json: {"key": "", "name": ""} + 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: + 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: + path: + topicKey: "" + responses: + "200": + application/json: {"_environmentId": "", "_organizationId": "", "key": "", "name": "", "subscribers": []} + TopicsController_addSubscribers: + speakeasy-default-topics-controller-add-subscribers: + parameters: + path: + topicKey: "" + requestBody: + application/json: {"subscribers": []} + TopicsController_removeSubscribers: + speakeasy-default-topics-controller-remove-subscribers: + parameters: + path: + topicKey: "" + requestBody: + application/json: {"subscribers": []} + TopicsController_getTopicSubscriber: + speakeasy-default-topics-controller-get-topic-subscriber: + parameters: + path: + 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: + parameters: + path: + workflowId: "" + 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": []} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 335afd26..542fce51 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -11,7 +11,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.0.1-alpha.10 + version: 0.0.1-alpha.11 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1c02396d..2030e082 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.386.0 +speakeasyVersion: 1.399.2 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:6bd29dd911f0d002ed01f7e6c2f88aaa3fff6eea08e8b6b9f66a888a6dc340e4 - sourceBlobDigest: sha256:02d801ab167023e73aeda8504c864217ba40f5f0f52f04ce3696f9034664a819 + sourceRevisionDigest: sha256:395eba518bfd3c604bf1fdd5dba5d7b7fd45b266e2e943805083c8bad4771fdd + sourceBlobDigest: sha256:a87a8330164b61538704ebe0d75d9adb307d3cc249d11a835b8cd71be3703570 tags: - latest - main @@ -11,11 +11,10 @@ targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:6bd29dd911f0d002ed01f7e6c2f88aaa3fff6eea08e8b6b9f66a888a6dc340e4 - sourceBlobDigest: sha256:02d801ab167023e73aeda8504c864217ba40f5f0f52f04ce3696f9034664a819 + sourceRevisionDigest: sha256:395eba518bfd3c604bf1fdd5dba5d7b7fd45b266e2e943805083c8bad4771fdd + sourceBlobDigest: sha256:a87a8330164b61538704ebe0d75d9adb307d3cc249d11a835b8cd71be3703570 codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:d6206d9d099c5ec737dacbf0c1f20ff93bb60a9df7f4b86e2d8a68e7f205b671 - outLocation: /github/workspace/repo + codeSamplesRevisionDigest: sha256:ec9766637494086a4198568b8ec23f28a71e7af7bebc6b0b5b38460ea0edc273 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 57660538..97019519 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,14 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -99,24 +99,24 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.trigger({ - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ - { - topicKey: "", - type: "Topic", - }, - ], - }); + const result = await novu.trigger({ + name: "workflow_identifier", + overrides: {}, + payload: {}, + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -129,18 +129,18 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.triggerBroadcast({ - name: "", - overrides: {}, - payload: {}, - }); + const result = await novu.triggerBroadcast({ + name: "", + overrides: {}, + payload: {}, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -153,16 +153,16 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.triggerBulk({ - events: [], - }); + const result = await novu.triggerBulk({ + events: [], + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -173,12 +173,8 @@ run(); ## Available Resources and Operations -### [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 +
+Available methods ### [changes](docs/sdks/changes/README.md) @@ -192,7 +188,7 @@ run(); * [list](docs/sdks/environments/README.md#list) - Get environments * [retrieve](docs/sdks/environments/README.md#retrieve) - Get current environment -### [environments.apiKeys](docs/sdks/apikeys/README.md) +#### [environments.apiKeys](docs/sdks/apikeys/README.md) * [list](docs/sdks/apikeys/README.md#list) - Get api keys @@ -215,7 +211,7 @@ run(); * [setAsPrimary](docs/sdks/integrations/README.md#setasprimary) - Set integration as primary * [update](docs/sdks/integrations/README.md#update) - Update integration -### [integrations.webhooks](docs/sdks/webhooks/README.md) +#### [integrations.webhooks](docs/sdks/webhooks/README.md) * [retrieve](docs/sdks/webhooks/README.md#retrieve) - Get webhook support status for provider @@ -234,24 +230,23 @@ run(); * [deleteByTransactionId](docs/sdks/messages/README.md#deletebytransactionid) - Delete messages by transactionId * [retrieve](docs/sdks/messages/README.md#retrieve) - Get messages -### [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 - ### [notifications](docs/sdks/notifications/README.md) * [list](docs/sdks/notifications/README.md#list) - Get notifications * [retrieve](docs/sdks/notifications/README.md#retrieve) - Get notification -### [notifications.stats](docs/sdks/stats/README.md) +#### [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 +### [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 @@ -267,39 +262,39 @@ run(); * [retrieve](docs/sdks/subscribers/README.md#retrieve) - Get subscriber * [update](docs/sdks/subscribers/README.md#update) - Update subscriber -### [subscribers.credentials](docs/sdks/credentials/README.md) +#### [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 + +#### [subscribers.credentials](docs/sdks/credentials/README.md) * [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.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 - -### [subscribers.messages](docs/sdks/novumessages/README.md) +#### [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 * [updateAsSeen](docs/sdks/novumessages/README.md#updateasseen) - Mark message action as seen -### [subscribers.notifications](docs/sdks/novunotifications/README.md) +#### [subscribers.notifications](docs/sdks/novunotifications/README.md) * [retrieve](docs/sdks/novunotifications/README.md#retrieve) - Get in-app notification feed for a particular subscriber * [unseenCount](docs/sdks/novunotifications/README.md#unseencount) - Get the unseen in-app notifications count for subscribers feed -### [subscribers.properties](docs/sdks/properties/README.md) - -* [updateOnlineFlag](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status - -### [subscribers.preferences](docs/sdks/preferences/README.md) +#### [subscribers.preferences](docs/sdks/preferences/README.md) * [list](docs/sdks/preferences/README.md#list) - Get subscriber 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 @@ -316,12 +311,20 @@ run(); * [rename](docs/sdks/topics/README.md#rename) - Rename a topic * [retrieve](docs/sdks/topics/README.md#retrieve) - Get topic -### [topics.subscribers](docs/sdks/novusubscribers/README.md) +#### [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 +### [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 @@ -330,13 +333,15 @@ run(); * [retrieve](docs/sdks/workflows/README.md#retrieve) - Get workflow * [update](docs/sdks/workflows/README.md#update) - Update workflow -### [workflows.variables](docs/sdks/variables/README.md) +#### [workflows.status](docs/sdks/status/README.md) -* [retrieve](docs/sdks/variables/README.md#retrieve) - Get available variables +* [update](docs/sdks/status/README.md#update) - Update workflow status -### [workflows.status](docs/sdks/status/README.md) +#### [workflows.variables](docs/sdks/variables/README.md) -* [update](docs/sdks/status/README.md#update) - Update workflow status +* [retrieve](docs/sdks/variables/README.md#retrieve) - Get available variables + +
@@ -459,16 +464,16 @@ Here's an example of one such pagination call: import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.subscribers.list(); + const result = await novu.subscribers.list(); - for await (const page of result) { - // Handle the page - console.log(page); - } + for await (const page of result) { + // Handle the page + console.log(page); + } } run(); @@ -493,30 +498,30 @@ import { Novu } from "@novu/api"; import { SDKValidationError } from "@novu/api/models/errors"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - let result; - try { - result = await novu.cancel(""); - } catch (err) { - switch (true) { - case err instanceof SDKValidationError: { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - default: { - throw err; - } - } - } + let result; + try { + result = await novu.cancel(""); // Handle the result console.log(result); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + default: { + throw err; + } + } + } } run(); @@ -540,15 +545,15 @@ You can override the default server globally by passing a server index to the `s import { Novu } from "@novu/api"; const novu = new Novu({ - serverIdx: 1, - apiKey: "", + serverIdx: 1, + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -564,15 +569,15 @@ The default server can also be overridden globally by passing a URL to the `serv import { Novu } from "@novu/api"; const novu = new Novu({ - serverURL: "https://api.novu.co", - apiKey: "", + serverURL: "https://api.novu.co", + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -645,14 +650,14 @@ To authenticate with the API the `apiKey` parameter must be set when initializin import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -670,25 +675,25 @@ To change the default retry strategy for a single API call, simply provide a ret import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.cancel("", { - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - }); + const result = await novu.cancel("", { + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -700,24 +705,24 @@ If you'd like to override the default retry strategy for all operations that sup import { Novu } from "@novu/api"; const novu = new Novu({ - retryConfig: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, - apiKey: "", + retryConnectionErrors: false, + }, + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/RELEASES.md b/RELEASES.md index c46bfa1d..eb761a86 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [typescript v0.0.1-alpha.10] . ### Releases -- [NPM v0.0.1-alpha.10] https://www.npmjs.com/package/@novu/api/v/0.0.1-alpha.10 - . \ No newline at end of file +- [NPM v0.0.1-alpha.10] https://www.npmjs.com/package/@novu/api/v/0.0.1-alpha.10 - . + +## 2024-09-19 00:16:17 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.0.1-alpha.11] . +### Releases +- [NPM v0.0.1-alpha.11] https://www.npmjs.com/package/@novu/api/v/0.0.1-alpha.11 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 4f44a179..827664bf 100644 --- a/USAGE.md +++ b/USAGE.md @@ -5,14 +5,14 @@ import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.cancel(""); + const result = await novu.cancel(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -25,24 +25,24 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.trigger({ - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ - { - topicKey: "", - type: "Topic", - }, - ], - }); - - // Handle the result - console.log(result); + const result = await novu.trigger({ + name: "workflow_identifier", + overrides: {}, + payload: {}, + to: [ + { + topicKey: "", + type: "Topic", + }, + ], + }); + + // Handle the result + console.log(result); } run(); @@ -55,18 +55,18 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.triggerBroadcast({ - name: "", - overrides: {}, - payload: {}, - }); - - // Handle the result - console.log(result); + const result = await novu.triggerBroadcast({ + name: "", + overrides: {}, + payload: {}, + }); + + // Handle the result + console.log(result); } run(); @@ -79,16 +79,16 @@ run(); import { Novu } from "@novu/api"; const novu = new Novu({ - apiKey: "", + apiKey: "", }); async function run() { - const result = await novu.triggerBulk({ - events: [], - }); + const result = await novu.triggerBulk({ + events: [], + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/docs/models/components/activitiesresponsedto.md b/docs/models/components/activitiesresponsedto.md index 0027f15c..8e565df5 100644 --- a/docs/models/components/activitiesresponsedto.md +++ b/docs/models/components/activitiesresponsedto.md @@ -6,10 +6,12 @@ import { ActivitiesResponseDto } from "@novu/api/models/components"; let value: ActivitiesResponseDto = { - data: [""], - hasMore: false, - page: 9786.19, - pageSize: 4736.08, + data: [ + "", + ], + hasMore: false, + page: 9786.19, + pageSize: 4736.08, }; ``` diff --git a/docs/models/components/activitygraphstatesresponse.md b/docs/models/components/activitygraphstatesresponse.md index a842fa0e..0f32d1c5 100644 --- a/docs/models/components/activitygraphstatesresponse.md +++ b/docs/models/components/activitygraphstatesresponse.md @@ -6,10 +6,14 @@ import { ActivityGraphStatesResponse } from "@novu/api/models/components"; let value: ActivityGraphStatesResponse = { - id: "", - channels: ["sms"], - count: 5204.78, - templates: [""], + id: "", + channels: [ + "sms", + ], + count: 5204.78, + templates: [ + "", + ], }; ``` diff --git a/docs/models/components/activitynotificationresponsedto.md b/docs/models/components/activitynotificationresponsedto.md index cf30930e..dbf0ad4e 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: "", }; ``` diff --git a/docs/models/components/activitynotificationsubscriberresponsedto.md b/docs/models/components/activitynotificationsubscriberresponsedto.md index 5684735b..d842710e 100644 --- a/docs/models/components/activitynotificationsubscriberresponsedto.md +++ b/docs/models/components/activitynotificationsubscriberresponsedto.md @@ -6,7 +6,7 @@ import { ActivityNotificationSubscriberResponseDto } from "@novu/api/models/components"; let value: ActivityNotificationSubscriberResponseDto = { - id: "", + id: "", }; ``` diff --git a/docs/models/components/activitynotificationtemplateresponsedto.md b/docs/models/components/activitynotificationtemplateresponsedto.md index e19627c0..54054b48 100644 --- a/docs/models/components/activitynotificationtemplateresponsedto.md +++ b/docs/models/components/activitynotificationtemplateresponsedto.md @@ -6,8 +6,10 @@ import { ActivityNotificationTemplateResponseDto } from "@novu/api/models/components"; let value: ActivityNotificationTemplateResponseDto = { - name: "", - triggers: [""], + name: "", + triggers: [ + "", + ], }; ``` diff --git a/docs/models/components/activitystatsresponsedto.md b/docs/models/components/activitystatsresponsedto.md index e9c31fd5..5638b4aa 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, + monthlySent: 7805.29, + weeklySent: 6788.8, }; ``` diff --git a/docs/models/components/actor.md b/docs/models/components/actor.md index 3258ef27..7e6bb009 100644 --- a/docs/models/components/actor.md +++ b/docs/models/components/actor.md @@ -10,7 +10,7 @@ It is used to display the Avatar of the provided actor's subscriber id or actor import { Actor } from "@novu/api/models/components"; let value: Actor = { - subscriberId: "", + subscriberId: "", }; ``` diff --git a/docs/models/components/addsubscribersrequestdto.md b/docs/models/components/addsubscribersrequestdto.md index b85168b6..983a3b5f 100644 --- a/docs/models/components/addsubscribersrequestdto.md +++ b/docs/models/components/addsubscribersrequestdto.md @@ -6,7 +6,9 @@ import { AddSubscribersRequestDto } from "@novu/api/models/components"; let value: AddSubscribersRequestDto = { - subscribers: [""], + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/apikey.md b/docs/models/components/apikey.md index 91ae26ed..1711b1aa 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: "", + key: "", }; ``` diff --git a/docs/models/components/bulkapplychangedto.md b/docs/models/components/bulkapplychangedto.md index daac17c6..6b6ced19 100644 --- a/docs/models/components/bulkapplychangedto.md +++ b/docs/models/components/bulkapplychangedto.md @@ -6,7 +6,9 @@ import { BulkApplyChangeDto } from "@novu/api/models/components"; let value: BulkApplyChangeDto = { - changeIds: [""], + changeIds: [ + "", + ], }; ``` diff --git a/docs/models/components/bulksubscribercreatedto.md b/docs/models/components/bulksubscribercreatedto.md index f81d7a67..497e5fb5 100644 --- a/docs/models/components/bulksubscribercreatedto.md +++ b/docs/models/components/bulksubscribercreatedto.md @@ -6,7 +6,9 @@ import { BulkSubscriberCreateDto } from "@novu/api/models/components"; let value: BulkSubscriberCreateDto = { - subscribers: [""], + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/bulktriggereventdto.md b/docs/models/components/bulktriggereventdto.md index 6e85b1d2..7df06717 100644 --- a/docs/models/components/bulktriggereventdto.md +++ b/docs/models/components/bulktriggereventdto.md @@ -6,7 +6,7 @@ import { BulkTriggerEventDto } from "@novu/api/models/components"; let value: BulkTriggerEventDto = { - events: [], + events: [], }; ``` diff --git a/docs/models/components/changeresponsedto.md b/docs/models/components/changeresponsedto.md index 232964e5..821a95c0 100644 --- a/docs/models/components/changeresponsedto.md +++ b/docs/models/components/changeresponsedto.md @@ -6,14 +6,14 @@ import { ChangeResponseDto } from "@novu/api/models/components"; let value: ChangeResponseDto = { - creatorId: "", - entityId: "", - environmentId: "", - organizationId: "", - change: {}, - createdAt: "", - enabled: false, - type: "NotificationTemplate", + creatorId: "", + entityId: "", + environmentId: "", + organizationId: "", + change: {}, + createdAt: "", + enabled: false, + type: "NotificationTemplate", }; ``` diff --git a/docs/models/components/changesresponsedto.md b/docs/models/components/changesresponsedto.md index 87ca8a6c..bfdf6c29 100644 --- a/docs/models/components/changesresponsedto.md +++ b/docs/models/components/changesresponsedto.md @@ -6,10 +6,12 @@ import { ChangesResponseDto } from "@novu/api/models/components"; let value: ChangesResponseDto = { - data: [""], - page: 3843.82, - pageSize: 4375.87, - totalCount: 2975.34, + data: [ + "", + ], + page: 3843.82, + pageSize: 4375.87, + totalCount: 2975.34, }; ``` diff --git a/docs/models/components/changeworkflowstatusrequestdto.md b/docs/models/components/changeworkflowstatusrequestdto.md index 9d768905..e30d73d6 100644 --- a/docs/models/components/changeworkflowstatusrequestdto.md +++ b/docs/models/components/changeworkflowstatusrequestdto.md @@ -6,7 +6,7 @@ import { ChangeWorkflowStatusRequestDto } from "@novu/api/models/components"; let value: ChangeWorkflowStatusRequestDto = { - active: false, + active: false, }; ``` diff --git a/docs/models/components/channelcredentials.md b/docs/models/components/channelcredentials.md index 58e9432d..69f27e90 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: "", }; ``` diff --git a/docs/models/components/channelpreference.md b/docs/models/components/channelpreference.md index e2585e30..35f6985c 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 = { - enabled: false, - type: "chat", + enabled: false, + type: "chat", }; ``` diff --git a/docs/models/components/channelsettings.md b/docs/models/components/channelsettings.md index 43d239f9..7a44047d 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: "", - credentials: { - webhookUrl: "", - }, - providerId: 1433.53, + integrationId: "", + credentials: { + webhookUrl: "", + }, + providerId: 1433.53, }; ``` diff --git a/docs/models/components/createfeedrequestdto.md b/docs/models/components/createfeedrequestdto.md index 3546b4c5..5b278ef4 100644 --- a/docs/models/components/createfeedrequestdto.md +++ b/docs/models/components/createfeedrequestdto.md @@ -6,7 +6,7 @@ import { CreateFeedRequestDto } from "@novu/api/models/components"; let value: CreateFeedRequestDto = { - name: "", + name: "", }; ``` diff --git a/docs/models/components/createintegrationrequestdto.md b/docs/models/components/createintegrationrequestdto.md index e574200d..3652982a 100644 --- a/docs/models/components/createintegrationrequestdto.md +++ b/docs/models/components/createintegrationrequestdto.md @@ -6,8 +6,8 @@ import { CreateIntegrationRequestDto } from "@novu/api/models/components"; let value: CreateIntegrationRequestDto = { - channel: "push", - providerId: "", + channel: "push", + providerId: "", }; ``` diff --git a/docs/models/components/createlayoutresponsedto.md b/docs/models/components/createlayoutresponsedto.md index 66fe58d1..4ac7fb63 100644 --- a/docs/models/components/createlayoutresponsedto.md +++ b/docs/models/components/createlayoutresponsedto.md @@ -6,7 +6,7 @@ import { CreateLayoutResponseDto } from "@novu/api/models/components"; let value: CreateLayoutResponseDto = { - id: "", + id: "", }; ``` diff --git a/docs/models/components/createnotificationgrouprequestdto.md b/docs/models/components/createnotificationgrouprequestdto.md index d4d8218c..330c7811 100644 --- a/docs/models/components/createnotificationgrouprequestdto.md +++ b/docs/models/components/createnotificationgrouprequestdto.md @@ -6,7 +6,7 @@ import { CreateNotificationGroupRequestDto } from "@novu/api/models/components"; let value: CreateNotificationGroupRequestDto = { - name: "", + name: "", }; ``` diff --git a/docs/models/components/createsubscriberrequestdto.md b/docs/models/components/createsubscriberrequestdto.md index 16c0f41a..169be995 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: "", }; ``` diff --git a/docs/models/components/createtenantrequestdto.md b/docs/models/components/createtenantrequestdto.md index 42bb4464..046af22c 100644 --- a/docs/models/components/createtenantrequestdto.md +++ b/docs/models/components/createtenantrequestdto.md @@ -6,8 +6,8 @@ import { CreateTenantRequestDto } from "@novu/api/models/components"; let value: CreateTenantRequestDto = { - identifier: "", - name: "", + identifier: "", + name: "", }; ``` diff --git a/docs/models/components/createtenantresponsedto.md b/docs/models/components/createtenantresponsedto.md index c6431e85..64f852cc 100644 --- a/docs/models/components/createtenantresponsedto.md +++ b/docs/models/components/createtenantresponsedto.md @@ -6,11 +6,11 @@ import { CreateTenantResponseDto } from "@novu/api/models/components"; let value: CreateTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", + environmentId: "", + id: "", + createdAt: "", + identifier: "", + updatedAt: "", }; ``` diff --git a/docs/models/components/createtopicrequestdto.md b/docs/models/components/createtopicrequestdto.md index be049174..611f5b5a 100644 --- a/docs/models/components/createtopicrequestdto.md +++ b/docs/models/components/createtopicrequestdto.md @@ -6,8 +6,8 @@ import { CreateTopicRequestDto } from "@novu/api/models/components"; let value: CreateTopicRequestDto = { - key: "", - name: "", + key: "", + name: "", }; ``` diff --git a/docs/models/components/createtopicresponsedto.md b/docs/models/components/createtopicresponsedto.md index cc4cb755..7399856b 100644 --- a/docs/models/components/createtopicresponsedto.md +++ b/docs/models/components/createtopicresponsedto.md @@ -6,7 +6,7 @@ import { CreateTopicResponseDto } from "@novu/api/models/components"; let value: CreateTopicResponseDto = { - key: "", + key: "", }; ``` diff --git a/docs/models/components/createworkflowrequestdto.md b/docs/models/components/createworkflowrequestdto.md index 84de0573..04129fba 100644 --- a/docs/models/components/createworkflowrequestdto.md +++ b/docs/models/components/createworkflowrequestdto.md @@ -6,9 +6,9 @@ import { CreateWorkflowRequestDto } from "@novu/api/models/components"; let value: CreateWorkflowRequestDto = { - name: "", - notificationGroupId: "", - steps: [], + name: "", + notificationGroupId: "", + steps: [], }; ``` diff --git a/docs/models/components/databooleandto.md b/docs/models/components/databooleandto.md index 88fb1927..fd5bdad6 100644 --- a/docs/models/components/databooleandto.md +++ b/docs/models/components/databooleandto.md @@ -6,7 +6,7 @@ import { DataBooleanDto } from "@novu/api/models/components"; let value: DataBooleanDto = { - data: false, + data: false, }; ``` diff --git a/docs/models/components/datanumberdto.md b/docs/models/components/datanumberdto.md index c912e1e8..ca2e5cd0 100644 --- a/docs/models/components/datanumberdto.md +++ b/docs/models/components/datanumberdto.md @@ -6,7 +6,7 @@ import { DataNumberDto } from "@novu/api/models/components"; let value: DataNumberDto = { - data: 6458.94, + data: 6458.94, }; ``` diff --git a/docs/models/components/delayregularmetadata.md b/docs/models/components/delayregularmetadata.md index 470edfb4..6b465e75 100644 --- a/docs/models/components/delayregularmetadata.md +++ b/docs/models/components/delayregularmetadata.md @@ -6,7 +6,7 @@ import { DelayRegularMetadata } from "@novu/api/models/components"; let value: DelayRegularMetadata = { - type: "regular", + type: "regular", }; ``` diff --git a/docs/models/components/delayscheduledmetadata.md b/docs/models/components/delayscheduledmetadata.md index 640c0375..c66808b0 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: "", + type: "scheduled", }; ``` diff --git a/docs/models/components/deletemessageresponsedto.md b/docs/models/components/deletemessageresponsedto.md index cf881ab6..be84162e 100644 --- a/docs/models/components/deletemessageresponsedto.md +++ b/docs/models/components/deletemessageresponsedto.md @@ -6,8 +6,8 @@ import { DeleteMessageResponseDto } from "@novu/api/models/components"; let value: DeleteMessageResponseDto = { - acknowledged: false, - status: "deleted", + acknowledged: false, + status: "deleted", }; ``` diff --git a/docs/models/components/deletenotificationgroupresponsedto.md b/docs/models/components/deletenotificationgroupresponsedto.md index 17b5fdd2..1543e617 100644 --- a/docs/models/components/deletenotificationgroupresponsedto.md +++ b/docs/models/components/deletenotificationgroupresponsedto.md @@ -6,8 +6,8 @@ import { DeleteNotificationGroupResponseDto } from "@novu/api/models/components"; let value: DeleteNotificationGroupResponseDto = { - acknowledged: false, - status: "deleted", + acknowledged: false, + status: "deleted", }; ``` diff --git a/docs/models/components/deletesubscriberresponsedto.md b/docs/models/components/deletesubscriberresponsedto.md index 924cb4f2..68e2ba72 100644 --- a/docs/models/components/deletesubscriberresponsedto.md +++ b/docs/models/components/deletesubscriberresponsedto.md @@ -6,8 +6,8 @@ import { DeleteSubscriberResponseDto } from "@novu/api/models/components"; let value: DeleteSubscriberResponseDto = { - acknowledged: false, - status: "deleted", + acknowledged: false, + status: "deleted", }; ``` diff --git a/docs/models/components/digestregularmetadata.md b/docs/models/components/digestregularmetadata.md index ded27209..33d02c99 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: "backoff", }; ``` diff --git a/docs/models/components/digesttimedmetadata.md b/docs/models/components/digesttimedmetadata.md index 40cf77d0..8de2266e 100644 --- a/docs/models/components/digesttimedmetadata.md +++ b/docs/models/components/digesttimedmetadata.md @@ -6,7 +6,7 @@ import { DigestTimedMetadata } from "@novu/api/models/components"; let value: DigestTimedMetadata = { - type: "timed", + type: "timed", }; ``` diff --git a/docs/models/components/emailblock.md b/docs/models/components/emailblock.md index 64f80d76..da8b172a 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 = { - content: "", - type: "text", + content: "", + type: "text", }; ``` diff --git a/docs/models/components/emailblockstyles.md b/docs/models/components/emailblockstyles.md index ecbe93b1..8ddbd4e2 100644 --- a/docs/models/components/emailblockstyles.md +++ b/docs/models/components/emailblockstyles.md @@ -6,7 +6,7 @@ import { EmailBlockStyles } from "@novu/api/models/components"; let value: EmailBlockStyles = { - textAlign: "center", + textAlign: "center", }; ``` diff --git a/docs/models/components/environmentresponsedto.md b/docs/models/components/environmentresponsedto.md index b330416c..9cde3edf 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: "", + parentId: "", + identifier: "", + name: "", }; ``` diff --git a/docs/models/components/executiondetailsresponsedto.md b/docs/models/components/executiondetailsresponsedto.md index 70860606..b12ad80d 100644 --- a/docs/models/components/executiondetailsresponsedto.md +++ b/docs/models/components/executiondetailsresponsedto.md @@ -6,19 +6,19 @@ import { ExecutionDetailsResponseDto } from "@novu/api/models/components"; let value: ExecutionDetailsResponseDto = { - environmentId: "", - jobId: "", - notificationId: "", - notificationTemplateId: "", - organizationId: "", - subscriberId: "", - channel: "sms", - detail: "", - isRetry: false, - isTest: false, - source: "Internal", - status: "Failed", - transactionId: "", + environmentId: "", + jobId: "", + notificationId: "", + notificationTemplateId: "", + organizationId: "", + subscriberId: "", + channel: "sms", + detail: "", + isRetry: false, + isTest: false, + source: "Internal", + status: "Failed", + transactionId: "", }; ``` diff --git a/docs/models/components/feedidentifier.md b/docs/models/components/feedidentifier.md index 42f5f9a7..524dd4b6 100644 --- a/docs/models/components/feedidentifier.md +++ b/docs/models/components/feedidentifier.md @@ -7,7 +7,9 @@ Optional feed identifier or array of feed identifiers ```typescript import { FeedIdentifier } from "@novu/api/models/components"; -let value: FeedIdentifier = [""]; +let value: FeedIdentifier = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/components/feedresponsedto.md b/docs/models/components/feedresponsedto.md index db709507..0f40b894 100644 --- a/docs/models/components/feedresponsedto.md +++ b/docs/models/components/feedresponsedto.md @@ -6,10 +6,12 @@ import { FeedResponseDto } from "@novu/api/models/components"; let value: FeedResponseDto = { - data: [""], - hasMore: false, - page: 7917.25, - pageSize: 8121.69, + data: [ + "", + ], + hasMore: false, + page: 7917.25, + pageSize: 8121.69, }; ``` diff --git a/docs/models/components/fieldfilterpart.md b/docs/models/components/fieldfilterpart.md index 0047dfd5..367c6044 100644 --- a/docs/models/components/fieldfilterpart.md +++ b/docs/models/components/fieldfilterpart.md @@ -6,10 +6,10 @@ import { FieldFilterPart } from "@novu/api/models/components"; let value: FieldFilterPart = { - field: "", - on: "subscriber", - operator: "NOT_EQUAL", - value: "", + field: "", + on: "subscriber", + operator: "NOT_EQUAL", + value: "", }; ``` diff --git a/docs/models/components/filtertopicsresponsedto.md b/docs/models/components/filtertopicsresponsedto.md index 4c71176d..60bd21ba 100644 --- a/docs/models/components/filtertopicsresponsedto.md +++ b/docs/models/components/filtertopicsresponsedto.md @@ -6,18 +6,20 @@ import { FilterTopicsResponseDto } from "@novu/api/models/components"; let value: FilterTopicsResponseDto = { - data: [ - { - environmentId: "", - organizationId: "", - key: "", - name: "", - subscribers: [""], - }, - ], - page: 3637.11, - pageSize: 3250.47, - totalCount: 5701.97, + data: [ + { + environmentId: "", + organizationId: "", + key: "", + name: "", + subscribers: [ + "", + ], + }, + ], + page: 3637.11, + pageSize: 3250.47, + totalCount: 5701.97, }; ``` diff --git a/docs/models/components/getlayoutresponsedto.md b/docs/models/components/getlayoutresponsedto.md index 8dd35140..1cf25cd6 100644 --- a/docs/models/components/getlayoutresponsedto.md +++ b/docs/models/components/getlayoutresponsedto.md @@ -6,16 +6,16 @@ import { GetLayoutResponseDto } from "@novu/api/models/components"; let value: GetLayoutResponseDto = { - creatorId: "", - environmentId: "", - organizationId: "", - channel: "in_app", - content: "", - contentType: "", - identifier: "", - isDefault: false, - isDeleted: false, - name: "", + creatorId: "", + environmentId: "", + organizationId: "", + channel: "in_app", + content: "", + contentType: "", + identifier: "", + isDefault: false, + isDeleted: false, + name: "", }; ``` diff --git a/docs/models/components/getsubscriberpreferencesresponsedto.md b/docs/models/components/getsubscriberpreferencesresponsedto.md index aadfdf03..4d59dd04 100644 --- a/docs/models/components/getsubscriberpreferencesresponsedto.md +++ b/docs/models/components/getsubscriberpreferencesresponsedto.md @@ -6,10 +6,10 @@ import { GetSubscriberPreferencesResponseDto } from "@novu/api/models/components"; let value: GetSubscriberPreferencesResponseDto = { - preference: { - channels: {}, - enabled: false, - }, + preference: { + channels: {}, + enabled: false, + }, }; ``` diff --git a/docs/models/components/gettenantresponsedto.md b/docs/models/components/gettenantresponsedto.md index ce12b52f..e4043b00 100644 --- a/docs/models/components/gettenantresponsedto.md +++ b/docs/models/components/gettenantresponsedto.md @@ -6,11 +6,11 @@ import { GetTenantResponseDto } from "@novu/api/models/components"; let value: GetTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", + environmentId: "", + id: "", + createdAt: "", + identifier: "", + updatedAt: "", }; ``` diff --git a/docs/models/components/gettopicresponsedto.md b/docs/models/components/gettopicresponsedto.md index f536618d..810fe726 100644 --- a/docs/models/components/gettopicresponsedto.md +++ b/docs/models/components/gettopicresponsedto.md @@ -6,11 +6,13 @@ import { GetTopicResponseDto } from "@novu/api/models/components"; let value: GetTopicResponseDto = { - environmentId: "", - organizationId: "", - key: "", - name: "", - subscribers: [""], + environmentId: "", + organizationId: "", + key: "", + name: "", + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/integrationresponsedto.md b/docs/models/components/integrationresponsedto.md index 243f395f..7fb511f1 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, - channel: "sms", - credentials: {}, - deleted: false, - deletedAt: "", - deletedBy: "", - identifier: "", - name: "", - primary: false, - providerId: "", + environmentId: "", + organizationId: "", + active: false, + channel: "sms", + credentials: {}, + deleted: false, + deletedAt: "", + deletedBy: "", + identifier: "", + name: "", + primary: false, + providerId: "", }; ``` diff --git a/docs/models/components/markallmessageasrequestdto.md b/docs/models/components/markallmessageasrequestdto.md index fc1783c9..3af1c1ba 100644 --- a/docs/models/components/markallmessageasrequestdto.md +++ b/docs/models/components/markallmessageasrequestdto.md @@ -6,7 +6,7 @@ import { MarkAllMessageAsRequestDto } from "@novu/api/models/components"; let value: MarkAllMessageAsRequestDto = { - markAs: "unread", + markAs: "unread", }; ``` diff --git a/docs/models/components/markmessageactionasseendto.md b/docs/models/components/markmessageactionasseendto.md index 4dc30ab8..9e60e4cf 100644 --- a/docs/models/components/markmessageactionasseendto.md +++ b/docs/models/components/markmessageactionasseendto.md @@ -6,7 +6,7 @@ import { MarkMessageActionAsSeenDto } from "@novu/api/models/components"; let value: MarkMessageActionAsSeenDto = { - status: "pending", + status: "pending", }; ``` diff --git a/docs/models/components/messagebutton.md b/docs/models/components/messagebutton.md index 91379d89..eabd38d1 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 = { - content: "", - type: "secondary", + content: "", + type: "secondary", }; ``` diff --git a/docs/models/components/messagecta.md b/docs/models/components/messagecta.md index 516cdf9f..ee13a74d 100644 --- a/docs/models/components/messagecta.md +++ b/docs/models/components/messagecta.md @@ -6,7 +6,7 @@ import { MessageCTA } from "@novu/api/models/components"; let value: MessageCTA = { - data: {}, + data: {}, }; ``` diff --git a/docs/models/components/messagemarkasrequestdto.md b/docs/models/components/messagemarkasrequestdto.md index 1f846fbe..b4255e6a 100644 --- a/docs/models/components/messagemarkasrequestdto.md +++ b/docs/models/components/messagemarkasrequestdto.md @@ -6,8 +6,8 @@ import { MessageMarkAsRequestDto } from "@novu/api/models/components"; let value: MessageMarkAsRequestDto = { - markAs: "seen", - messageId: "", + markAs: "seen", + messageId: "", }; ``` diff --git a/docs/models/components/messageresponsedto.md b/docs/models/components/messageresponsedto.md index d51c8050..2dc6d12c 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -6,29 +6,29 @@ import { MessageResponseDto } from "@novu/api/models/components"; let value: MessageResponseDto = { - environmentId: "", - messageTemplateId: "", - notificationId: "", - organizationId: "", - subscriberId: "", - templateId: "", - channel: "sms", - content: { - content: "", - type: "text", - }, - createdAt: "", - cta: { - data: {}, - }, - errorId: "", - errorText: "", - overrides: {}, - payload: {}, - read: false, - seen: false, - status: "sent", - transactionId: "", + environmentId: "", + messageTemplateId: "", + notificationId: "", + organizationId: "", + subscriberId: "", + templateId: "", + channel: "sms", + content: { + content: "", + type: "text", + }, + createdAt: "", + cta: { + data: {}, + }, + errorId: "", + errorText: "", + overrides: {}, + payload: {}, + read: false, + seen: false, + status: "sent", + transactionId: "", }; ``` diff --git a/docs/models/components/metadata.md b/docs/models/components/metadata.md index 9aac87ac..6d143455 100644 --- a/docs/models/components/metadata.md +++ b/docs/models/components/metadata.md @@ -6,7 +6,7 @@ import { Metadata } from "@novu/api/models/components"; let value: Metadata = { - type: "backoff", + type: "backoff", }; ``` diff --git a/docs/models/components/notificationgroup.md b/docs/models/components/notificationgroup.md index 0dd29f97..1af391ed 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: "", + name: "", }; ``` diff --git a/docs/models/components/notificationgroupresponsedto.md b/docs/models/components/notificationgroupresponsedto.md index 82d4ec5a..78a24be3 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: "", + name: "", }; ``` diff --git a/docs/models/components/notificationstepvariantmetadata.md b/docs/models/components/notificationstepvariantmetadata.md index 8820b121..ec02b532 100644 --- a/docs/models/components/notificationstepvariantmetadata.md +++ b/docs/models/components/notificationstepvariantmetadata.md @@ -6,7 +6,7 @@ import { NotificationStepVariantMetadata } from "@novu/api/models/components"; let value: NotificationStepVariantMetadata = { - type: "backoff", + type: "backoff", }; ``` diff --git a/docs/models/components/notificationtrigger.md b/docs/models/components/notificationtrigger.md index b605b899..259a8d41 100644 --- a/docs/models/components/notificationtrigger.md +++ b/docs/models/components/notificationtrigger.md @@ -6,13 +6,13 @@ import { NotificationTrigger } from "@novu/api/models/components"; let value: NotificationTrigger = { - identifier: "", - type: "event", - variables: [ - { - name: "", - }, - ], + identifier: "", + type: "event", + variables: [ + { + name: "", + }, + ], }; ``` diff --git a/docs/models/components/notificationtriggervariable.md b/docs/models/components/notificationtriggervariable.md index 02aa5aee..4bca567c 100644 --- a/docs/models/components/notificationtriggervariable.md +++ b/docs/models/components/notificationtriggervariable.md @@ -6,7 +6,7 @@ import { NotificationTriggerVariable } from "@novu/api/models/components"; let value: NotificationTriggerVariable = { - name: "", + name: "", }; ``` diff --git a/docs/models/components/organizationbrandingresponsedto.md b/docs/models/components/organizationbrandingresponsedto.md index e4203223..90d54994 100644 --- a/docs/models/components/organizationbrandingresponsedto.md +++ b/docs/models/components/organizationbrandingresponsedto.md @@ -6,10 +6,10 @@ import { OrganizationBrandingResponseDto } from "@novu/api/models/components"; let value: OrganizationBrandingResponseDto = { - color: "orchid", - contentBackground: "", - fontColor: "", - logo: "", + color: "orchid", + contentBackground: "", + fontColor: "", + logo: "", }; ``` diff --git a/docs/models/components/organizationresponsedto.md b/docs/models/components/organizationresponsedto.md index b3311b8a..d2304ea1 100644 --- a/docs/models/components/organizationresponsedto.md +++ b/docs/models/components/organizationresponsedto.md @@ -6,13 +6,13 @@ import { OrganizationResponseDto } from "@novu/api/models/components"; let value: OrganizationResponseDto = { - branding: { - color: "yellow", - contentBackground: "", - fontColor: "", - logo: "", - }, - name: "", + branding: { + color: "yellow", + contentBackground: "", + fontColor: "", + logo: "", + }, + name: "", }; ``` diff --git a/docs/models/components/preference.md b/docs/models/components/preference.md index c8733df2..c2da69be 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: {}, + enabled: false, }; ``` diff --git a/docs/models/components/removesubscribersrequestdto.md b/docs/models/components/removesubscribersrequestdto.md index e8397440..6378417e 100644 --- a/docs/models/components/removesubscribersrequestdto.md +++ b/docs/models/components/removesubscribersrequestdto.md @@ -6,7 +6,9 @@ import { RemoveSubscribersRequestDto } from "@novu/api/models/components"; let value: RemoveSubscribersRequestDto = { - subscribers: [""], + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/renameorganizationdto.md b/docs/models/components/renameorganizationdto.md index f91595cd..30bd019a 100644 --- a/docs/models/components/renameorganizationdto.md +++ b/docs/models/components/renameorganizationdto.md @@ -6,7 +6,7 @@ import { RenameOrganizationDto } from "@novu/api/models/components"; let value: RenameOrganizationDto = { - name: "", + name: "", }; ``` diff --git a/docs/models/components/renametopicrequestdto.md b/docs/models/components/renametopicrequestdto.md index 454a4cbf..7e0ec720 100644 --- a/docs/models/components/renametopicrequestdto.md +++ b/docs/models/components/renametopicrequestdto.md @@ -6,7 +6,7 @@ import { RenameTopicRequestDto } from "@novu/api/models/components"; let value: RenameTopicRequestDto = { - name: "", + name: "", }; ``` diff --git a/docs/models/components/renametopicresponsedto.md b/docs/models/components/renametopicresponsedto.md index 4b89f7d9..a512fd9e 100644 --- a/docs/models/components/renametopicresponsedto.md +++ b/docs/models/components/renametopicresponsedto.md @@ -6,11 +6,13 @@ import { RenameTopicResponseDto } from "@novu/api/models/components"; let value: RenameTopicResponseDto = { - environmentId: "", - organizationId: "", - key: "", - name: "", - subscribers: [""], + environmentId: "", + organizationId: "", + key: "", + name: "", + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/security.md b/docs/models/components/security.md index 8d41653f..59a810c2 100644 --- a/docs/models/components/security.md +++ b/docs/models/components/security.md @@ -6,7 +6,7 @@ import { Security } from "@novu/api/models/components"; let value: Security = { - apiKey: "", + apiKey: "", }; ``` diff --git a/docs/models/components/stepfilter.md b/docs/models/components/stepfilter.md index 33ae8ae4..86f42673 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 = { - children: [ - { - field: "", - on: "payload", - operator: "LIKE", - value: "", - }, - ], - isNegated: false, - type: "BOOLEAN", - value: "AND", + children: [ + { + field: "", + on: "payload", + operator: "LIKE", + value: "", + }, + ], + isNegated: false, + type: "BOOLEAN", + value: "AND", }; ``` diff --git a/docs/models/components/subscriberpayloaddto.md b/docs/models/components/subscriberpayloaddto.md index 7eb560fb..3ff650c3 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: "", }; ``` diff --git a/docs/models/components/subscriberresponsedto.md b/docs/models/components/subscriberresponsedto.md index 27af339b..dd59905f 100644 --- a/docs/models/components/subscriberresponsedto.md +++ b/docs/models/components/subscriberresponsedto.md @@ -6,12 +6,12 @@ import { SubscriberResponseDto } from "@novu/api/models/components"; let value: SubscriberResponseDto = { - environmentId: "", - organizationId: "", - createdAt: "", - deleted: false, - subscriberId: "", - updatedAt: "", + environmentId: "", + organizationId: "", + createdAt: "", + deleted: false, + subscriberId: "", + updatedAt: "", }; ``` diff --git a/docs/models/components/templateresponse.md b/docs/models/components/templateresponse.md index a23f8c18..47ba212f 100644 --- a/docs/models/components/templateresponse.md +++ b/docs/models/components/templateresponse.md @@ -6,10 +6,12 @@ import { TemplateResponse } from "@novu/api/models/components"; let value: TemplateResponse = { - id: "", - critical: false, - name: "", - triggers: [""], + id: "", + critical: false, + name: "", + triggers: [ + "", + ], }; ``` diff --git a/docs/models/components/topicdto.md b/docs/models/components/topicdto.md index b505f5c9..b91cff17 100644 --- a/docs/models/components/topicdto.md +++ b/docs/models/components/topicdto.md @@ -6,11 +6,13 @@ import { TopicDto } from "@novu/api/models/components"; let value: TopicDto = { - environmentId: "", - organizationId: "", - key: "", - name: "", - subscribers: [""], + environmentId: "", + organizationId: "", + key: "", + name: "", + subscribers: [ + "", + ], }; ``` diff --git a/docs/models/components/topicpayloaddto.md b/docs/models/components/topicpayloaddto.md index 03e4b942..28bc3522 100644 --- a/docs/models/components/topicpayloaddto.md +++ b/docs/models/components/topicpayloaddto.md @@ -6,8 +6,8 @@ import { TopicPayloadDto } from "@novu/api/models/components"; let value: TopicPayloadDto = { - topicKey: "", - type: "Topic", + topicKey: "", + type: "Topic", }; ``` diff --git a/docs/models/components/topicsubscriberdto.md b/docs/models/components/topicsubscriberdto.md index b34a017f..716a8e71 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: "", - topicKey: "", + environmentId: "", + organizationId: "", + subscriberId: "", + topicId: "", + externalSubscriberId: "", + topicKey: "", }; ``` diff --git a/docs/models/components/triggereventrequestdto.md b/docs/models/components/triggereventrequestdto.md index db6803e4..1ce1aed0 100644 --- a/docs/models/components/triggereventrequestdto.md +++ b/docs/models/components/triggereventrequestdto.md @@ -6,15 +6,15 @@ import { TriggerEventRequestDto } from "@novu/api/models/components"; let value: TriggerEventRequestDto = { - name: "workflow_identifier", - overrides: {}, - payload: {}, - to: [ - { - topicKey: "", - type: "Topic", - }, - ], + name: "workflow_identifier", + overrides: {}, + payload: {}, + to: [ + { + topicKey: "", + type: "Topic", + }, + ], }; ``` diff --git a/docs/models/components/triggereventresponsedto.md b/docs/models/components/triggereventresponsedto.md index 2641d722..49fbc392 100644 --- a/docs/models/components/triggereventresponsedto.md +++ b/docs/models/components/triggereventresponsedto.md @@ -6,8 +6,8 @@ import { TriggerEventResponseDto } from "@novu/api/models/components"; let value: TriggerEventResponseDto = { - acknowledged: false, - status: "processed", + acknowledged: false, + status: "processed", }; ``` diff --git a/docs/models/components/triggereventtoallrequestdto.md b/docs/models/components/triggereventtoallrequestdto.md index fffaf0c6..fec71ca3 100644 --- a/docs/models/components/triggereventtoallrequestdto.md +++ b/docs/models/components/triggereventtoallrequestdto.md @@ -6,9 +6,9 @@ import { TriggerEventToAllRequestDto } from "@novu/api/models/components"; let value: TriggerEventToAllRequestDto = { - name: "", - overrides: {}, - payload: {}, + name: "", + overrides: {}, + payload: {}, }; ``` diff --git a/docs/models/components/triggereventtoallrequestdtoactor.md b/docs/models/components/triggereventtoallrequestdtoactor.md index 6b7425ed..f40e47dd 100644 --- a/docs/models/components/triggereventtoallrequestdtoactor.md +++ b/docs/models/components/triggereventtoallrequestdtoactor.md @@ -10,7 +10,7 @@ It is used to display the Avatar of the provided actor's subscriber id or actor import { TriggerEventToAllRequestDtoActor } from "@novu/api/models/components"; let value: TriggerEventToAllRequestDtoActor = { - subscriberId: "", + subscriberId: "", }; ``` diff --git a/docs/models/components/unseencountresponse.md b/docs/models/components/unseencountresponse.md index ead33729..2594614d 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: 7506.86, }; ``` diff --git a/docs/models/components/updatebrandingdetailsdto.md b/docs/models/components/updatebrandingdetailsdto.md index 12143f90..cfdd42a4 100644 --- a/docs/models/components/updatebrandingdetailsdto.md +++ b/docs/models/components/updatebrandingdetailsdto.md @@ -6,10 +6,10 @@ import { UpdateBrandingDetailsDto } from "@novu/api/models/components"; let value: UpdateBrandingDetailsDto = { - color: "plum", - contentBackground: "", - fontColor: "", - logo: "", + color: "plum", + contentBackground: "", + fontColor: "", + logo: "", }; ``` diff --git a/docs/models/components/updateintegrationrequestdto.md b/docs/models/components/updateintegrationrequestdto.md index 2e0584ec..87df9622 100644 --- a/docs/models/components/updateintegrationrequestdto.md +++ b/docs/models/components/updateintegrationrequestdto.md @@ -18,4 +18,5 @@ let value: UpdateIntegrationRequestDto = {}; | `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 | \ No newline at end of file +| `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 diff --git a/docs/models/components/updatelayoutrequestdto.md b/docs/models/components/updatelayoutrequestdto.md index 7bf7d176..192e97af 100644 --- a/docs/models/components/updatelayoutrequestdto.md +++ b/docs/models/components/updatelayoutrequestdto.md @@ -6,7 +6,7 @@ import { UpdateLayoutRequestDto } from "@novu/api/models/components"; let value: UpdateLayoutRequestDto = { - identifier: "", + identifier: "", }; ``` diff --git a/docs/models/components/updatelayoutresponsedto.md b/docs/models/components/updatelayoutresponsedto.md index c08c9e9a..3ae0539e 100644 --- a/docs/models/components/updatelayoutresponsedto.md +++ b/docs/models/components/updatelayoutresponsedto.md @@ -6,16 +6,16 @@ import { UpdateLayoutResponseDto } from "@novu/api/models/components"; let value: UpdateLayoutResponseDto = { - creatorId: "", - environmentId: "", - organizationId: "", - channel: "push", - content: "", - contentType: "", - identifier: "", - isDefault: false, - isDeleted: false, - name: "", + creatorId: "", + environmentId: "", + organizationId: "", + channel: "push", + content: "", + contentType: "", + identifier: "", + isDefault: false, + isDeleted: false, + name: "", }; ``` diff --git a/docs/models/components/updatesubscriberchannelrequestdto.md b/docs/models/components/updatesubscriberchannelrequestdto.md index 87223667..0c0c628c 100644 --- a/docs/models/components/updatesubscriberchannelrequestdto.md +++ b/docs/models/components/updatesubscriberchannelrequestdto.md @@ -6,10 +6,10 @@ import { UpdateSubscriberChannelRequestDto } from "@novu/api/models/components"; let value: UpdateSubscriberChannelRequestDto = { - credentials: { - webhookUrl: "", - }, - providerId: 5373.73, + credentials: { + webhookUrl: "", + }, + providerId: 5373.73, }; ``` diff --git a/docs/models/components/updatesubscriberonlineflagrequestdto.md b/docs/models/components/updatesubscriberonlineflagrequestdto.md index 9aaeb45e..83061978 100644 --- a/docs/models/components/updatesubscriberonlineflagrequestdto.md +++ b/docs/models/components/updatesubscriberonlineflagrequestdto.md @@ -6,7 +6,7 @@ import { UpdateSubscriberOnlineFlagRequestDto } from "@novu/api/models/components"; let value: UpdateSubscriberOnlineFlagRequestDto = { - isOnline: false, + isOnline: false, }; ``` diff --git a/docs/models/components/updatesubscriberpreferenceresponsedto.md b/docs/models/components/updatesubscriberpreferenceresponsedto.md index 2c27ec2d..5f0733f0 100644 --- a/docs/models/components/updatesubscriberpreferenceresponsedto.md +++ b/docs/models/components/updatesubscriberpreferenceresponsedto.md @@ -6,16 +6,18 @@ import { UpdateSubscriberPreferenceResponseDto } from "@novu/api/models/components"; let value: UpdateSubscriberPreferenceResponseDto = { - preference: { - channels: {}, - enabled: false, - }, - template: { - id: "", - critical: false, - name: "", - triggers: [""], - }, + preference: { + channels: {}, + enabled: false, + }, + template: { + id: "", + critical: false, + name: "", + triggers: [ + "", + ], + }, }; ``` diff --git a/docs/models/components/updatetenantresponsedto.md b/docs/models/components/updatetenantresponsedto.md index 07d7cf06..5ff64e3c 100644 --- a/docs/models/components/updatetenantresponsedto.md +++ b/docs/models/components/updatetenantresponsedto.md @@ -6,11 +6,11 @@ import { UpdateTenantResponseDto } from "@novu/api/models/components"; let value: UpdateTenantResponseDto = { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", + environmentId: "", + id: "", + createdAt: "", + identifier: "", + updatedAt: "", }; ``` diff --git a/docs/models/components/updateworkflowrequestdto.md b/docs/models/components/updateworkflowrequestdto.md index 2d1af828..ddfbb2d4 100644 --- a/docs/models/components/updateworkflowrequestdto.md +++ b/docs/models/components/updateworkflowrequestdto.md @@ -6,8 +6,8 @@ import { UpdateWorkflowRequestDto } from "@novu/api/models/components"; let value: UpdateWorkflowRequestDto = { - name: "", - notificationGroupId: "", + name: "", + notificationGroupId: "", }; ``` diff --git a/docs/models/components/variablesresponsedto.md b/docs/models/components/variablesresponsedto.md index cf0d068c..d76878fb 100644 --- a/docs/models/components/variablesresponsedto.md +++ b/docs/models/components/variablesresponsedto.md @@ -6,8 +6,8 @@ import { VariablesResponseDto } from "@novu/api/models/components"; let value: VariablesResponseDto = { - system: {}, - translations: {}, + system: {}, + translations: {}, }; ``` diff --git a/docs/models/components/workflowresponse.md b/docs/models/components/workflowresponse.md index e5924db1..582f80c6 100644 --- a/docs/models/components/workflowresponse.md +++ b/docs/models/components/workflowresponse.md @@ -6,22 +6,24 @@ import { WorkflowResponse } from "@novu/api/models/components"; let value: WorkflowResponse = { - creatorId: "", - environmentId: "", - notificationGroupId: "", - organizationId: "", - active: false, - critical: false, - deleted: false, - deletedAt: "", - deletedBy: "", - description: "Advanced eco-centric middleware", - draft: false, - name: "", - preferenceSettings: {}, - steps: [], - tags: [""], - triggers: [], + creatorId: "", + environmentId: "", + notificationGroupId: "", + organizationId: "", + active: false, + critical: false, + deleted: false, + deletedAt: "", + deletedBy: "", + description: "Advanced eco-centric middleware", + draft: false, + name: "", + preferenceSettings: {}, + steps: [], + tags: [ + "", + ], + triggers: [], }; ``` diff --git a/docs/models/components/workflowsresponsedto.md b/docs/models/components/workflowsresponsedto.md index 16d24c6d..e3be277c 100644 --- a/docs/models/components/workflowsresponsedto.md +++ b/docs/models/components/workflowsresponsedto.md @@ -6,10 +6,12 @@ import { WorkflowsResponseDto } from "@novu/api/models/components"; let value: WorkflowsResponseDto = { - data: [""], - page: 384.25, - pageSize: 4386.01, - totalCount: 6342.74, + data: [ + "", + ], + page: 384.25, + pageSize: 4386.01, + totalCount: 6342.74, }; ``` diff --git a/docs/models/operations/changescontrollerapplydiffrequest.md b/docs/models/operations/changescontrollerapplydiffrequest.md index e3765197..96156aad 100644 --- a/docs/models/operations/changescontrollerapplydiffrequest.md +++ b/docs/models/operations/changescontrollerapplydiffrequest.md @@ -6,7 +6,7 @@ import { ChangesControllerApplyDiffRequest } from "@novu/api/models/operations"; let value: ChangesControllerApplyDiffRequest = { - changeId: "", + changeId: "", }; ``` diff --git a/docs/models/operations/changescontrollergetchangesrequest.md b/docs/models/operations/changescontrollergetchangesrequest.md index 31a1a883..6c032e39 100644 --- a/docs/models/operations/changescontrollergetchangesrequest.md +++ b/docs/models/operations/changescontrollergetchangesrequest.md @@ -6,7 +6,7 @@ import { ChangesControllerGetChangesRequest } from "@novu/api/models/operations"; let value: ChangesControllerGetChangesRequest = { - promoted: "false", + promoted: "false", }; ``` diff --git a/docs/models/operations/eventscontrollercancelrequest.md b/docs/models/operations/eventscontrollercancelrequest.md index d4e452f7..e66845f7 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/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md index eb1fd426..9e5fbef5 100644 --- a/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md +++ b/docs/models/operations/executiondetailscontrollergetexecutiondetailsfornotificationrequest.md @@ -5,10 +5,11 @@ ```typescript import { ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest } from "@novu/api/models/operations"; -let value: ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { +let value: ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = + { notificationId: "", subscriberId: "", -}; + }; ``` ## Fields diff --git a/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md b/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md index 44dc17fb..179af31c 100644 --- a/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md +++ b/docs/models/operations/feedscontrollerdeletefeedbyidrequest.md @@ -6,7 +6,7 @@ import { FeedsControllerDeleteFeedByIdRequest } from "@novu/api/models/operations"; let value: FeedsControllerDeleteFeedByIdRequest = { - feedId: "", + feedId: "", }; ``` diff --git a/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md b/docs/models/operations/integrationscontrollergetwebhooksupportstatusrequest.md index 3e0b88d8..3495cb1c 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/integrationscontrollerremoveintegrationrequest.md b/docs/models/operations/integrationscontrollerremoveintegrationrequest.md index 8aa58a3f..6dfbb687 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/integrationscontrollersetintegrationasprimaryrequest.md b/docs/models/operations/integrationscontrollersetintegrationasprimaryrequest.md index ee25065a..bca2b6c6 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/integrationscontrollerupdateintegrationbyidrequest.md b/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md index 0f8e0f4c..d277b527 100644 --- a/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md +++ b/docs/models/operations/integrationscontrollerupdateintegrationbyidrequest.md @@ -6,8 +6,8 @@ import { IntegrationsControllerUpdateIntegrationByIdRequest } from "@novu/api/models/operations"; let value: IntegrationsControllerUpdateIntegrationByIdRequest = { - integrationId: "", - updateIntegrationRequestDto: {}, + integrationId: "", + updateIntegrationRequestDto: {}, }; ``` diff --git a/docs/models/operations/layoutscontrollerdeletelayoutrequest.md b/docs/models/operations/layoutscontrollerdeletelayoutrequest.md index 5cee7b5c..27ca6443 100644 --- a/docs/models/operations/layoutscontrollerdeletelayoutrequest.md +++ b/docs/models/operations/layoutscontrollerdeletelayoutrequest.md @@ -6,7 +6,7 @@ import { LayoutsControllerDeleteLayoutRequest } from "@novu/api/models/operations"; let value: LayoutsControllerDeleteLayoutRequest = { - layoutId: "", + layoutId: "", }; ``` diff --git a/docs/models/operations/layoutscontrollergetlayoutrequest.md b/docs/models/operations/layoutscontrollergetlayoutrequest.md index e3e999b8..4bf3c2c1 100644 --- a/docs/models/operations/layoutscontrollergetlayoutrequest.md +++ b/docs/models/operations/layoutscontrollergetlayoutrequest.md @@ -6,7 +6,7 @@ import { LayoutsControllerGetLayoutRequest } from "@novu/api/models/operations"; let value: LayoutsControllerGetLayoutRequest = { - layoutId: "", + layoutId: "", }; ``` diff --git a/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md b/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md index 5d23ae29..b71765e0 100644 --- a/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md +++ b/docs/models/operations/layoutscontrollersetdefaultlayoutrequest.md @@ -6,7 +6,7 @@ import { LayoutsControllerSetDefaultLayoutRequest } from "@novu/api/models/operations"; let value: LayoutsControllerSetDefaultLayoutRequest = { - layoutId: "", + layoutId: "", }; ``` diff --git a/docs/models/operations/layoutscontrollerupdatelayoutrequest.md b/docs/models/operations/layoutscontrollerupdatelayoutrequest.md index fee347f3..cb9215a1 100644 --- a/docs/models/operations/layoutscontrollerupdatelayoutrequest.md +++ b/docs/models/operations/layoutscontrollerupdatelayoutrequest.md @@ -6,10 +6,10 @@ import { LayoutsControllerUpdateLayoutRequest } from "@novu/api/models/operations"; let value: LayoutsControllerUpdateLayoutRequest = { - layoutId: "", - updateLayoutRequestDto: { - identifier: "", - }, + layoutId: "", + updateLayoutRequestDto: { + identifier: "", + }, }; ``` diff --git a/docs/models/operations/messagescontrollerdeletemessagerequest.md b/docs/models/operations/messagescontrollerdeletemessagerequest.md index 19945745..a1bbbf03 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/messagescontrollerdeletemessagesbytransactionidrequest.md b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md index e6f54e31..c0dd0db8 100644 --- a/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md +++ b/docs/models/operations/messagescontrollerdeletemessagesbytransactionidrequest.md @@ -6,7 +6,7 @@ import { MessagesControllerDeleteMessagesByTransactionIdRequest } from "@novu/api/models/operations"; let value: MessagesControllerDeleteMessagesByTransactionIdRequest = { - transactionId: "", + transactionId: "", }; ``` diff --git a/docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md b/docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md index 9b5e0e70..f460ee17 100644 --- a/docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md +++ b/docs/models/operations/notificationgroupscontrollerdeletenotificationgrouprequest.md @@ -6,7 +6,7 @@ import { NotificationGroupsControllerDeleteNotificationGroupRequest } from "@novu/api/models/operations"; let value: NotificationGroupsControllerDeleteNotificationGroupRequest = { - id: "", + id: "", }; ``` diff --git a/docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md b/docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md index 0f57f130..51bff1be 100644 --- a/docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md +++ b/docs/models/operations/notificationgroupscontrollergetnotificationgrouprequest.md @@ -6,7 +6,7 @@ import { NotificationGroupsControllerGetNotificationGroupRequest } from "@novu/api/models/operations"; let value: NotificationGroupsControllerGetNotificationGroupRequest = { - id: "", + id: "", }; ``` diff --git a/docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md b/docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md index b56403f4..464f6cac 100644 --- a/docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md +++ b/docs/models/operations/notificationgroupscontrollerupdatenotificationgrouprequest.md @@ -6,10 +6,10 @@ import { NotificationGroupsControllerUpdateNotificationGroupRequest } from "@novu/api/models/operations"; let value: NotificationGroupsControllerUpdateNotificationGroupRequest = { - id: "", - createNotificationGroupRequestDto: { - name: "", - }, + id: "", + createNotificationGroupRequestDto: { + name: "", + }, }; ``` diff --git a/docs/models/operations/notificationscontrollergetnotificationrequest.md b/docs/models/operations/notificationscontrollergetnotificationrequest.md index b8fadc69..c65e4ea7 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/notificationscontrollerlistnotificationsrequest.md b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md index 1e41be84..8e364fe7 100644 --- a/docs/models/operations/notificationscontrollerlistnotificationsrequest.md +++ b/docs/models/operations/notificationscontrollerlistnotificationsrequest.md @@ -6,11 +6,19 @@ import { NotificationsControllerListNotificationsRequest } from "@novu/api/models/operations"; let value: NotificationsControllerListNotificationsRequest = { - channels: ["email"], - templates: [""], - emails: [""], - search: "", - subscriberIds: [""], + channels: [ + "email", + ], + templates: [ + "", + ], + emails: [ + "", + ], + search: "", + subscriberIds: [ + "", + ], }; ``` diff --git a/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md b/docs/models/operations/subscriberscontrollerchataccessoauthrequest.md index 86769f60..3e083540 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: "", - providerId: "", - hmacHash: "", - environmentId: "", + subscriberId: "", + providerId: "", + hmacHash: "", + environmentId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md b/docs/models/operations/subscriberscontrollerchatoauthcallbackrequest.md index a5f089f1..4c06450b 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: "", - providerId: "", - code: "", - hmacHash: "", - environmentId: "", + subscriberId: "", + providerId: "", + code: "", + hmacHash: "", + environmentId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md b/docs/models/operations/subscriberscontrollerdeletesubscribercredentialsrequest.md index de8d020a..5f7ab572 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/subscriberscontrollergetnotificationsfeedrequest.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md index d91b5962..bbc86de6 100644 --- a/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedrequest.md @@ -6,9 +6,9 @@ import { SubscribersControllerGetNotificationsFeedRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetNotificationsFeedRequest = { - subscriberId: "", - payload: - "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + subscriberId: "", + payload: + "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }; ``` diff --git a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md index fb6fc3cc..60ad4334 100644 --- a/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md +++ b/docs/models/operations/subscriberscontrollergetnotificationsfeedresponsebody.md @@ -6,17 +6,19 @@ import { SubscribersControllerGetNotificationsFeedResponseBody } from "@novu/api/models/operations"; let value: SubscribersControllerGetNotificationsFeedResponseBody = { - data: [ - { - data: [""], - hasMore: false, - page: 6235.1, - pageSize: 1589.69, - }, - ], - hasMore: false, - page: 3380.07, - pageSize: 1103.75, + data: [ + { + data: [ + "", + ], + hasMore: false, + page: 6235.1, + pageSize: 1589.69, + }, + ], + hasMore: false, + page: 3380.07, + pageSize: 1103.75, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md index ac94961f..ae47e412 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberpreferencebylevelrequest.md @@ -6,8 +6,8 @@ import { SubscribersControllerGetSubscriberPreferenceByLevelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - parameter: "Subscriber", - subscriberId: "", + parameter: "Subscriber", + subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollergetsubscriberrequest.md b/docs/models/operations/subscriberscontrollergetsubscriberrequest.md index 580d10aa..50c764a3 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberrequest.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerGetSubscriberRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetSubscriberRequest = { - subscriberId: "", + subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollergetunseencountrequest.md b/docs/models/operations/subscriberscontrollergetunseencountrequest.md index 2acd8436..4d295f52 100644 --- a/docs/models/operations/subscriberscontrollergetunseencountrequest.md +++ b/docs/models/operations/subscriberscontrollergetunseencountrequest.md @@ -6,9 +6,9 @@ import { SubscribersControllerGetUnseenCountRequest } from "@novu/api/models/operations"; let value: SubscribersControllerGetUnseenCountRequest = { - seen: false, - subscriberId: "", - limit: 6747.52, + seen: false, + subscriberId: "", + limit: 6747.52, }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md index 24588586..d1d6edce 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md +++ b/docs/models/operations/subscriberscontrollerlistsubscriberpreferencesrequest.md @@ -6,7 +6,7 @@ import { SubscribersControllerListSubscriberPreferencesRequest } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscriberPreferencesRequest = { - subscriberId: "", + subscriberId: "", }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md index b56856fd..10955de5 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md @@ -6,21 +6,21 @@ import { SubscribersControllerListSubscribersResponse } from "@novu/api/models/operations"; let value: SubscribersControllerListSubscribersResponse = { - result: { - data: [ - { - environmentId: "", - organizationId: "", - createdAt: "", - deleted: false, - subscriberId: "", - updatedAt: "", - }, - ], - hasMore: false, - page: 9953, - pageSize: 6531.08, - }, + result: { + data: [ + { + environmentId: "", + organizationId: "", + createdAt: "", + deleted: false, + subscriberId: "", + updatedAt: "", + }, + ], + hasMore: false, + page: 9953, + pageSize: 6531.08, + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md index accde6f1..6a1b7857 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 = { - data: [ - { - environmentId: "", - organizationId: "", - createdAt: "", - deleted: false, - subscriberId: "", - updatedAt: "", - }, - ], - hasMore: false, - page: 6350.59, - pageSize: 1613.09, + data: [ + { + environmentId: "", + organizationId: "", + createdAt: "", + deleted: false, + subscriberId: "", + updatedAt: "", + }, + ], + hasMore: false, + page: 6350.59, + pageSize: 1613.09, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md index 625dbaf7..6f55f530 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenrequest.md @@ -6,12 +6,12 @@ import { SubscribersControllerMarkActionAsSeenRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkActionAsSeenRequest = { - messageId: "", - type: "", - subscriberId: "", - markMessageActionAsSeenDto: { - status: "pending", - }, + messageId: "", + type: "", + subscriberId: "", + markMessageActionAsSeenDto: { + status: "pending", + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md b/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md index 740d08f0..1955d33c 100644 --- a/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md +++ b/docs/models/operations/subscriberscontrollermarkallunreadasreadrequest.md @@ -6,10 +6,10 @@ import { SubscribersControllerMarkAllUnreadAsReadRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkAllUnreadAsReadRequest = { - subscriberId: "", - markAllMessageAsRequestDto: { - markAs: "seen", - }, + subscriberId: "", + markAllMessageAsRequestDto: { + markAs: "seen", + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md b/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md index 5e54cd40..31fcbb18 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasrequest.md @@ -6,11 +6,11 @@ import { SubscribersControllerMarkMessagesAsRequest } from "@novu/api/models/operations"; let value: SubscribersControllerMarkMessagesAsRequest = { - subscriberId: "", - messageMarkAsRequestDto: { - markAs: "seen", - messageId: "", - }, + subscriberId: "", + messageMarkAsRequestDto: { + markAs: "seen", + messageId: "", + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md index f60209c5..64cf6ce6 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelrequest.md @@ -6,13 +6,13 @@ import { SubscribersControllerModifySubscriberChannelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerModifySubscriberChannelRequest = { - subscriberId: "", - updateSubscriberChannelRequestDto: { - credentials: { - webhookUrl: "", - }, - providerId: 5818.5, + subscriberId: "", + updateSubscriberChannelRequestDto: { + credentials: { + webhookUrl: "", }, + providerId: 5818.5, + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md b/docs/models/operations/subscriberscontrollerremovesubscriberrequest.md index e2c61b95..58779388 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/subscriberscontrollerupdatesubscriberchannelrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md index 621047c3..dad1f5c9 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelrequest.md @@ -6,13 +6,13 @@ import { SubscribersControllerUpdateSubscriberChannelRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberChannelRequest = { - subscriberId: "", - updateSubscriberChannelRequestDto: { - credentials: { - webhookUrl: "", - }, - providerId: 2532.91, + subscriberId: "", + updateSubscriberChannelRequestDto: { + credentials: { + webhookUrl: "", }, + providerId: 2532.91, + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md index 96513c5b..67141d4b 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberglobalpreferencesrequest.md @@ -6,8 +6,8 @@ import { SubscribersControllerUpdateSubscriberGlobalPreferencesRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { - subscriberId: "", - updateSubscriberGlobalPreferencesRequestDto: {}, + subscriberId: "", + updateSubscriberGlobalPreferencesRequestDto: {}, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md index 1918813e..12e63c00 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagrequest.md @@ -6,10 +6,10 @@ import { SubscribersControllerUpdateSubscriberOnlineFlagRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberOnlineFlagRequest = { - subscriberId: "", - updateSubscriberOnlineFlagRequestDto: { - isOnline: false, - }, + subscriberId: "", + updateSubscriberOnlineFlagRequestDto: { + isOnline: false, + }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md index a1f6b87b..2f770b13 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberpreferencerequest.md @@ -6,9 +6,9 @@ import { SubscribersControllerUpdateSubscriberPreferenceRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberPreferenceRequest = { - subscriberId: "", - parameter: "", - updateSubscriberPreferenceRequestDto: {}, + subscriberId: "", + parameter: "", + updateSubscriberPreferenceRequestDto: {}, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md b/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md index 2fd3a73a..99bcdc5e 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md @@ -6,8 +6,8 @@ import { SubscribersControllerUpdateSubscriberRequest } from "@novu/api/models/operations"; let value: SubscribersControllerUpdateSubscriberRequest = { - subscriberId: "", - updateSubscriberRequestDto: {}, + subscriberId: "", + updateSubscriberRequestDto: {}, }; ``` diff --git a/docs/models/operations/tenantcontrollergettenantbyidrequest.md b/docs/models/operations/tenantcontrollergettenantbyidrequest.md index ac956fb2..a933feac 100644 --- a/docs/models/operations/tenantcontrollergettenantbyidrequest.md +++ b/docs/models/operations/tenantcontrollergettenantbyidrequest.md @@ -6,7 +6,7 @@ import { TenantControllerGetTenantByIdRequest } from "@novu/api/models/operations"; let value: TenantControllerGetTenantByIdRequest = { - identifier: "", + identifier: "", }; ``` diff --git a/docs/models/operations/tenantcontrollerlisttenantsresponse.md b/docs/models/operations/tenantcontrollerlisttenantsresponse.md index 9c54d368..f9ea5e5f 100644 --- a/docs/models/operations/tenantcontrollerlisttenantsresponse.md +++ b/docs/models/operations/tenantcontrollerlisttenantsresponse.md @@ -6,20 +6,20 @@ 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, - }, + result: { + data: [ + { + environmentId: "", + id: "", + createdAt: "", + identifier: "", + updatedAt: "", + }, + ], + hasMore: false, + page: 1965.82, + pageSize: 9495.72, + }, }; ``` diff --git a/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md b/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md index 43d3f54b..a6ca341e 100644 --- a/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md +++ b/docs/models/operations/tenantcontrollerlisttenantsresponsebody.md @@ -6,18 +6,18 @@ import { TenantControllerListTenantsResponseBody } from "@novu/api/models/operations"; let value: TenantControllerListTenantsResponseBody = { - data: [ - { - environmentId: "", - id: "", - createdAt: "", - identifier: "", - updatedAt: "", - }, - ], - hasMore: false, - page: 1381.83, - pageSize: 7783.46, + data: [ + { + environmentId: "", + id: "", + createdAt: "", + identifier: "", + updatedAt: "", + }, + ], + hasMore: false, + page: 1381.83, + pageSize: 7783.46, }; ``` diff --git a/docs/models/operations/tenantcontrollerremovetenantrequest.md b/docs/models/operations/tenantcontrollerremovetenantrequest.md index eaf07da3..481cd4ba 100644 --- a/docs/models/operations/tenantcontrollerremovetenantrequest.md +++ b/docs/models/operations/tenantcontrollerremovetenantrequest.md @@ -6,7 +6,7 @@ import { TenantControllerRemoveTenantRequest } from "@novu/api/models/operations"; let value: TenantControllerRemoveTenantRequest = { - identifier: "", + identifier: "", }; ``` diff --git a/docs/models/operations/tenantcontrollerupdatetenantrequest.md b/docs/models/operations/tenantcontrollerupdatetenantrequest.md index 625191ad..478d5d89 100644 --- a/docs/models/operations/tenantcontrollerupdatetenantrequest.md +++ b/docs/models/operations/tenantcontrollerupdatetenantrequest.md @@ -6,8 +6,8 @@ import { TenantControllerUpdateTenantRequest } from "@novu/api/models/operations"; let value: TenantControllerUpdateTenantRequest = { - identifier: "", - updateTenantRequestDto: {}, + identifier: "", + updateTenantRequestDto: {}, }; ``` diff --git a/docs/models/operations/topicscontrolleraddsubscribersrequest.md b/docs/models/operations/topicscontrolleraddsubscribersrequest.md index bac4e298..d618fb15 100644 --- a/docs/models/operations/topicscontrolleraddsubscribersrequest.md +++ b/docs/models/operations/topicscontrolleraddsubscribersrequest.md @@ -6,10 +6,12 @@ import { TopicsControllerAddSubscribersRequest } from "@novu/api/models/operations"; let value: TopicsControllerAddSubscribersRequest = { - topicKey: "", - addSubscribersRequestDto: { - subscribers: [""], - }, + topicKey: "", + addSubscribersRequestDto: { + subscribers: [ + "", + ], + }, }; ``` diff --git a/docs/models/operations/topicscontrollerdeletetopicrequest.md b/docs/models/operations/topicscontrollerdeletetopicrequest.md index bb852cb5..91fa24c2 100644 --- a/docs/models/operations/topicscontrollerdeletetopicrequest.md +++ b/docs/models/operations/topicscontrollerdeletetopicrequest.md @@ -6,7 +6,7 @@ import { TopicsControllerDeleteTopicRequest } from "@novu/api/models/operations"; let value: TopicsControllerDeleteTopicRequest = { - topicKey: "", + topicKey: "", }; ``` diff --git a/docs/models/operations/topicscontrollergettopicrequest.md b/docs/models/operations/topicscontrollergettopicrequest.md index d2598bc6..10c3e7ba 100644 --- a/docs/models/operations/topicscontrollergettopicrequest.md +++ b/docs/models/operations/topicscontrollergettopicrequest.md @@ -6,7 +6,7 @@ import { TopicsControllerGetTopicRequest } from "@novu/api/models/operations"; let value: TopicsControllerGetTopicRequest = { - topicKey: "", + topicKey: "", }; ``` diff --git a/docs/models/operations/topicscontrollergettopicsubscriberrequest.md b/docs/models/operations/topicscontrollergettopicsubscriberrequest.md index 4820002d..98b9f2d6 100644 --- a/docs/models/operations/topicscontrollergettopicsubscriberrequest.md +++ b/docs/models/operations/topicscontrollergettopicsubscriberrequest.md @@ -6,8 +6,8 @@ import { TopicsControllerGetTopicSubscriberRequest } from "@novu/api/models/operations"; let value: TopicsControllerGetTopicSubscriberRequest = { - externalSubscriberId: "", - topicKey: "", + externalSubscriberId: "", + topicKey: "", }; ``` diff --git a/docs/models/operations/topicscontrollerremovesubscribersrequest.md b/docs/models/operations/topicscontrollerremovesubscribersrequest.md index 339dc820..2120c9fe 100644 --- a/docs/models/operations/topicscontrollerremovesubscribersrequest.md +++ b/docs/models/operations/topicscontrollerremovesubscribersrequest.md @@ -6,10 +6,12 @@ import { TopicsControllerRemoveSubscribersRequest } from "@novu/api/models/operations"; let value: TopicsControllerRemoveSubscribersRequest = { - topicKey: "", - removeSubscribersRequestDto: { - subscribers: [""], - }, + topicKey: "", + removeSubscribersRequestDto: { + subscribers: [ + "", + ], + }, }; ``` diff --git a/docs/models/operations/topicscontrollerrenametopicrequest.md b/docs/models/operations/topicscontrollerrenametopicrequest.md index 6ba308ab..8f50fa1d 100644 --- a/docs/models/operations/topicscontrollerrenametopicrequest.md +++ b/docs/models/operations/topicscontrollerrenametopicrequest.md @@ -6,10 +6,10 @@ import { TopicsControllerRenameTopicRequest } from "@novu/api/models/operations"; let value: TopicsControllerRenameTopicRequest = { - topicKey: "", - renameTopicRequestDto: { - name: "", - }, + topicKey: "", + renameTopicRequestDto: { + name: "", + }, }; ``` diff --git a/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md b/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md index cd20c8b4..a433199c 100644 --- a/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md +++ b/docs/models/operations/workflowcontrollerdeleteworkflowbyidrequest.md @@ -6,7 +6,7 @@ import { WorkflowControllerDeleteWorkflowByIdRequest } from "@novu/api/models/operations"; let value: WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: "", + workflowId: "", }; ``` diff --git a/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md b/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md index efd0872b..dc02856f 100644 --- a/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md +++ b/docs/models/operations/workflowcontrollergetworkflowbyidrequest.md @@ -6,7 +6,7 @@ import { WorkflowControllerGetWorkflowByIdRequest } from "@novu/api/models/operations"; let value: WorkflowControllerGetWorkflowByIdRequest = { - workflowId: "", + workflowId: "", }; ``` diff --git a/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md b/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md index 0e81bdd5..20487685 100644 --- a/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md +++ b/docs/models/operations/workflowcontrollerupdateactivestatusrequest.md @@ -6,10 +6,10 @@ import { WorkflowControllerUpdateActiveStatusRequest } from "@novu/api/models/operations"; let value: WorkflowControllerUpdateActiveStatusRequest = { - workflowId: "", - changeWorkflowStatusRequestDto: { - active: false, - }, + workflowId: "", + changeWorkflowStatusRequestDto: { + active: false, + }, }; ``` diff --git a/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md b/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md index 51e8c4e2..6aeea8aa 100644 --- a/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md +++ b/docs/models/operations/workflowcontrollerupdateworkflowbyidrequest.md @@ -6,11 +6,11 @@ import { WorkflowControllerUpdateWorkflowByIdRequest } from "@novu/api/models/operations"; let value: WorkflowControllerUpdateWorkflowByIdRequest = { - workflowId: "", - updateWorkflowRequestDto: { - name: "", - notificationGroupId: "", - }, + workflowId: "", + updateWorkflowRequestDto: { + name: "", + notificationGroupId: "", + }, }; ``` diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index 35ddd53b..65113f9f 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -22,7 +22,7 @@ const novu = new Novu({ async function run() { const result = await novu.environments.apiKeys.list(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index ffaf21ba..0dc8b9a7 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -28,8 +28,6 @@ async function run() { hmacHash: "", environmentId: "", }); - - } run(); @@ -110,7 +108,7 @@ async function run() { hmacHash: "", environmentId: "", }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/changes/README.md b/docs/sdks/changes/README.md index cb800114..f7fb7a41 100644 --- a/docs/sdks/changes/README.md +++ b/docs/sdks/changes/README.md @@ -28,7 +28,7 @@ const novu = new Novu({ async function run() { const result = await novu.changes.apply(""); - + // Handle the result console.log(result) } @@ -105,7 +105,7 @@ async function run() { "", ], }); - + // Handle the result console.log(result) } @@ -182,7 +182,7 @@ const novu = new Novu({ async function run() { const result = await novu.changes.count(); - + // Handle the result console.log(result) } @@ -256,7 +256,7 @@ async function run() { const result = await novu.changes.retrieve({ promoted: "false", }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/credentials/README.md b/docs/sdks/credentials/README.md index 4b43129c..317edc59 100644 --- a/docs/sdks/credentials/README.md +++ b/docs/sdks/credentials/README.md @@ -30,7 +30,7 @@ async function run() { }, providerId: 3462.44, }); - + // Handle the result console.log(result) } @@ -57,7 +57,7 @@ async function run() { credentials: { webhookUrl: "", }, - providerId: 5829.63, + providerId: 3462.44, }); if (!res.ok) { @@ -109,8 +109,6 @@ const novu = new Novu({ async function run() { await novu.subscribers.credentials.delete("", ""); - - } run(); @@ -186,7 +184,7 @@ async function run() { }, providerId: 8574.78, }); - + // Handle the result console.log(result) } @@ -213,7 +211,7 @@ async function run() { credentials: { webhookUrl: "", }, - providerId: 5971.29, + providerId: 8574.78, }); if (!res.ok) { diff --git a/docs/sdks/environments/README.md b/docs/sdks/environments/README.md index fa6ac560..172b211b 100644 --- a/docs/sdks/environments/README.md +++ b/docs/sdks/environments/README.md @@ -26,7 +26,7 @@ const novu = new Novu({ async function run() { const result = await novu.environments.list(); - + // Handle the result console.log(result) } @@ -98,7 +98,7 @@ const novu = new Novu({ async function run() { const result = await novu.environments.retrieve(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/executiondetails/README.md b/docs/sdks/executiondetails/README.md index 9d87719e..6697b90a 100644 --- a/docs/sdks/executiondetails/README.md +++ b/docs/sdks/executiondetails/README.md @@ -25,7 +25,7 @@ const novu = new Novu({ async function run() { const result = await novu.executionDetails.retrieve("", ""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/feeds/README.md b/docs/sdks/feeds/README.md index c6aac119..34e12f2b 100644 --- a/docs/sdks/feeds/README.md +++ b/docs/sdks/feeds/README.md @@ -29,7 +29,7 @@ async function run() { const result = await novu.feeds.create({ name: "", }); - + // Handle the result console.log(result) } @@ -104,7 +104,7 @@ const novu = new Novu({ async function run() { const result = await novu.feeds.delete(""); - + // Handle the result console.log(result) } @@ -177,7 +177,7 @@ const novu = new Novu({ async function run() { const result = await novu.feeds.retrieve(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index 672704a6..07d5f7c9 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -33,7 +33,7 @@ async function run() { channel: "sms", providerId: "", }); - + // Handle the result console.log(result) } @@ -57,7 +57,7 @@ const novu = new NovuCore({ async function run() { const res = await integrationsCreate(novu, { - channel: "chat", + channel: "sms", providerId: "", }); @@ -109,7 +109,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.delete(""); - + // Handle the result console.log(result) } @@ -182,7 +182,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.list(); - + // Handle the result console.log(result) } @@ -254,7 +254,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.listActive(); - + // Handle the result console.log(result) } @@ -326,7 +326,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.setAsPrimary(""); - + // Handle the result console.log(result) } @@ -399,7 +399,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.update("", {}); - + // Handle the result console.log(result) } diff --git a/docs/sdks/layouts/README.md b/docs/sdks/layouts/README.md index af14baaa..5dc0ea87 100644 --- a/docs/sdks/layouts/README.md +++ b/docs/sdks/layouts/README.md @@ -30,7 +30,7 @@ const novu = new Novu({ async function run() { const result = await novu.layouts.create(); - + // Handle the result console.log(result) } @@ -102,8 +102,6 @@ const novu = new Novu({ async function run() { await novu.layouts.delete(""); - - } run(); @@ -173,8 +171,6 @@ const novu = new Novu({ async function run() { await novu.layouts.list({}); - - } run(); @@ -244,7 +240,7 @@ const novu = new Novu({ async function run() { const result = await novu.layouts.retrieve(""); - + // Handle the result console.log(result) } @@ -317,8 +313,6 @@ const novu = new Novu({ async function run() { await novu.layouts.setAsDefault(""); - - } run(); @@ -390,7 +384,7 @@ async function run() { const result = await novu.layouts.update("", { identifier: "", }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index 438178bf..25aea245 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -27,7 +27,7 @@ const novu = new Novu({ async function run() { const result = await novu.messages.delete(""); - + // Handle the result console.log(result) } @@ -100,8 +100,6 @@ const novu = new Novu({ async function run() { await novu.messages.deleteByTransactionId(""); - - } run(); @@ -172,7 +170,7 @@ const novu = new Novu({ async function run() { const result = await novu.messages.retrieve({}); - + // Handle the result console.log(result) } diff --git a/docs/sdks/notifications/README.md b/docs/sdks/notifications/README.md index 8753ad2a..f8ef411c 100644 --- a/docs/sdks/notifications/README.md +++ b/docs/sdks/notifications/README.md @@ -37,7 +37,7 @@ async function run() { "", ], }); - + // Handle the result console.log(result) } @@ -124,7 +124,7 @@ const novu = new Novu({ async function run() { const result = await novu.notifications.retrieve(""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index a44ef13e..05b13556 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -32,7 +32,7 @@ const novu = new Novu({ async function run() { const result = await novu.cancel(""); - + // Handle the result console.log(result) } @@ -119,7 +119,7 @@ async function run() { }, ], }); - + // Handle the result console.log(result) } @@ -207,7 +207,7 @@ async function run() { overrides: {}, payload: {}, }); - + // Handle the result console.log(result) } @@ -291,7 +291,7 @@ async function run() { ], }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/novumessages/README.md b/docs/sdks/novumessages/README.md index 834fa8d1..a4e794a6 100644 --- a/docs/sdks/novumessages/README.md +++ b/docs/sdks/novumessages/README.md @@ -26,7 +26,7 @@ async function run() { const result = await novu.subscribers.messages.markAll("", { markAs: "seen", }); - + // Handle the result console.log(result) } @@ -105,7 +105,7 @@ async function run() { markAs: "seen", messageId: "", }); - + // Handle the result console.log(result) } @@ -129,7 +129,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersMessagesMarkAllAs(novu, "", { - markAs: "read", + markAs: "seen", messageId: "", }); @@ -189,7 +189,7 @@ async function run() { status: "done", }, }); - + // Handle the result console.log(result) } @@ -217,7 +217,7 @@ async function run() { type: "", subscriberId: "", markMessageActionAsSeenDto: { - status: "pending", + status: "done", }, }); diff --git a/docs/sdks/novunotifications/README.md b/docs/sdks/novunotifications/README.md index ea735858..d0d6c0a6 100644 --- a/docs/sdks/novunotifications/README.md +++ b/docs/sdks/novunotifications/README.md @@ -26,7 +26,7 @@ async function run() { subscriberId: "", payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }); - + // Handle the result console.log(result) } @@ -102,11 +102,11 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.notifications.unseenCount({ - seen: false, + seen: true, subscriberId: "", - limit: 2166.35, + limit: 4322.81, }); - + // Handle the result console.log(result) } @@ -130,9 +130,9 @@ const novu = new NovuCore({ async function run() { const res = await subscribersNotificationsUnseenCount(novu, { - seen: false, + seen: true, subscriberId: "", - limit: 4327.98, + limit: 4322.81, }); if (!res.ok) { diff --git a/docs/sdks/novusubscribers/README.md b/docs/sdks/novusubscribers/README.md index d2edd7bf..56b39a52 100644 --- a/docs/sdks/novusubscribers/README.md +++ b/docs/sdks/novusubscribers/README.md @@ -28,8 +28,6 @@ async function run() { "", ], }); - - } run(); @@ -108,8 +106,6 @@ async function run() { "", ], }); - - } run(); @@ -184,7 +180,7 @@ const novu = new Novu({ async function run() { const result = await novu.topics.subscribers.retrieve("", ""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 736c0018..a6a2ac8f 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -29,7 +29,7 @@ async function run() { const result = await novu.organizations.eeOrganizationControllerRenameOrganization({ name: "", }); - + // Handle the result console.log(result) } @@ -104,7 +104,7 @@ const novu = new Novu({ async function run() { const result = await novu.organizations.retrieve(); - + // Handle the result console.log(result) } @@ -181,7 +181,7 @@ async function run() { fontColor: "", logo: "", }); - + // Handle the result console.log(result) } @@ -205,7 +205,7 @@ const novu = new NovuCore({ async function run() { const res = await organizationsUpdate(novu, { - color: "plum", + color: "fuchsia", contentBackground: "", fontColor: "", logo: "", diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md index 206a737a..04f72141 100644 --- a/docs/sdks/preferences/README.md +++ b/docs/sdks/preferences/README.md @@ -25,7 +25,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.preferences.list(""); - + // Handle the result console.log(result) } @@ -98,7 +98,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.preferences.retrieveByLevel("Topic", ""); - + // Handle the result console.log(result) } @@ -121,7 +121,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersPreferencesRetrieveByLevel(novu, "Subscriber", ""); + const res = await subscribersPreferencesRetrieveByLevel(novu, "Topic", ""); if (!res.ok) { throw res.error; @@ -176,7 +176,7 @@ async function run() { parameter: "", updateSubscriberPreferenceRequestDto: {}, }); - + // Handle the result console.log(result) } @@ -253,7 +253,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.preferences.updateGlobal("", {}); - + // Handle the result console.log(result) } diff --git a/docs/sdks/properties/README.md b/docs/sdks/properties/README.md index 983a2330..cf996e87 100644 --- a/docs/sdks/properties/README.md +++ b/docs/sdks/properties/README.md @@ -24,7 +24,7 @@ async function run() { const result = await novu.subscribers.properties.updateOnlineFlag("", { isOnline: false, }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/stats/README.md b/docs/sdks/stats/README.md index 3997e6c3..4fc48b3b 100644 --- a/docs/sdks/stats/README.md +++ b/docs/sdks/stats/README.md @@ -23,7 +23,7 @@ const novu = new Novu({ async function run() { const result = await novu.notifications.stats.graph(); - + // Handle the result console.log(result) } @@ -96,7 +96,7 @@ const novu = new Novu({ async function run() { const result = await novu.notifications.stats.retrieve(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/status/README.md b/docs/sdks/status/README.md index 3f263ee5..1444bcb0 100644 --- a/docs/sdks/status/README.md +++ b/docs/sdks/status/README.md @@ -24,7 +24,7 @@ async function run() { const result = await novu.workflows.status.update("", { active: false, }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/subscribers/README.md b/docs/sdks/subscribers/README.md index 157012b1..72c03327 100644 --- a/docs/sdks/subscribers/README.md +++ b/docs/sdks/subscribers/README.md @@ -32,7 +32,7 @@ async function run() { const result = await novu.subscribers.create({ subscriberId: "", }); - + // Handle the result console.log(result) } @@ -114,8 +114,6 @@ async function run() { "", ], }); - - } run(); @@ -189,7 +187,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.delete(""); - + // Handle the result console.log(result) } @@ -262,7 +260,7 @@ 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); @@ -340,7 +338,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.retrieve(""); - + // Handle the result console.log(result) } @@ -413,7 +411,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.update("", {}); - + // Handle the result console.log(result) } diff --git a/docs/sdks/tenants/README.md b/docs/sdks/tenants/README.md index 33e24622..db8e9564 100644 --- a/docs/sdks/tenants/README.md +++ b/docs/sdks/tenants/README.md @@ -32,7 +32,7 @@ async function run() { identifier: "", name: "", }); - + // Handle the result console.log(result) } @@ -108,8 +108,6 @@ const novu = new Novu({ async function run() { await novu.tenants.delete(""); - - } run(); @@ -179,7 +177,7 @@ const novu = new Novu({ async function run() { const result = await novu.tenants.list(); - + for await (const page of result) { // Handle the page console.log(page); @@ -257,7 +255,7 @@ const novu = new Novu({ async function run() { const result = await novu.tenants.retrieve(""); - + // Handle the result console.log(result) } @@ -330,7 +328,7 @@ const novu = new Novu({ async function run() { const result = await novu.tenants.update("", {}); - + // Handle the result console.log(result) } diff --git a/docs/sdks/topics/README.md b/docs/sdks/topics/README.md index a2d35d88..184309c9 100644 --- a/docs/sdks/topics/README.md +++ b/docs/sdks/topics/README.md @@ -32,7 +32,7 @@ async function run() { key: "", name: "", }); - + // Handle the result console.log(result) } @@ -108,8 +108,6 @@ const novu = new Novu({ async function run() { await novu.topics.delete(""); - - } run(); @@ -179,7 +177,7 @@ const novu = new Novu({ async function run() { const result = await novu.topics.list({}); - + // Handle the result console.log(result) } @@ -254,7 +252,7 @@ async function run() { const result = await novu.topics.rename("", { name: "", }); - + // Handle the result console.log(result) } @@ -330,7 +328,7 @@ const novu = new Novu({ async function run() { const result = await novu.topics.retrieve(""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/variables/README.md b/docs/sdks/variables/README.md index 94bc07ac..df67e49c 100644 --- a/docs/sdks/variables/README.md +++ b/docs/sdks/variables/README.md @@ -22,7 +22,7 @@ const novu = new Novu({ async function run() { const result = await novu.workflows.variables.retrieve(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 2e933e03..9002ec87 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -22,7 +22,7 @@ const novu = new Novu({ async function run() { const result = await novu.integrations.webhooks.retrieve(""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/workflowgroups/README.md b/docs/sdks/workflowgroups/README.md index 03fef41e..5b30be03 100644 --- a/docs/sdks/workflowgroups/README.md +++ b/docs/sdks/workflowgroups/README.md @@ -30,7 +30,7 @@ async function run() { const result = await novu.workflowGroups.create({ name: "", }); - + // Handle the result console.log(result) } @@ -104,8 +104,8 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.delete(""); - + const result = await novu.workflowGroups.delete(""); + // Handle the result console.log(result) } @@ -128,7 +128,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsDelete(novu, ""); + const res = await workflowGroupsDelete(novu, ""); if (!res.ok) { throw res.error; @@ -178,7 +178,7 @@ const novu = new Novu({ async function run() { const result = await novu.workflowGroups.list(); - + // Handle the result console.log(result) } @@ -249,8 +249,8 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.retrieve(""); - + const result = await novu.workflowGroups.retrieve(""); + // Handle the result console.log(result) } @@ -273,7 +273,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsRetrieve(novu, ""); + const res = await workflowGroupsRetrieve(novu, ""); if (!res.ok) { throw res.error; @@ -322,10 +322,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.workflowGroups.update("", { + const result = await novu.workflowGroups.update("", { name: "", }); - + // Handle the result console.log(result) } @@ -348,7 +348,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await workflowGroupsUpdate(novu, "", { + const res = await workflowGroupsUpdate(novu, "", { name: "", }); diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index d0bf56b0..184dc471 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -35,7 +35,7 @@ async function run() { ], }); - + // Handle the result console.log(result) } @@ -114,7 +114,7 @@ const novu = new Novu({ async function run() { const result = await novu.workflows.delete(""); - + // Handle the result console.log(result) } @@ -187,7 +187,7 @@ const novu = new Novu({ async function run() { const result = await novu.workflows.list({}); - + // Handle the result console.log(result) } @@ -260,7 +260,7 @@ const novu = new Novu({ async function run() { const result = await novu.workflows.retrieve(""); - + // Handle the result console.log(result) } @@ -336,7 +336,7 @@ async function run() { name: "", notificationGroupId: "", }); - + // Handle the result console.log(result) } diff --git a/jsr.json b/jsr.json index f582fa1f..081fbdb7 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.10", + "version": "0.0.1-alpha.11", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index ef596a9b..332335e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.10", + "version": "0.0.1-alpha.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.0.1-alpha.10", + "version": "0.0.1-alpha.11", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 1062ff02..d84a765c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@novu/api", - "version": "0.0.1-alpha.10", + "version": "0.0.1-alpha.11", "author": "Novu", "main": "./index.js", "sideEffects": false, @@ -11,7 +11,7 @@ "scripts": { "lint": "eslint --max-warnings=0 src", "build": "tsc", - "prepare": "npm run build" + "prepublishOnly": "npm run build" }, "peerDependencies": { "zod": ">= 3" diff --git a/sources/code-samples.yaml b/sources/code-samples.yaml index 088fb282..5956a4d6 100644 --- a/sources/code-samples.yaml +++ b/sources/code-samples.yaml @@ -3,507 +3,507 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/v1/notification-groups"]["get"] + - target: $["paths"]["/v1/changes"]["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/organizations/me"]["get"] + "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": "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();" - - target: $["paths"]["/v1/integrations/active"]["get"] + "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": "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/{integrationId}/set-primary"]["post"] + "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": "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/subscribers/{subscriberId}/preferences"]["get"] + "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": "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"] + "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();" + - target: $["paths"]["/v1/environments/api-keys"]["get"] 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/messages"]["get"] + "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();" + - target: $["paths"]["/v1/environments/me"]["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/workflows/{workflowId}"]["delete"] + "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();" + - target: $["paths"]["/v1/events/trigger"]["post"] 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/notification-groups"]["post"] + "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();" + - target: $["paths"]["/v1/events/trigger/broadcast"]["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/organizations/branding"]["put"] + "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();" + - target: $["paths"]["/v1/events/trigger/bulk"]["post"] 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/integrations/{integrationId}"]["delete"] + "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();" + - target: $["paths"]["/v1/events/trigger/{transactionId}"]["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/subscribers/{subscriberId}/credentials"]["put"] + "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": "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();" - - target: $["paths"]["/v1/layouts"]["post"] + "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": "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"]["get"] + "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": "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/events/trigger/bulk"]["post"] + "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": "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();" - - target: $["paths"]["/v1/environments"]["get"] + "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();" + - target: $["paths"]["/v1/integrations"]["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();" - - target: $["paths"]["/v1/workflows"]["post"] + "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": "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/layouts/{layoutId}"]["patch"] + "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": "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/topics/{topicKey}"]["patch"] + "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": "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"] + "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": "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\nrun();" - - target: $["paths"]["/v1/layouts/{layoutId}"]["get"] + "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": "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/tenants/{identifier}"]["patch"] + "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": "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();" - - target: $["paths"]["/v1/subscribers/{subscriberId}"]["get"] + "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": "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}/notifications/feed"]["get"] + "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": "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();" + "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 \n}\n\nrun();" - - target: $["paths"]["/v1/topics"]["post"] + "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": "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();" - - target: $["paths"]["/v1/integrations/{integrationId}"]["put"] + "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": "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/changes/{changeId}/apply"]["post"] + "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": "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/subscribers/{subscriberId}"]["delete"] + "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();" + - target: $["paths"]["/v1/messages"]["get"] 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/layouts/{layoutId}/default"]["post"] + "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": "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 \n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}"]["put"] + "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();" + - target: $["paths"]["/v1/messages/{messageId}"]["delete"] 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/integrations"]["get"] + "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": "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"] + "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": "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/webhook/provider/{providerOrIntegrationId}/status"]["get"] + "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": "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/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback"]["get"] + "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": "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/feeds/{feedId}"]["delete"] + "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": "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();" - - target: $["paths"]["/v1/tenants"]["post"] + "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": "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/notifications/{notificationId}"]["get"] + "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();" + - target: $["paths"]["/v1/notifications/graph/stats"]["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/changes"]["get"] + "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": "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/subscribers"]["post"] + "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": "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/topics"]["get"] + "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": "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/events/trigger"]["post"] + "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": "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();" - - target: $["paths"]["/v1/organizations"]["patch"] + "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_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/subscribers/{subscriberId}/notifications/unseen"]["get"] + "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();" + - target: $["paths"]["/v1/subscribers"]["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: false,\n subscriberId: \"\",\n limit: 2166.35,\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/mark-as"]["post"] + "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_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();" - - target: $["paths"]["/v1/environments/api-keys"]["get"] + "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": "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();" - - target: $["paths"]["/v1/workflows/{workflowId}"]["get"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}"]["delete"] 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/notification-groups/{id}"]["delete"] + "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": "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/subscribers/bulk"]["post"] + "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_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();" + "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: \"\",\n },\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - - target: $["paths"]["/v1/messages/transaction/{transactionId}"]["delete"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials"]["put"] 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/tenants"]["get"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}"]["delete"] 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/events/trigger/broadcast"]["post"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth"]["get"] 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();" - - target: $["paths"]["/v1/execution-details"]["get"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback"]["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/workflows"]["get"] + "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": "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/notifications/stats"]["get"] + "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": "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/changes/bulk/apply"]["post"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}"]["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/feeds"]["post"] + "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": "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/tenants/{identifier}"]["delete"] + "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": "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 \n}\n\nrun();" - - target: $["paths"]["/v1/notifications"]["get"] + "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();" + - target: $["paths"]["/v1/subscribers/{subscriberId}/online-status"]["patch"] 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();" - - target: $["paths"]["/v1/subscribers/{subscriberId}/preferences/{parameter}"]["get"] + "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_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();" - - target: $["paths"]["/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}"]["post"] + "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_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}/credentials/{providerId}"]["delete"] + "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_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();" + "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();" - 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/{topicKey}/subscribers/removal"]["post"] + "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": "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\nrun();" - - target: $["paths"]["/v1/events/trigger/{transactionId}"]["delete"] + "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": "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/notifications/graph/stats"]["get"] + "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": "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/notification-groups/{id}"]["get"] + "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": "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/subscribers/{subscriberId}"]["put"] + "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": "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/{providerId}/oauth"]["get"] + "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();" + - target: $["paths"]["/v1/topics"]["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/topics/{topicKey}"]["delete"] + "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_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 \n}\n\nrun();" - - target: $["paths"]["/v1/workflows/{workflowId}/status"]["put"] + "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();" + - target: $["paths"]["/v1/topics/{topicKey}"]["delete"] 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();" - - target: $["paths"]["/v1/notification-groups/{id}"]["patch"] + "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();" + - target: $["paths"]["/v1/topics/{topicKey}"]["get"] 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/subscribers/{subscriberId}/online-status"]["patch"] + "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": "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}/messages/mark-all"]["post"] + "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": "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/messages/{messageId}"]["delete"] + "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();" + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/removal"]["post"] 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/topics/{topicKey}"]["get"] + "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();" + - target: $["paths"]["/v1/topics/{topicKey}/subscribers/{externalSubscriberId}"]["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/tenants/{identifier}"]["get"] + "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": "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/environments/me"]["get"] + "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": "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": "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/changes/count"]["get"] + "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": "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/subscribers"]["get"] + "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": "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/feeds"]["get"] + "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": "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/topics/{topicKey}/subscribers/{externalSubscriberId}"]["get"] + "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": "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();" + "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();" diff --git a/sources/json-development.json b/sources/json-development.json index 40dd42fa..8d42fbdd 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -3714,11 +3714,11 @@ "in": "path", "description": "the preferences level to be retrieved( Subscriber / Topic) ", "schema": { - "type": "string", "enum": [ "Subscriber", "Topic" - ] + ], + "type": "string" } }, { @@ -8402,6 +8402,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" }, diff --git a/src/funcs/cancel.ts b/src/funcs/cancel.ts index 91909877..af85b536 100644 --- a/src/funcs/cancel.ts +++ b/src/funcs/cancel.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,115 +29,112 @@ import { Result } from "../types/fp.js"; * * 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... - * */ export async function cancel( - client$: NovuCore, - transactionId: string, - options?: RequestOptions + client$: NovuCore, + transactionId: string, + options?: RequestOptions, ): Promise< - Result< - components.DataBooleanDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DataBooleanDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.EventsControllerCancelRequest = { - transactionId: transactionId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.EventsControllerCancelRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const input$: operations.EventsControllerCancelRequest = { + transactionId: transactionId, + }; - const pathParams$ = { - transactionId: encodeSimple$("transactionId", payload$.transactionId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.EventsControllerCancelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/events/trigger/{transactionId}")(pathParams$); + const pathParams$ = { + transactionId: encodeSimple$("transactionId", payload$.transactionId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/events/trigger/{transactionId}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EventsController_cancel", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "EventsController_cancel", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [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$; - } + 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/changesApply.ts b/src/funcs/changesApply.ts index afcabb6a..f30b617c 100644 --- a/src/funcs/changesApply.ts +++ b/src/funcs/changesApply.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,128 +12,125 @@ 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, + 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 * as z from "zod"; /** * Apply change */ export async function changesApply( - client$: NovuCore, - changeId: string, - options?: RequestOptions + client$: NovuCore, + changeId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.ChangesControllerApplyDiffRequest = { + changeId: changeId, + }; - const pathParams$ = { - changeId: encodeSimple$("changeId", payload$.changeId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/changes/{changeId}/apply")(pathParams$); + const pathParams$ = { + changeId: encodeSimple$("changeId", payload$.changeId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/changes/{changeId}/apply")(pathParams$); - 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 headers$ = new Headers({ + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 index 9230b333..9ddabb21 100644 --- a/src/funcs/changesApplyBulk.ts +++ b/src/funcs/changesApplyBulk.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,119 +12,115 @@ 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, + 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"; -import * as z from "zod"; /** * Apply changes */ export async function changesApplyBulk( - client$: NovuCore, - request: components.BulkApplyChangeDto, - options?: RequestOptions + client$: NovuCore, + request: components.BulkApplyChangeDto, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$ = request; - const path$ = pathToFunc("/v1/changes/bulk/apply")(); + 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 headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/changes/bulk/apply")(); - 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 headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 index 501c65c9..1d9569b6 100644 --- a/src/funcs/changesCount.ts +++ b/src/funcs/changesCount.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -23,88 +23,85 @@ import { Result } from "../types/fp.js"; * Get changes count */ export async function changesCount( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.DataNumberDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DataNumberDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/changes/count")(); + const path$ = pathToFunc("/v1/changes/count")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 101d02da..a7d6e940 100644 --- a/src/funcs/changesRetrieve.ts +++ b/src/funcs/changesRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,110 +26,110 @@ import { Result } from "../types/fp.js"; * Get changes */ export async function changesRetrieve( - client$: NovuCore, - request: operations.ChangesControllerGetChangesRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.ChangesControllerGetChangesRequest, + options?: RequestOptions, ): Promise< - Result< - components.ChangesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ChangesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/changes")(); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - page: payload$.page, - promoted: payload$.promoted, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "page": payload$.page, + "promoted": payload$.promoted, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 4a3a49de..2f87658d 100644 --- a/src/funcs/environmentsApiKeysList.ts +++ b/src/funcs/environmentsApiKeysList.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,103 +10,99 @@ 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, + 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"; -import * as z from "zod"; /** * Get api keys */ export async function environmentsApiKeysList( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/environments/api-keys")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/environments/api-keys")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EnvironmentsController_listOrganizationApiKeys", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "EnvironmentsController_listOrganizationApiKeys", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.ApiKey$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ApiKey$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/environmentsList.ts b/src/funcs/environmentsList.ts index 52f9ed68..b3c6bf4e 100644 --- a/src/funcs/environmentsList.ts +++ b/src/funcs/environmentsList.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,103 +10,99 @@ 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, + 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"; -import * as z from "zod"; /** * Get environments */ export async function environmentsList( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/environments")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/environments")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EnvironmentsController_listMyEnvironments", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "EnvironmentsController_listMyEnvironments", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.EnvironmentResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.EnvironmentResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/environmentsRetrieve.ts b/src/funcs/environmentsRetrieve.ts index 257194d0..bbbcedc0 100644 --- a/src/funcs/environmentsRetrieve.ts +++ b/src/funcs/environmentsRetrieve.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -23,88 +23,85 @@ import { Result } from "../types/fp.js"; * Get current environment */ export async function environmentsRetrieve( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.EnvironmentResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.EnvironmentResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/environments/me")(); + const path$ = pathToFunc("/v1/environments/me")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EnvironmentsController_getCurrentEnvironment", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "EnvironmentsController_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; - - 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 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 [result$] = await m$.match< - components.EnvironmentResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.EnvironmentResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.EnvironmentResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.EnvironmentResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/executionDetailsRetrieve.ts b/src/funcs/executionDetailsRetrieve.ts index 1298440f..0e67d6ed 100644 --- a/src/funcs/executionDetailsRetrieve.ts +++ b/src/funcs/executionDetailsRetrieve.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,132 +12,131 @@ 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, + 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 * as z from "zod"; /** * Get execution details */ export async function executionDetailsRetrieve( - client$: NovuCore, - notificationId: string, - subscriberId: string, - options?: RequestOptions + client$: NovuCore, + notificationId: string, + subscriberId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { + const input$: + operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = + { notificationId: notificationId, subscriberId: subscriberId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + }; - const path$ = pathToFunc("/v1/execution-details")(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const query$ = encodeFormQuery$({ - notificationId: payload$.notificationId, - subscriberId: payload$.subscriberId, - }); + const path$ = pathToFunc("/v1/execution-details")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const query$ = encodeFormQuery$({ + "notificationId": payload$.notificationId, + "subscriberId": payload$.subscriberId, + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "ExecutionDetailsController_getExecutionDetailsForNotification", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: + "ExecutionDetailsController_getExecutionDetailsForNotification", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.ExecutionDetailsResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ExecutionDetailsResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/feedsCreate.ts b/src/funcs/feedsCreate.ts index 614c8d87..7a72681c 100644 --- a/src/funcs/feedsCreate.ts +++ b/src/funcs/feedsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -25,104 +25,101 @@ import { Result } from "../types/fp.js"; * Create feed */ export async function feedsCreate( - client$: NovuCore, - request: components.CreateFeedRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateFeedRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.FeedResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.FeedResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/feeds")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 80f04db8..4fb59744 100644 --- a/src/funcs/feedsDelete.ts +++ b/src/funcs/feedsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,128 +12,127 @@ 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, + 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 * as z from "zod"; /** * Delete feed */ export async function feedsDelete( - client$: NovuCore, - feedId: string, - options?: RequestOptions + client$: NovuCore, + feedId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.FeedsControllerDeleteFeedByIdRequest = { + feedId: feedId, + }; - const pathParams$ = { - feedId: encodeSimple$("feedId", payload$.feedId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/feeds/{feedId}")(pathParams$); + const pathParams$ = { + feedId: encodeSimple$("feedId", payload$.feedId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/feeds/{feedId}")(pathParams$); - 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 headers$ = new Headers({ + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 index 52e755df..8ee75fe9 100644 --- a/src/funcs/feedsRetrieve.ts +++ b/src/funcs/feedsRetrieve.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,103 +10,99 @@ 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, + 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"; -import * as z from "zod"; /** * Get feeds */ export async function feedsRetrieve( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/feeds")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/feeds")(); - 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 headers$ = new Headers({ + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 bf3c65b5..711603b9 100644 --- a/src/funcs/integrationsCreate.ts +++ b/src/funcs/integrationsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,102 @@ 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, - request: components.CreateIntegrationRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateIntegrationRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateIntegrationRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + components.CreateIntegrationRequestDto$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/integrations")(); + const path$ = pathToFunc("/v1/integrations")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "IntegrationsController_createIntegration", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.IntegrationResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.IntegrationResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsDelete.ts b/src/funcs/integrationsDelete.ts index 44286976..db593277 100644 --- a/src/funcs/integrationsDelete.ts +++ b/src/funcs/integrationsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,129 +12,126 @@ 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, + 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 * as z from "zod"; /** * Delete integration */ export async function integrationsDelete( - client$: NovuCore, - integrationId: string, - options?: RequestOptions + client$: NovuCore, + integrationId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.IntegrationsControllerRemoveIntegrationRequest = { - integrationId: integrationId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.IntegrationsControllerRemoveIntegrationRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const input$: operations.IntegrationsControllerRemoveIntegrationRequest = { + integrationId: integrationId, + }; - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.IntegrationsControllerRemoveIntegrationRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/integrations/{integrationId}")(pathParams$); + const pathParams$ = { + integrationId: encodeSimple$("integrationId", payload$.integrationId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/integrations/{integrationId}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "IntegrationsController_removeIntegration", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "IntegrationsController_removeIntegration", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsList.ts b/src/funcs/integrationsList.ts index 62b49dce..c18bef66 100644 --- a/src/funcs/integrationsList.ts +++ b/src/funcs/integrationsList.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,16 +10,15 @@ 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, + 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"; -import * as z from "zod"; /** * Get integrations @@ -27,88 +27,85 @@ import * as z from "zod"; * 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, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/integrations")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/integrations")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "IntegrationsController_listIntegrations", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "IntegrationsController_listIntegrations", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsListActive.ts b/src/funcs/integrationsListActive.ts index 4611aa92..0321683b 100644 --- a/src/funcs/integrationsListActive.ts +++ b/src/funcs/integrationsListActive.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,16 +10,15 @@ 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, + 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"; -import * as z from "zod"; /** * Get active integrations @@ -27,88 +27,85 @@ import * as z from "zod"; * 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, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/integrations/active")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/integrations/active")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "IntegrationsController_getActiveIntegrations", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "IntegrationsController_getActiveIntegrations", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.IntegrationResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsSetAsPrimary.ts b/src/funcs/integrationsSetAsPrimary.ts index 3222a600..a13a3be9 100644 --- a/src/funcs/integrationsSetAsPrimary.ts +++ b/src/funcs/integrationsSetAsPrimary.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,115 +26,115 @@ import { Result } from "../types/fp.js"; * Set integration as primary */ export async function integrationsSetAsPrimary( - client$: NovuCore, - integrationId: string, - options?: RequestOptions + client$: NovuCore, + integrationId: string, + options?: RequestOptions, ): Promise< - Result< - components.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.IntegrationsControllerSetIntegrationAsPrimaryRequest = { - integrationId: integrationId, + const input$: + operations.IntegrationsControllerSetIntegrationAsPrimaryRequest = { + integrationId: integrationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/integrations/{integrationId}/set-primary")(pathParams$); + const pathParams$ = { + integrationId: encodeSimple$("integrationId", payload$.integrationId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/integrations/{integrationId}/set-primary")( + pathParams$, + ); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "IntegrationsController_setIntegrationAsPrimary", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "IntegrationsController_setIntegrationAsPrimary", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.IntegrationResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.IntegrationResponseDto$inboundSchema), + m$.fail([404, 409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsUpdate.ts b/src/funcs/integrationsUpdate.ts index 67049f86..6fa7dfd3 100644 --- a/src/funcs/integrationsUpdate.ts +++ b/src/funcs/integrationsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,118 +29,118 @@ import { Result } from "../types/fp.js"; * Update integration */ export async function integrationsUpdate( - client$: NovuCore, - integrationId: string, - updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, - options?: RequestOptions + client$: NovuCore, + integrationId: string, + updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.IntegrationsControllerUpdateIntegrationByIdRequest = { - integrationId: integrationId, - updateIntegrationRequestDto: updateIntegrationRequestDto, + const input$: operations.IntegrationsControllerUpdateIntegrationByIdRequest = + { + integrationId: integrationId, + updateIntegrationRequestDto: updateIntegrationRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateIntegrationRequestDto, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.UpdateIntegrationRequestDto, { + explode: true, + }); - const pathParams$ = { - integrationId: encodeSimple$("integrationId", payload$.integrationId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "IntegrationsController_updateIntegrationById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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: ["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.IntegrationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.IntegrationResponseDto$inboundSchema), - m$.fail([404, 409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.IntegrationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.IntegrationResponseDto$inboundSchema), + m$.fail([404, 409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/integrationsWebhooksRetrieve.ts b/src/funcs/integrationsWebhooksRetrieve.ts index c901be8b..773c34b6 100644 --- a/src/funcs/integrationsWebhooksRetrieve.ts +++ b/src/funcs/integrationsWebhooksRetrieve.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Get webhook support status for provider @@ -29,118 +29,116 @@ import * as z from "zod"; * 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, - providerOrIntegrationId: string, - options?: RequestOptions + client$: NovuCore, + providerOrIntegrationId: string, + options?: RequestOptions, ): Promise< - Result< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + boolean, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.IntegrationsControllerGetWebhookSupportStatusRequest = { - providerOrIntegrationId: providerOrIntegrationId, + const input$: + operations.IntegrationsControllerGetWebhookSupportStatusRequest = { + providerOrIntegrationId: providerOrIntegrationId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - providerOrIntegrationId: encodeSimple$( - "providerOrIntegrationId", - payload$.providerOrIntegrationId, - { explode: false, charEncoding: "percent" } - ), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/integrations/webhook/provider/{providerOrIntegrationId}/status")( - pathParams$ - ); + const pathParams$ = { + providerOrIntegrationId: encodeSimple$( + "providerOrIntegrationId", + payload$.providerOrIntegrationId, + { explode: false, charEncoding: "percent" }, + ), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc( + "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "IntegrationsController_getWebhookSupportStatus", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "IntegrationsController_getWebhookSupportStatus", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - boolean, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.boolean()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + boolean, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, z.boolean()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/layoutsCreate.ts b/src/funcs/layoutsCreate.ts index 13be4981..16783977 100644 --- a/src/funcs/layoutsCreate.ts +++ b/src/funcs/layoutsCreate.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,88 +26,85 @@ import { Result } from "../types/fp.js"; * Create a layout */ export async function layoutsCreate( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.CreateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.CreateLayoutResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/layouts")(); + const path$ = pathToFunc("/v1/layouts")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index f4c50148..1cf04f2b 100644 --- a/src/funcs/layoutsDelete.ts +++ b/src/funcs/layoutsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Delete layout @@ -29,112 +29,112 @@ import * as z from "zod"; * Execute a soft delete of a layout given a certain ID. */ export async function layoutsDelete( - client$: NovuCore, - layoutId: string, - options?: RequestOptions + client$: NovuCore, + layoutId: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.LayoutsControllerDeleteLayoutRequest = { + layoutId: layoutId, + }; - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); + const pathParams$ = { + layoutId: encodeSimple$("layoutId", payload$.layoutId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "*/*", - }); + const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - 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 headers$ = new Headers({ + Accept: "*/*", + }); - 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 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 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 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 [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$; - } + 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 index fb25e131..5e373cd4 100644 --- a/src/funcs/layoutsList.ts +++ b/src/funcs/layoutsList.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Filter layouts @@ -29,111 +29,111 @@ import * as z from "zod"; * 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 + client$: NovuCore, + request: operations.LayoutsControllerListLayoutsRequest, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : 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 input$ = request; - const path$ = pathToFunc("/v1/layouts")(); + 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 query$ = encodeFormQuery$({ - orderBy: payload$.orderBy, - page: payload$.page, - pageSize: payload$.pageSize, - sortBy: payload$.sortBy, - }); + const path$ = pathToFunc("/v1/layouts")(); - const headers$ = new Headers({ - Accept: "*/*", - }); + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "sortBy": payload$.sortBy, + }); - 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 headers$ = new Headers({ + Accept: "*/*", + }); - 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 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 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 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 [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$; - } + 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 index a8fb9101..ece864d4 100644 --- a/src/funcs/layoutsRetrieve.ts +++ b/src/funcs/layoutsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,110 @@ import { Result } from "../types/fp.js"; * Get a layout by its ID */ export async function layoutsRetrieve( - client$: NovuCore, - layoutId: string, - options?: RequestOptions + client$: NovuCore, + layoutId: string, + options?: RequestOptions, ): Promise< - Result< - components.GetLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetLayoutResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.LayoutsControllerGetLayoutRequest = { - layoutId: layoutId, - }; + 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 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 pathParams$ = { + layoutId: encodeSimple$("layoutId", payload$.layoutId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); + const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 0bce5a04..0db331fe 100644 --- a/src/funcs/layoutsSetAsDefault.ts +++ b/src/funcs/layoutsSetAsDefault.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Set default layout @@ -29,113 +29,112 @@ import * as z from "zod"; * 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 + client$: NovuCore, + layoutId: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.LayoutsControllerSetDefaultLayoutRequest = { + layoutId: layoutId, + }; - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/layouts/{layoutId}/default")(pathParams$); + const pathParams$ = { + layoutId: encodeSimple$("layoutId", payload$.layoutId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "*/*", - }); + const path$ = pathToFunc("/v1/layouts/{layoutId}/default")(pathParams$); - 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 headers$ = new Headers({ + Accept: "*/*", + }); - 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 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 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 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 [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$; - } + 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 index 20ac60b9..a5015fd0 100644 --- a/src/funcs/layoutsUpdate.ts +++ b/src/funcs/layoutsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,115 +32,117 @@ import { Result } from "../types/fp.js"; * 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 + client$: NovuCore, + layoutId: string, + updateLayoutRequestDto: components.UpdateLayoutRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.UpdateLayoutResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.LayoutsControllerUpdateLayoutRequest = { + layoutId: layoutId, + updateLayoutRequestDto: updateLayoutRequestDto, + }; - const pathParams$ = { - layoutId: encodeSimple$("layoutId", payload$.layoutId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); + const pathParams$ = { + layoutId: encodeSimple$("layoutId", payload$.layoutId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/layouts/{layoutId}")(pathParams$); - 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 headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 526921e1..19734bf8 100644 --- a/src/funcs/messagesDelete.ts +++ b/src/funcs/messagesDelete.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,112 @@ import { Result } from "../types/fp.js"; * Deletes a message entity from the Novu platform */ export async function messagesDelete( - client$: NovuCore, - messageId: string, - options?: RequestOptions + client$: NovuCore, + messageId: string, + options?: RequestOptions, ): Promise< - Result< - components.DeleteMessageResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DeleteMessageResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.MessagesControllerDeleteMessageRequest = { - messageId: messageId, - }; + const input$: operations.MessagesControllerDeleteMessageRequest = { + messageId: messageId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.MessagesControllerDeleteMessageRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.MessagesControllerDeleteMessageRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - messageId: encodeSimple$("messageId", payload$.messageId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "MessagesController_deleteMessage", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.DeleteMessageResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DeleteMessageResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.DeleteMessageResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.DeleteMessageResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/messagesDeleteByTransactionId.ts b/src/funcs/messagesDeleteByTransactionId.ts index 00f4fbf5..3fdbb2f7 100644 --- a/src/funcs/messagesDeleteByTransactionId.ts +++ b/src/funcs/messagesDeleteByTransactionId.ts @@ -2,10 +2,11 @@ * 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$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,17 +14,16 @@ 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, + 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 * as z from "zod"; /** * Delete messages by transactionId @@ -32,122 +32,122 @@ import * as z from "zod"; * Deletes messages entity from the Novu platform using TransactionId of message */ export async function messagesDeleteByTransactionId( - client$: NovuCore, - transactionId: string, - channel?: operations.Channel | undefined, - options?: RequestOptions + client$: NovuCore, + transactionId: string, + channel?: operations.Channel | undefined, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.MessagesControllerDeleteMessagesByTransactionIdRequest = { - channel: channel, - transactionId: transactionId, + const input$: + operations.MessagesControllerDeleteMessagesByTransactionIdRequest = { + channel: channel, + transactionId: transactionId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - transactionId: encodeSimple$("transactionId", payload$.transactionId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/messages/transaction/{transactionId}")(pathParams$); + const pathParams$ = { + transactionId: encodeSimple$("transactionId", payload$.transactionId, { + explode: false, + charEncoding: "percent", + }), + }; - const query$ = encodeFormQuery$({ - channel: payload$.channel, - }); + const path$ = pathToFunc("/v1/messages/transaction/{transactionId}")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "*/*", - }); + const query$ = encodeFormQuery$({ + "channel": payload$.channel, + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "MessagesController_deleteMessagesByTransactionId", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "*/*", + }); - 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; + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "MessagesController_deleteMessagesByTransactionId", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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; - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/messagesRetrieve.ts b/src/funcs/messagesRetrieve.ts index 14643a2d..a17a2ded 100644 --- a/src/funcs/messagesRetrieve.ts +++ b/src/funcs/messagesRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,112 @@ import { Result } from "../types/fp.js"; * Returns a list of messages, could paginate using the `page` query parameter */ export async function messagesRetrieve( - client$: NovuCore, - request: operations.MessagesControllerGetMessagesRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.MessagesControllerGetMessagesRequest, + options?: RequestOptions, ): Promise< - Result< - components.ActivitiesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ActivitiesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.MessagesControllerGetMessagesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.MessagesControllerGetMessagesRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "MessagesController_getMessages", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.ActivitiesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ActivitiesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ActivitiesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ActivitiesResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsList.ts b/src/funcs/notificationsList.ts index 18a3093f..0c0a75ec 100644 --- a/src/funcs/notificationsList.ts +++ b/src/funcs/notificationsList.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,115 +26,113 @@ import { Result } from "../types/fp.js"; * Get notifications */ export async function notificationsList( - client$: NovuCore, - request: operations.NotificationsControllerListNotificationsRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.NotificationsControllerListNotificationsRequest, + options?: RequestOptions, ): Promise< - Result< - components.ActivitiesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ActivitiesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationsControllerListNotificationsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.NotificationsControllerListNotificationsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationsController_listNotifications", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.ActivitiesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ActivitiesResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ActivitiesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ActivitiesResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsRetrieve.ts b/src/funcs/notificationsRetrieve.ts index 7e43bcf7..b834e689 100644 --- a/src/funcs/notificationsRetrieve.ts +++ b/src/funcs/notificationsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,113 +26,111 @@ import { Result } from "../types/fp.js"; * Get notification */ export async function notificationsRetrieve( - client$: NovuCore, - notificationId: string, - options?: RequestOptions + client$: NovuCore, + notificationId: string, + options?: RequestOptions, ): Promise< - Result< - components.ActivityNotificationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ActivityNotificationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.NotificationsControllerGetNotificationRequest = { - notificationId: notificationId, - }; + const input$: operations.NotificationsControllerGetNotificationRequest = { + notificationId: notificationId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationsControllerGetNotificationRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.NotificationsControllerGetNotificationRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - notificationId: encodeSimple$("notificationId", payload$.notificationId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationsController_getNotification", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.ActivityNotificationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ActivityNotificationResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ActivityNotificationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ActivityNotificationResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsStatsGraph.ts b/src/funcs/notificationsStatsGraph.ts index b5d1e894..8e64da09 100644 --- a/src/funcs/notificationsStatsGraph.ts +++ b/src/funcs/notificationsStatsGraph.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,129 +12,126 @@ 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, + 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 * as z from "zod"; /** * Get notification graph statistics */ export async function notificationsStatsGraph( - client$: NovuCore, - days?: number | undefined, - options?: RequestOptions + client$: NovuCore, + days?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.NotificationsControllerGetActivityGraphStatsRequest = { - days: days, + const input$: operations.NotificationsControllerGetActivityGraphStatsRequest = + { + days: days, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationsControllerGetActivityGraphStatsRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .NotificationsControllerGetActivityGraphStatsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationsController_getActivityGraphStats", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.ActivityGraphStatesResponse$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ActivityGraphStatesResponse$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsStatsRetrieve.ts b/src/funcs/notificationsStatsRetrieve.ts index 8cc0842c..af40cec5 100644 --- a/src/funcs/notificationsStatsRetrieve.ts +++ b/src/funcs/notificationsStatsRetrieve.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -23,88 +23,85 @@ import { Result } from "../types/fp.js"; * Get notification statistics */ export async function notificationsStatsRetrieve( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.ActivityStatsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ActivityStatsResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/notifications/stats")(); + const path$ = pathToFunc("/v1/notifications/stats")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationsController_getActivityStats", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.ActivityStatsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ActivityStatsResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.ActivityStatsResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ActivityStatsResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts b/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts index 4781dc7f..a5a583de 100644 --- a/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts +++ b/src/funcs/organizationsEEOrganizationControllerRenameOrganization.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -25,104 +25,101 @@ import { Result } from "../types/fp.js"; * Rename organization name */ export async function organizationsEEOrganizationControllerRenameOrganization( - client$: NovuCore, - request: components.RenameOrganizationDto, - options?: RequestOptions + client$: NovuCore, + request: components.RenameOrganizationDto, + options?: RequestOptions, ): Promise< - Result< - components.RenameOrganizationDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.RenameOrganizationDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/organizations")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 26ca46cd..fcb079be 100644 --- a/src/funcs/organizationsRetrieve.ts +++ b/src/funcs/organizationsRetrieve.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -23,88 +23,85 @@ import { Result } from "../types/fp.js"; * Fetch current organization details */ export async function organizationsRetrieve( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.OrganizationResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.OrganizationResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/organizations/me")(); + const path$ = pathToFunc("/v1/organizations/me")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 9ce7a499..be4f456f 100644 --- a/src/funcs/organizationsUpdate.ts +++ b/src/funcs/organizationsUpdate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -25,104 +25,102 @@ import { Result } from "../types/fp.js"; * Update organization branding details */ export async function organizationsUpdate( - client$: NovuCore, - request: components.UpdateBrandingDetailsDto, - options?: RequestOptions + client$: NovuCore, + request: components.UpdateBrandingDetailsDto, + options?: RequestOptions, ): Promise< - Result< - components.OrganizationBrandingResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.OrganizationBrandingResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/organizations/branding")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 e9edaab8..f217a422 100644 --- a/src/funcs/subscribersAuthenticationChatAccessOauth.ts +++ b/src/funcs/subscribersAuthenticationChatAccessOauth.ts @@ -2,10 +2,11 @@ * 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$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,140 +14,137 @@ 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, + 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 * as z from "zod"; /** * Handle chat oauth */ export async function subscribersAuthenticationChatAccessOauth( - client$: NovuCore, - request: operations.SubscribersControllerChatAccessOauthRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerChatAccessOauthRequest, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerChatAccessOauthRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const input$ = request; - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerChatAccessOauthRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth")( - pathParams$ - ); + const pathParams$ = { + providerId: encodeSimple$("providerId", payload$.providerId, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const query$ = encodeFormQuery$({ - environmentId: payload$.environmentId, - hmacHash: payload$.hmacHash, - integrationIdentifier: payload$.integrationIdentifier, - }); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth", + )(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - }); + const query$ = encodeFormQuery$({ + "environmentId": payload$.environmentId, + "hmacHash": payload$.hmacHash, + "integrationIdentifier": payload$.integrationIdentifier, + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_chatAccessOauth", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "*/*", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_chatAccessOauth", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts b/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts index f9c0c713..1cf9abef 100644 --- a/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +++ b/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts @@ -4,8 +4,8 @@ import { NovuCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,125 +28,127 @@ import { Result } from "../types/fp.js"; * Handle providers oauth redirect */ export async function subscribersAuthenticationChatAccessOauthCallBack( - client$: NovuCore, - request: operations.SubscribersControllerChatOauthCallbackRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerChatOauthCallbackRequest, + options?: RequestOptions, ): Promise< - Result< - operations.SubscribersControllerChatOauthCallbackResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SubscribersControllerChatOauthCallbackResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerChatOauthCallbackRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerChatOauthCallbackRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + providerId: encodeSimple$("providerId", payload$.providerId, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc( - "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback" - )(pathParams$); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback", + )(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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_chatOauthCallback", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - operations.SubscribersControllerChatOauthCallbackResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.SubscribersControllerChatOauthCallbackResponseBody$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + operations.SubscribersControllerChatOauthCallbackResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations + .SubscribersControllerChatOauthCallbackResponseBody$inboundSchema, + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersCreate.ts b/src/funcs/subscribersCreate.ts index bddf86f1..368b7590 100644 --- a/src/funcs/subscribersCreate.ts +++ b/src/funcs/subscribersCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,102 @@ 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, - request: components.CreateSubscriberRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateSubscriberRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateSubscriberRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + components.CreateSubscriberRequestDto$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/subscribers")(); + const path$ = pathToFunc("/v1/subscribers")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_createSubscriber", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersCreateBulk.ts b/src/funcs/subscribersCreateBulk.ts index 0bf2b5a3..4353e37c 100644 --- a/src/funcs/subscribersCreateBulk.ts +++ b/src/funcs/subscribersCreateBulk.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,16 +12,15 @@ 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, + 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"; -import * as z from "zod"; /** * Bulk create subscribers @@ -29,107 +29,103 @@ import * as z from "zod"; * * 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. - * */ export async function subscribersCreateBulk( - client$: NovuCore, - request: components.BulkSubscriberCreateDto, - options?: RequestOptions + client$: NovuCore, + request: components.BulkSubscriberCreateDto, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.BulkSubscriberCreateDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => components.BulkSubscriberCreateDto$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/subscribers/bulk")(); + const path$ = pathToFunc("/v1/subscribers/bulk")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_bulkCreateSubscribers", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(201, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(201, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersCredentialsAppend.ts b/src/funcs/subscribersCredentialsAppend.ts index 730dc146..a07dd359 100644 --- a/src/funcs/subscribersCredentialsAppend.ts +++ b/src/funcs/subscribersCredentialsAppend.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -30,120 +33,123 @@ import { Result } from "../types/fp.js"; * This endpoint appends provided credentials and deviceTokens to the existing ones. */ export async function subscribersCredentialsAppend( - client$: NovuCore, - subscriberId: string, - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerModifySubscriberChannelRequest = { - subscriberId: subscriberId, - updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, + const input$: operations.SubscribersControllerModifySubscriberChannelRequest = + { + subscriberId: subscriberId, + updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerModifySubscriberChannelRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberChannelRequestDto, { - explode: true, - }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerModifySubscriberChannelRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.UpdateSubscriberChannelRequestDto, + { explode: true }, + ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_modifySubscriberChannel", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersCredentialsDelete.ts b/src/funcs/subscribersCredentialsDelete.ts index a0f484e2..00df9a48 100644 --- a/src/funcs/subscribersCredentialsDelete.ts +++ b/src/funcs/subscribersCredentialsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Delete subscriber credentials by providerId @@ -29,123 +29,121 @@ import * as z from "zod"; * Delete subscriber credentials such as slack and expo tokens. */ export async function subscribersCredentialsDelete( - client$: NovuCore, - subscriberId: string, - providerId: string, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + providerId: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerDeleteSubscriberCredentialsRequest = { - subscriberId: subscriberId, - providerId: providerId, + const input$: + operations.SubscribersControllerDeleteSubscriberCredentialsRequest = { + subscriberId: subscriberId, + providerId: providerId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - providerId: encodeSimple$("providerId", payload$.providerId, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/credentials/{providerId}")( - pathParams$ - ); + const pathParams$ = { + providerId: encodeSimple$("providerId", payload$.providerId, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "*/*", - }); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/credentials/{providerId}", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_deleteSubscriberCredentials", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "*/*", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_deleteSubscriberCredentials", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersCredentialsUpdate.ts b/src/funcs/subscribersCredentialsUpdate.ts index 4b0a1c8a..11a0b5f1 100644 --- a/src/funcs/subscribersCredentialsUpdate.ts +++ b/src/funcs/subscribersCredentialsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,120 +32,123 @@ 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, - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerUpdateSubscriberChannelRequest = { - subscriberId: subscriberId, - updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, + const input$: operations.SubscribersControllerUpdateSubscriberChannelRequest = + { + subscriberId: subscriberId, + updateSubscriberChannelRequestDto: updateSubscriberChannelRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberChannelRequestDto, { - explode: true, - }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.UpdateSubscriberChannelRequestDto, + { explode: true }, + ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_updateSubscriberChannel", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersDelete.ts b/src/funcs/subscribersDelete.ts index cf7cc81c..938540d6 100644 --- a/src/funcs/subscribersDelete.ts +++ b/src/funcs/subscribersDelete.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,113 +29,111 @@ import { Result } from "../types/fp.js"; * Deletes a subscriber entity from the Novu platform */ export async function subscribersDelete( - client$: NovuCore, - subscriberId: string, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + options?: RequestOptions, ): Promise< - Result< - components.DeleteSubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DeleteSubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerRemoveSubscriberRequest = { - subscriberId: subscriberId, - }; + const input$: operations.SubscribersControllerRemoveSubscriberRequest = { + subscriberId: subscriberId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerRemoveSubscriberRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerRemoveSubscriberRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_removeSubscriber", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.DeleteSubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DeleteSubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.DeleteSubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.DeleteSubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersList.ts b/src/funcs/subscribersList.ts index dda4ec63..de4b29d9 100644 --- a/src/funcs/subscribersList.ts +++ b/src/funcs/subscribersList.ts @@ -11,17 +11,22 @@ 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, + 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"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get subscribers @@ -30,155 +35,161 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter */ export async function subscribersList( - client$: NovuCore, - page?: number | undefined, - limit?: number | undefined, - options?: RequestOptions + client$: NovuCore, + page?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, ): Promise< - PageIterator< - Result< - operations.SubscribersControllerListSubscribersResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.SubscribersControllerListSubscribersResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$: operations.SubscribersControllerListSubscribersRequest = { - page: page, - limit: limit, - }; + const input$: operations.SubscribersControllerListSubscribersRequest = { + page: page, + limit: limit, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerListSubscribersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerListSubscribersRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + 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({ + Accept: "application/json", + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_listSubscribers", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - 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; - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + 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, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.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 responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const [result$, raw$] = await m$.match< + operations.SubscribersControllerListSubscribersResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.SubscribersControllerListSubscribersResponse$inboundSchema, + { key: "Result" }, + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } - const [result$, raw$] = await m$.match< - operations.SubscribersControllerListSubscribersResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.SubscribersControllerListSubscribersResponse$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.SubscribersControllerListSubscribersResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const page = input$.page || 0; - const nextPage = page + 1; + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.SubscribersControllerListSubscribersResponse, + | 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; - } + 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 () => subscribersList(client$, nextPage, limit, options); - }; + return () => + subscribersList( + client$, + nextPage, + limit, + options, + ); + }; - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + 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 dc61db12..fc83af32 100644 --- a/src/funcs/subscribersMessagesMarkAll.ts +++ b/src/funcs/subscribersMessagesMarkAll.ts @@ -2,8 +2,12 @@ * 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 { + 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"; @@ -11,132 +15,133 @@ 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, + 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 * as z from "zod"; /** * 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, - markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, + options?: RequestOptions, ): Promise< - Result< - number, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + number, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerMarkAllUnreadAsReadRequest = { - subscriberId: subscriberId, - markAllMessageAsRequestDto: markAllMessageAsRequestDto, - }; + const input$: operations.SubscribersControllerMarkAllUnreadAsReadRequest = { + subscriberId: subscriberId, + markAllMessageAsRequestDto: markAllMessageAsRequestDto, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MarkAllMessageAsRequestDto, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.MarkAllMessageAsRequestDto, { + explode: true, + }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_markAllUnreadAsRead", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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< - number, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, z.number()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + number, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, z.number()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersMessagesMarkAllAs.ts b/src/funcs/subscribersMessagesMarkAllAs.ts index 2e93ada5..de3c2f3c 100644 --- a/src/funcs/subscribersMessagesMarkAllAs.ts +++ b/src/funcs/subscribersMessagesMarkAllAs.ts @@ -2,8 +2,12 @@ * 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 { + 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"; @@ -11,132 +15,133 @@ 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, + 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 * as z from "zod"; /** * Mark a subscriber messages as seen, read, unseen or unread */ export async function subscribersMessagesMarkAllAs( - client$: NovuCore, - subscriberId: string, - messageMarkAsRequestDto: components.MessageMarkAsRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + messageMarkAsRequestDto: components.MessageMarkAsRequestDto, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerMarkMessagesAsRequest = { - subscriberId: subscriberId, - messageMarkAsRequestDto: messageMarkAsRequestDto, - }; + const input$: operations.SubscribersControllerMarkMessagesAsRequest = { + subscriberId: subscriberId, + messageMarkAsRequestDto: messageMarkAsRequestDto, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerMarkMessagesAsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MessageMarkAsRequestDto, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerMarkMessagesAsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.MessageMarkAsRequestDto, { + explode: true, + }); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_markMessagesAs", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.MessageEntity$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.MessageEntity$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersMessagesUpdateAsSeen.ts b/src/funcs/subscribersMessagesUpdateAsSeen.ts index 78ad3ec8..2e46bb9f 100644 --- a/src/funcs/subscribersMessagesUpdateAsSeen.ts +++ b/src/funcs/subscribersMessagesUpdateAsSeen.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,119 +29,122 @@ import { Result } from "../types/fp.js"; * Mark message action as seen */ export async function subscribersMessagesUpdateAsSeen( - client$: NovuCore, - request: operations.SubscribersControllerMarkActionAsSeenRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerMarkActionAsSeenRequest, + options?: RequestOptions, ): Promise< - Result< - components.MessageResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.MessageResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerMarkActionAsSeenRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.MarkMessageActionAsSeenDto, { explode: true }); + const input$ = request; - const pathParams$ = { - messageId: encodeSimple$("messageId", payload$.messageId, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - type: encodeSimple$("type", payload$.type, { explode: false, charEncoding: "percent" }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerMarkActionAsSeenRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.MarkMessageActionAsSeenDto, { + explode: true, + }); - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}")( - pathParams$ - ); + const pathParams$ = { + messageId: encodeSimple$("messageId", payload$.messageId, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + type: encodeSimple$("type", payload$.type, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_markActionAsSeen", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_markActionAsSeen", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.MessageResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.MessageResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.MessageResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.MessageResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersNotificationsRetrieve.ts b/src/funcs/subscribersNotificationsRetrieve.ts index 4452db83..4ba293fb 100644 --- a/src/funcs/subscribersNotificationsRetrieve.ts +++ b/src/funcs/subscribersNotificationsRetrieve.ts @@ -4,8 +4,8 @@ import { NovuCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,125 +28,124 @@ import { Result } from "../types/fp.js"; * Get in-app notification feed for a particular subscriber */ export async function subscribersNotificationsRetrieve( - client$: NovuCore, - request: operations.SubscribersControllerGetNotificationsFeedRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerGetNotificationsFeedRequest, + options?: RequestOptions, ): Promise< - Result< - operations.SubscribersControllerGetNotificationsFeedResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SubscribersControllerGetNotificationsFeedResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerGetNotificationsFeedRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerGetNotificationsFeedRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_getNotificationsFeed", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - operations.SubscribersControllerGetNotificationsFeedResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json( - 200, - operations.SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema - ), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + operations.SubscribersControllerGetNotificationsFeedResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations + .SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema, + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersNotificationsUnseenCount.ts b/src/funcs/subscribersNotificationsUnseenCount.ts index b099ff47..9f98dc9d 100644 --- a/src/funcs/subscribersNotificationsUnseenCount.ts +++ b/src/funcs/subscribersNotificationsUnseenCount.ts @@ -4,8 +4,8 @@ import { NovuCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,117 +29,117 @@ import { Result } from "../types/fp.js"; * Get the unseen in-app notifications count for subscribers feed */ export async function subscribersNotificationsUnseenCount( - client$: NovuCore, - request: operations.SubscribersControllerGetUnseenCountRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerGetUnseenCountRequest, + options?: RequestOptions, ): Promise< - Result< - components.UnseenCountResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.UnseenCountResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerGetUnseenCountRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerGetUnseenCountRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/notifications/unseen")(pathParams$); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/notifications/unseen", + )(pathParams$); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - seen: payload$.seen, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "seen": payload$.seen, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_getUnseenCount", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.UnseenCountResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UnseenCountResponse$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.UnseenCountResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.UnseenCountResponse$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersPreferencesList.ts b/src/funcs/subscribersPreferencesList.ts index 99163209..7d815c92 100644 --- a/src/funcs/subscribersPreferencesList.ts +++ b/src/funcs/subscribersPreferencesList.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,131 +12,133 @@ 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, + 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 * as z from "zod"; /** * Get subscriber preferences */ export async function subscribersPreferencesList( - client$: NovuCore, - subscriberId: string, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerListSubscriberPreferencesRequest = { - subscriberId: subscriberId, + const input$: + operations.SubscribersControllerListSubscriberPreferencesRequest = { + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerListSubscriberPreferencesRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerListSubscriberPreferencesRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences")(pathParams$); + const pathParams$ = { + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences")( + pathParams$, + ); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_listSubscriberPreferences", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_listSubscriberPreferences", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.UpdateSubscriberPreferenceResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.UpdateSubscriberPreferenceResponseDto$inboundSchema), + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersPreferencesRetrieveByLevel.ts b/src/funcs/subscribersPreferencesRetrieveByLevel.ts index 9ccfb051..fc9f5db5 100644 --- a/src/funcs/subscribersPreferencesRetrieveByLevel.ts +++ b/src/funcs/subscribersPreferencesRetrieveByLevel.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,137 +12,139 @@ 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, + 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 * as z from "zod"; /** * Get subscriber preferences by level */ export async function subscribersPreferencesRetrieveByLevel( - client$: NovuCore, - parameter: operations.Parameter, - subscriberId: string, - options?: RequestOptions + client$: NovuCore, + parameter: operations.Parameter, + subscriberId: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - parameter: parameter, - subscriberId: subscriberId, + const input$: + operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest = { + parameter: parameter, + subscriberId: subscriberId, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const pathParams$ = { - parameter: encodeSimple$("parameter", payload$.parameter, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences/{parameter}")(pathParams$); + const pathParams$ = { + parameter: encodeSimple$("parameter", payload$.parameter, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/preferences/{parameter}", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_getSubscriberPreferenceByLevel", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_getSubscriberPreferenceByLevel", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.GetSubscriberPreferencesResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.GetSubscriberPreferencesResponseDto$inboundSchema), + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersPreferencesUpdate.ts b/src/funcs/subscribersPreferencesUpdate.ts index 4b9b1975..451e189a 100644 --- a/src/funcs/subscribersPreferencesUpdate.ts +++ b/src/funcs/subscribersPreferencesUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,120 +29,124 @@ import { Result } from "../types/fp.js"; * Update subscriber preference */ export async function subscribersPreferencesUpdate( - client$: NovuCore, - request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, + options?: RequestOptions, ): Promise< - Result< - components.UpdateSubscriberPreferenceResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.UpdateSubscriberPreferenceResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberPreferenceRequestDto, { - explode: true, - }); + const input$ = request; - const pathParams$ = { - parameter: encodeSimple$("parameter", payload$.parameter, { - explode: false, - charEncoding: "percent", - }), - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.UpdateSubscriberPreferenceRequestDto, + { explode: true }, + ); - const path$ = pathToFunc("/v1/subscribers/{subscriberId}/preferences/{parameter}")(pathParams$); + const pathParams$ = { + parameter: encodeSimple$("parameter", payload$.parameter, { + explode: false, + charEncoding: "percent", + }), + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc( + "/v1/subscribers/{subscriberId}/preferences/{parameter}", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_updateSubscriberPreference", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_updateSubscriberPreference", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.UpdateSubscriberPreferenceResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UpdateSubscriberPreferenceResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.UpdateSubscriberPreferenceResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersPreferencesUpdateGlobal.ts b/src/funcs/subscribersPreferencesUpdateGlobal.ts index f4c7ae19..c509b03e 100644 --- a/src/funcs/subscribersPreferencesUpdateGlobal.ts +++ b/src/funcs/subscribersPreferencesUpdateGlobal.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,120 +29,127 @@ import { Result } from "../types/fp.js"; * Update subscriber global preferences */ export async function subscribersPreferencesUpdateGlobal( - client$: NovuCore, - subscriberId: string, - updateSubscriberGlobalPreferencesRequestDto: components.UpdateSubscriberGlobalPreferencesRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + updateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.UpdateSubscriberPreferenceResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.UpdateSubscriberPreferenceResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { - subscriberId: subscriberId, - updateSubscriberGlobalPreferencesRequestDto: updateSubscriberGlobalPreferencesRequestDto, + const input$: + operations.SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { + subscriberId: subscriberId, + updateSubscriberGlobalPreferencesRequestDto: + updateSubscriberGlobalPreferencesRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberGlobalPreferencesRequestDto, { - explode: true, - }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.UpdateSubscriberGlobalPreferencesRequestDto, + { explode: true }, + ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_updateSubscriberGlobalPreferences", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.UpdateSubscriberPreferenceResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UpdateSubscriberPreferenceResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.UpdateSubscriberPreferenceResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + components.UpdateSubscriberPreferenceResponseDto$inboundSchema, + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts b/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts index f337897d..59961603 100644 --- a/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +++ b/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,120 +32,124 @@ import { Result } from "../types/fp.js"; * Used to update the subscriber isOnline flag. */ export async function subscribersPropertiesUpdateOnlineFlag( - client$: NovuCore, - subscriberId: string, - updateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + updateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerUpdateSubscriberOnlineFlagRequest = { - subscriberId: subscriberId, - updateSubscriberOnlineFlagRequestDto: updateSubscriberOnlineFlagRequestDto, + const input$: + operations.SubscribersControllerUpdateSubscriberOnlineFlagRequest = { + subscriberId: subscriberId, + updateSubscriberOnlineFlagRequestDto: + updateSubscriberOnlineFlagRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberOnlineFlagRequestDto, { - explode: true, - }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.UpdateSubscriberOnlineFlagRequestDto, + { explode: true }, + ); - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "SubscribersController_updateSubscriberOnlineFlag", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersRetrieve.ts b/src/funcs/subscribersRetrieve.ts index 2114c00f..99b4c315 100644 --- a/src/funcs/subscribersRetrieve.ts +++ b/src/funcs/subscribersRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,113 +29,112 @@ import { Result } from "../types/fp.js"; * Get subscriber by your internal id used to identify the subscriber */ export async function subscribersRetrieve( - client$: NovuCore, - subscriberId: string, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerGetSubscriberRequest = { - subscriberId: subscriberId, - }; + const input$: operations.SubscribersControllerGetSubscriberRequest = { + subscriberId: subscriberId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerGetSubscriberRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerGetSubscriberRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_getSubscriber", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/subscribersUpdate.ts b/src/funcs/subscribersUpdate.ts index 157cb601..6dc677ff 100644 --- a/src/funcs/subscribersUpdate.ts +++ b/src/funcs/subscribersUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,116 +32,116 @@ import { Result } from "../types/fp.js"; * Used to update the subscriber entity with new information */ export async function subscribersUpdate( - client$: NovuCore, - subscriberId: string, - updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, - options?: RequestOptions + client$: NovuCore, + subscriberId: string, + updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SubscribersControllerUpdateSubscriberRequest = { - subscriberId: subscriberId, - updateSubscriberRequestDto: updateSubscriberRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SubscribersControllerUpdateSubscriberRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateSubscriberRequestDto, { explode: true }); + const input$: operations.SubscribersControllerUpdateSubscriberRequest = { + subscriberId: subscriberId, + updateSubscriberRequestDto: updateSubscriberRequestDto, + }; - const pathParams$ = { - subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SubscribersControllerUpdateSubscriberRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.UpdateSubscriberRequestDto, { + explode: true, + }); - const path$ = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams$); + const pathParams$ = { + subscriberId: encodeSimple$("subscriberId", payload$.subscriberId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "SubscribersController_updateSubscriber", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "SubscribersController_updateSubscriber", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.SubscriberResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SubscriberResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.SubscriberResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SubscriberResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tenantsCreate.ts b/src/funcs/tenantsCreate.ts index 0dad2a98..b1c7c55b 100644 --- a/src/funcs/tenantsCreate.ts +++ b/src/funcs/tenantsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,101 @@ import { Result } from "../types/fp.js"; * 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 + client$: NovuCore, + request: components.CreateTenantRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.CreateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.CreateTenantResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/tenants")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 539ae767..ad5bdbe7 100644 --- a/src/funcs/tenantsDelete.ts +++ b/src/funcs/tenantsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Delete tenant @@ -29,112 +29,112 @@ import * as z from "zod"; * 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 + client$: NovuCore, + identifier: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.TenantControllerRemoveTenantRequest = { + identifier: identifier, + }; - const pathParams$ = { - identifier: encodeSimple$("identifier", payload$.identifier, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); + const pathParams$ = { + identifier: encodeSimple$("identifier", payload$.identifier, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "*/*", - }); + const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - 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 headers$ = new Headers({ + Accept: "*/*", + }); - 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 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 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 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 [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$; - } + 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 index 342ee47d..b86246c2 100644 --- a/src/funcs/tenantsList.ts +++ b/src/funcs/tenantsList.ts @@ -11,17 +11,22 @@ 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, + 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"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get tenants @@ -30,154 +35,160 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * 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 + client$: NovuCore, + page?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, ): Promise< - PageIterator< - Result< - operations.TenantControllerListTenantsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.TenantControllerListTenantsResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$: operations.TenantControllerListTenantsRequest = { - page: page, - limit: limit, - }; + 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 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 path$ = pathToFunc("/v1/tenants")(); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "page": payload$.page, + }); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - page: payload$.page, - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 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 requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + 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, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.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 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 [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; + 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; - } + 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); - }; + return () => + tenantsList( + client$, + nextPage, + limit, + options, + ); + }; - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + 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 index fb28491b..38b5d8b4 100644 --- a/src/funcs/tenantsRetrieve.ts +++ b/src/funcs/tenantsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,112 @@ import { Result } from "../types/fp.js"; * 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 + client$: NovuCore, + identifier: string, + options?: RequestOptions, ): Promise< - Result< - components.GetTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetTenantResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TenantControllerGetTenantByIdRequest = { - identifier: identifier, - }; + 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 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 pathParams$ = { + identifier: encodeSimple$("identifier", payload$.identifier, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); + const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 8fb6da40..51eb7f5e 100644 --- a/src/funcs/tenantsUpdate.ts +++ b/src/funcs/tenantsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,115 +32,117 @@ import { Result } from "../types/fp.js"; * 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 + client$: NovuCore, + identifier: string, + updateTenantRequestDto: components.UpdateTenantRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.UpdateTenantResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.TenantControllerUpdateTenantRequest = { + identifier: identifier, + updateTenantRequestDto: updateTenantRequestDto, + }; - const pathParams$ = { - identifier: encodeSimple$("identifier", payload$.identifier, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); + const pathParams$ = { + identifier: encodeSimple$("identifier", payload$.identifier, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/tenants/{identifier}")(pathParams$); - 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 headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 e44b45a4..478b92e2 100644 --- a/src/funcs/topicsCreate.ts +++ b/src/funcs/topicsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,101 @@ import { Result } from "../types/fp.js"; * Create a topic */ export async function topicsCreate( - client$: NovuCore, - request: components.CreateTopicRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateTopicRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.CreateTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.CreateTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateTopicRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => components.CreateTopicRequestDto$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/topics")(); + const path$ = pathToFunc("/v1/topics")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "TopicsController_createTopic", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.CreateTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.CreateTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.CreateTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.CreateTopicResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsDelete.ts b/src/funcs/topicsDelete.ts index 327a069c..7da8e531 100644 --- a/src/funcs/topicsDelete.ts +++ b/src/funcs/topicsDelete.ts @@ -2,6 +2,7 @@ * 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"; @@ -10,17 +11,16 @@ 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, + 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 * as z from "zod"; /** * Delete topic @@ -29,112 +29,112 @@ import * as z from "zod"; * Delete a topic by its topic key if it has no subscribers */ export async function topicsDelete( - client$: NovuCore, - topicKey: string, - options?: RequestOptions + client$: NovuCore, + topicKey: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerDeleteTopicRequest = { - topicKey: topicKey, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.TopicsControllerDeleteTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const input$: operations.TopicsControllerDeleteTopicRequest = { + topicKey: topicKey, + }; - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerDeleteTopicRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); + const pathParams$ = { + topicKey: encodeSimple$("topicKey", payload$.topicKey, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "*/*", - }); + const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_deleteTopic", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "*/*", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "TopicsController_deleteTopic", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [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$; - } + 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/topicsList.ts b/src/funcs/topicsList.ts index 45e0f734..78b1c098 100644 --- a/src/funcs/topicsList.ts +++ b/src/funcs/topicsList.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,110 +29,108 @@ 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, - request: operations.TopicsControllerListTopicsRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.TopicsControllerListTopicsRequest, + options?: RequestOptions, ): Promise< - Result< - components.FilterTopicsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.FilterTopicsResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.TopicsControllerListTopicsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerListTopicsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_listTopics", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.FilterTopicsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.FilterTopicsResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.FilterTopicsResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.FilterTopicsResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsRename.ts b/src/funcs/topicsRename.ts index f6c24b0c..d9685ee8 100644 --- a/src/funcs/topicsRename.ts +++ b/src/funcs/topicsRename.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,115 +32,117 @@ import { Result } from "../types/fp.js"; * Rename a topic by providing a new name */ export async function topicsRename( - client$: NovuCore, - topicKey: string, - renameTopicRequestDto: components.RenameTopicRequestDto, - options?: RequestOptions + client$: NovuCore, + topicKey: string, + renameTopicRequestDto: components.RenameTopicRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.RenameTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.RenameTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerRenameTopicRequest = { - topicKey: topicKey, - renameTopicRequestDto: renameTopicRequestDto, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.TopicsControllerRenameTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RenameTopicRequestDto, { explode: true }); + const input$: operations.TopicsControllerRenameTopicRequest = { + topicKey: topicKey, + renameTopicRequestDto: renameTopicRequestDto, + }; - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerRenameTopicRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RenameTopicRequestDto, { + explode: true, + }); - const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); + const pathParams$ = { + topicKey: encodeSimple$("topicKey", payload$.topicKey, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/topics/{topicKey}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_renameTopic", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "TopicsController_renameTopic", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.RenameTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.RenameTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.RenameTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.RenameTopicResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsRetrieve.ts b/src/funcs/topicsRetrieve.ts index 61310bad..86192d23 100644 --- a/src/funcs/topicsRetrieve.ts +++ b/src/funcs/topicsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,110 @@ import { Result } from "../types/fp.js"; * Get a topic by its topic key */ export async function topicsRetrieve( - client$: NovuCore, - topicKey: string, - options?: RequestOptions + client$: NovuCore, + topicKey: string, + options?: RequestOptions, ): Promise< - Result< - components.GetTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerGetTopicRequest = { - topicKey: topicKey, - }; + const input$: operations.TopicsControllerGetTopicRequest = { + topicKey: topicKey, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.TopicsControllerGetTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerGetTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_getTopic", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.GetTopicResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetTopicResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.GetTopicResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetTopicResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsSubscribersAssign.ts b/src/funcs/topicsSubscribersAssign.ts index 3f438bf5..d3337afe 100644 --- a/src/funcs/topicsSubscribersAssign.ts +++ b/src/funcs/topicsSubscribersAssign.ts @@ -2,8 +2,12 @@ * 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 { + 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"; @@ -11,17 +15,16 @@ 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, + 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 * as z from "zod"; /** * Subscribers addition @@ -30,115 +33,117 @@ import * as z from "zod"; * Add subscribers to a topic by key */ export async function topicsSubscribersAssign( - client$: NovuCore, - topicKey: string, - addSubscribersRequestDto: components.AddSubscribersRequestDto, - options?: RequestOptions + client$: NovuCore, + topicKey: string, + addSubscribersRequestDto: components.AddSubscribersRequestDto, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerAddSubscribersRequest = { - topicKey: topicKey, - addSubscribersRequestDto: addSubscribersRequestDto, - }; + const input$: operations.TopicsControllerAddSubscribersRequest = { + topicKey: topicKey, + addSubscribersRequestDto: addSubscribersRequestDto, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.TopicsControllerAddSubscribersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.AddSubscribersRequestDto, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerAddSubscribersRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.AddSubscribersRequestDto, { + explode: true, + }); - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_addSubscribers", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsSubscribersDelete.ts b/src/funcs/topicsSubscribersDelete.ts index fc530bee..557f4f40 100644 --- a/src/funcs/topicsSubscribersDelete.ts +++ b/src/funcs/topicsSubscribersDelete.ts @@ -2,8 +2,12 @@ * 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 { + 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"; @@ -11,17 +15,16 @@ 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, + 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 * as z from "zod"; /** * Subscribers removal @@ -30,116 +33,119 @@ import * as z from "zod"; * Remove subscribers from a topic */ export async function topicsSubscribersDelete( - client$: NovuCore, - topicKey: string, - removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, - options?: RequestOptions + client$: NovuCore, + topicKey: string, + removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerRemoveSubscribersRequest = { - topicKey: topicKey, - removeSubscribersRequestDto: removeSubscribersRequestDto, - }; + const input$: operations.TopicsControllerRemoveSubscribersRequest = { + topicKey: topicKey, + removeSubscribersRequestDto: removeSubscribersRequestDto, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerRemoveSubscribersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RemoveSubscribersRequestDto, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerRemoveSubscribersRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RemoveSubscribersRequestDto, { + explode: true, + }); - const pathParams$ = { - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + 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({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_removeSubscribers", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, z.void()), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsSubscribersRetrieve.ts b/src/funcs/topicsSubscribersRetrieve.ts index a0e0f47e..856d0a62 100644 --- a/src/funcs/topicsSubscribersRetrieve.ts +++ b/src/funcs/topicsSubscribersRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,121 +29,121 @@ import { Result } from "../types/fp.js"; * Check if a subscriber belongs to a certain topic */ export async function topicsSubscribersRetrieve( - client$: NovuCore, - externalSubscriberId: string, - topicKey: string, - options?: RequestOptions + client$: NovuCore, + externalSubscriberId: string, + topicKey: string, + options?: RequestOptions, ): Promise< - Result< - components.TopicSubscriberDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.TopicSubscriberDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.TopicsControllerGetTopicSubscriberRequest = { - externalSubscriberId: externalSubscriberId, - topicKey: topicKey, - }; + const input$: operations.TopicsControllerGetTopicSubscriberRequest = { + externalSubscriberId: externalSubscriberId, + topicKey: topicKey, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.TopicsControllerGetTopicSubscriberRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.TopicsControllerGetTopicSubscriberRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - externalSubscriberId: encodeSimple$("externalSubscriberId", payload$.externalSubscriberId, { - explode: false, - charEncoding: "percent", - }), - topicKey: encodeSimple$("topicKey", payload$.topicKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + externalSubscriberId: encodeSimple$( + "externalSubscriberId", + payload$.externalSubscriberId, + { explode: false, charEncoding: "percent" }, + ), + topicKey: encodeSimple$("topicKey", payload$.topicKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/topics/{topicKey}/subscribers/{externalSubscriberId}")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "TopicsController_getTopicSubscriber", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.TopicSubscriberDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.TopicSubscriberDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.TopicSubscriberDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.TopicSubscriberDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/trigger.ts b/src/funcs/trigger.ts index ab072ff1..ae672b44 100644 --- a/src/funcs/trigger.ts +++ b/src/funcs/trigger.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,107 +29,103 @@ import { Result } from "../types/fp.js"; * 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. - * */ export async function trigger( - client$: NovuCore, - request: components.TriggerEventRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.TriggerEventRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.TriggerEventResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.TriggerEventResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.TriggerEventRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const input$ = request; - const path$ = pathToFunc("/v1/events/trigger")(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => components.TriggerEventRequestDto$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/events/trigger")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "EventsController_trigger", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "EventsController_trigger", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.TriggerEventResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.TriggerEventResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.TriggerEventResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.TriggerEventResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/triggerBroadcast.ts b/src/funcs/triggerBroadcast.ts index 971d0da6..7004f5b8 100644 --- a/src/funcs/triggerBroadcast.ts +++ b/src/funcs/triggerBroadcast.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,104 +29,102 @@ import { Result } from "../types/fp.js"; * In the future could be used to trigger events to a subset of subscribers based on defined filters. */ export async function triggerBroadcast( - client$: NovuCore, - request: components.TriggerEventToAllRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.TriggerEventToAllRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.TriggerEventResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.TriggerEventResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.TriggerEventToAllRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + components.TriggerEventToAllRequestDto$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/events/trigger/broadcast")(); + const path$ = pathToFunc("/v1/events/trigger/broadcast")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "EventsController_broadcastEventToAll", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.TriggerEventResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.TriggerEventResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.TriggerEventResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.TriggerEventResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/triggerBulk.ts b/src/funcs/triggerBulk.ts index 16163aea..7072dd0d 100644 --- a/src/funcs/triggerBulk.ts +++ b/src/funcs/triggerBulk.ts @@ -2,6 +2,7 @@ * 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"; @@ -11,16 +12,15 @@ 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, + 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"; -import * as z from "zod"; /** * Bulk trigger event @@ -29,107 +29,103 @@ import * as z from "zod"; * * 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. - * */ export async function triggerBulk( - client$: NovuCore, - request: components.BulkTriggerEventDto, - options?: RequestOptions + client$: NovuCore, + request: components.BulkTriggerEventDto, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.BulkTriggerEventDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => components.BulkTriggerEventDto$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/events/trigger/bulk")(); + const path$ = pathToFunc("/v1/events/trigger/bulk")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "EventsController_triggerBulk", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.TriggerEventResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.TriggerEventResponseDto$inboundSchema)), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowGroupsCreate.ts b/src/funcs/workflowGroupsCreate.ts index 5d8f4c05..64aae9b6 100644 --- a/src/funcs/workflowGroupsCreate.ts +++ b/src/funcs/workflowGroupsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,102 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsCreate( - client$: NovuCore, - request: components.CreateNotificationGroupRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateNotificationGroupRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateNotificationGroupRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + components.CreateNotificationGroupRequestDto$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/notification-groups")(); + const path$ = pathToFunc("/v1/notification-groups")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "NotificationGroupsController_createNotificationGroup", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; - - 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 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 [result$] = await m$.match< - components.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, components.NotificationGroupResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowGroupsDelete.ts b/src/funcs/workflowGroupsDelete.ts index b1492cf8..9bed9bf5 100644 --- a/src/funcs/workflowGroupsDelete.ts +++ b/src/funcs/workflowGroupsDelete.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,113 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsDelete( - client$: NovuCore, - id: string, - options?: RequestOptions + client$: NovuCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - components.DeleteNotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DeleteNotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.NotificationGroupsControllerDeleteNotificationGroupRequest = { - id: id, + const input$: + operations.NotificationGroupsControllerDeleteNotificationGroupRequest = { + id: id, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; - - const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationGroupsController_deleteNotificationGroup", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "NotificationGroupsController_deleteNotificationGroup", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.DeleteNotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DeleteNotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.DeleteNotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.DeleteNotificationGroupResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowGroupsList.ts b/src/funcs/workflowGroupsList.ts index 2eaee4e0..8edd041f 100644 --- a/src/funcs/workflowGroupsList.ts +++ b/src/funcs/workflowGroupsList.ts @@ -2,6 +2,7 @@ * 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"; @@ -9,16 +10,15 @@ 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, + 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"; -import * as z from "zod"; /** * Get workflow groups @@ -27,88 +27,88 @@ import * as z from "zod"; * workflow group was previously named notification group */ export async function workflowGroupsList( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/notification-groups")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/notification-groups")(); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationGroupsController_listNotificationGroups", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "NotificationGroupsController_listNotificationGroups", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, z.array(components.NotificationGroupResponseDto$inboundSchema)), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.NotificationGroupResponseDto$inboundSchema), + ), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowGroupsRetrieve.ts b/src/funcs/workflowGroupsRetrieve.ts index 6ff662d9..da00f3e6 100644 --- a/src/funcs/workflowGroupsRetrieve.ts +++ b/src/funcs/workflowGroupsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,112 +29,113 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsRetrieve( - client$: NovuCore, - id: string, - options?: RequestOptions + client$: NovuCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - components.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.NotificationGroupsControllerGetNotificationGroupRequest = { - id: id, + const input$: + operations.NotificationGroupsControllerGetNotificationGroupRequest = { + id: id, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; - - const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/notification-groups/{id}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "NotificationGroupsController_getNotificationGroup", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - 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 apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "NotificationGroupsController_getNotificationGroup", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - 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 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 [result$] = await m$.match< - components.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.NotificationGroupResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowGroupsUpdate.ts b/src/funcs/workflowGroupsUpdate.ts index 8b833c6d..284d5d50 100644 --- a/src/funcs/workflowGroupsUpdate.ts +++ b/src/funcs/workflowGroupsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,117 +32,121 @@ import { Result } from "../types/fp.js"; * workflow group was previously named notification group */ export async function workflowGroupsUpdate( - client$: NovuCore, - id: string, - createNotificationGroupRequestDto: components.CreateNotificationGroupRequestDto, - options?: RequestOptions + client$: NovuCore, + id: string, + createNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.NotificationGroupsControllerUpdateNotificationGroupRequest = { - id: id, - createNotificationGroupRequestDto: createNotificationGroupRequestDto, + const input$: + operations.NotificationGroupsControllerUpdateNotificationGroupRequest = { + id: id, + createNotificationGroupRequestDto: createNotificationGroupRequestDto, }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.CreateNotificationGroupRequestDto, { - explode: true, - }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$( + "body", + payload$.CreateNotificationGroupRequestDto, + { explode: true }, + ); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + 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({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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: "NotificationGroupsController_updateNotificationGroup", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + 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; + 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.NotificationGroupResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.NotificationGroupResponseDto$inboundSchema), - m$.fail([409, 429, "4XX", 503, "5XX"]) - )(response); - if (!result$.ok) { - return result$; - } + 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.NotificationGroupResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.NotificationGroupResponseDto$inboundSchema), + m$.fail([409, 429, "4XX", 503, "5XX"]), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/workflowsCreate.ts b/src/funcs/workflowsCreate.ts index 7dd3d4f0..be87fc98 100644 --- a/src/funcs/workflowsCreate.ts +++ b/src/funcs/workflowsCreate.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -28,104 +28,102 @@ import { Result } from "../types/fp.js"; * Workflow was previously named notification template */ export async function workflowsCreate( - client$: NovuCore, - request: components.CreateWorkflowRequestDto, - options?: RequestOptions + client$: NovuCore, + request: components.CreateWorkflowRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WorkflowResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + 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 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 path$ = pathToFunc("/v1/workflows")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 93f29d7a..936ecf50 100644 --- a/src/funcs/workflowsDelete.ts +++ b/src/funcs/workflowsDelete.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,113 +29,111 @@ import { Result } from "../types/fp.js"; * Workflow was previously named notification template */ export async function workflowsDelete( - client$: NovuCore, - workflowId: string, - options?: RequestOptions + client$: NovuCore, + workflowId: string, + options?: RequestOptions, ): Promise< - Result< - components.DataBooleanDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DataBooleanDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: workflowId, - }; + 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 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 pathParams$ = { + workflowId: encodeSimple$("workflowId", payload$.workflowId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); + const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 23037ac8..039ecb7d 100644 --- a/src/funcs/workflowsList.ts +++ b/src/funcs/workflowsList.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,110 +29,110 @@ import { Result } from "../types/fp.js"; * Workflows were previously named notification templates */ export async function workflowsList( - client$: NovuCore, - request: operations.WorkflowControllerListWorkflowsRequest, - options?: RequestOptions + client$: NovuCore, + request: operations.WorkflowControllerListWorkflowsRequest, + options?: RequestOptions, ): Promise< - Result< - components.WorkflowsResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WorkflowsResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + 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 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 path$ = pathToFunc("/v1/workflows")(); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - page: payload$.page, - query: payload$.query, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "page": payload$.page, + "query": payload$.query, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index f792e60e..38cf326a 100644 --- a/src/funcs/workflowsRetrieve.ts +++ b/src/funcs/workflowsRetrieve.ts @@ -11,11 +11,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,113 +29,112 @@ import { Result } from "../types/fp.js"; * Workflow was previously named notification template */ export async function workflowsRetrieve( - client$: NovuCore, - workflowId: string, - options?: RequestOptions + client$: NovuCore, + workflowId: string, + options?: RequestOptions, ): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WorkflowResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.WorkflowControllerGetWorkflowByIdRequest = { - workflowId: workflowId, - }; + 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 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 pathParams$ = { + workflowId: encodeSimple$("workflowId", payload$.workflowId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); + const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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 index 518e60f9..31e1d20a 100644 --- a/src/funcs/workflowsStatusUpdate.ts +++ b/src/funcs/workflowsStatusUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,116 +32,116 @@ import { Result } from "../types/fp.js"; * Workflow was previously named notification template */ export async function workflowsStatusUpdate( - client$: NovuCore, - workflowId: string, - changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto, - options?: RequestOptions + client$: NovuCore, + workflowId: string, + changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.WorkflowControllerUpdateActiveStatusRequest = { + workflowId: workflowId, + changeWorkflowStatusRequestDto: changeWorkflowStatusRequestDto, + }; - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/workflows/{workflowId}/status")(pathParams$); + const pathParams$ = { + workflowId: encodeSimple$("workflowId", payload$.workflowId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/workflows/{workflowId}/status")(pathParams$); - 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 headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 index 0c200e85..7a0ba097 100644 --- a/src/funcs/workflowsUpdate.ts +++ b/src/funcs/workflowsUpdate.ts @@ -3,7 +3,10 @@ */ import { NovuCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.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"; @@ -11,11 +14,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -29,116 +32,116 @@ import { Result } from "../types/fp.js"; * Workflow was previously named notification template */ export async function workflowsUpdate( - client$: NovuCore, - workflowId: string, - updateWorkflowRequestDto: components.UpdateWorkflowRequestDto, - options?: RequestOptions + client$: NovuCore, + workflowId: string, + updateWorkflowRequestDto: components.UpdateWorkflowRequestDto, + options?: RequestOptions, ): Promise< - Result< - components.WorkflowResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + 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 input$: operations.WorkflowControllerUpdateWorkflowByIdRequest = { + workflowId: workflowId, + updateWorkflowRequestDto: updateWorkflowRequestDto, + }; - const pathParams$ = { - workflowId: encodeSimple$("workflowId", payload$.workflowId, { - explode: false, - charEncoding: "percent", - }), - }; + 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 path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); + const pathParams$ = { + workflowId: encodeSimple$("workflowId", payload$.workflowId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/workflows/{workflowId}")(pathParams$); - 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 headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - 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 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 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 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 [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$; - } + 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 index b0e39a01..1062f192 100644 --- a/src/funcs/workflowsVariablesRetrieve.ts +++ b/src/funcs/workflowsVariablesRetrieve.ts @@ -9,11 +9,11 @@ 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, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; @@ -26,88 +26,85 @@ import { Result } from "../types/fp.js"; * Get the variables that can be used in the workflow */ export async function workflowsVariablesRetrieve( - client$: NovuCore, - options?: RequestOptions + client$: NovuCore, + options?: RequestOptions, ): Promise< - Result< - components.VariablesResponseDto, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.VariablesResponseDto, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/v1/workflows/variables")(); + const path$ = pathToFunc("/v1/workflows/variables")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + 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 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 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 [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$; - } + 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/hooks.ts b/src/hooks/hooks.ts index a6b6e17a..d1b3396f 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -4,100 +4,109 @@ import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeRequestContext, - BeforeRequestHook, - BeforeCreateRequestHook, - BeforeCreateRequestContext, - Hooks, - SDKInitHook, - SDKInitOptions, + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, } from "./types.js"; import { initHooks } from "./registration.js"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; - - constructor() { - initHooks(this); + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); } - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); - } + return inp; + } - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); - } + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); } - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } + return req; + } - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); } - beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { - let inp = input; - - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); - } - - return inp; + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; } - async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); - } - - return req; - } - - async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); - } - - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; - } - - return { response: res, error: err }; - } + return { response: res, error: err }; + } } diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8f0e4dbf..f60ec7ac 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./types.js"; export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 3a31914a..656b9e37 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -5,16 +5,16 @@ import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { - operationID: string; - oAuth2Scopes?: string[]; - securitySource?: any | (() => Promise); + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); }; export type Awaitable = T | Promise; export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -27,63 +27,72 @@ export type AfterErrorContext = HookContext & {}; * hook can return a new baseURL and HTTP client to be used by the SDK. */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; } diff --git a/src/index.ts b/src/index.ts index ceb63804..5ddc765e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,5 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk/sdk.js"; export * from "./lib/config.js"; +export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/config.ts b/src/lib/config.ts index 85abaeab..0a6e23cb 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -10,49 +10,52 @@ import { Params, pathToFunc } from "./url.js"; /** * Contains the list of servers available to the SDK */ -export const ServerList = ["https://api.novu.co", "https://eu.api.novu.co"] as const; +export const ServerList = [ + "https://api.novu.co", + "https://eu.api.novu.co", +] as const; export type SDKOptions = { - apiKey?: string | (() => Promise); - - httpClient?: HTTPClient; - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; + apiKey?: string | (() => Promise); + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; }; export function serverURLFromOptions(options: SDKOptions): URL | null { - let serverURL = options.serverURL; + let serverURL = options.serverURL; - const params: Params = {}; + const params: Params = {}; - if (!serverURL) { - const serverIdx = options.serverIdx ?? 0; - if (serverIdx < 0 || serverIdx >= ServerList.length) { - throw new Error(`Invalid server index ${serverIdx}`); - } - serverURL = ServerList[serverIdx] || ""; + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); } + serverURL = ServerList[serverIdx] || ""; + } - const u = pathToFunc(serverURL)(params); - return new URL(u); + const u = pathToFunc(serverURL)(params); + return new URL(u); } export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "1.0", - sdkVersion: "0.0.1-alpha.10", - genVersion: "2.407.2", - userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.10 2.407.2 1.0 @novu/api", + 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", } as const; diff --git a/src/lib/files.ts b/src/lib/files.ts new file mode 100644 index 00000000..19e08041 --- /dev/null +++ b/src/lib/files.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Consumes a stream and returns a concatenated array buffer. Useful in + * situations where we need to read the whole file because it forms part of a + * larger payload containing other fields, and we can't modify the underlying + * request structure. + */ +export async function readableStreamToArrayBuffer( + readable: ReadableStream, +): Promise { + const reader = readable.getReader(); + const chunks: Uint8Array[] = []; + + let totalLength = 0; + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + + if (doneReading) { + done = true; + } else { + chunks.push(value); + totalLength += value.length; + } + } + + const concatenatedChunks = new Uint8Array(totalLength); + let offset = 0; + + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + + return concatenatedChunks.buffer; +} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index dcb468b8..55a9e14b 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -2,271 +2,285 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { safeParse } from "./schemas.js"; -import { StatusCodePredicate, matchResponse, matchStatusCode } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { Result } from "../types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; -export type Encoding = "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail"; +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; const DEFAULT_CONTENT_TYPES: Record = { - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", }; type Schema = { parse(raw: unknown): T }; -type MatchOptions = { ctype?: string; hdrs?: boolean; key?: string; sseSentinel?: string }; +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; }; export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; }; export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; + enc: "fail"; + codes: StatusCodePredicate; }; export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; + return { ...options, err: true, enc: "json", codes, schema }; } export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "json", codes, schema }; + return { ...options, enc: "json", codes, schema }; } export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; + return { ...options, err: true, enc: "text", codes, schema }; } export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "text", codes, schema }; + return { ...options, enc: "text", codes, schema }; } export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; + return { ...options, err: true, enc: "bytes", codes, schema }; } export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; + return { ...options, enc: "bytes", codes, schema }; } export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; + return { ...options, err: true, enc: "stream", codes, schema }; } export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; + return { ...options, enc: "stream", codes, schema }; } export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; + return { ...options, err: true, enc: "sse", codes, schema }; } export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; + return { ...options, enc: "sse", codes, schema }; } export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; + return { ...options, err: true, enc: "nil", codes, schema }; } export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; + return { ...options, enc: "nil", codes, schema }; } export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; + return { enc: "fail", codes }; } -export type MatchedValue = Matchers extends Matcher[] ? T : never; -export type MatchedError = Matchers extends Matcher[] ? E : never; +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; export type MatchFunc = ( - response: Response, - options?: { resultKey?: string; extraFields?: Record } + response: Response, + options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( - ...matchers: Array> + ...matchers: Array> ): MatchFunc { - return async function matchFunc( - response: Response, - options?: { resultKey?: string; extraFields?: Record } - ): Promise<[result: Result, raw: unknown]> { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match ? match.ctype : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } - if (!matcher) { - const responseBody = await response.text(); - return [ - { - ok: false, - error: new SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ), - }, - responseBody, - ]; - } + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } - const encoding = matcher.enc; - switch (encoding) { - case "json": - raw = await response.json(); - break; - case "bytes": - raw = await response.arrayBuffer(); - break; - case "stream": - raw = response.body; - break; - case "text": - raw = await response.text(); - break; - case "sse": - raw = response.body; - break; - case "nil": - raw = await discardResponseBody(response); - break; - case "fail": - raw = await response.text(); - break; - default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); - } + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } - if (matcher.enc === "fail") { - return [ - { - ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ), - }, - raw, - ]; - } + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } - const resultKey = matcher.key || options?.resultKey; - let data: unknown; + const resultKey = matcher.key || options?.resultKey; + let data: unknown; - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else if (matcher.hdrs) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else { - data = raw; - } + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else if (matcher.hdrs) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else { + data = raw; + } - if ("err" in matcher) { - const result = safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ), - raw, - ]; - } - }; + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; } const headerValRE = /, */; @@ -275,13 +289,13 @@ const headerValRE = /, */; * entries. Values are represented as an array to account for repeated headers. */ export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; } /** @@ -291,18 +305,18 @@ export function unpackHeaders(headers: Headers): Record { * https://undici.nodejs.org/#/?id=garbage-collection */ export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } + const reader = res.body?.getReader(); + if (reader == null) { + return; + } - try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 37b0b131..f3856dcb 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -2,7 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../types/fp.js"; @@ -11,15 +18,19 @@ import { ERR, OK, Result } from "../types/fp.js"; * intercepts this error and converts it to an SDKValidationError so as to not * leak Zod implementation details to user code. */ -export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); } + throw err; + } } /** @@ -28,47 +39,48 @@ export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMes * leak Zod implementation details to user code. */ export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, ): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } } export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, >( - obj: ZodObject, - extrasKey: K + obj: ZodObject, + extrasKey: K, ): ZodEffects< - typeof obj, - output> & { - [k in K]: Record>; - } + typeof obj, + & output> + & { + [k in K]: Record>; + } > { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } - const v = val[key]; - if (typeof v === "undefined") { - continue; - } + const v = val[key]; + if (typeof v === "undefined") { + continue; + } - extras[key] = v; - delete val[key]; - } + extras[key] = v; + delete val[key]; + } - return { ...val, [extrasKey]: extras }; - }); + return { ...val, [extrasKey]: extras }; + }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 51b49bd0..5e2a8909 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,356 +2,383 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { - HTTPClient, - matchContentType, - matchStatusCode, - isAbortError, - isTimeoutError, - isConnectionError, -} from "./http.js"; -import { SecurityState } from "./security.js"; -import { retry, RetryConfig } from "./retries.js"; -import { Logger } from "./logger.js"; -import { encodeForm } from "./encodings.js"; -import { stringToBase64 } from "./base64.js"; -import { SDKOptions, SDK_METADATA, serverURLFromOptions } from "./config.js"; import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; }; type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - timeoutMs?: number; + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = - typeof gt === "object" && - gt != null && - "importScripts" in gt && - typeof gt["importScripts"] === "function"; -const isBrowserLike = - webWorkerLike || - (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - (typeof window === "object" && typeof window.document !== "undefined"); +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (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 }; - - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" && - opt != null && - "hooks" in opt && - opt.hooks instanceof SDKHooks - ) { - this.hooks$ = opt.hooks; - } else { - this.hooks$ = new SDKHooks(); - } - this.options$ = { ...options, hooks: this.hooks$ }; - - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - const { baseURL, client } = this.hooks$.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } else { + this.hooks$ = new SDKHooks(); } + this.options$ = { ...options, hooks: this.hooks$ }; - public createRequest$( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; - - const base = conf.baseURL ?? this.baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); - - if (path) { - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); - } - - let finalQuery = query || ""; + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + const { baseURL, client } = this.hooks$.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this.baseURL = baseURL; + this.httpClient = client; + this.logger = options.debugLogger; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } + let finalQuery = query || ""; - const headers = new Headers(opHeaders); + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64([username || "", password || ""].join(":")); - headers.set("Authorization", `Basic ${encoded}`); - } + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } + const headers = new Headers(opHeaders); - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } - const userHeaders = new Headers(options?.fetchOptions?.headers); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); - } + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); - let fetchOptions = options?.fetchOptions; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } - } + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } - let input; - try { - input = this.hooks$.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { - return ERR( - new UnexpectedClientError("Create request hook failed to execute", { cause: err }) - ); - } + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } - return OK(new Request(input.url, input.options)); + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } } - public async do$( - request: Request, - options: { - context: HookContext; - errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; - } - ): Promise< - Result< - Response, - RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError - > - > { - 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) - ); - - 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; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - await logResponse(this.logger, response, req).catch((e) => - this.logger?.log("Failed to log response:", e) - ); - - return response; - }, - { config: retryConfig, statusCodes: retryCodes } - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { cause: err }) - ); - case isTimeoutError(err): - return ERR(new RequestTimeoutError("Request timed out", { cause: err })); - case isConnectionError(err): - return ERR(new ConnectionError("Unable to make request", { cause: err })); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }) - ); - } - } - ); + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + fetchOptions.duplex = "half"; + } } -} -const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; -async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); } - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + 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) + ); - logger.group(`> Request: ${req.method} ${req.url}`); + let response = await this.httpClient.request(req); - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; + 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); } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - logger.groupEnd(); + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); + + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): + return ERR( + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), + ); + } + }, + ); + } } -async function logResponse(logger: Logger | undefined, res: Response, req: Request) { - if (!logger) { - return; +const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; +async function logRequest(logger: Logger | undefined, req: Request) { + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); + logger.groupEnd(); +} - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") || jsonLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } - logger.groupEnd(); + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - logger.groupEnd(); + logger.groupEnd(); } diff --git a/src/lib/security.ts b/src/lib/security.ts index bc77acc8..f9d684c4 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -5,199 +5,213 @@ import * as components from "../models/components/index.js"; export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", } export class SecurityError extends Error { - constructor(public code: SecurityErrorCode, message: string) { - super(message); - this.name = "SecurityError"; - } - - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation" - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}` - ); - } + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } } export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; }; type SecurityInputBasic = { - type: "http:basic"; - value: { username?: string | undefined; password?: string | undefined } | null | undefined; + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; }; type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; + type: "oauth2"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: string | null | undefined; - fieldName: string; + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName: string; + type: "http:custom"; + value: any | null | undefined; + fieldName: string; }; export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOIDC - | SecurityInputCustom; - -export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { - const state: SecurityState = { - basic: { username: "", password: "" }, - headers: {}, - queryParams: {}, - cookies: {}, - }; - - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` - ); - } - }); - }); - if (option == null) { + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { return null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; } - option.forEach((spec) => { - if (spec.value == null) { - return; - } - - const { type } = spec; - - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); - } - }); + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); - return state; + return state; } -function applyBasic(state: SecurityState, spec: SecurityInputBasic) { - if (spec.value == null) { - return; - } +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } - state.basic = spec.value; + state.basic = spec.value; } function applyBearer( - state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, ) { - if (spec.value == null) { - return; - } + if (spec.value == null) { + return; + } - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } - state.headers[spec.fieldName] = value; + state.headers[spec.fieldName] = value; } export function resolveGlobalSecurity( - security: Partial | null | undefined + security: Partial | null | undefined, ): SecurityState | null { - return resolveSecurity([ - { - fieldName: "Authorization", - type: "apiKey:header", - value: security?.apiKey, - }, - ]); + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "apiKey:header", + value: security?.apiKey, + }, + ], + ); } -export async function extractSecurity>( - sec: T | (() => Promise) | undefined -): Promise { - if (sec == null) { - return; - } +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } - return typeof sec === "function" ? sec() : sec; + return typeof sec === "function" ? sec() : sec; } diff --git a/src/models/components/activitiesresponsedto.ts b/src/models/components/activitiesresponsedto.ts index 5bed52e3..2f217b85 100644 --- a/src/models/components/activitiesresponsedto.ts +++ b/src/models/components/activitiesresponsedto.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type ActivitiesResponseDto = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; }; /** @internal */ export const ActivitiesResponseDto$inboundSchema: z.ZodType< - ActivitiesResponseDto, - z.ZodTypeDef, - unknown + ActivitiesResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.array(z.string()), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), + data: z.array(z.string()), + hasMore: z.boolean(), + page: z.number(), + pageSize: z.number(), }); /** @internal */ export type ActivitiesResponseDto$Outbound = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; }; /** @internal */ export const ActivitiesResponseDto$outboundSchema: z.ZodType< - ActivitiesResponseDto$Outbound, - z.ZodTypeDef, - ActivitiesResponseDto + ActivitiesResponseDto$Outbound, + z.ZodTypeDef, + ActivitiesResponseDto > = z.object({ - data: z.array(z.string()), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), + data: z.array(z.string()), + hasMore: z.boolean(), + page: z.number(), + pageSize: z.number(), }); /** @@ -48,10 +48,10 @@ export const ActivitiesResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivitiesResponseDto$ { - /** @deprecated use `ActivitiesResponseDto$inboundSchema` instead. */ - export const inboundSchema = ActivitiesResponseDto$inboundSchema; - /** @deprecated use `ActivitiesResponseDto$outboundSchema` instead. */ - export const outboundSchema = ActivitiesResponseDto$outboundSchema; - /** @deprecated use `ActivitiesResponseDto$Outbound` instead. */ - export type Outbound = ActivitiesResponseDto$Outbound; + /** @deprecated use `ActivitiesResponseDto$inboundSchema` instead. */ + export const inboundSchema = ActivitiesResponseDto$inboundSchema; + /** @deprecated use `ActivitiesResponseDto$outboundSchema` instead. */ + export const outboundSchema = ActivitiesResponseDto$outboundSchema; + /** @deprecated use `ActivitiesResponseDto$Outbound` instead. */ + export type Outbound = ActivitiesResponseDto$Outbound; } diff --git a/src/models/components/activitygraphstatesresponse.ts b/src/models/components/activitygraphstatesresponse.ts index b8532600..8898c0f4 100644 --- a/src/models/components/activitygraphstatesresponse.ts +++ b/src/models/components/activitygraphstatesresponse.ts @@ -2,96 +2,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 { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const Channels = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; export type Channels = ClosedEnum; export type ActivityGraphStatesResponse = { - id: string; - channels: Array; - count: number; - templates: Array; + id: string; + channels: Array; + count: number; + templates: Array; }; /** @internal */ -export const Channels$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Channels); +export const Channels$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channels); /** @internal */ -export const Channels$outboundSchema: z.ZodNativeEnum = Channels$inboundSchema; +export const Channels$outboundSchema: z.ZodNativeEnum = + Channels$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Channels$ { - /** @deprecated use `Channels$inboundSchema` instead. */ - export const inboundSchema = Channels$inboundSchema; - /** @deprecated use `Channels$outboundSchema` instead. */ - export const outboundSchema = Channels$outboundSchema; + /** @deprecated use `Channels$inboundSchema` instead. */ + export const inboundSchema = Channels$inboundSchema; + /** @deprecated use `Channels$outboundSchema` instead. */ + export const outboundSchema = Channels$outboundSchema; } /** @internal */ export const ActivityGraphStatesResponse$inboundSchema: z.ZodType< - ActivityGraphStatesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string(), - channels: z.array(Channels$inboundSchema), - count: z.number(), - templates: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - }); - }); + ActivityGraphStatesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string(), + channels: z.array(Channels$inboundSchema), + count: z.number(), + templates: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type ActivityGraphStatesResponse$Outbound = { - _id: string; - channels: Array; - count: number; - templates: Array; + _id: string; + channels: Array; + count: number; + templates: Array; }; /** @internal */ export const ActivityGraphStatesResponse$outboundSchema: z.ZodType< - ActivityGraphStatesResponse$Outbound, - z.ZodTypeDef, - ActivityGraphStatesResponse -> = z - .object({ - id: z.string(), - channels: z.array(Channels$outboundSchema), - count: z.number(), - templates: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - }); - }); + ActivityGraphStatesResponse$Outbound, + z.ZodTypeDef, + ActivityGraphStatesResponse +> = z.object({ + id: z.string(), + channels: z.array(Channels$outboundSchema), + count: z.number(), + templates: z.array(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 ActivityGraphStatesResponse$ { - /** @deprecated use `ActivityGraphStatesResponse$inboundSchema` instead. */ - export const inboundSchema = ActivityGraphStatesResponse$inboundSchema; - /** @deprecated use `ActivityGraphStatesResponse$outboundSchema` instead. */ - export const outboundSchema = ActivityGraphStatesResponse$outboundSchema; - /** @deprecated use `ActivityGraphStatesResponse$Outbound` instead. */ - export type Outbound = ActivityGraphStatesResponse$Outbound; + /** @deprecated use `ActivityGraphStatesResponse$inboundSchema` instead. */ + export const inboundSchema = ActivityGraphStatesResponse$inboundSchema; + /** @deprecated use `ActivityGraphStatesResponse$outboundSchema` instead. */ + export const outboundSchema = ActivityGraphStatesResponse$outboundSchema; + /** @deprecated use `ActivityGraphStatesResponse$Outbound` instead. */ + export type Outbound = ActivityGraphStatesResponse$Outbound; } diff --git a/src/models/components/activitynotificationresponsedto.ts b/src/models/components/activitynotificationresponsedto.ts index cb11624b..cd4d41fc 100644 --- a/src/models/components/activitynotificationresponsedto.ts +++ b/src/models/components/activitynotificationresponsedto.ts @@ -2,142 +2,142 @@ * 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"; import { - ActivityNotificationSubscriberResponseDto, - ActivityNotificationSubscriberResponseDto$inboundSchema, - ActivityNotificationSubscriberResponseDto$Outbound, - ActivityNotificationSubscriberResponseDto$outboundSchema, + ActivityNotificationSubscriberResponseDto, + ActivityNotificationSubscriberResponseDto$inboundSchema, + ActivityNotificationSubscriberResponseDto$Outbound, + ActivityNotificationSubscriberResponseDto$outboundSchema, } from "./activitynotificationsubscriberresponsedto.js"; import { - ActivityNotificationTemplateResponseDto, - ActivityNotificationTemplateResponseDto$inboundSchema, - ActivityNotificationTemplateResponseDto$Outbound, - ActivityNotificationTemplateResponseDto$outboundSchema, + ActivityNotificationTemplateResponseDto, + ActivityNotificationTemplateResponseDto$inboundSchema, + ActivityNotificationTemplateResponseDto$Outbound, + ActivityNotificationTemplateResponseDto$outboundSchema, } from "./activitynotificationtemplateresponsedto.js"; -import * as z from "zod"; export const ActivityNotificationResponseDtoChannels = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", - Digest: "digest", - Trigger: "trigger", - Delay: "delay", - Custom: "custom", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", + Digest: "digest", + Trigger: "trigger", + Delay: "delay", + Custom: "custom", } as const; export type ActivityNotificationResponseDtoChannels = ClosedEnum< - typeof ActivityNotificationResponseDtoChannels + typeof ActivityNotificationResponseDtoChannels >; export type ActivityNotificationResponseDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - channels?: ActivityNotificationResponseDtoChannels | undefined; - createdAt?: string | undefined; - jobs?: Array | undefined; - subscriber?: ActivityNotificationSubscriberResponseDto | undefined; - template?: ActivityNotificationTemplateResponseDto | undefined; - transactionId: string; + environmentId: string; + id?: string | undefined; + organizationId: string; + channels?: ActivityNotificationResponseDtoChannels | undefined; + createdAt?: string | undefined; + jobs?: Array | undefined; + subscriber?: ActivityNotificationSubscriberResponseDto | undefined; + template?: ActivityNotificationTemplateResponseDto | undefined; + transactionId: string; }; /** @internal */ -export const ActivityNotificationResponseDtoChannels$inboundSchema: z.ZodNativeEnum< - typeof ActivityNotificationResponseDtoChannels -> = z.nativeEnum(ActivityNotificationResponseDtoChannels); +export const ActivityNotificationResponseDtoChannels$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(ActivityNotificationResponseDtoChannels); /** @internal */ -export const ActivityNotificationResponseDtoChannels$outboundSchema: z.ZodNativeEnum< - typeof ActivityNotificationResponseDtoChannels -> = ActivityNotificationResponseDtoChannels$inboundSchema; +export const ActivityNotificationResponseDtoChannels$outboundSchema: + z.ZodNativeEnum = + ActivityNotificationResponseDtoChannels$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivityNotificationResponseDtoChannels$ { - /** @deprecated use `ActivityNotificationResponseDtoChannels$inboundSchema` instead. */ - export const inboundSchema = ActivityNotificationResponseDtoChannels$inboundSchema; - /** @deprecated use `ActivityNotificationResponseDtoChannels$outboundSchema` instead. */ - export const outboundSchema = ActivityNotificationResponseDtoChannels$outboundSchema; + /** @deprecated use `ActivityNotificationResponseDtoChannels$inboundSchema` instead. */ + export const inboundSchema = + ActivityNotificationResponseDtoChannels$inboundSchema; + /** @deprecated use `ActivityNotificationResponseDtoChannels$outboundSchema` instead. */ + export const outboundSchema = + ActivityNotificationResponseDtoChannels$outboundSchema; } /** @internal */ export const ActivityNotificationResponseDto$inboundSchema: z.ZodType< - ActivityNotificationResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - channels: ActivityNotificationResponseDtoChannels$inboundSchema.optional(), - createdAt: z.string().optional(), - jobs: z.array(z.string()).optional(), - subscriber: ActivityNotificationSubscriberResponseDto$inboundSchema.optional(), - template: ActivityNotificationTemplateResponseDto$inboundSchema.optional(), - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); + ActivityNotificationResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + channels: ActivityNotificationResponseDtoChannels$inboundSchema.optional(), + createdAt: z.string().optional(), + jobs: z.array(z.string()).optional(), + subscriber: ActivityNotificationSubscriberResponseDto$inboundSchema + .optional(), + template: ActivityNotificationTemplateResponseDto$inboundSchema.optional(), + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @internal */ export type ActivityNotificationResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - channels?: string | undefined; - createdAt?: string | undefined; - jobs?: Array | undefined; - subscriber?: ActivityNotificationSubscriberResponseDto$Outbound | undefined; - template?: ActivityNotificationTemplateResponseDto$Outbound | undefined; - transactionId: string; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + channels?: string | undefined; + createdAt?: string | undefined; + jobs?: Array | undefined; + subscriber?: ActivityNotificationSubscriberResponseDto$Outbound | undefined; + template?: ActivityNotificationTemplateResponseDto$Outbound | undefined; + transactionId: string; }; /** @internal */ export const ActivityNotificationResponseDto$outboundSchema: z.ZodType< - ActivityNotificationResponseDto$Outbound, - z.ZodTypeDef, - ActivityNotificationResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - channels: ActivityNotificationResponseDtoChannels$outboundSchema.optional(), - createdAt: z.string().optional(), - jobs: z.array(z.string()).optional(), - subscriber: ActivityNotificationSubscriberResponseDto$outboundSchema.optional(), - template: ActivityNotificationTemplateResponseDto$outboundSchema.optional(), - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); + ActivityNotificationResponseDto$Outbound, + z.ZodTypeDef, + ActivityNotificationResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + channels: ActivityNotificationResponseDtoChannels$outboundSchema.optional(), + createdAt: z.string().optional(), + jobs: z.array(z.string()).optional(), + subscriber: ActivityNotificationSubscriberResponseDto$outboundSchema + .optional(), + template: ActivityNotificationTemplateResponseDto$outboundSchema.optional(), + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivityNotificationResponseDto$ { - /** @deprecated use `ActivityNotificationResponseDto$inboundSchema` instead. */ - export const inboundSchema = ActivityNotificationResponseDto$inboundSchema; - /** @deprecated use `ActivityNotificationResponseDto$outboundSchema` instead. */ - export const outboundSchema = ActivityNotificationResponseDto$outboundSchema; - /** @deprecated use `ActivityNotificationResponseDto$Outbound` instead. */ - export type Outbound = ActivityNotificationResponseDto$Outbound; + /** @deprecated use `ActivityNotificationResponseDto$inboundSchema` instead. */ + export const inboundSchema = ActivityNotificationResponseDto$inboundSchema; + /** @deprecated use `ActivityNotificationResponseDto$outboundSchema` instead. */ + export const outboundSchema = ActivityNotificationResponseDto$outboundSchema; + /** @deprecated use `ActivityNotificationResponseDto$Outbound` instead. */ + export type Outbound = ActivityNotificationResponseDto$Outbound; } diff --git a/src/models/components/activitynotificationsubscriberresponsedto.ts b/src/models/components/activitynotificationsubscriberresponsedto.ts index a99d798c..45b5c01e 100644 --- a/src/models/components/activitynotificationsubscriberresponsedto.ts +++ b/src/models/components/activitynotificationsubscriberresponsedto.ts @@ -2,73 +2,72 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type ActivityNotificationSubscriberResponseDto = { - id: string; - email?: string | undefined; - firstName?: string | undefined; - lastName?: string | undefined; - phone?: string | undefined; + id: string; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + phone?: string | undefined; }; /** @internal */ export const ActivityNotificationSubscriberResponseDto$inboundSchema: z.ZodType< - ActivityNotificationSubscriberResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string(), - email: z.string().optional(), - firstName: z.string().optional(), - lastName: z.string().optional(), - phone: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - }); - }); + ActivityNotificationSubscriberResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + phone: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type ActivityNotificationSubscriberResponseDto$Outbound = { - _id: string; - email?: string | undefined; - firstName?: string | undefined; - lastName?: string | undefined; - phone?: string | undefined; + _id: string; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + phone?: string | undefined; }; /** @internal */ -export const ActivityNotificationSubscriberResponseDto$outboundSchema: z.ZodType< +export const ActivityNotificationSubscriberResponseDto$outboundSchema: + z.ZodType< ActivityNotificationSubscriberResponseDto$Outbound, z.ZodTypeDef, ActivityNotificationSubscriberResponseDto -> = z - .object({ - id: z.string(), - email: z.string().optional(), - firstName: z.string().optional(), - lastName: z.string().optional(), - phone: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - }); + > = z.object({ + id: z.string(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + phone: z.string().optional(), + }).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 ActivityNotificationSubscriberResponseDto$ { - /** @deprecated use `ActivityNotificationSubscriberResponseDto$inboundSchema` instead. */ - export const inboundSchema = ActivityNotificationSubscriberResponseDto$inboundSchema; - /** @deprecated use `ActivityNotificationSubscriberResponseDto$outboundSchema` instead. */ - export const outboundSchema = ActivityNotificationSubscriberResponseDto$outboundSchema; - /** @deprecated use `ActivityNotificationSubscriberResponseDto$Outbound` instead. */ - export type Outbound = ActivityNotificationSubscriberResponseDto$Outbound; + /** @deprecated use `ActivityNotificationSubscriberResponseDto$inboundSchema` instead. */ + export const inboundSchema = + ActivityNotificationSubscriberResponseDto$inboundSchema; + /** @deprecated use `ActivityNotificationSubscriberResponseDto$outboundSchema` instead. */ + export const outboundSchema = + ActivityNotificationSubscriberResponseDto$outboundSchema; + /** @deprecated use `ActivityNotificationSubscriberResponseDto$Outbound` instead. */ + export type Outbound = ActivityNotificationSubscriberResponseDto$Outbound; } diff --git a/src/models/components/activitynotificationtemplateresponsedto.ts b/src/models/components/activitynotificationtemplateresponsedto.ts index 7959bf59..4191097a 100644 --- a/src/models/components/activitynotificationtemplateresponsedto.ts +++ b/src/models/components/activitynotificationtemplateresponsedto.ts @@ -2,65 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type ActivityNotificationTemplateResponseDto = { - id?: string | undefined; - name: string; - triggers: Array; + id?: string | undefined; + name: string; + triggers: Array; }; /** @internal */ export const ActivityNotificationTemplateResponseDto$inboundSchema: z.ZodType< - ActivityNotificationTemplateResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string().optional(), - name: z.string(), - triggers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - }); - }); + ActivityNotificationTemplateResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string().optional(), + name: z.string(), + triggers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type ActivityNotificationTemplateResponseDto$Outbound = { - _id?: string | undefined; - name: string; - triggers: Array; + _id?: string | undefined; + name: string; + triggers: Array; }; /** @internal */ export const ActivityNotificationTemplateResponseDto$outboundSchema: z.ZodType< - ActivityNotificationTemplateResponseDto$Outbound, - z.ZodTypeDef, - ActivityNotificationTemplateResponseDto -> = z - .object({ - id: z.string().optional(), - name: z.string(), - triggers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - }); - }); + ActivityNotificationTemplateResponseDto$Outbound, + z.ZodTypeDef, + ActivityNotificationTemplateResponseDto +> = z.object({ + id: z.string().optional(), + name: z.string(), + triggers: z.array(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 ActivityNotificationTemplateResponseDto$ { - /** @deprecated use `ActivityNotificationTemplateResponseDto$inboundSchema` instead. */ - export const inboundSchema = ActivityNotificationTemplateResponseDto$inboundSchema; - /** @deprecated use `ActivityNotificationTemplateResponseDto$outboundSchema` instead. */ - export const outboundSchema = ActivityNotificationTemplateResponseDto$outboundSchema; - /** @deprecated use `ActivityNotificationTemplateResponseDto$Outbound` instead. */ - export type Outbound = ActivityNotificationTemplateResponseDto$Outbound; + /** @deprecated use `ActivityNotificationTemplateResponseDto$inboundSchema` instead. */ + export const inboundSchema = + ActivityNotificationTemplateResponseDto$inboundSchema; + /** @deprecated use `ActivityNotificationTemplateResponseDto$outboundSchema` instead. */ + export const outboundSchema = + ActivityNotificationTemplateResponseDto$outboundSchema; + /** @deprecated use `ActivityNotificationTemplateResponseDto$Outbound` instead. */ + export type Outbound = ActivityNotificationTemplateResponseDto$Outbound; } diff --git a/src/models/components/activitystatsresponsedto.ts b/src/models/components/activitystatsresponsedto.ts index a8138b40..78abb8d1 100644 --- a/src/models/components/activitystatsresponsedto.ts +++ b/src/models/components/activitystatsresponsedto.ts @@ -5,34 +5,34 @@ import * as z from "zod"; export type ActivityStatsResponseDto = { - monthlySent: number; - weeklySent: number; + monthlySent: number; + weeklySent: number; }; /** @internal */ export const ActivityStatsResponseDto$inboundSchema: z.ZodType< - ActivityStatsResponseDto, - z.ZodTypeDef, - unknown + ActivityStatsResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - monthlySent: z.number(), - weeklySent: z.number(), + monthlySent: z.number(), + weeklySent: z.number(), }); /** @internal */ export type ActivityStatsResponseDto$Outbound = { - monthlySent: number; - weeklySent: number; + monthlySent: number; + weeklySent: number; }; /** @internal */ export const ActivityStatsResponseDto$outboundSchema: z.ZodType< - ActivityStatsResponseDto$Outbound, - z.ZodTypeDef, - ActivityStatsResponseDto + ActivityStatsResponseDto$Outbound, + z.ZodTypeDef, + ActivityStatsResponseDto > = z.object({ - monthlySent: z.number(), - weeklySent: z.number(), + monthlySent: z.number(), + weeklySent: z.number(), }); /** @@ -40,10 +40,10 @@ export const ActivityStatsResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivityStatsResponseDto$ { - /** @deprecated use `ActivityStatsResponseDto$inboundSchema` instead. */ - export const inboundSchema = ActivityStatsResponseDto$inboundSchema; - /** @deprecated use `ActivityStatsResponseDto$outboundSchema` instead. */ - export const outboundSchema = ActivityStatsResponseDto$outboundSchema; - /** @deprecated use `ActivityStatsResponseDto$Outbound` instead. */ - export type Outbound = ActivityStatsResponseDto$Outbound; + /** @deprecated use `ActivityStatsResponseDto$inboundSchema` instead. */ + export const inboundSchema = ActivityStatsResponseDto$inboundSchema; + /** @deprecated use `ActivityStatsResponseDto$outboundSchema` instead. */ + export const outboundSchema = ActivityStatsResponseDto$outboundSchema; + /** @deprecated use `ActivityStatsResponseDto$Outbound` instead. */ + export type Outbound = ActivityStatsResponseDto$Outbound; } diff --git a/src/models/components/addsubscribersrequestdto.ts b/src/models/components/addsubscribersrequestdto.ts index c87f8ecb..1c4cf277 100644 --- a/src/models/components/addsubscribersrequestdto.ts +++ b/src/models/components/addsubscribersrequestdto.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type AddSubscribersRequestDto = { - /** - * List of subscriber identifiers that will be associated to the topic - */ - subscribers: Array; + /** + * List of subscriber identifiers that will be associated to the topic + */ + subscribers: Array; }; /** @internal */ export const AddSubscribersRequestDto$inboundSchema: z.ZodType< - AddSubscribersRequestDto, - z.ZodTypeDef, - unknown + AddSubscribersRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @internal */ export type AddSubscribersRequestDto$Outbound = { - subscribers: Array; + subscribers: Array; }; /** @internal */ export const AddSubscribersRequestDto$outboundSchema: z.ZodType< - AddSubscribersRequestDto$Outbound, - z.ZodTypeDef, - AddSubscribersRequestDto + AddSubscribersRequestDto$Outbound, + z.ZodTypeDef, + AddSubscribersRequestDto > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @@ -39,10 +39,10 @@ export const AddSubscribersRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddSubscribersRequestDto$ { - /** @deprecated use `AddSubscribersRequestDto$inboundSchema` instead. */ - export const inboundSchema = AddSubscribersRequestDto$inboundSchema; - /** @deprecated use `AddSubscribersRequestDto$outboundSchema` instead. */ - export const outboundSchema = AddSubscribersRequestDto$outboundSchema; - /** @deprecated use `AddSubscribersRequestDto$Outbound` instead. */ - export type Outbound = AddSubscribersRequestDto$Outbound; + /** @deprecated use `AddSubscribersRequestDto$inboundSchema` instead. */ + export const inboundSchema = AddSubscribersRequestDto$inboundSchema; + /** @deprecated use `AddSubscribersRequestDto$outboundSchema` instead. */ + export const outboundSchema = AddSubscribersRequestDto$outboundSchema; + /** @deprecated use `AddSubscribersRequestDto$Outbound` instead. */ + export type Outbound = AddSubscribersRequestDto$Outbound; } diff --git a/src/models/components/apikey.ts b/src/models/components/apikey.ts index 2e6f7ce7..7e7886db 100644 --- a/src/models/components/apikey.ts +++ b/src/models/components/apikey.ts @@ -2,53 +2,54 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type ApiKey = { - userId: string; - key: string; + userId: string; + key: string; }; /** @internal */ export const ApiKey$inboundSchema: z.ZodType = z - .object({ - _userId: z.string(), - key: z.string(), - }) - .transform((v) => { - return remap$(v, { - _userId: "userId", - }); + .object({ + _userId: z.string(), + key: z.string(), + }).transform((v) => { + return remap$(v, { + "_userId": "userId", }); + }); /** @internal */ export type ApiKey$Outbound = { - _userId: string; - key: string; + _userId: string; + key: string; }; /** @internal */ -export const ApiKey$outboundSchema: z.ZodType = z - .object({ - userId: z.string(), - key: z.string(), - }) - .transform((v) => { - return remap$(v, { - userId: "_userId", - }); - }); +export const ApiKey$outboundSchema: z.ZodType< + ApiKey$Outbound, + z.ZodTypeDef, + ApiKey +> = z.object({ + userId: z.string(), + key: z.string(), +}).transform((v) => { + return remap$(v, { + userId: "_userId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApiKey$ { - /** @deprecated use `ApiKey$inboundSchema` instead. */ - export const inboundSchema = ApiKey$inboundSchema; - /** @deprecated use `ApiKey$outboundSchema` instead. */ - export const outboundSchema = ApiKey$outboundSchema; - /** @deprecated use `ApiKey$Outbound` instead. */ - export type Outbound = ApiKey$Outbound; + /** @deprecated use `ApiKey$inboundSchema` instead. */ + export const inboundSchema = ApiKey$inboundSchema; + /** @deprecated use `ApiKey$outboundSchema` instead. */ + export const outboundSchema = ApiKey$outboundSchema; + /** @deprecated use `ApiKey$Outbound` instead. */ + export type Outbound = ApiKey$Outbound; } diff --git a/src/models/components/bulkapplychangedto.ts b/src/models/components/bulkapplychangedto.ts index 8efca721..e13f15eb 100644 --- a/src/models/components/bulkapplychangedto.ts +++ b/src/models/components/bulkapplychangedto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type BulkApplyChangeDto = { - changeIds: Array; + changeIds: Array; }; /** @internal */ export const BulkApplyChangeDto$inboundSchema: z.ZodType< - BulkApplyChangeDto, - z.ZodTypeDef, - unknown + BulkApplyChangeDto, + z.ZodTypeDef, + unknown > = z.object({ - changeIds: z.array(z.string()), + changeIds: z.array(z.string()), }); /** @internal */ export type BulkApplyChangeDto$Outbound = { - changeIds: Array; + changeIds: Array; }; /** @internal */ export const BulkApplyChangeDto$outboundSchema: z.ZodType< - BulkApplyChangeDto$Outbound, - z.ZodTypeDef, - BulkApplyChangeDto + BulkApplyChangeDto$Outbound, + z.ZodTypeDef, + BulkApplyChangeDto > = z.object({ - changeIds: z.array(z.string()), + changeIds: z.array(z.string()), }); /** @@ -36,10 +36,10 @@ export const BulkApplyChangeDto$outboundSchema: z.ZodType< * @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; + /** @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 e2e64fd6..baaf729d 100644 --- a/src/models/components/bulksubscribercreatedto.ts +++ b/src/models/components/bulksubscribercreatedto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type BulkSubscriberCreateDto = { - subscribers: Array; + subscribers: Array; }; /** @internal */ export const BulkSubscriberCreateDto$inboundSchema: z.ZodType< - BulkSubscriberCreateDto, - z.ZodTypeDef, - unknown + BulkSubscriberCreateDto, + z.ZodTypeDef, + unknown > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @internal */ export type BulkSubscriberCreateDto$Outbound = { - subscribers: Array; + subscribers: Array; }; /** @internal */ export const BulkSubscriberCreateDto$outboundSchema: z.ZodType< - BulkSubscriberCreateDto$Outbound, - z.ZodTypeDef, - BulkSubscriberCreateDto + BulkSubscriberCreateDto$Outbound, + z.ZodTypeDef, + BulkSubscriberCreateDto > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @@ -36,10 +36,10 @@ export const BulkSubscriberCreateDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BulkSubscriberCreateDto$ { - /** @deprecated use `BulkSubscriberCreateDto$inboundSchema` instead. */ - export const inboundSchema = BulkSubscriberCreateDto$inboundSchema; - /** @deprecated use `BulkSubscriberCreateDto$outboundSchema` instead. */ - export const outboundSchema = BulkSubscriberCreateDto$outboundSchema; - /** @deprecated use `BulkSubscriberCreateDto$Outbound` instead. */ - export type Outbound = BulkSubscriberCreateDto$Outbound; + /** @deprecated use `BulkSubscriberCreateDto$inboundSchema` instead. */ + export const inboundSchema = BulkSubscriberCreateDto$inboundSchema; + /** @deprecated use `BulkSubscriberCreateDto$outboundSchema` instead. */ + export const outboundSchema = BulkSubscriberCreateDto$outboundSchema; + /** @deprecated use `BulkSubscriberCreateDto$Outbound` instead. */ + export type Outbound = BulkSubscriberCreateDto$Outbound; } diff --git a/src/models/components/bulktriggereventdto.ts b/src/models/components/bulktriggereventdto.ts index 5eb8fbdb..6a5bfecd 100644 --- a/src/models/components/bulktriggereventdto.ts +++ b/src/models/components/bulktriggereventdto.ts @@ -2,39 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - TriggerEventRequestDto, - TriggerEventRequestDto$inboundSchema, - TriggerEventRequestDto$Outbound, - TriggerEventRequestDto$outboundSchema, + TriggerEventRequestDto, + TriggerEventRequestDto$inboundSchema, + TriggerEventRequestDto$Outbound, + TriggerEventRequestDto$outboundSchema, } from "./triggereventrequestdto.js"; -import * as z from "zod"; export type BulkTriggerEventDto = { - events: Array; + events: Array; }; /** @internal */ export const BulkTriggerEventDto$inboundSchema: z.ZodType< - BulkTriggerEventDto, - z.ZodTypeDef, - unknown + BulkTriggerEventDto, + z.ZodTypeDef, + unknown > = z.object({ - events: z.array(TriggerEventRequestDto$inboundSchema), + events: z.array(TriggerEventRequestDto$inboundSchema), }); /** @internal */ export type BulkTriggerEventDto$Outbound = { - events: Array; + events: Array; }; /** @internal */ export const BulkTriggerEventDto$outboundSchema: z.ZodType< - BulkTriggerEventDto$Outbound, - z.ZodTypeDef, - BulkTriggerEventDto + BulkTriggerEventDto$Outbound, + z.ZodTypeDef, + BulkTriggerEventDto > = z.object({ - events: z.array(TriggerEventRequestDto$outboundSchema), + events: z.array(TriggerEventRequestDto$outboundSchema), }); /** @@ -42,10 +42,10 @@ export const BulkTriggerEventDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BulkTriggerEventDto$ { - /** @deprecated use `BulkTriggerEventDto$inboundSchema` instead. */ - export const inboundSchema = BulkTriggerEventDto$inboundSchema; - /** @deprecated use `BulkTriggerEventDto$outboundSchema` instead. */ - export const outboundSchema = BulkTriggerEventDto$outboundSchema; - /** @deprecated use `BulkTriggerEventDto$Outbound` instead. */ - export type Outbound = BulkTriggerEventDto$Outbound; + /** @deprecated use `BulkTriggerEventDto$inboundSchema` instead. */ + export const inboundSchema = BulkTriggerEventDto$inboundSchema; + /** @deprecated use `BulkTriggerEventDto$outboundSchema` instead. */ + export const outboundSchema = BulkTriggerEventDto$outboundSchema; + /** @deprecated use `BulkTriggerEventDto$Outbound` instead. */ + export type Outbound = BulkTriggerEventDto$Outbound; } diff --git a/src/models/components/changeresponsedto.ts b/src/models/components/changeresponsedto.ts index 476d3129..c30a32d9 100644 --- a/src/models/components/changeresponsedto.ts +++ b/src/models/components/changeresponsedto.ts @@ -2,154 +2,161 @@ * 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"; -import * as z from "zod"; export type Change = {}; export const Type = { - Feed: "Feed", - MessageTemplate: "MessageTemplate", - Layout: "Layout", - DefaultLayout: "DefaultLayout", - NotificationTemplate: "NotificationTemplate", - NotificationGroup: "NotificationGroup", - TranslationGroup: "TranslationGroup", - Translation: "Translation", + 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; + 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({}); +export const Change$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type Change$Outbound = {}; /** @internal */ -export const Change$outboundSchema: z.ZodType = z.object({}); +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; + /** @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); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = Type$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 Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; + /** @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 = - 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", - }); - }); +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; + _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", - }); - }); + 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; + /** @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 index 11ad5212..d8b7ffaf 100644 --- a/src/models/components/changesresponsedto.ts +++ b/src/models/components/changesresponsedto.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type ChangesResponseDto = { - data: Array; - page: number; - pageSize: number; - totalCount: number; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const ChangesResponseDto$inboundSchema: z.ZodType< - ChangesResponseDto, - z.ZodTypeDef, - unknown + ChangesResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + 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; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const ChangesResponseDto$outboundSchema: z.ZodType< - ChangesResponseDto$Outbound, - z.ZodTypeDef, - ChangesResponseDto + ChangesResponseDto$Outbound, + z.ZodTypeDef, + ChangesResponseDto > = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + data: z.array(z.string()), + page: z.number(), + pageSize: z.number(), + totalCount: z.number(), }); /** @@ -48,10 +48,10 @@ export const ChangesResponseDto$outboundSchema: z.ZodType< * @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; + /** @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 index a409444a..ee83a2d2 100644 --- a/src/models/components/changeworkflowstatusrequestdto.ts +++ b/src/models/components/changeworkflowstatusrequestdto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type ChangeWorkflowStatusRequestDto = { - active: boolean; + active: boolean; }; /** @internal */ export const ChangeWorkflowStatusRequestDto$inboundSchema: z.ZodType< - ChangeWorkflowStatusRequestDto, - z.ZodTypeDef, - unknown + ChangeWorkflowStatusRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - active: z.boolean(), + active: z.boolean(), }); /** @internal */ export type ChangeWorkflowStatusRequestDto$Outbound = { - active: boolean; + active: boolean; }; /** @internal */ export const ChangeWorkflowStatusRequestDto$outboundSchema: z.ZodType< - ChangeWorkflowStatusRequestDto$Outbound, - z.ZodTypeDef, - ChangeWorkflowStatusRequestDto + ChangeWorkflowStatusRequestDto$Outbound, + z.ZodTypeDef, + ChangeWorkflowStatusRequestDto > = z.object({ - active: z.boolean(), + active: z.boolean(), }); /** @@ -36,10 +36,10 @@ export const ChangeWorkflowStatusRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 73e02177..dac42e95 100644 --- a/src/models/components/channelcredentials.ts +++ b/src/models/components/channelcredentials.ts @@ -5,82 +5,82 @@ import * as z from "zod"; export type ChannelCredentials = { - /** - * alert_uid for grafana on-call webhook payload - */ - alertUid?: string | undefined; - /** - * Channel specification for Mattermost chat notifications - */ - channel?: string | undefined; - /** - * Contains an array of the subscriber device tokens for a given provider. Used on Push integrations - */ - deviceTokens?: Array | undefined; - /** - * link_to_upstream_details property fo grafana on call webhook - */ - externalUrl?: string | undefined; - /** - * image_url property fo grafana on call webhook - */ - imageUrl?: string | undefined; - /** - * state property fo grafana on call webhook - */ - 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. - */ - webhookUrl: string; + /** + * alert_uid for grafana on-call webhook payload + */ + alertUid?: string | undefined; + /** + * Channel specification for Mattermost chat notifications + */ + channel?: string | undefined; + /** + * Contains an array of the subscriber device tokens for a given provider. Used on Push integrations + */ + deviceTokens?: Array | undefined; + /** + * link_to_upstream_details property fo grafana on call webhook + */ + externalUrl?: string | undefined; + /** + * image_url property fo grafana on call webhook + */ + imageUrl?: string | undefined; + /** + * state property fo grafana on call webhook + */ + 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. + */ + webhookUrl: string; }; /** @internal */ export const ChannelCredentials$inboundSchema: z.ZodType< - ChannelCredentials, - z.ZodTypeDef, - unknown + ChannelCredentials, + z.ZodTypeDef, + unknown > = z.object({ - alertUid: z.string().optional(), - channel: z.string().optional(), - deviceTokens: z.array(z.string()).optional(), - externalUrl: z.string().optional(), - imageUrl: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), - webhookUrl: z.string(), + alertUid: z.string().optional(), + channel: z.string().optional(), + deviceTokens: z.array(z.string()).optional(), + externalUrl: z.string().optional(), + imageUrl: z.string().optional(), + state: z.string().optional(), + title: z.string().optional(), + webhookUrl: z.string(), }); /** @internal */ export type ChannelCredentials$Outbound = { - alertUid?: string | undefined; - channel?: string | undefined; - deviceTokens?: Array | undefined; - externalUrl?: string | undefined; - imageUrl?: string | undefined; - state?: string | undefined; - title?: string | undefined; - webhookUrl: string; + alertUid?: string | undefined; + channel?: string | undefined; + deviceTokens?: Array | undefined; + externalUrl?: string | undefined; + imageUrl?: string | undefined; + state?: string | undefined; + title?: string | undefined; + webhookUrl: string; }; /** @internal */ export const ChannelCredentials$outboundSchema: z.ZodType< - ChannelCredentials$Outbound, - z.ZodTypeDef, - ChannelCredentials + ChannelCredentials$Outbound, + z.ZodTypeDef, + ChannelCredentials > = z.object({ - alertUid: z.string().optional(), - channel: z.string().optional(), - deviceTokens: z.array(z.string()).optional(), - externalUrl: z.string().optional(), - imageUrl: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), - webhookUrl: z.string(), + alertUid: z.string().optional(), + channel: z.string().optional(), + deviceTokens: z.array(z.string()).optional(), + externalUrl: z.string().optional(), + imageUrl: z.string().optional(), + state: z.string().optional(), + title: z.string().optional(), + webhookUrl: z.string(), }); /** @@ -88,10 +88,10 @@ export const ChannelCredentials$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChannelCredentials$ { - /** @deprecated use `ChannelCredentials$inboundSchema` instead. */ - export const inboundSchema = ChannelCredentials$inboundSchema; - /** @deprecated use `ChannelCredentials$outboundSchema` instead. */ - export const outboundSchema = ChannelCredentials$outboundSchema; - /** @deprecated use `ChannelCredentials$Outbound` instead. */ - export type Outbound = ChannelCredentials$Outbound; + /** @deprecated use `ChannelCredentials$inboundSchema` instead. */ + export const inboundSchema = ChannelCredentials$inboundSchema; + /** @deprecated use `ChannelCredentials$outboundSchema` instead. */ + export const outboundSchema = ChannelCredentials$outboundSchema; + /** @deprecated use `ChannelCredentials$Outbound` instead. */ + export type Outbound = ChannelCredentials$Outbound; } diff --git a/src/models/components/channelpreference.ts b/src/models/components/channelpreference.ts index 0cc20cd0..4f761043 100644 --- a/src/models/components/channelpreference.ts +++ b/src/models/components/channelpreference.ts @@ -2,18 +2,18 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The type of channel that is enabled or not */ export const ChannelPreferenceType = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; /** * The type of channel that is enabled or not @@ -21,56 +21,61 @@ 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; + /** + * The type of channel that is enabled or not + */ + type: ChannelPreferenceType; }; /** @internal */ -export const ChannelPreferenceType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ChannelPreferenceType); +export const ChannelPreferenceType$inboundSchema: z.ZodNativeEnum< + typeof ChannelPreferenceType +> = z.nativeEnum(ChannelPreferenceType); /** @internal */ -export const ChannelPreferenceType$outboundSchema: z.ZodNativeEnum = - ChannelPreferenceType$inboundSchema; +export const ChannelPreferenceType$outboundSchema: z.ZodNativeEnum< + typeof ChannelPreferenceType +> = ChannelPreferenceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChannelPreferenceType$ { - /** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */ - export const inboundSchema = ChannelPreferenceType$inboundSchema; - /** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */ - export const outboundSchema = ChannelPreferenceType$outboundSchema; + /** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */ + export const inboundSchema = ChannelPreferenceType$inboundSchema; + /** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */ + export const outboundSchema = ChannelPreferenceType$outboundSchema; } /** @internal */ -export const ChannelPreference$inboundSchema: z.ZodType = - z.object({ - enabled: z.boolean(), - type: ChannelPreferenceType$inboundSchema, - }); +export const ChannelPreference$inboundSchema: z.ZodType< + ChannelPreference, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.boolean(), + type: ChannelPreferenceType$inboundSchema, +}); /** @internal */ export type ChannelPreference$Outbound = { - enabled: boolean; - type: string; + enabled: boolean; + type: string; }; /** @internal */ export const ChannelPreference$outboundSchema: z.ZodType< - ChannelPreference$Outbound, - z.ZodTypeDef, - ChannelPreference + ChannelPreference$Outbound, + z.ZodTypeDef, + ChannelPreference > = z.object({ - enabled: z.boolean(), - type: ChannelPreferenceType$outboundSchema, + enabled: z.boolean(), + type: ChannelPreferenceType$outboundSchema, }); /** @@ -78,10 +83,10 @@ export const ChannelPreference$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChannelPreference$ { - /** @deprecated use `ChannelPreference$inboundSchema` instead. */ - export const inboundSchema = ChannelPreference$inboundSchema; - /** @deprecated use `ChannelPreference$outboundSchema` instead. */ - export const outboundSchema = ChannelPreference$outboundSchema; - /** @deprecated use `ChannelPreference$Outbound` instead. */ - export type Outbound = ChannelPreference$Outbound; + /** @deprecated use `ChannelPreference$inboundSchema` instead. */ + export const inboundSchema = ChannelPreference$inboundSchema; + /** @deprecated use `ChannelPreference$outboundSchema` instead. */ + export const outboundSchema = ChannelPreference$outboundSchema; + /** @deprecated use `ChannelPreference$Outbound` instead. */ + export type Outbound = ChannelPreference$Outbound; } diff --git a/src/models/components/channelsettings.ts b/src/models/components/channelsettings.ts index 3d30399b..1417df3b 100644 --- a/src/models/components/channelsettings.ts +++ b/src/models/components/channelsettings.ts @@ -2,83 +2,83 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - ChannelCredentials, - ChannelCredentials$inboundSchema, - ChannelCredentials$Outbound, - ChannelCredentials$outboundSchema, + ChannelCredentials, + ChannelCredentials$inboundSchema, + ChannelCredentials$Outbound, + ChannelCredentials$outboundSchema, } from "./channelcredentials.js"; -import * as z from "zod"; export type ChannelSettings = { - /** - * Id of the integration that is used for this channel - */ - integrationId: string; - /** - * Credentials payload for the specified provider - */ - credentials: ChannelCredentials; - /** - * The integration identifier - */ - integrationIdentifier?: string | undefined; - /** - * The provider identifier for the credentials - */ - providerId: number; + /** + * Id of the integration that is used for this channel + */ + integrationId: string; + /** + * Credentials payload for the specified provider + */ + credentials: ChannelCredentials; + /** + * The integration identifier + */ + integrationIdentifier?: string | undefined; + /** + * The provider identifier for the credentials + */ + providerId: number; }; /** @internal */ -export const ChannelSettings$inboundSchema: z.ZodType = z - .object({ - _integrationId: z.string(), - credentials: ChannelCredentials$inboundSchema, - integrationIdentifier: z.string().optional(), - providerId: z.number(), - }) - .transform((v) => { - return remap$(v, { - _integrationId: "integrationId", - }); - }); +export const ChannelSettings$inboundSchema: z.ZodType< + ChannelSettings, + z.ZodTypeDef, + unknown +> = z.object({ + _integrationId: z.string(), + credentials: ChannelCredentials$inboundSchema, + integrationIdentifier: z.string().optional(), + providerId: z.number(), +}).transform((v) => { + return remap$(v, { + "_integrationId": "integrationId", + }); +}); /** @internal */ export type ChannelSettings$Outbound = { - _integrationId: string; - credentials: ChannelCredentials$Outbound; - integrationIdentifier?: string | undefined; - providerId: number; + _integrationId: string; + credentials: ChannelCredentials$Outbound; + integrationIdentifier?: string | undefined; + providerId: number; }; /** @internal */ export const ChannelSettings$outboundSchema: z.ZodType< - ChannelSettings$Outbound, - z.ZodTypeDef, - ChannelSettings -> = z - .object({ - integrationId: z.string(), - credentials: ChannelCredentials$outboundSchema, - integrationIdentifier: z.string().optional(), - providerId: z.number(), - }) - .transform((v) => { - return remap$(v, { - integrationId: "_integrationId", - }); - }); + ChannelSettings$Outbound, + z.ZodTypeDef, + ChannelSettings +> = z.object({ + integrationId: z.string(), + credentials: ChannelCredentials$outboundSchema, + integrationIdentifier: z.string().optional(), + providerId: z.number(), +}).transform((v) => { + return remap$(v, { + integrationId: "_integrationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChannelSettings$ { - /** @deprecated use `ChannelSettings$inboundSchema` instead. */ - export const inboundSchema = ChannelSettings$inboundSchema; - /** @deprecated use `ChannelSettings$outboundSchema` instead. */ - export const outboundSchema = ChannelSettings$outboundSchema; - /** @deprecated use `ChannelSettings$Outbound` instead. */ - export type Outbound = ChannelSettings$Outbound; + /** @deprecated use `ChannelSettings$inboundSchema` instead. */ + export const inboundSchema = ChannelSettings$inboundSchema; + /** @deprecated use `ChannelSettings$outboundSchema` instead. */ + export const outboundSchema = ChannelSettings$outboundSchema; + /** @deprecated use `ChannelSettings$Outbound` instead. */ + export type Outbound = ChannelSettings$Outbound; } diff --git a/src/models/components/createfeedrequestdto.ts b/src/models/components/createfeedrequestdto.ts index ee24e86a..d5383714 100644 --- a/src/models/components/createfeedrequestdto.ts +++ b/src/models/components/createfeedrequestdto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type CreateFeedRequestDto = { - name: string; + name: string; }; /** @internal */ export const CreateFeedRequestDto$inboundSchema: z.ZodType< - CreateFeedRequestDto, - z.ZodTypeDef, - unknown + CreateFeedRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type CreateFeedRequestDto$Outbound = { - name: string; + name: string; }; /** @internal */ export const CreateFeedRequestDto$outboundSchema: z.ZodType< - CreateFeedRequestDto$Outbound, - z.ZodTypeDef, - CreateFeedRequestDto + CreateFeedRequestDto$Outbound, + z.ZodTypeDef, + CreateFeedRequestDto > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -36,10 +36,10 @@ export const CreateFeedRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 3d78633a..de0d5b5a 100644 --- a/src/models/components/createintegrationrequestdto.ts +++ b/src/models/components/createintegrationrequestdto.ts @@ -2,131 +2,129 @@ * 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"; import { - CredentialsDto, - CredentialsDto$inboundSchema, - CredentialsDto$Outbound, - CredentialsDto$outboundSchema, + CredentialsDto, + CredentialsDto$inboundSchema, + CredentialsDto$Outbound, + CredentialsDto$outboundSchema, } from "./credentialsdto.js"; import { - StepFilter, - StepFilter$inboundSchema, - StepFilter$Outbound, - StepFilter$outboundSchema, + StepFilter, + StepFilter$inboundSchema, + StepFilter$Outbound, + StepFilter$outboundSchema, } from "./stepfilter.js"; -import * as z from "zod"; export const Channel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; export type Channel = ClosedEnum; export type CreateIntegrationRequestDto = { - environmentId?: string | 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; + environmentId?: string | 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 Channel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channel); /** @internal */ -export const Channel$outboundSchema: z.ZodNativeEnum = Channel$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 Channel$ { - /** @deprecated use `Channel$inboundSchema` instead. */ - export const inboundSchema = Channel$inboundSchema; - /** @deprecated use `Channel$outboundSchema` instead. */ - export const outboundSchema = Channel$outboundSchema; + /** @deprecated use `Channel$inboundSchema` instead. */ + export const inboundSchema = Channel$inboundSchema; + /** @deprecated use `Channel$outboundSchema` instead. */ + export const outboundSchema = Channel$outboundSchema; } /** @internal */ export const CreateIntegrationRequestDto$inboundSchema: z.ZodType< - CreateIntegrationRequestDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string().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", - }); - }); + CreateIntegrationRequestDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string().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", + }); +}); /** @internal */ export type CreateIntegrationRequestDto$Outbound = { - _environmentId?: string | undefined; - active?: boolean | undefined; - channel: string; - check?: boolean | undefined; - conditions?: Array | undefined; - credentials?: CredentialsDto$Outbound | undefined; - identifier?: string | undefined; - name?: string | undefined; - providerId: string; + _environmentId?: string | undefined; + active?: boolean | undefined; + channel: string; + check?: boolean | undefined; + conditions?: Array | undefined; + credentials?: CredentialsDto$Outbound | undefined; + identifier?: string | undefined; + name?: string | undefined; + providerId: string; }; /** @internal */ export const CreateIntegrationRequestDto$outboundSchema: z.ZodType< - CreateIntegrationRequestDto$Outbound, - z.ZodTypeDef, - CreateIntegrationRequestDto -> = z - .object({ - environmentId: z.string().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", - }); - }); + CreateIntegrationRequestDto$Outbound, + z.ZodTypeDef, + CreateIntegrationRequestDto +> = z.object({ + environmentId: z.string().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", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateIntegrationRequestDto$ { - /** @deprecated use `CreateIntegrationRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateIntegrationRequestDto$inboundSchema; - /** @deprecated use `CreateIntegrationRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateIntegrationRequestDto$outboundSchema; - /** @deprecated use `CreateIntegrationRequestDto$Outbound` instead. */ - export type Outbound = CreateIntegrationRequestDto$Outbound; + /** @deprecated use `CreateIntegrationRequestDto$inboundSchema` instead. */ + export const inboundSchema = CreateIntegrationRequestDto$inboundSchema; + /** @deprecated use `CreateIntegrationRequestDto$outboundSchema` instead. */ + export const outboundSchema = CreateIntegrationRequestDto$outboundSchema; + /** @deprecated use `CreateIntegrationRequestDto$Outbound` instead. */ + export type Outbound = CreateIntegrationRequestDto$Outbound; } diff --git a/src/models/components/createlayoutresponsedto.ts b/src/models/components/createlayoutresponsedto.ts index cc3e7f4f..b39c9283 100644 --- a/src/models/components/createlayoutresponsedto.ts +++ b/src/models/components/createlayoutresponsedto.ts @@ -2,60 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; 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; + /** + * 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", - }); - }); + CreateLayoutResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string(), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type CreateLayoutResponseDto$Outbound = { - _id: string; + _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", - }); - }); + 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; + /** @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 5950429d..515a12c5 100644 --- a/src/models/components/createnotificationgrouprequestdto.ts +++ b/src/models/components/createnotificationgrouprequestdto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type CreateNotificationGroupRequestDto = { - name: string; + name: string; }; /** @internal */ export const CreateNotificationGroupRequestDto$inboundSchema: z.ZodType< - CreateNotificationGroupRequestDto, - z.ZodTypeDef, - unknown + CreateNotificationGroupRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type CreateNotificationGroupRequestDto$Outbound = { - name: string; + name: string; }; /** @internal */ export const CreateNotificationGroupRequestDto$outboundSchema: z.ZodType< - CreateNotificationGroupRequestDto$Outbound, - z.ZodTypeDef, - CreateNotificationGroupRequestDto + CreateNotificationGroupRequestDto$Outbound, + z.ZodTypeDef, + CreateNotificationGroupRequestDto > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -36,10 +36,11 @@ export const CreateNotificationGroupRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateNotificationGroupRequestDto$ { - /** @deprecated use `CreateNotificationGroupRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateNotificationGroupRequestDto$inboundSchema; - /** @deprecated use `CreateNotificationGroupRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateNotificationGroupRequestDto$outboundSchema; - /** @deprecated use `CreateNotificationGroupRequestDto$Outbound` instead. */ - export type Outbound = CreateNotificationGroupRequestDto$Outbound; + /** @deprecated use `CreateNotificationGroupRequestDto$inboundSchema` instead. */ + export const inboundSchema = CreateNotificationGroupRequestDto$inboundSchema; + /** @deprecated use `CreateNotificationGroupRequestDto$outboundSchema` instead. */ + export const outboundSchema = + CreateNotificationGroupRequestDto$outboundSchema; + /** @deprecated use `CreateNotificationGroupRequestDto$Outbound` instead. */ + export type Outbound = CreateNotificationGroupRequestDto$Outbound; } diff --git a/src/models/components/createsubscriberrequestdto.ts b/src/models/components/createsubscriberrequestdto.ts index 1f492d13..4992e28a 100644 --- a/src/models/components/createsubscriberrequestdto.ts +++ b/src/models/components/createsubscriberrequestdto.ts @@ -7,90 +7,92 @@ import * as z from "zod"; export type Data = {}; export type CreateSubscriberRequestDto = { - /** - * An http url to the profile image of your subscriber - */ - avatar?: string | undefined; - channels?: Array | undefined; - data?: Data | undefined; - 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 - */ - subscriberId: string; + /** + * An http url to the profile image of your subscriber + */ + avatar?: string | undefined; + channels?: Array | undefined; + data?: Data | undefined; + 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 + */ + subscriberId: string; }; /** @internal */ -export const Data$inboundSchema: z.ZodType = z.object({}); +export const Data$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type Data$Outbound = {}; /** @internal */ -export const Data$outboundSchema: z.ZodType = 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 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; + /** @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; } /** @internal */ export const CreateSubscriberRequestDto$inboundSchema: z.ZodType< - CreateSubscriberRequestDto, - z.ZodTypeDef, - unknown + CreateSubscriberRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => Data$inboundSchema).optional(), - 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(), + channels: z.array(z.string()).optional(), + data: z.lazy(() => Data$inboundSchema).optional(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + locale: z.string().optional(), + phone: z.string().optional(), + subscriberId: z.string(), }); /** @internal */ export type CreateSubscriberRequestDto$Outbound = { - avatar?: string | undefined; - channels?: Array | undefined; - data?: Data$Outbound | undefined; - email?: string | undefined; - firstName?: string | undefined; - lastName?: string | undefined; - locale?: string | undefined; - phone?: string | undefined; - subscriberId: string; + avatar?: string | undefined; + channels?: Array | undefined; + data?: Data$Outbound | undefined; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + locale?: string | undefined; + phone?: string | undefined; + subscriberId: string; }; /** @internal */ export const CreateSubscriberRequestDto$outboundSchema: z.ZodType< - CreateSubscriberRequestDto$Outbound, - z.ZodTypeDef, - CreateSubscriberRequestDto + CreateSubscriberRequestDto$Outbound, + z.ZodTypeDef, + CreateSubscriberRequestDto > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => Data$outboundSchema).optional(), - 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(), + channels: z.array(z.string()).optional(), + data: z.lazy(() => Data$outboundSchema).optional(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + locale: z.string().optional(), + phone: z.string().optional(), + subscriberId: z.string(), }); /** @@ -98,10 +100,10 @@ export const CreateSubscriberRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateSubscriberRequestDto$ { - /** @deprecated use `CreateSubscriberRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateSubscriberRequestDto$inboundSchema; - /** @deprecated use `CreateSubscriberRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateSubscriberRequestDto$outboundSchema; - /** @deprecated use `CreateSubscriberRequestDto$Outbound` instead. */ - export type Outbound = CreateSubscriberRequestDto$Outbound; + /** @deprecated use `CreateSubscriberRequestDto$inboundSchema` instead. */ + export const inboundSchema = CreateSubscriberRequestDto$inboundSchema; + /** @deprecated use `CreateSubscriberRequestDto$outboundSchema` instead. */ + export const outboundSchema = CreateSubscriberRequestDto$outboundSchema; + /** @deprecated use `CreateSubscriberRequestDto$Outbound` instead. */ + export type Outbound = CreateSubscriberRequestDto$Outbound; } diff --git a/src/models/components/createtenantrequestdto.ts b/src/models/components/createtenantrequestdto.ts index 91735ea8..74654278 100644 --- a/src/models/components/createtenantrequestdto.ts +++ b/src/models/components/createtenantrequestdto.ts @@ -7,16 +7,16 @@ import * as z from "zod"; export type CreateTenantRequestDtoData = {}; export type CreateTenantRequestDto = { - data?: CreateTenantRequestDtoData | undefined; - identifier: string; - name: string; + data?: CreateTenantRequestDtoData | undefined; + identifier: string; + name: string; }; /** @internal */ export const CreateTenantRequestDtoData$inboundSchema: z.ZodType< - CreateTenantRequestDtoData, - z.ZodTypeDef, - unknown + CreateTenantRequestDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -24,9 +24,9 @@ export type CreateTenantRequestDtoData$Outbound = {}; /** @internal */ export const CreateTenantRequestDtoData$outboundSchema: z.ZodType< - CreateTenantRequestDtoData$Outbound, - z.ZodTypeDef, - CreateTenantRequestDtoData + CreateTenantRequestDtoData$Outbound, + z.ZodTypeDef, + CreateTenantRequestDtoData > = z.object({}); /** @@ -34,41 +34,41 @@ export const CreateTenantRequestDtoData$outboundSchema: z.ZodType< * @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; + /** @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 + CreateTenantRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.lazy(() => CreateTenantRequestDtoData$inboundSchema).optional(), - identifier: z.string(), - name: z.string(), + 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; + data?: CreateTenantRequestDtoData$Outbound | undefined; + identifier: string; + name: string; }; /** @internal */ export const CreateTenantRequestDto$outboundSchema: z.ZodType< - CreateTenantRequestDto$Outbound, - z.ZodTypeDef, - CreateTenantRequestDto + CreateTenantRequestDto$Outbound, + z.ZodTypeDef, + CreateTenantRequestDto > = z.object({ - data: z.lazy(() => CreateTenantRequestDtoData$outboundSchema).optional(), - identifier: z.string(), - name: z.string(), + data: z.lazy(() => CreateTenantRequestDtoData$outboundSchema).optional(), + identifier: z.string(), + name: z.string(), }); /** @@ -76,10 +76,10 @@ export const CreateTenantRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 index 24bf0f98..6c2a00de 100644 --- a/src/models/components/createtenantresponsedto.ts +++ b/src/models/components/createtenantresponsedto.ts @@ -2,26 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; 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; + 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 + CreateTenantResponseDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -29,9 +29,9 @@ export type CreateTenantResponseDtoData$Outbound = {}; /** @internal */ export const CreateTenantResponseDtoData$outboundSchema: z.ZodType< - CreateTenantResponseDtoData$Outbound, - z.ZodTypeDef, - CreateTenantResponseDtoData + CreateTenantResponseDtoData$Outbound, + z.ZodTypeDef, + CreateTenantResponseDtoData > = z.object({}); /** @@ -39,78 +39,74 @@ export const CreateTenantResponseDtoData$outboundSchema: z.ZodType< * @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; + /** @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", - }); - }); + 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; + _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", - }); - }); + 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; + /** @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 40dba06f..1c078b77 100644 --- a/src/models/components/createtopicrequestdto.ts +++ b/src/models/components/createtopicrequestdto.ts @@ -5,40 +5,40 @@ import * as z from "zod"; export type CreateTopicRequestDto = { - /** - * User defined custom key and provided by the user that will be an unique identifier for the Topic created. - */ - key: string; - /** - * User defined custom name and provided by the user that will name the Topic created. - */ - name: string; + /** + * User defined custom key and provided by the user that will be an unique identifier for the Topic created. + */ + key: string; + /** + * User defined custom name and provided by the user that will name the Topic created. + */ + name: string; }; /** @internal */ export const CreateTopicRequestDto$inboundSchema: z.ZodType< - CreateTopicRequestDto, - z.ZodTypeDef, - unknown + CreateTopicRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - key: z.string(), - name: z.string(), + key: z.string(), + name: z.string(), }); /** @internal */ export type CreateTopicRequestDto$Outbound = { - key: string; - name: string; + key: string; + name: string; }; /** @internal */ export const CreateTopicRequestDto$outboundSchema: z.ZodType< - CreateTopicRequestDto$Outbound, - z.ZodTypeDef, - CreateTopicRequestDto + CreateTopicRequestDto$Outbound, + z.ZodTypeDef, + CreateTopicRequestDto > = z.object({ - key: z.string(), - name: z.string(), + key: z.string(), + name: z.string(), }); /** @@ -46,10 +46,10 @@ export const CreateTopicRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicRequestDto$ { - /** @deprecated use `CreateTopicRequestDto$inboundSchema` instead. */ - export const inboundSchema = CreateTopicRequestDto$inboundSchema; - /** @deprecated use `CreateTopicRequestDto$outboundSchema` instead. */ - export const outboundSchema = CreateTopicRequestDto$outboundSchema; - /** @deprecated use `CreateTopicRequestDto$Outbound` instead. */ - export type Outbound = CreateTopicRequestDto$Outbound; + /** @deprecated use `CreateTopicRequestDto$inboundSchema` instead. */ + export const inboundSchema = CreateTopicRequestDto$inboundSchema; + /** @deprecated use `CreateTopicRequestDto$outboundSchema` instead. */ + export const outboundSchema = CreateTopicRequestDto$outboundSchema; + /** @deprecated use `CreateTopicRequestDto$Outbound` instead. */ + export type Outbound = CreateTopicRequestDto$Outbound; } diff --git a/src/models/components/createtopicresponsedto.ts b/src/models/components/createtopicresponsedto.ts index b4725d0d..95d759f1 100644 --- a/src/models/components/createtopicresponsedto.ts +++ b/src/models/components/createtopicresponsedto.ts @@ -2,67 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type CreateTopicResponseDto = { - /** - * The unique identifier for the Topic created. - */ - id?: string | undefined; - /** - * User defined custom key and provided by the user that will be an unique identifier for the Topic created. - */ - key: string; + /** + * The unique identifier for the Topic created. + */ + id?: string | undefined; + /** + * User defined custom key and provided by the user that will be an unique identifier for the Topic created. + */ + key: string; }; /** @internal */ export const CreateTopicResponseDto$inboundSchema: z.ZodType< - CreateTopicResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string().optional(), - key: z.string(), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - }); - }); + CreateTopicResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string().optional(), + key: z.string(), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type CreateTopicResponseDto$Outbound = { - _id?: string | undefined; - key: string; + _id?: string | undefined; + key: string; }; /** @internal */ export const CreateTopicResponseDto$outboundSchema: z.ZodType< - CreateTopicResponseDto$Outbound, - z.ZodTypeDef, - CreateTopicResponseDto -> = z - .object({ - id: z.string().optional(), - key: z.string(), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - }); - }); + CreateTopicResponseDto$Outbound, + z.ZodTypeDef, + CreateTopicResponseDto +> = z.object({ + id: z.string().optional(), + key: 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 CreateTopicResponseDto$ { - /** @deprecated use `CreateTopicResponseDto$inboundSchema` instead. */ - export const inboundSchema = CreateTopicResponseDto$inboundSchema; - /** @deprecated use `CreateTopicResponseDto$outboundSchema` instead. */ - export const outboundSchema = CreateTopicResponseDto$outboundSchema; - /** @deprecated use `CreateTopicResponseDto$Outbound` instead. */ - export type Outbound = CreateTopicResponseDto$Outbound; + /** @deprecated use `CreateTopicResponseDto$inboundSchema` instead. */ + export const inboundSchema = CreateTopicResponseDto$inboundSchema; + /** @deprecated use `CreateTopicResponseDto$outboundSchema` instead. */ + export const outboundSchema = CreateTopicResponseDto$outboundSchema; + /** @deprecated use `CreateTopicResponseDto$Outbound` instead. */ + export type Outbound = CreateTopicResponseDto$Outbound; } diff --git a/src/models/components/createworkflowrequestdto.ts b/src/models/components/createworkflowrequestdto.ts index b45e9d4a..cae2a3a2 100644 --- a/src/models/components/createworkflowrequestdto.ts +++ b/src/models/components/createworkflowrequestdto.ts @@ -2,47 +2,47 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NotificationStep, - NotificationStep$inboundSchema, - NotificationStep$Outbound, - NotificationStep$outboundSchema, + NotificationStep, + NotificationStep$inboundSchema, + NotificationStep$Outbound, + NotificationStep$outboundSchema, } from "./notificationstep.js"; import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, + PreferenceChannels, + PreferenceChannels$inboundSchema, + PreferenceChannels$Outbound, + PreferenceChannels$outboundSchema, } from "./preferencechannels.js"; -import * as z from "zod"; 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; + 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 + CreateWorkflowRequestDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -50,9 +50,9 @@ export type CreateWorkflowRequestDtoData$Outbound = {}; /** @internal */ export const CreateWorkflowRequestDtoData$outboundSchema: z.ZodType< - CreateWorkflowRequestDtoData$Outbound, - z.ZodTypeDef, - CreateWorkflowRequestDtoData + CreateWorkflowRequestDtoData$Outbound, + z.ZodTypeDef, + CreateWorkflowRequestDtoData > = z.object({}); /** @@ -60,102 +60,107 @@ export const CreateWorkflowRequestDtoData$outboundSchema: z.ZodType< * @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; + /** @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 + CreateWorkflowRequestDtoNotificationGroup, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ export type CreateWorkflowRequestDtoNotificationGroup$Outbound = {}; /** @internal */ -export const CreateWorkflowRequestDtoNotificationGroup$outboundSchema: z.ZodType< +export const CreateWorkflowRequestDtoNotificationGroup$outboundSchema: + z.ZodType< CreateWorkflowRequestDtoNotificationGroup$Outbound, z.ZodTypeDef, CreateWorkflowRequestDtoNotificationGroup -> = z.object({}); + > = 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; + /** @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 + 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(), + 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; + 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 + 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(), + 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(), }); /** @@ -163,10 +168,10 @@ export const CreateWorkflowRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 ac29f788..8c7f9c76 100644 --- a/src/models/components/credentialsdto.ts +++ b/src/models/components/credentialsdto.ts @@ -7,214 +7,224 @@ import * as z from "zod"; 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; - 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; - port?: string | undefined; - projectName?: string | undefined; - redirectUrl?: string | undefined; - region?: string | undefined; - requireTls?: boolean | undefined; - secretKey?: string | undefined; - secretKeyRequestHeader?: string | undefined; - secure?: boolean | undefined; - senderName?: string | undefined; - serviceAccount?: string | undefined; - state?: string | undefined; - title?: string | undefined; - tlsOptions?: TlsOptions | undefined; - token?: string | undefined; - user?: string | undefined; - webhookUrl?: string | undefined; + 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; + 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; + port?: string | undefined; + projectName?: string | undefined; + redirectUrl?: string | undefined; + region?: string | undefined; + requireTls?: boolean | undefined; + secretKey?: string | undefined; + secretKeyRequestHeader?: string | undefined; + secure?: boolean | undefined; + senderName?: string | undefined; + serviceAccount?: string | undefined; + state?: string | undefined; + title?: string | undefined; + tlsOptions?: TlsOptions | undefined; + token?: string | undefined; + user?: string | undefined; + webhookUrl?: string | undefined; }; /** @internal */ -export const TlsOptions$inboundSchema: z.ZodType = z.object({}); +export const TlsOptions$inboundSchema: z.ZodType< + TlsOptions, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type TlsOptions$Outbound = {}; /** @internal */ -export const TlsOptions$outboundSchema: z.ZodType = - z.object({}); +export const TlsOptions$outboundSchema: z.ZodType< + TlsOptions$Outbound, + z.ZodTypeDef, + TlsOptions +> = 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 TlsOptions$ { - /** @deprecated use `TlsOptions$inboundSchema` instead. */ - export const inboundSchema = TlsOptions$inboundSchema; - /** @deprecated use `TlsOptions$outboundSchema` instead. */ - export const outboundSchema = TlsOptions$outboundSchema; - /** @deprecated use `TlsOptions$Outbound` instead. */ - export type Outbound = TlsOptions$Outbound; + /** @deprecated use `TlsOptions$inboundSchema` instead. */ + export const inboundSchema = TlsOptions$inboundSchema; + /** @deprecated use `TlsOptions$outboundSchema` instead. */ + export const outboundSchema = TlsOptions$outboundSchema; + /** @deprecated use `TlsOptions$Outbound` instead. */ + export type Outbound = TlsOptions$Outbound; } /** @internal */ -export const CredentialsDto$inboundSchema: z.ZodType = - 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(), - 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(), - 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(), - senderName: z.string().optional(), - serviceAccount: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), - tlsOptions: z.lazy(() => TlsOptions$inboundSchema).optional(), - token: z.string().optional(), - user: z.string().optional(), - webhookUrl: z.string().optional(), - }); +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(), + 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(), + 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(), + senderName: z.string().optional(), + serviceAccount: z.string().optional(), + state: z.string().optional(), + title: z.string().optional(), + tlsOptions: z.lazy(() => TlsOptions$inboundSchema).optional(), + token: z.string().optional(), + user: z.string().optional(), + webhookUrl: 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; - 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; - port?: string | undefined; - projectName?: string | undefined; - redirectUrl?: string | undefined; - region?: string | undefined; - requireTls?: boolean | undefined; - secretKey?: string | undefined; - secretKeyRequestHeader?: string | undefined; - secure?: boolean | undefined; - senderName?: string | undefined; - serviceAccount?: string | undefined; - state?: string | undefined; - title?: string | undefined; - tlsOptions?: TlsOptions$Outbound | undefined; - token?: string | undefined; - user?: string | undefined; - webhookUrl?: string | undefined; + 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; + 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; + port?: string | undefined; + projectName?: string | undefined; + redirectUrl?: string | undefined; + region?: string | undefined; + requireTls?: boolean | undefined; + secretKey?: string | undefined; + secretKeyRequestHeader?: string | undefined; + secure?: boolean | undefined; + senderName?: string | undefined; + serviceAccount?: string | undefined; + state?: string | undefined; + title?: string | undefined; + tlsOptions?: TlsOptions$Outbound | undefined; + token?: string | undefined; + user?: string | undefined; + webhookUrl?: string | undefined; }; /** @internal */ export const CredentialsDto$outboundSchema: z.ZodType< - CredentialsDto$Outbound, - z.ZodTypeDef, - CredentialsDto + CredentialsDto$Outbound, + 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(), - 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(), - 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(), - senderName: z.string().optional(), - serviceAccount: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), - tlsOptions: z.lazy(() => TlsOptions$outboundSchema).optional(), - token: z.string().optional(), - user: z.string().optional(), - webhookUrl: z.string().optional(), + 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(), + 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(), + 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(), + senderName: z.string().optional(), + serviceAccount: z.string().optional(), + state: z.string().optional(), + title: z.string().optional(), + tlsOptions: z.lazy(() => TlsOptions$outboundSchema).optional(), + token: z.string().optional(), + user: z.string().optional(), + webhookUrl: z.string().optional(), }); /** @@ -222,10 +232,10 @@ export const CredentialsDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CredentialsDto$ { - /** @deprecated use `CredentialsDto$inboundSchema` instead. */ - export const inboundSchema = CredentialsDto$inboundSchema; - /** @deprecated use `CredentialsDto$outboundSchema` instead. */ - export const outboundSchema = CredentialsDto$outboundSchema; - /** @deprecated use `CredentialsDto$Outbound` instead. */ - export type Outbound = CredentialsDto$Outbound; + /** @deprecated use `CredentialsDto$inboundSchema` instead. */ + export const inboundSchema = CredentialsDto$inboundSchema; + /** @deprecated use `CredentialsDto$outboundSchema` instead. */ + export const outboundSchema = CredentialsDto$outboundSchema; + /** @deprecated use `CredentialsDto$Outbound` instead. */ + export type Outbound = CredentialsDto$Outbound; } diff --git a/src/models/components/databooleandto.ts b/src/models/components/databooleandto.ts index 9218aa01..3d202f50 100644 --- a/src/models/components/databooleandto.ts +++ b/src/models/components/databooleandto.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type DataBooleanDto = { - data: boolean; + data: boolean; }; /** @internal */ -export const DataBooleanDto$inboundSchema: z.ZodType = - z.object({ - data: z.boolean(), - }); +export const DataBooleanDto$inboundSchema: z.ZodType< + DataBooleanDto, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.boolean(), +}); /** @internal */ export type DataBooleanDto$Outbound = { - data: boolean; + data: boolean; }; /** @internal */ export const DataBooleanDto$outboundSchema: z.ZodType< - DataBooleanDto$Outbound, - z.ZodTypeDef, - DataBooleanDto + DataBooleanDto$Outbound, + z.ZodTypeDef, + DataBooleanDto > = z.object({ - data: z.boolean(), + data: z.boolean(), }); /** @@ -33,10 +36,10 @@ export const DataBooleanDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataBooleanDto$ { - /** @deprecated use `DataBooleanDto$inboundSchema` instead. */ - export const inboundSchema = DataBooleanDto$inboundSchema; - /** @deprecated use `DataBooleanDto$outboundSchema` instead. */ - export const outboundSchema = DataBooleanDto$outboundSchema; - /** @deprecated use `DataBooleanDto$Outbound` instead. */ - export type Outbound = DataBooleanDto$Outbound; + /** @deprecated use `DataBooleanDto$inboundSchema` instead. */ + export const inboundSchema = DataBooleanDto$inboundSchema; + /** @deprecated use `DataBooleanDto$outboundSchema` instead. */ + export const outboundSchema = DataBooleanDto$outboundSchema; + /** @deprecated use `DataBooleanDto$Outbound` instead. */ + export type Outbound = DataBooleanDto$Outbound; } diff --git a/src/models/components/datanumberdto.ts b/src/models/components/datanumberdto.ts index a43b399f..8fa574a0 100644 --- a/src/models/components/datanumberdto.ts +++ b/src/models/components/datanumberdto.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type DataNumberDto = { - data: number; + data: number; }; /** @internal */ -export const DataNumberDto$inboundSchema: z.ZodType = - z.object({ - data: z.number(), - }); +export const DataNumberDto$inboundSchema: z.ZodType< + DataNumberDto, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.number(), +}); /** @internal */ export type DataNumberDto$Outbound = { - data: number; + data: number; }; /** @internal */ export const DataNumberDto$outboundSchema: z.ZodType< - DataNumberDto$Outbound, - z.ZodTypeDef, - DataNumberDto + DataNumberDto$Outbound, + z.ZodTypeDef, + DataNumberDto > = z.object({ - data: z.number(), + data: z.number(), }); /** @@ -33,10 +36,10 @@ export const DataNumberDto$outboundSchema: z.ZodType< * @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; + /** @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 44c0f71b..fb7a6ef3 100644 --- a/src/models/components/delayregularmetadata.ts +++ b/src/models/components/delayregularmetadata.ts @@ -2,38 +2,40 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const DelayRegularMetadataType = { - Regular: "regular", + Regular: "regular", } as const; -export type DelayRegularMetadataType = ClosedEnum; +export type DelayRegularMetadataType = ClosedEnum< + typeof DelayRegularMetadataType +>; export const Unit = { - Seconds: "seconds", - Minutes: "minutes", - Hours: "hours", - Days: "days", - Weeks: "weeks", - Months: "months", + Seconds: "seconds", + Minutes: "minutes", + Hours: "hours", + Days: "days", + Weeks: "weeks", + Months: "months", } as const; export type Unit = ClosedEnum; export type DelayRegularMetadata = { - amount?: number | undefined; - type: DelayRegularMetadataType; - unit?: Unit | undefined; + amount?: number | undefined; + type: DelayRegularMetadataType; + unit?: Unit | undefined; }; /** @internal */ export const DelayRegularMetadataType$inboundSchema: z.ZodNativeEnum< - typeof DelayRegularMetadataType + typeof DelayRegularMetadataType > = z.nativeEnum(DelayRegularMetadataType); /** @internal */ export const DelayRegularMetadataType$outboundSchema: z.ZodNativeEnum< - typeof DelayRegularMetadataType + typeof DelayRegularMetadataType > = DelayRegularMetadataType$inboundSchema; /** @@ -41,56 +43,59 @@ export const DelayRegularMetadataType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelayRegularMetadataType$ { - /** @deprecated use `DelayRegularMetadataType$inboundSchema` instead. */ - export const inboundSchema = DelayRegularMetadataType$inboundSchema; - /** @deprecated use `DelayRegularMetadataType$outboundSchema` instead. */ - export const outboundSchema = DelayRegularMetadataType$outboundSchema; + /** @deprecated use `DelayRegularMetadataType$inboundSchema` instead. */ + export const inboundSchema = DelayRegularMetadataType$inboundSchema; + /** @deprecated use `DelayRegularMetadataType$outboundSchema` instead. */ + export const outboundSchema = DelayRegularMetadataType$outboundSchema; } /** @internal */ -export const Unit$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Unit); +export const Unit$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Unit, +); /** @internal */ -export const Unit$outboundSchema: z.ZodNativeEnum = Unit$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 Unit$ { - /** @deprecated use `Unit$inboundSchema` instead. */ - export const inboundSchema = Unit$inboundSchema; - /** @deprecated use `Unit$outboundSchema` instead. */ - export const outboundSchema = Unit$outboundSchema; + /** @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, - z.ZodTypeDef, - unknown + DelayRegularMetadata, + z.ZodTypeDef, + unknown > = z.object({ - amount: z.number().optional(), - type: DelayRegularMetadataType$inboundSchema, - unit: Unit$inboundSchema.optional(), + amount: z.number().optional(), + type: DelayRegularMetadataType$inboundSchema, + unit: Unit$inboundSchema.optional(), }); /** @internal */ export type DelayRegularMetadata$Outbound = { - amount?: number | undefined; - type: string; - unit?: string | undefined; + amount?: number | undefined; + type: string; + unit?: string | undefined; }; /** @internal */ export const DelayRegularMetadata$outboundSchema: z.ZodType< - DelayRegularMetadata$Outbound, - z.ZodTypeDef, - DelayRegularMetadata + DelayRegularMetadata$Outbound, + z.ZodTypeDef, + DelayRegularMetadata > = z.object({ - amount: z.number().optional(), - type: DelayRegularMetadataType$outboundSchema, - unit: Unit$outboundSchema.optional(), + amount: z.number().optional(), + type: DelayRegularMetadataType$outboundSchema, + unit: Unit$outboundSchema.optional(), }); /** @@ -98,10 +103,10 @@ export const DelayRegularMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelayRegularMetadata$ { - /** @deprecated use `DelayRegularMetadata$inboundSchema` instead. */ - export const inboundSchema = DelayRegularMetadata$inboundSchema; - /** @deprecated use `DelayRegularMetadata$outboundSchema` instead. */ - export const outboundSchema = DelayRegularMetadata$outboundSchema; - /** @deprecated use `DelayRegularMetadata$Outbound` instead. */ - export type Outbound = DelayRegularMetadata$Outbound; + /** @deprecated use `DelayRegularMetadata$inboundSchema` instead. */ + export const inboundSchema = DelayRegularMetadata$inboundSchema; + /** @deprecated use `DelayRegularMetadata$outboundSchema` instead. */ + export const outboundSchema = DelayRegularMetadata$outboundSchema; + /** @deprecated use `DelayRegularMetadata$Outbound` instead. */ + export type Outbound = DelayRegularMetadata$Outbound; } diff --git a/src/models/components/delayscheduledmetadata.ts b/src/models/components/delayscheduledmetadata.ts index c2e77e18..6c6797fa 100644 --- a/src/models/components/delayscheduledmetadata.ts +++ b/src/models/components/delayscheduledmetadata.ts @@ -2,27 +2,29 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const DelayScheduledMetadataType = { - Scheduled: "scheduled", + Scheduled: "scheduled", } as const; -export type DelayScheduledMetadataType = ClosedEnum; +export type DelayScheduledMetadataType = ClosedEnum< + typeof DelayScheduledMetadataType +>; export type DelayScheduledMetadata = { - delayPath: string; - type: DelayScheduledMetadataType; + delayPath: string; + type: DelayScheduledMetadataType; }; /** @internal */ export const DelayScheduledMetadataType$inboundSchema: z.ZodNativeEnum< - typeof DelayScheduledMetadataType + typeof DelayScheduledMetadataType > = z.nativeEnum(DelayScheduledMetadataType); /** @internal */ export const DelayScheduledMetadataType$outboundSchema: z.ZodNativeEnum< - typeof DelayScheduledMetadataType + typeof DelayScheduledMetadataType > = DelayScheduledMetadataType$inboundSchema; /** @@ -30,36 +32,36 @@ export const DelayScheduledMetadataType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelayScheduledMetadataType$ { - /** @deprecated use `DelayScheduledMetadataType$inboundSchema` instead. */ - export const inboundSchema = DelayScheduledMetadataType$inboundSchema; - /** @deprecated use `DelayScheduledMetadataType$outboundSchema` instead. */ - export const outboundSchema = DelayScheduledMetadataType$outboundSchema; + /** @deprecated use `DelayScheduledMetadataType$inboundSchema` instead. */ + export const inboundSchema = DelayScheduledMetadataType$inboundSchema; + /** @deprecated use `DelayScheduledMetadataType$outboundSchema` instead. */ + export const outboundSchema = DelayScheduledMetadataType$outboundSchema; } /** @internal */ export const DelayScheduledMetadata$inboundSchema: z.ZodType< - DelayScheduledMetadata, - z.ZodTypeDef, - unknown + DelayScheduledMetadata, + z.ZodTypeDef, + unknown > = z.object({ - delayPath: z.string(), - type: DelayScheduledMetadataType$inboundSchema, + delayPath: z.string(), + type: DelayScheduledMetadataType$inboundSchema, }); /** @internal */ export type DelayScheduledMetadata$Outbound = { - delayPath: string; - type: string; + delayPath: string; + type: string; }; /** @internal */ export const DelayScheduledMetadata$outboundSchema: z.ZodType< - DelayScheduledMetadata$Outbound, - z.ZodTypeDef, - DelayScheduledMetadata + DelayScheduledMetadata$Outbound, + z.ZodTypeDef, + DelayScheduledMetadata > = z.object({ - delayPath: z.string(), - type: DelayScheduledMetadataType$outboundSchema, + delayPath: z.string(), + type: DelayScheduledMetadataType$outboundSchema, }); /** @@ -67,10 +69,10 @@ export const DelayScheduledMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelayScheduledMetadata$ { - /** @deprecated use `DelayScheduledMetadata$inboundSchema` instead. */ - export const inboundSchema = DelayScheduledMetadata$inboundSchema; - /** @deprecated use `DelayScheduledMetadata$outboundSchema` instead. */ - export const outboundSchema = DelayScheduledMetadata$outboundSchema; - /** @deprecated use `DelayScheduledMetadata$Outbound` instead. */ - export type Outbound = DelayScheduledMetadata$Outbound; + /** @deprecated use `DelayScheduledMetadata$inboundSchema` instead. */ + export const inboundSchema = DelayScheduledMetadata$inboundSchema; + /** @deprecated use `DelayScheduledMetadata$outboundSchema` instead. */ + export const outboundSchema = DelayScheduledMetadata$outboundSchema; + /** @deprecated use `DelayScheduledMetadata$Outbound` instead. */ + export type Outbound = DelayScheduledMetadata$Outbound; } diff --git a/src/models/components/deletemessageresponsedto.ts b/src/models/components/deletemessageresponsedto.ts index 1294bf97..1d567ae8 100644 --- a/src/models/components/deletemessageresponsedto.ts +++ b/src/models/components/deletemessageresponsedto.ts @@ -2,14 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The status enum for the performed action */ export const Status = { - Deleted: "deleted", + Deleted: "deleted", } as const; /** * The status enum for the performed action @@ -17,57 +17,59 @@ export const Status = { export type Status = ClosedEnum; export type DeleteMessageResponseDto = { - /** - * A boolean stating the success of the action - */ - acknowledged: boolean; - /** - * The status enum for the performed action - */ - status: Status; + /** + * A boolean stating the success of the action + */ + acknowledged: boolean; + /** + * The status enum for the performed action + */ + status: Status; }; /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Status); +export const Status$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Status); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = Status$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 Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; + /** @deprecated use `Status$inboundSchema` instead. */ + export const inboundSchema = Status$inboundSchema; + /** @deprecated use `Status$outboundSchema` instead. */ + export const outboundSchema = Status$outboundSchema; } /** @internal */ export const DeleteMessageResponseDto$inboundSchema: z.ZodType< - DeleteMessageResponseDto, - z.ZodTypeDef, - unknown + DeleteMessageResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - acknowledged: z.boolean(), - status: Status$inboundSchema, + acknowledged: z.boolean(), + status: Status$inboundSchema, }); /** @internal */ export type DeleteMessageResponseDto$Outbound = { - acknowledged: boolean; - status: string; + acknowledged: boolean; + status: string; }; /** @internal */ export const DeleteMessageResponseDto$outboundSchema: z.ZodType< - DeleteMessageResponseDto$Outbound, - z.ZodTypeDef, - DeleteMessageResponseDto + DeleteMessageResponseDto$Outbound, + z.ZodTypeDef, + DeleteMessageResponseDto > = z.object({ - acknowledged: z.boolean(), - status: Status$outboundSchema, + acknowledged: z.boolean(), + status: Status$outboundSchema, }); /** @@ -75,10 +77,10 @@ export const DeleteMessageResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteMessageResponseDto$ { - /** @deprecated use `DeleteMessageResponseDto$inboundSchema` instead. */ - export const inboundSchema = DeleteMessageResponseDto$inboundSchema; - /** @deprecated use `DeleteMessageResponseDto$outboundSchema` instead. */ - export const outboundSchema = DeleteMessageResponseDto$outboundSchema; - /** @deprecated use `DeleteMessageResponseDto$Outbound` instead. */ - export type Outbound = DeleteMessageResponseDto$Outbound; + /** @deprecated use `DeleteMessageResponseDto$inboundSchema` instead. */ + export const inboundSchema = DeleteMessageResponseDto$inboundSchema; + /** @deprecated use `DeleteMessageResponseDto$outboundSchema` instead. */ + export const outboundSchema = DeleteMessageResponseDto$outboundSchema; + /** @deprecated use `DeleteMessageResponseDto$Outbound` instead. */ + export type Outbound = DeleteMessageResponseDto$Outbound; } diff --git a/src/models/components/deletenotificationgroupresponsedto.ts b/src/models/components/deletenotificationgroupresponsedto.ts index 303a95ca..0ea940cf 100644 --- a/src/models/components/deletenotificationgroupresponsedto.ts +++ b/src/models/components/deletenotificationgroupresponsedto.ts @@ -2,78 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The status enum for the performed action */ export const DeleteNotificationGroupResponseDtoStatus = { - Deleted: "deleted", + Deleted: "deleted", } as const; /** * The status enum for the performed action */ export type DeleteNotificationGroupResponseDtoStatus = ClosedEnum< - typeof DeleteNotificationGroupResponseDtoStatus + typeof DeleteNotificationGroupResponseDtoStatus >; export type DeleteNotificationGroupResponseDto = { - /** - * A boolean stating the success of the action - */ - acknowledged: boolean; - /** - * The status enum for the performed action - */ - status: DeleteNotificationGroupResponseDtoStatus; + /** + * A boolean stating the success of the action + */ + acknowledged: boolean; + /** + * The status enum for the performed action + */ + status: DeleteNotificationGroupResponseDtoStatus; }; /** @internal */ -export const DeleteNotificationGroupResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof DeleteNotificationGroupResponseDtoStatus -> = z.nativeEnum(DeleteNotificationGroupResponseDtoStatus); +export const DeleteNotificationGroupResponseDtoStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(DeleteNotificationGroupResponseDtoStatus); /** @internal */ -export const DeleteNotificationGroupResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof DeleteNotificationGroupResponseDtoStatus -> = DeleteNotificationGroupResponseDtoStatus$inboundSchema; +export const DeleteNotificationGroupResponseDtoStatus$outboundSchema: + z.ZodNativeEnum = + DeleteNotificationGroupResponseDtoStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteNotificationGroupResponseDtoStatus$ { - /** @deprecated use `DeleteNotificationGroupResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = DeleteNotificationGroupResponseDtoStatus$inboundSchema; - /** @deprecated use `DeleteNotificationGroupResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = DeleteNotificationGroupResponseDtoStatus$outboundSchema; + /** @deprecated use `DeleteNotificationGroupResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = + DeleteNotificationGroupResponseDtoStatus$inboundSchema; + /** @deprecated use `DeleteNotificationGroupResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = + DeleteNotificationGroupResponseDtoStatus$outboundSchema; } /** @internal */ export const DeleteNotificationGroupResponseDto$inboundSchema: z.ZodType< - DeleteNotificationGroupResponseDto, - z.ZodTypeDef, - unknown + DeleteNotificationGroupResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - acknowledged: z.boolean(), - status: DeleteNotificationGroupResponseDtoStatus$inboundSchema, + acknowledged: z.boolean(), + status: DeleteNotificationGroupResponseDtoStatus$inboundSchema, }); /** @internal */ export type DeleteNotificationGroupResponseDto$Outbound = { - acknowledged: boolean; - status: string; + acknowledged: boolean; + status: string; }; /** @internal */ export const DeleteNotificationGroupResponseDto$outboundSchema: z.ZodType< - DeleteNotificationGroupResponseDto$Outbound, - z.ZodTypeDef, - DeleteNotificationGroupResponseDto + DeleteNotificationGroupResponseDto$Outbound, + z.ZodTypeDef, + DeleteNotificationGroupResponseDto > = z.object({ - acknowledged: z.boolean(), - status: DeleteNotificationGroupResponseDtoStatus$outboundSchema, + acknowledged: z.boolean(), + status: DeleteNotificationGroupResponseDtoStatus$outboundSchema, }); /** @@ -81,10 +83,11 @@ export const DeleteNotificationGroupResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteNotificationGroupResponseDto$ { - /** @deprecated use `DeleteNotificationGroupResponseDto$inboundSchema` instead. */ - export const inboundSchema = DeleteNotificationGroupResponseDto$inboundSchema; - /** @deprecated use `DeleteNotificationGroupResponseDto$outboundSchema` instead. */ - export const outboundSchema = DeleteNotificationGroupResponseDto$outboundSchema; - /** @deprecated use `DeleteNotificationGroupResponseDto$Outbound` instead. */ - export type Outbound = DeleteNotificationGroupResponseDto$Outbound; + /** @deprecated use `DeleteNotificationGroupResponseDto$inboundSchema` instead. */ + export const inboundSchema = DeleteNotificationGroupResponseDto$inboundSchema; + /** @deprecated use `DeleteNotificationGroupResponseDto$outboundSchema` instead. */ + export const outboundSchema = + DeleteNotificationGroupResponseDto$outboundSchema; + /** @deprecated use `DeleteNotificationGroupResponseDto$Outbound` instead. */ + export type Outbound = DeleteNotificationGroupResponseDto$Outbound; } diff --git a/src/models/components/deletesubscriberresponsedto.ts b/src/models/components/deletesubscriberresponsedto.ts index dfa6c12a..00b98a0d 100644 --- a/src/models/components/deletesubscriberresponsedto.ts +++ b/src/models/components/deletesubscriberresponsedto.ts @@ -2,41 +2,41 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The status enum for the performed action */ export const DeleteSubscriberResponseDtoStatus = { - Deleted: "deleted", + Deleted: "deleted", } as const; /** * The status enum for the performed action */ export type DeleteSubscriberResponseDtoStatus = ClosedEnum< - typeof DeleteSubscriberResponseDtoStatus + typeof DeleteSubscriberResponseDtoStatus >; export type DeleteSubscriberResponseDto = { - /** - * A boolean stating the success of the action - */ - acknowledged: boolean; - /** - * The status enum for the performed action - */ - status: DeleteSubscriberResponseDtoStatus; + /** + * A boolean stating the success of the action + */ + acknowledged: boolean; + /** + * The status enum for the performed action + */ + status: DeleteSubscriberResponseDtoStatus; }; /** @internal */ export const DeleteSubscriberResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof DeleteSubscriberResponseDtoStatus + typeof DeleteSubscriberResponseDtoStatus > = z.nativeEnum(DeleteSubscriberResponseDtoStatus); /** @internal */ export const DeleteSubscriberResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof DeleteSubscriberResponseDtoStatus + typeof DeleteSubscriberResponseDtoStatus > = DeleteSubscriberResponseDtoStatus$inboundSchema; /** @@ -44,36 +44,37 @@ export const DeleteSubscriberResponseDtoStatus$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteSubscriberResponseDtoStatus$ { - /** @deprecated use `DeleteSubscriberResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = DeleteSubscriberResponseDtoStatus$inboundSchema; - /** @deprecated use `DeleteSubscriberResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = DeleteSubscriberResponseDtoStatus$outboundSchema; + /** @deprecated use `DeleteSubscriberResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = DeleteSubscriberResponseDtoStatus$inboundSchema; + /** @deprecated use `DeleteSubscriberResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = + DeleteSubscriberResponseDtoStatus$outboundSchema; } /** @internal */ export const DeleteSubscriberResponseDto$inboundSchema: z.ZodType< - DeleteSubscriberResponseDto, - z.ZodTypeDef, - unknown + DeleteSubscriberResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - acknowledged: z.boolean(), - status: DeleteSubscriberResponseDtoStatus$inboundSchema, + acknowledged: z.boolean(), + status: DeleteSubscriberResponseDtoStatus$inboundSchema, }); /** @internal */ export type DeleteSubscriberResponseDto$Outbound = { - acknowledged: boolean; - status: string; + acknowledged: boolean; + status: string; }; /** @internal */ export const DeleteSubscriberResponseDto$outboundSchema: z.ZodType< - DeleteSubscriberResponseDto$Outbound, - z.ZodTypeDef, - DeleteSubscriberResponseDto + DeleteSubscriberResponseDto$Outbound, + z.ZodTypeDef, + DeleteSubscriberResponseDto > = z.object({ - acknowledged: z.boolean(), - status: DeleteSubscriberResponseDtoStatus$outboundSchema, + acknowledged: z.boolean(), + status: DeleteSubscriberResponseDtoStatus$outboundSchema, }); /** @@ -81,10 +82,10 @@ export const DeleteSubscriberResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteSubscriberResponseDto$ { - /** @deprecated use `DeleteSubscriberResponseDto$inboundSchema` instead. */ - export const inboundSchema = DeleteSubscriberResponseDto$inboundSchema; - /** @deprecated use `DeleteSubscriberResponseDto$outboundSchema` instead. */ - export const outboundSchema = DeleteSubscriberResponseDto$outboundSchema; - /** @deprecated use `DeleteSubscriberResponseDto$Outbound` instead. */ - export type Outbound = DeleteSubscriberResponseDto$Outbound; + /** @deprecated use `DeleteSubscriberResponseDto$inboundSchema` instead. */ + export const inboundSchema = DeleteSubscriberResponseDto$inboundSchema; + /** @deprecated use `DeleteSubscriberResponseDto$outboundSchema` instead. */ + export const outboundSchema = DeleteSubscriberResponseDto$outboundSchema; + /** @deprecated use `DeleteSubscriberResponseDto$Outbound` instead. */ + export type Outbound = DeleteSubscriberResponseDto$Outbound; } diff --git a/src/models/components/digestregularmetadata.ts b/src/models/components/digestregularmetadata.ts index 76f8d1d3..67c8f1f4 100644 --- a/src/models/components/digestregularmetadata.ts +++ b/src/models/components/digestregularmetadata.ts @@ -2,73 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const BackoffUnit = { - Seconds: "seconds", - Minutes: "minutes", - Hours: "hours", - Days: "days", - Weeks: "weeks", - Months: "months", + Seconds: "seconds", + Minutes: "minutes", + Hours: "hours", + Days: "days", + Weeks: "weeks", + Months: "months", } as const; export type BackoffUnit = ClosedEnum; export const DigestRegularMetadataType = { - Regular: "regular", - Backoff: "backoff", + Regular: "regular", + Backoff: "backoff", } as const; -export type DigestRegularMetadataType = ClosedEnum; +export type DigestRegularMetadataType = ClosedEnum< + typeof DigestRegularMetadataType +>; export const DigestRegularMetadataUnit = { - Seconds: "seconds", - Minutes: "minutes", - Hours: "hours", - Days: "days", - Weeks: "weeks", - Months: "months", + Seconds: "seconds", + Minutes: "minutes", + Hours: "hours", + Days: "days", + Weeks: "weeks", + Months: "months", } as const; -export type DigestRegularMetadataUnit = ClosedEnum; +export type DigestRegularMetadataUnit = ClosedEnum< + typeof DigestRegularMetadataUnit +>; export type DigestRegularMetadata = { - amount?: number | undefined; - backoff?: boolean | undefined; - backoffAmount?: number | undefined; - backoffUnit?: BackoffUnit | undefined; - digestKey?: string | undefined; - type: DigestRegularMetadataType; - unit?: DigestRegularMetadataUnit | undefined; - updateMode?: boolean | undefined; + amount?: number | undefined; + 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 BackoffUnit$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BackoffUnit); /** @internal */ export const BackoffUnit$outboundSchema: z.ZodNativeEnum = - BackoffUnit$inboundSchema; + 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 BackoffUnit$ { - /** @deprecated use `BackoffUnit$inboundSchema` instead. */ - export const inboundSchema = BackoffUnit$inboundSchema; - /** @deprecated use `BackoffUnit$outboundSchema` instead. */ - export const outboundSchema = BackoffUnit$outboundSchema; + /** @deprecated use `BackoffUnit$inboundSchema` instead. */ + export const inboundSchema = BackoffUnit$inboundSchema; + /** @deprecated use `BackoffUnit$outboundSchema` instead. */ + export const outboundSchema = BackoffUnit$outboundSchema; } /** @internal */ export const DigestRegularMetadataType$inboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataType + typeof DigestRegularMetadataType > = z.nativeEnum(DigestRegularMetadataType); /** @internal */ export const DigestRegularMetadataType$outboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataType + typeof DigestRegularMetadataType > = DigestRegularMetadataType$inboundSchema; /** @@ -76,20 +80,20 @@ export const DigestRegularMetadataType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DigestRegularMetadataType$ { - /** @deprecated use `DigestRegularMetadataType$inboundSchema` instead. */ - export const inboundSchema = DigestRegularMetadataType$inboundSchema; - /** @deprecated use `DigestRegularMetadataType$outboundSchema` instead. */ - export const outboundSchema = DigestRegularMetadataType$outboundSchema; + /** @deprecated use `DigestRegularMetadataType$inboundSchema` instead. */ + export const inboundSchema = DigestRegularMetadataType$inboundSchema; + /** @deprecated use `DigestRegularMetadataType$outboundSchema` instead. */ + export const outboundSchema = DigestRegularMetadataType$outboundSchema; } /** @internal */ export const DigestRegularMetadataUnit$inboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataUnit + typeof DigestRegularMetadataUnit > = z.nativeEnum(DigestRegularMetadataUnit); /** @internal */ export const DigestRegularMetadataUnit$outboundSchema: z.ZodNativeEnum< - typeof DigestRegularMetadataUnit + typeof DigestRegularMetadataUnit > = DigestRegularMetadataUnit$inboundSchema; /** @@ -97,54 +101,54 @@ export const DigestRegularMetadataUnit$outboundSchema: z.ZodNativeEnum< * @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; + /** @deprecated use `DigestRegularMetadataUnit$inboundSchema` instead. */ + export const inboundSchema = DigestRegularMetadataUnit$inboundSchema; + /** @deprecated use `DigestRegularMetadataUnit$outboundSchema` instead. */ + export const outboundSchema = DigestRegularMetadataUnit$outboundSchema; } /** @internal */ export const DigestRegularMetadata$inboundSchema: z.ZodType< - DigestRegularMetadata, - z.ZodTypeDef, - unknown + DigestRegularMetadata, + z.ZodTypeDef, + unknown > = z.object({ - amount: z.number().optional(), - 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(), + amount: z.number().optional(), + 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; - backoff?: boolean | undefined; - backoffAmount?: number | undefined; - backoffUnit?: string | undefined; - digestKey?: string | undefined; - type: string; - unit?: string | undefined; - updateMode?: boolean | undefined; + amount?: number | undefined; + backoff?: boolean | undefined; + backoffAmount?: number | undefined; + backoffUnit?: string | undefined; + digestKey?: string | undefined; + type: string; + unit?: string | undefined; + updateMode?: boolean | undefined; }; /** @internal */ export const DigestRegularMetadata$outboundSchema: z.ZodType< - DigestRegularMetadata$Outbound, - z.ZodTypeDef, - DigestRegularMetadata + DigestRegularMetadata$Outbound, + z.ZodTypeDef, + DigestRegularMetadata > = z.object({ - amount: z.number().optional(), - 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(), + amount: z.number().optional(), + 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(), }); /** @@ -152,10 +156,10 @@ export const DigestRegularMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DigestRegularMetadata$ { - /** @deprecated use `DigestRegularMetadata$inboundSchema` instead. */ - export const inboundSchema = DigestRegularMetadata$inboundSchema; - /** @deprecated use `DigestRegularMetadata$outboundSchema` instead. */ - export const outboundSchema = DigestRegularMetadata$outboundSchema; - /** @deprecated use `DigestRegularMetadata$Outbound` instead. */ - export type Outbound = DigestRegularMetadata$Outbound; + /** @deprecated use `DigestRegularMetadata$inboundSchema` instead. */ + export const inboundSchema = DigestRegularMetadata$inboundSchema; + /** @deprecated use `DigestRegularMetadata$outboundSchema` instead. */ + export const outboundSchema = DigestRegularMetadata$outboundSchema; + /** @deprecated use `DigestRegularMetadata$Outbound` instead. */ + export type Outbound = DigestRegularMetadata$Outbound; } diff --git a/src/models/components/digesttimedmetadata.ts b/src/models/components/digesttimedmetadata.ts index 85e03f2a..789d20cc 100644 --- a/src/models/components/digesttimedmetadata.ts +++ b/src/models/components/digesttimedmetadata.ts @@ -2,46 +2,50 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - TimedConfig, - TimedConfig$inboundSchema, - TimedConfig$Outbound, - TimedConfig$outboundSchema, + TimedConfig, + TimedConfig$inboundSchema, + TimedConfig$Outbound, + TimedConfig$outboundSchema, } from "./timedconfig.js"; -import * as z from "zod"; export const DigestTimedMetadataType = { - Timed: "timed", + Timed: "timed", } as const; -export type DigestTimedMetadataType = ClosedEnum; +export type DigestTimedMetadataType = ClosedEnum< + typeof DigestTimedMetadataType +>; export const DigestTimedMetadataUnit = { - Seconds: "seconds", - Minutes: "minutes", - Hours: "hours", - Days: "days", - Weeks: "weeks", - Months: "months", + Seconds: "seconds", + Minutes: "minutes", + Hours: "hours", + Days: "days", + Weeks: "weeks", + Months: "months", } as const; -export type DigestTimedMetadataUnit = ClosedEnum; +export type DigestTimedMetadataUnit = ClosedEnum< + typeof DigestTimedMetadataUnit +>; export type DigestTimedMetadata = { - amount?: number | undefined; - digestKey?: string | undefined; - timed?: TimedConfig | undefined; - type: DigestTimedMetadataType; - unit?: DigestTimedMetadataUnit | undefined; + amount?: number | undefined; + digestKey?: string | undefined; + timed?: TimedConfig | undefined; + type: DigestTimedMetadataType; + unit?: DigestTimedMetadataUnit | undefined; }; /** @internal */ export const DigestTimedMetadataType$inboundSchema: z.ZodNativeEnum< - typeof DigestTimedMetadataType + typeof DigestTimedMetadataType > = z.nativeEnum(DigestTimedMetadataType); /** @internal */ export const DigestTimedMetadataType$outboundSchema: z.ZodNativeEnum< - typeof DigestTimedMetadataType + typeof DigestTimedMetadataType > = DigestTimedMetadataType$inboundSchema; /** @@ -49,20 +53,20 @@ export const DigestTimedMetadataType$outboundSchema: z.ZodNativeEnum< * @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; + /** @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 + typeof DigestTimedMetadataUnit > = z.nativeEnum(DigestTimedMetadataUnit); /** @internal */ export const DigestTimedMetadataUnit$outboundSchema: z.ZodNativeEnum< - typeof DigestTimedMetadataUnit + typeof DigestTimedMetadataUnit > = DigestTimedMetadataUnit$inboundSchema; /** @@ -70,45 +74,45 @@ export const DigestTimedMetadataUnit$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DigestTimedMetadataUnit$ { - /** @deprecated use `DigestTimedMetadataUnit$inboundSchema` instead. */ - export const inboundSchema = DigestTimedMetadataUnit$inboundSchema; - /** @deprecated use `DigestTimedMetadataUnit$outboundSchema` instead. */ - export const outboundSchema = DigestTimedMetadataUnit$outboundSchema; + /** @deprecated use `DigestTimedMetadataUnit$inboundSchema` instead. */ + export const inboundSchema = DigestTimedMetadataUnit$inboundSchema; + /** @deprecated use `DigestTimedMetadataUnit$outboundSchema` instead. */ + export const outboundSchema = DigestTimedMetadataUnit$outboundSchema; } /** @internal */ export const DigestTimedMetadata$inboundSchema: z.ZodType< - DigestTimedMetadata, - z.ZodTypeDef, - unknown + DigestTimedMetadata, + z.ZodTypeDef, + unknown > = z.object({ - amount: z.number().optional(), - digestKey: z.string().optional(), - timed: TimedConfig$inboundSchema.optional(), - type: DigestTimedMetadataType$inboundSchema, - unit: DigestTimedMetadataUnit$inboundSchema.optional(), + amount: z.number().optional(), + digestKey: z.string().optional(), + timed: TimedConfig$inboundSchema.optional(), + type: DigestTimedMetadataType$inboundSchema, + unit: DigestTimedMetadataUnit$inboundSchema.optional(), }); /** @internal */ export type DigestTimedMetadata$Outbound = { - amount?: number | undefined; - digestKey?: string | undefined; - timed?: TimedConfig$Outbound | undefined; - type: string; - unit?: string | undefined; + amount?: number | undefined; + digestKey?: string | undefined; + timed?: TimedConfig$Outbound | undefined; + type: string; + unit?: string | undefined; }; /** @internal */ export const DigestTimedMetadata$outboundSchema: z.ZodType< - DigestTimedMetadata$Outbound, - z.ZodTypeDef, - DigestTimedMetadata + DigestTimedMetadata$Outbound, + z.ZodTypeDef, + DigestTimedMetadata > = z.object({ - amount: z.number().optional(), - digestKey: z.string().optional(), - timed: TimedConfig$outboundSchema.optional(), - type: DigestTimedMetadataType$outboundSchema, - unit: DigestTimedMetadataUnit$outboundSchema.optional(), + amount: z.number().optional(), + digestKey: z.string().optional(), + timed: TimedConfig$outboundSchema.optional(), + type: DigestTimedMetadataType$outboundSchema, + unit: DigestTimedMetadataUnit$outboundSchema.optional(), }); /** @@ -116,10 +120,10 @@ export const DigestTimedMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DigestTimedMetadata$ { - /** @deprecated use `DigestTimedMetadata$inboundSchema` instead. */ - export const inboundSchema = DigestTimedMetadata$inboundSchema; - /** @deprecated use `DigestTimedMetadata$outboundSchema` instead. */ - export const outboundSchema = DigestTimedMetadata$outboundSchema; - /** @deprecated use `DigestTimedMetadata$Outbound` instead. */ - export type Outbound = DigestTimedMetadata$Outbound; + /** @deprecated use `DigestTimedMetadata$inboundSchema` instead. */ + export const inboundSchema = DigestTimedMetadata$inboundSchema; + /** @deprecated use `DigestTimedMetadata$outboundSchema` instead. */ + export const outboundSchema = DigestTimedMetadata$outboundSchema; + /** @deprecated use `DigestTimedMetadata$Outbound` instead. */ + export type Outbound = DigestTimedMetadata$Outbound; } diff --git a/src/models/components/emailblock.ts b/src/models/components/emailblock.ts index d500abd1..b8da5de8 100644 --- a/src/models/components/emailblock.ts +++ b/src/models/components/emailblock.ts @@ -2,81 +2,90 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - EmailBlockStyles, - EmailBlockStyles$inboundSchema, - EmailBlockStyles$Outbound, - EmailBlockStyles$outboundSchema, + EmailBlockStyles, + EmailBlockStyles$inboundSchema, + EmailBlockStyles$Outbound, + EmailBlockStyles$outboundSchema, } from "./emailblockstyles.js"; -import * as z from "zod"; export const EmailBlockType = { - Button: "button", - Text: "text", + Button: "button", + Text: "text", } as const; export type EmailBlockType = ClosedEnum; export type EmailBlock = { - content: string; - styles?: EmailBlockStyles | undefined; - type: EmailBlockType; - url?: string | undefined; + content: string; + styles?: EmailBlockStyles | undefined; + type: EmailBlockType; + url?: string | undefined; }; /** @internal */ -export const EmailBlockType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(EmailBlockType); +export const EmailBlockType$inboundSchema: z.ZodNativeEnum< + typeof EmailBlockType +> = z.nativeEnum(EmailBlockType); /** @internal */ -export const EmailBlockType$outboundSchema: z.ZodNativeEnum = - EmailBlockType$inboundSchema; +export const EmailBlockType$outboundSchema: z.ZodNativeEnum< + typeof EmailBlockType +> = EmailBlockType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EmailBlockType$ { - /** @deprecated use `EmailBlockType$inboundSchema` instead. */ - export const inboundSchema = EmailBlockType$inboundSchema; - /** @deprecated use `EmailBlockType$outboundSchema` instead. */ - export const outboundSchema = EmailBlockType$outboundSchema; + /** @deprecated use `EmailBlockType$inboundSchema` instead. */ + export const inboundSchema = EmailBlockType$inboundSchema; + /** @deprecated use `EmailBlockType$outboundSchema` instead. */ + export const outboundSchema = EmailBlockType$outboundSchema; } /** @internal */ -export const EmailBlock$inboundSchema: z.ZodType = z.object({ - content: z.string(), - styles: EmailBlockStyles$inboundSchema.optional(), - type: EmailBlockType$inboundSchema, - url: z.string().optional(), +export const EmailBlock$inboundSchema: z.ZodType< + EmailBlock, + z.ZodTypeDef, + unknown +> = z.object({ + content: z.string(), + styles: EmailBlockStyles$inboundSchema.optional(), + type: EmailBlockType$inboundSchema, + url: z.string().optional(), }); /** @internal */ export type EmailBlock$Outbound = { - content: string; - styles?: EmailBlockStyles$Outbound | undefined; - type: string; - url?: string | undefined; + content: string; + styles?: EmailBlockStyles$Outbound | undefined; + type: string; + url?: string | undefined; }; /** @internal */ -export const EmailBlock$outboundSchema: z.ZodType = - z.object({ - content: z.string(), - styles: EmailBlockStyles$outboundSchema.optional(), - type: EmailBlockType$outboundSchema, - url: z.string().optional(), - }); +export const EmailBlock$outboundSchema: z.ZodType< + EmailBlock$Outbound, + z.ZodTypeDef, + EmailBlock +> = z.object({ + content: z.string(), + styles: EmailBlockStyles$outboundSchema.optional(), + type: EmailBlockType$outboundSchema, + url: 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 EmailBlock$ { - /** @deprecated use `EmailBlock$inboundSchema` instead. */ - export const inboundSchema = EmailBlock$inboundSchema; - /** @deprecated use `EmailBlock$outboundSchema` instead. */ - export const outboundSchema = EmailBlock$outboundSchema; - /** @deprecated use `EmailBlock$Outbound` instead. */ - export type Outbound = EmailBlock$Outbound; + /** @deprecated use `EmailBlock$inboundSchema` instead. */ + export const inboundSchema = EmailBlock$inboundSchema; + /** @deprecated use `EmailBlock$outboundSchema` instead. */ + export const outboundSchema = EmailBlock$outboundSchema; + /** @deprecated use `EmailBlock$Outbound` instead. */ + export type Outbound = EmailBlock$Outbound; } diff --git a/src/models/components/emailblockstyles.ts b/src/models/components/emailblockstyles.ts index 5f23b4f4..9416a9b5 100644 --- a/src/models/components/emailblockstyles.ts +++ b/src/models/components/emailblockstyles.ts @@ -2,55 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TextAlign = { - Center: "center", - Left: "left", - Right: "right", + Center: "center", + Left: "left", + Right: "right", } as const; export type TextAlign = ClosedEnum; export type EmailBlockStyles = { - textAlign: TextAlign; + textAlign: TextAlign; }; /** @internal */ -export const TextAlign$inboundSchema: z.ZodNativeEnum = z.nativeEnum(TextAlign); +export const TextAlign$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TextAlign); /** @internal */ -export const TextAlign$outboundSchema: z.ZodNativeEnum = TextAlign$inboundSchema; +export const TextAlign$outboundSchema: z.ZodNativeEnum = + TextAlign$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TextAlign$ { - /** @deprecated use `TextAlign$inboundSchema` instead. */ - export const inboundSchema = TextAlign$inboundSchema; - /** @deprecated use `TextAlign$outboundSchema` instead. */ - export const outboundSchema = TextAlign$outboundSchema; + /** @deprecated use `TextAlign$inboundSchema` instead. */ + export const inboundSchema = TextAlign$inboundSchema; + /** @deprecated use `TextAlign$outboundSchema` instead. */ + export const outboundSchema = TextAlign$outboundSchema; } /** @internal */ -export const EmailBlockStyles$inboundSchema: z.ZodType = - z.object({ - textAlign: TextAlign$inboundSchema, - }); +export const EmailBlockStyles$inboundSchema: z.ZodType< + EmailBlockStyles, + z.ZodTypeDef, + unknown +> = z.object({ + textAlign: TextAlign$inboundSchema, +}); /** @internal */ export type EmailBlockStyles$Outbound = { - textAlign: string; + textAlign: string; }; /** @internal */ export const EmailBlockStyles$outboundSchema: z.ZodType< - EmailBlockStyles$Outbound, - z.ZodTypeDef, - EmailBlockStyles + EmailBlockStyles$Outbound, + z.ZodTypeDef, + EmailBlockStyles > = z.object({ - textAlign: TextAlign$outboundSchema, + textAlign: TextAlign$outboundSchema, }); /** @@ -58,10 +63,10 @@ export const EmailBlockStyles$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EmailBlockStyles$ { - /** @deprecated use `EmailBlockStyles$inboundSchema` instead. */ - export const inboundSchema = EmailBlockStyles$inboundSchema; - /** @deprecated use `EmailBlockStyles$outboundSchema` instead. */ - export const outboundSchema = EmailBlockStyles$outboundSchema; - /** @deprecated use `EmailBlockStyles$Outbound` instead. */ - export type Outbound = EmailBlockStyles$Outbound; + /** @deprecated use `EmailBlockStyles$inboundSchema` instead. */ + export const inboundSchema = EmailBlockStyles$inboundSchema; + /** @deprecated use `EmailBlockStyles$outboundSchema` instead. */ + export const outboundSchema = EmailBlockStyles$outboundSchema; + /** @deprecated use `EmailBlockStyles$Outbound` instead. */ + export type Outbound = EmailBlockStyles$Outbound; } diff --git a/src/models/components/environmentresponsedto.ts b/src/models/components/environmentresponsedto.ts index fa8c3ec2..dd6faae2 100644 --- a/src/models/components/environmentresponsedto.ts +++ b/src/models/components/environmentresponsedto.ts @@ -2,81 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type EnvironmentResponseDto = { - id?: string | undefined; - organizationId: string; - parentId: string; - apiKeys?: Array | undefined; - identifier: string; - name: string; + id?: string | undefined; + organizationId: string; + parentId: string; + apiKeys?: Array | undefined; + identifier: string; + name: string; }; /** @internal */ export const EnvironmentResponseDto$inboundSchema: z.ZodType< - EnvironmentResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string(), - apiKeys: z.array(z.string()).optional(), - identifier: z.string(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - _organizationId: "organizationId", - _parentId: "parentId", - }); - }); + EnvironmentResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string().optional(), + _organizationId: z.string(), + _parentId: z.string(), + apiKeys: z.array(z.string()).optional(), + identifier: z.string(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "_id": "id", + "_organizationId": "organizationId", + "_parentId": "parentId", + }); +}); /** @internal */ export type EnvironmentResponseDto$Outbound = { - _id?: string | undefined; - _organizationId: string; - _parentId: string; - apiKeys?: Array | undefined; - identifier: string; - name: string; + _id?: string | undefined; + _organizationId: string; + _parentId: string; + apiKeys?: Array | undefined; + identifier: string; + name: string; }; /** @internal */ export const EnvironmentResponseDto$outboundSchema: z.ZodType< - EnvironmentResponseDto$Outbound, - z.ZodTypeDef, - EnvironmentResponseDto -> = z - .object({ - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string(), - apiKeys: z.array(z.string()).optional(), - identifier: z.string(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); - }); + EnvironmentResponseDto$Outbound, + z.ZodTypeDef, + EnvironmentResponseDto +> = z.object({ + id: z.string().optional(), + organizationId: z.string(), + parentId: z.string(), + apiKeys: z.array(z.string()).optional(), + identifier: z.string(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + 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 EnvironmentResponseDto$ { - /** @deprecated use `EnvironmentResponseDto$inboundSchema` instead. */ - export const inboundSchema = EnvironmentResponseDto$inboundSchema; - /** @deprecated use `EnvironmentResponseDto$outboundSchema` instead. */ - export const outboundSchema = EnvironmentResponseDto$outboundSchema; - /** @deprecated use `EnvironmentResponseDto$Outbound` instead. */ - export type Outbound = EnvironmentResponseDto$Outbound; + /** @deprecated use `EnvironmentResponseDto$inboundSchema` instead. */ + export const inboundSchema = EnvironmentResponseDto$inboundSchema; + /** @deprecated use `EnvironmentResponseDto$outboundSchema` instead. */ + export const outboundSchema = EnvironmentResponseDto$outboundSchema; + /** @deprecated use `EnvironmentResponseDto$Outbound` instead. */ + export type Outbound = EnvironmentResponseDto$Outbound; } diff --git a/src/models/components/executiondetailsresponsedto.ts b/src/models/components/executiondetailsresponsedto.ts index 1d4aff56..fcd14bbb 100644 --- a/src/models/components/executiondetailsresponsedto.ts +++ b/src/models/components/executiondetailsresponsedto.ts @@ -2,73 +2,73 @@ * 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"; -import * as z from "zod"; export const ExecutionDetailsResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", - Digest: "digest", - Trigger: "trigger", - Delay: "delay", - Custom: "custom", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", + Digest: "digest", + Trigger: "trigger", + Delay: "delay", + Custom: "custom", } as const; export type ExecutionDetailsResponseDtoChannel = ClosedEnum< - typeof ExecutionDetailsResponseDtoChannel + typeof ExecutionDetailsResponseDtoChannel >; export const Source = { - Credentials: "Credentials", - Internal: "Internal", - Payload: "Payload", - Webhook: "Webhook", + Credentials: "Credentials", + Internal: "Internal", + Payload: "Payload", + Webhook: "Webhook", } as const; export type Source = ClosedEnum; export const ExecutionDetailsResponseDtoStatus = { - Success: "Success", - Warning: "Warning", - Failed: "Failed", - Pending: "Pending", - Queued: "Queued", - ReadConfirmation: "ReadConfirmation", + Success: "Success", + Warning: "Warning", + Failed: "Failed", + Pending: "Pending", + Queued: "Queued", + ReadConfirmation: "ReadConfirmation", } as const; export type ExecutionDetailsResponseDtoStatus = ClosedEnum< - typeof ExecutionDetailsResponseDtoStatus + typeof ExecutionDetailsResponseDtoStatus >; export type ExecutionDetailsResponseDto = { - environmentId: string; - id?: string | undefined; - jobId: string; - messageId?: string | undefined; - notificationId: string; - notificationTemplateId: string; - organizationId: string; - subscriberId: string; - channel: ExecutionDetailsResponseDtoChannel; - createdAt?: string | undefined; - detail: string; - isRetry: boolean; - isTest: boolean; - providerId?: string | undefined; - source: Source; - status: ExecutionDetailsResponseDtoStatus; - transactionId: string; + environmentId: string; + id?: string | undefined; + jobId: string; + messageId?: string | undefined; + notificationId: string; + notificationTemplateId: string; + organizationId: string; + subscriberId: string; + channel: ExecutionDetailsResponseDtoChannel; + createdAt?: string | undefined; + detail: string; + isRetry: boolean; + isTest: boolean; + providerId?: string | undefined; + source: Source; + status: ExecutionDetailsResponseDtoStatus; + transactionId: string; }; /** @internal */ export const ExecutionDetailsResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoChannel + typeof ExecutionDetailsResponseDtoChannel > = z.nativeEnum(ExecutionDetailsResponseDtoChannel); /** @internal */ export const ExecutionDetailsResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoChannel + typeof ExecutionDetailsResponseDtoChannel > = ExecutionDetailsResponseDtoChannel$inboundSchema; /** @@ -76,37 +76,40 @@ export const ExecutionDetailsResponseDtoChannel$outboundSchema: z.ZodNativeEnum< * @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; + /** @deprecated use `ExecutionDetailsResponseDtoChannel$inboundSchema` instead. */ + export const inboundSchema = ExecutionDetailsResponseDtoChannel$inboundSchema; + /** @deprecated use `ExecutionDetailsResponseDtoChannel$outboundSchema` instead. */ + export const outboundSchema = + ExecutionDetailsResponseDtoChannel$outboundSchema; } /** @internal */ -export const Source$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Source); +export const Source$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Source); /** @internal */ -export const Source$outboundSchema: z.ZodNativeEnum = Source$inboundSchema; +export const Source$outboundSchema: z.ZodNativeEnum = + Source$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Source$ { - /** @deprecated use `Source$inboundSchema` instead. */ - export const inboundSchema = Source$inboundSchema; - /** @deprecated use `Source$outboundSchema` instead. */ - export const outboundSchema = Source$outboundSchema; + /** @deprecated use `Source$inboundSchema` instead. */ + export const inboundSchema = Source$inboundSchema; + /** @deprecated use `Source$outboundSchema` instead. */ + export const outboundSchema = Source$outboundSchema; } /** @internal */ export const ExecutionDetailsResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoStatus + typeof ExecutionDetailsResponseDtoStatus > = z.nativeEnum(ExecutionDetailsResponseDtoStatus); /** @internal */ export const ExecutionDetailsResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof ExecutionDetailsResponseDtoStatus + typeof ExecutionDetailsResponseDtoStatus > = ExecutionDetailsResponseDtoStatus$inboundSchema; /** @@ -114,118 +117,115 @@ export const ExecutionDetailsResponseDtoStatus$outboundSchema: z.ZodNativeEnum< * @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; + /** @deprecated use `ExecutionDetailsResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = ExecutionDetailsResponseDtoStatus$inboundSchema; + /** @deprecated use `ExecutionDetailsResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = + ExecutionDetailsResponseDtoStatus$outboundSchema; } /** @internal */ export const ExecutionDetailsResponseDto$inboundSchema: z.ZodType< - ExecutionDetailsResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _jobId: z.string(), - _messageId: z.string().optional(), - _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(), - providerId: z.string().optional(), - source: Source$inboundSchema, - status: ExecutionDetailsResponseDtoStatus$inboundSchema, - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _jobId: "jobId", - _messageId: "messageId", - _notificationId: "notificationId", - _notificationTemplateId: "notificationTemplateId", - _organizationId: "organizationId", - _subscriberId: "subscriberId", - }); - }); + ExecutionDetailsResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _jobId: z.string(), + _messageId: z.string().optional(), + _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(), + providerId: z.string().optional(), + source: Source$inboundSchema, + status: ExecutionDetailsResponseDtoStatus$inboundSchema, + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_jobId": "jobId", + "_messageId": "messageId", + "_notificationId": "notificationId", + "_notificationTemplateId": "notificationTemplateId", + "_organizationId": "organizationId", + "_subscriberId": "subscriberId", + }); +}); /** @internal */ export type ExecutionDetailsResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _jobId: string; - _messageId?: string | undefined; - _notificationId: string; - _notificationTemplateId: string; - _organizationId: string; - _subscriberId: string; - channel: string; - createdAt?: string | undefined; - detail: string; - isRetry: boolean; - isTest: boolean; - providerId?: string | undefined; - source: string; - status: string; - transactionId: string; + _environmentId: string; + _id?: string | undefined; + _jobId: string; + _messageId?: string | undefined; + _notificationId: string; + _notificationTemplateId: string; + _organizationId: string; + _subscriberId: string; + channel: string; + createdAt?: string | undefined; + detail: string; + isRetry: boolean; + isTest: boolean; + providerId?: string | undefined; + source: string; + status: string; + transactionId: string; }; /** @internal */ export const ExecutionDetailsResponseDto$outboundSchema: z.ZodType< - ExecutionDetailsResponseDto$Outbound, - z.ZodTypeDef, - ExecutionDetailsResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - jobId: z.string(), - messageId: z.string().optional(), - 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(), - providerId: z.string().optional(), - source: Source$outboundSchema, - status: ExecutionDetailsResponseDtoStatus$outboundSchema, - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - jobId: "_jobId", - messageId: "_messageId", - notificationId: "_notificationId", - notificationTemplateId: "_notificationTemplateId", - organizationId: "_organizationId", - subscriberId: "_subscriberId", - }); - }); + ExecutionDetailsResponseDto$Outbound, + z.ZodTypeDef, + ExecutionDetailsResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + jobId: z.string(), + messageId: z.string().optional(), + 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(), + providerId: z.string().optional(), + source: Source$outboundSchema, + status: ExecutionDetailsResponseDtoStatus$outboundSchema, + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + jobId: "_jobId", + messageId: "_messageId", + notificationId: "_notificationId", + notificationTemplateId: "_notificationTemplateId", + organizationId: "_organizationId", + subscriberId: "_subscriberId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExecutionDetailsResponseDto$ { - /** @deprecated use `ExecutionDetailsResponseDto$inboundSchema` instead. */ - export const inboundSchema = ExecutionDetailsResponseDto$inboundSchema; - /** @deprecated use `ExecutionDetailsResponseDto$outboundSchema` instead. */ - export const outboundSchema = ExecutionDetailsResponseDto$outboundSchema; - /** @deprecated use `ExecutionDetailsResponseDto$Outbound` instead. */ - export type Outbound = ExecutionDetailsResponseDto$Outbound; + /** @deprecated use `ExecutionDetailsResponseDto$inboundSchema` instead. */ + export const inboundSchema = ExecutionDetailsResponseDto$inboundSchema; + /** @deprecated use `ExecutionDetailsResponseDto$outboundSchema` instead. */ + export const outboundSchema = ExecutionDetailsResponseDto$outboundSchema; + /** @deprecated use `ExecutionDetailsResponseDto$Outbound` instead. */ + export type Outbound = ExecutionDetailsResponseDto$Outbound; } diff --git a/src/models/components/feedresponsedto.ts b/src/models/components/feedresponsedto.ts index 57e523dc..3f09d4e1 100644 --- a/src/models/components/feedresponsedto.ts +++ b/src/models/components/feedresponsedto.ts @@ -5,43 +5,46 @@ import * as z from "zod"; export type FeedResponseDto = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; - totalCount?: number | undefined; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; + totalCount?: number | undefined; }; /** @internal */ -export const FeedResponseDto$inboundSchema: z.ZodType = - z.object({ - data: z.array(z.string()), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), - totalCount: z.number().optional(), - }); +export const FeedResponseDto$inboundSchema: z.ZodType< + FeedResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(z.string()), + hasMore: z.boolean(), + page: z.number(), + pageSize: z.number(), + totalCount: z.number().optional(), +}); /** @internal */ export type FeedResponseDto$Outbound = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; - totalCount?: number | undefined; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; + totalCount?: number | undefined; }; /** @internal */ export const FeedResponseDto$outboundSchema: z.ZodType< - FeedResponseDto$Outbound, - z.ZodTypeDef, - FeedResponseDto + FeedResponseDto$Outbound, + z.ZodTypeDef, + FeedResponseDto > = z.object({ - data: z.array(z.string()), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), - totalCount: z.number().optional(), + data: z.array(z.string()), + hasMore: z.boolean(), + page: z.number(), + pageSize: z.number(), + totalCount: z.number().optional(), }); /** @@ -49,10 +52,10 @@ export const FeedResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FeedResponseDto$ { - /** @deprecated use `FeedResponseDto$inboundSchema` instead. */ - export const inboundSchema = FeedResponseDto$inboundSchema; - /** @deprecated use `FeedResponseDto$outboundSchema` instead. */ - export const outboundSchema = FeedResponseDto$outboundSchema; - /** @deprecated use `FeedResponseDto$Outbound` instead. */ - export type Outbound = FeedResponseDto$Outbound; + /** @deprecated use `FeedResponseDto$inboundSchema` instead. */ + export const inboundSchema = FeedResponseDto$inboundSchema; + /** @deprecated use `FeedResponseDto$outboundSchema` instead. */ + export const outboundSchema = FeedResponseDto$outboundSchema; + /** @deprecated use `FeedResponseDto$Outbound` instead. */ + export type Outbound = FeedResponseDto$Outbound; } diff --git a/src/models/components/fieldfilterpart.ts b/src/models/components/fieldfilterpart.ts index 810fa30c..6bdd95c5 100644 --- a/src/models/components/fieldfilterpart.ts +++ b/src/models/components/fieldfilterpart.ts @@ -2,38 +2,38 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const On = { - Subscriber: "subscriber", - Payload: "payload", + Subscriber: "subscriber", + Payload: "payload", } as const; export type On = ClosedEnum; export const Operator = { - Larger: "LARGER", - Smaller: "SMALLER", - LargerEqual: "LARGER_EQUAL", - SmallerEqual: "SMALLER_EQUAL", - Equal: "EQUAL", - NotEqual: "NOT_EQUAL", - AllIn: "ALL_IN", - AnyIn: "ANY_IN", - NotIn: "NOT_IN", - Between: "BETWEEN", - NotBetween: "NOT_BETWEEN", - Like: "LIKE", - NotLike: "NOT_LIKE", - In: "IN", + Larger: "LARGER", + Smaller: "SMALLER", + LargerEqual: "LARGER_EQUAL", + SmallerEqual: "SMALLER_EQUAL", + Equal: "EQUAL", + NotEqual: "NOT_EQUAL", + AllIn: "ALL_IN", + AnyIn: "ANY_IN", + NotIn: "NOT_IN", + Between: "BETWEEN", + NotBetween: "NOT_BETWEEN", + Like: "LIKE", + NotLike: "NOT_LIKE", + In: "IN", } as const; export type Operator = ClosedEnum; export type FieldFilterPart = { - field: string; - on: On; - operator: Operator; - value: string; + field: string; + on: On; + operator: Operator; + value: string; }; /** @internal */ @@ -47,56 +47,61 @@ export const On$outboundSchema: z.ZodNativeEnum = On$inboundSchema; * @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; + /** @deprecated use `On$inboundSchema` instead. */ + export const inboundSchema = On$inboundSchema; + /** @deprecated use `On$outboundSchema` instead. */ + export const outboundSchema = On$outboundSchema; } /** @internal */ -export const Operator$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Operator); +export const Operator$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Operator); /** @internal */ -export const Operator$outboundSchema: z.ZodNativeEnum = Operator$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 Operator$ { - /** @deprecated use `Operator$inboundSchema` instead. */ - export const inboundSchema = Operator$inboundSchema; - /** @deprecated use `Operator$outboundSchema` instead. */ - export const outboundSchema = Operator$outboundSchema; + /** @deprecated use `Operator$inboundSchema` instead. */ + export const inboundSchema = Operator$inboundSchema; + /** @deprecated use `Operator$outboundSchema` instead. */ + export const outboundSchema = Operator$outboundSchema; } /** @internal */ -export const FieldFilterPart$inboundSchema: z.ZodType = - z.object({ - field: z.string(), - on: On$inboundSchema, - operator: Operator$inboundSchema, - value: z.string(), - }); +export const FieldFilterPart$inboundSchema: z.ZodType< + FieldFilterPart, + z.ZodTypeDef, + unknown +> = z.object({ + field: z.string(), + on: On$inboundSchema, + operator: Operator$inboundSchema, + value: z.string(), +}); /** @internal */ export type FieldFilterPart$Outbound = { - field: string; - on: string; - operator: string; - value: string; + field: string; + on: string; + operator: string; + value: string; }; /** @internal */ export const FieldFilterPart$outboundSchema: z.ZodType< - FieldFilterPart$Outbound, - z.ZodTypeDef, - FieldFilterPart + FieldFilterPart$Outbound, + z.ZodTypeDef, + FieldFilterPart > = z.object({ - field: z.string(), - on: On$outboundSchema, - operator: Operator$outboundSchema, - value: z.string(), + field: z.string(), + on: On$outboundSchema, + operator: Operator$outboundSchema, + value: z.string(), }); /** @@ -104,10 +109,10 @@ export const FieldFilterPart$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FieldFilterPart$ { - /** @deprecated use `FieldFilterPart$inboundSchema` instead. */ - export const inboundSchema = FieldFilterPart$inboundSchema; - /** @deprecated use `FieldFilterPart$outboundSchema` instead. */ - export const outboundSchema = FieldFilterPart$outboundSchema; - /** @deprecated use `FieldFilterPart$Outbound` instead. */ - export type Outbound = FieldFilterPart$Outbound; + /** @deprecated use `FieldFilterPart$inboundSchema` instead. */ + export const inboundSchema = FieldFilterPart$inboundSchema; + /** @deprecated use `FieldFilterPart$outboundSchema` instead. */ + export const outboundSchema = FieldFilterPart$outboundSchema; + /** @deprecated use `FieldFilterPart$Outbound` instead. */ + export type Outbound = FieldFilterPart$Outbound; } diff --git a/src/models/components/filtertopicsresponsedto.ts b/src/models/components/filtertopicsresponsedto.ts index bb73539e..58eed1ba 100644 --- a/src/models/components/filtertopicsresponsedto.ts +++ b/src/models/components/filtertopicsresponsedto.ts @@ -2,51 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - TopicDto, - TopicDto$inboundSchema, - TopicDto$Outbound, - TopicDto$outboundSchema, + TopicDto, + TopicDto$inboundSchema, + TopicDto$Outbound, + TopicDto$outboundSchema, } from "./topicdto.js"; -import * as z from "zod"; export type FilterTopicsResponseDto = { - data: Array; - page: number; - pageSize: number; - totalCount: number; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const FilterTopicsResponseDto$inboundSchema: z.ZodType< - FilterTopicsResponseDto, - z.ZodTypeDef, - unknown + FilterTopicsResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.array(TopicDto$inboundSchema), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + data: z.array(TopicDto$inboundSchema), + page: z.number(), + pageSize: z.number(), + totalCount: z.number(), }); /** @internal */ export type FilterTopicsResponseDto$Outbound = { - data: Array; - page: number; - pageSize: number; - totalCount: number; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const FilterTopicsResponseDto$outboundSchema: z.ZodType< - FilterTopicsResponseDto$Outbound, - z.ZodTypeDef, - FilterTopicsResponseDto + FilterTopicsResponseDto$Outbound, + z.ZodTypeDef, + FilterTopicsResponseDto > = z.object({ - data: z.array(TopicDto$outboundSchema), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + data: z.array(TopicDto$outboundSchema), + page: z.number(), + pageSize: z.number(), + totalCount: z.number(), }); /** @@ -54,10 +54,10 @@ export const FilterTopicsResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FilterTopicsResponseDto$ { - /** @deprecated use `FilterTopicsResponseDto$inboundSchema` instead. */ - export const inboundSchema = FilterTopicsResponseDto$inboundSchema; - /** @deprecated use `FilterTopicsResponseDto$outboundSchema` instead. */ - export const outboundSchema = FilterTopicsResponseDto$outboundSchema; - /** @deprecated use `FilterTopicsResponseDto$Outbound` instead. */ - export type Outbound = FilterTopicsResponseDto$Outbound; + /** @deprecated use `FilterTopicsResponseDto$inboundSchema` instead. */ + export const inboundSchema = FilterTopicsResponseDto$inboundSchema; + /** @deprecated use `FilterTopicsResponseDto$outboundSchema` instead. */ + export const outboundSchema = FilterTopicsResponseDto$outboundSchema; + /** @deprecated use `FilterTopicsResponseDto$Outbound` instead. */ + export type Outbound = FilterTopicsResponseDto$Outbound; } diff --git a/src/models/components/getlayoutresponsedto.ts b/src/models/components/getlayoutresponsedto.ts index 0777aa01..a4095b13 100644 --- a/src/models/components/getlayoutresponsedto.ts +++ b/src/models/components/getlayoutresponsedto.ts @@ -2,46 +2,48 @@ * 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"; -import * as z from "zod"; export const GetLayoutResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; -export type GetLayoutResponseDtoChannel = ClosedEnum; +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; + 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 + typeof GetLayoutResponseDtoChannel > = z.nativeEnum(GetLayoutResponseDtoChannel); /** @internal */ export const GetLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof GetLayoutResponseDtoChannel + typeof GetLayoutResponseDtoChannel > = GetLayoutResponseDtoChannel$inboundSchema; /** @@ -49,109 +51,105 @@ export const GetLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< * @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; + /** @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", - }); - }); + 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; + _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", - }); - }); + 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; + /** @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 915182ce..da059c82 100644 --- a/src/models/components/getsubscriberpreferencesresponsedto.ts +++ b/src/models/components/getsubscriberpreferencesresponsedto.ts @@ -2,55 +2,55 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Preference, - Preference$inboundSchema, - Preference$Outbound, - Preference$outboundSchema, + Preference, + Preference$inboundSchema, + Preference$Outbound, + Preference$outboundSchema, } from "./preference.js"; import { - TemplateResponse, - TemplateResponse$inboundSchema, - TemplateResponse$Outbound, - TemplateResponse$outboundSchema, + TemplateResponse, + TemplateResponse$inboundSchema, + TemplateResponse$Outbound, + TemplateResponse$outboundSchema, } from "./templateresponse.js"; -import * as z from "zod"; 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; + /** + * The workflow information and if it is critical or not + */ + template?: TemplateResponse | undefined; }; /** @internal */ export const GetSubscriberPreferencesResponseDto$inboundSchema: z.ZodType< - GetSubscriberPreferencesResponseDto, - z.ZodTypeDef, - unknown + GetSubscriberPreferencesResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - preference: Preference$inboundSchema, - template: TemplateResponse$inboundSchema.optional(), + preference: Preference$inboundSchema, + template: TemplateResponse$inboundSchema.optional(), }); /** @internal */ export type GetSubscriberPreferencesResponseDto$Outbound = { - preference: Preference$Outbound; - template?: TemplateResponse$Outbound | undefined; + preference: Preference$Outbound; + template?: TemplateResponse$Outbound | undefined; }; /** @internal */ export const GetSubscriberPreferencesResponseDto$outboundSchema: z.ZodType< - GetSubscriberPreferencesResponseDto$Outbound, - z.ZodTypeDef, - GetSubscriberPreferencesResponseDto + GetSubscriberPreferencesResponseDto$Outbound, + z.ZodTypeDef, + GetSubscriberPreferencesResponseDto > = z.object({ - preference: Preference$outboundSchema, - template: TemplateResponse$outboundSchema.optional(), + preference: Preference$outboundSchema, + template: TemplateResponse$outboundSchema.optional(), }); /** @@ -58,10 +58,12 @@ export const GetSubscriberPreferencesResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSubscriberPreferencesResponseDto$ { - /** @deprecated use `GetSubscriberPreferencesResponseDto$inboundSchema` instead. */ - export const inboundSchema = GetSubscriberPreferencesResponseDto$inboundSchema; - /** @deprecated use `GetSubscriberPreferencesResponseDto$outboundSchema` instead. */ - export const outboundSchema = GetSubscriberPreferencesResponseDto$outboundSchema; - /** @deprecated use `GetSubscriberPreferencesResponseDto$Outbound` instead. */ - export type Outbound = GetSubscriberPreferencesResponseDto$Outbound; + /** @deprecated use `GetSubscriberPreferencesResponseDto$inboundSchema` instead. */ + export const inboundSchema = + GetSubscriberPreferencesResponseDto$inboundSchema; + /** @deprecated use `GetSubscriberPreferencesResponseDto$outboundSchema` instead. */ + export const outboundSchema = + GetSubscriberPreferencesResponseDto$outboundSchema; + /** @deprecated use `GetSubscriberPreferencesResponseDto$Outbound` instead. */ + export type Outbound = GetSubscriberPreferencesResponseDto$Outbound; } diff --git a/src/models/components/gettenantresponsedto.ts b/src/models/components/gettenantresponsedto.ts index 22d6a082..8cb45426 100644 --- a/src/models/components/gettenantresponsedto.ts +++ b/src/models/components/gettenantresponsedto.ts @@ -2,26 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; 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; + 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 + GetTenantResponseDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -29,9 +29,9 @@ export type GetTenantResponseDtoData$Outbound = {}; /** @internal */ export const GetTenantResponseDtoData$outboundSchema: z.ZodType< - GetTenantResponseDtoData$Outbound, - z.ZodTypeDef, - GetTenantResponseDtoData + GetTenantResponseDtoData$Outbound, + z.ZodTypeDef, + GetTenantResponseDtoData > = z.object({}); /** @@ -39,78 +39,74 @@ export const GetTenantResponseDtoData$outboundSchema: z.ZodType< * @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; + /** @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", - }); - }); + 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; + _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", - }); - }); + 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; + /** @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 8e8b447c..37f92c66 100644 --- a/src/models/components/gettopicresponsedto.ts +++ b/src/models/components/gettopicresponsedto.ts @@ -2,81 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type GetTopicResponseDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - key: string; - name: string; - subscribers: Array; + environmentId: string; + id?: string | undefined; + organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ export const GetTopicResponseDto$inboundSchema: z.ZodType< - GetTopicResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); + GetTopicResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @internal */ export type GetTopicResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - key: string; - name: string; - subscribers: Array; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ export const GetTopicResponseDto$outboundSchema: z.ZodType< - GetTopicResponseDto$Outbound, - z.ZodTypeDef, - GetTopicResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); + GetTopicResponseDto$Outbound, + z.ZodTypeDef, + GetTopicResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicResponseDto$ { - /** @deprecated use `GetTopicResponseDto$inboundSchema` instead. */ - export const inboundSchema = GetTopicResponseDto$inboundSchema; - /** @deprecated use `GetTopicResponseDto$outboundSchema` instead. */ - export const outboundSchema = GetTopicResponseDto$outboundSchema; - /** @deprecated use `GetTopicResponseDto$Outbound` instead. */ - export type Outbound = GetTopicResponseDto$Outbound; + /** @deprecated use `GetTopicResponseDto$inboundSchema` instead. */ + export const inboundSchema = GetTopicResponseDto$inboundSchema; + /** @deprecated use `GetTopicResponseDto$outboundSchema` instead. */ + export const outboundSchema = GetTopicResponseDto$outboundSchema; + /** @deprecated use `GetTopicResponseDto$Outbound` instead. */ + export type Outbound = GetTopicResponseDto$Outbound; } diff --git a/src/models/components/integrationresponsedto.ts b/src/models/components/integrationresponsedto.ts index 1996f418..7bd5ab35 100644 --- a/src/models/components/integrationresponsedto.ts +++ b/src/models/components/integrationresponsedto.ts @@ -2,56 +2,58 @@ * 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"; import { - CredentialsDto, - CredentialsDto$inboundSchema, - CredentialsDto$Outbound, - CredentialsDto$outboundSchema, + CredentialsDto, + CredentialsDto$inboundSchema, + CredentialsDto$Outbound, + CredentialsDto$outboundSchema, } from "./credentialsdto.js"; import { - StepFilter, - StepFilter$inboundSchema, - StepFilter$Outbound, - StepFilter$outboundSchema, + StepFilter, + StepFilter$inboundSchema, + StepFilter$Outbound, + StepFilter$outboundSchema, } from "./stepfilter.js"; -import * as z from "zod"; export const IntegrationResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; -export type IntegrationResponseDtoChannel = ClosedEnum; +export type IntegrationResponseDtoChannel = ClosedEnum< + typeof IntegrationResponseDtoChannel +>; export type IntegrationResponseDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - active: boolean; - channel: IntegrationResponseDtoChannel; - conditions?: Array | undefined; - credentials: CredentialsDto; - deleted: boolean; - deletedAt: string; - deletedBy: string; - identifier: string; - name: string; - primary: boolean; - providerId: string; + environmentId: string; + id?: string | undefined; + organizationId: string; + active: boolean; + channel: IntegrationResponseDtoChannel; + conditions?: Array | undefined; + credentials: CredentialsDto; + deleted: boolean; + deletedAt: string; + deletedBy: string; + identifier: string; + name: string; + primary: boolean; + providerId: string; }; /** @internal */ export const IntegrationResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof IntegrationResponseDtoChannel + typeof IntegrationResponseDtoChannel > = z.nativeEnum(IntegrationResponseDtoChannel); /** @internal */ export const IntegrationResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof IntegrationResponseDtoChannel + typeof IntegrationResponseDtoChannel > = IntegrationResponseDtoChannel$inboundSchema; /** @@ -59,99 +61,95 @@ export const IntegrationResponseDtoChannel$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IntegrationResponseDtoChannel$ { - /** @deprecated use `IntegrationResponseDtoChannel$inboundSchema` instead. */ - export const inboundSchema = IntegrationResponseDtoChannel$inboundSchema; - /** @deprecated use `IntegrationResponseDtoChannel$outboundSchema` instead. */ - export const outboundSchema = IntegrationResponseDtoChannel$outboundSchema; + /** @deprecated use `IntegrationResponseDtoChannel$inboundSchema` instead. */ + export const inboundSchema = IntegrationResponseDtoChannel$inboundSchema; + /** @deprecated use `IntegrationResponseDtoChannel$outboundSchema` instead. */ + export const outboundSchema = IntegrationResponseDtoChannel$outboundSchema; } /** @internal */ export const IntegrationResponseDto$inboundSchema: z.ZodType< - IntegrationResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - active: z.boolean(), - channel: IntegrationResponseDtoChannel$inboundSchema, - conditions: z.array(StepFilter$inboundSchema).optional(), - credentials: CredentialsDto$inboundSchema, - deleted: z.boolean(), - deletedAt: z.string(), - deletedBy: z.string(), - identifier: z.string(), - name: z.string(), - primary: z.boolean(), - providerId: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); + IntegrationResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + active: z.boolean(), + channel: IntegrationResponseDtoChannel$inboundSchema, + conditions: z.array(StepFilter$inboundSchema).optional(), + credentials: CredentialsDto$inboundSchema, + deleted: z.boolean(), + deletedAt: z.string(), + deletedBy: z.string(), + identifier: z.string(), + name: z.string(), + primary: z.boolean(), + providerId: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @internal */ export type IntegrationResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - active: boolean; - channel: string; - conditions?: Array | undefined; - credentials: CredentialsDto$Outbound; - deleted: boolean; - deletedAt: string; - deletedBy: string; - identifier: string; - name: string; - primary: boolean; - providerId: string; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + active: boolean; + channel: string; + conditions?: Array | undefined; + credentials: CredentialsDto$Outbound; + deleted: boolean; + deletedAt: string; + deletedBy: string; + identifier: string; + name: string; + primary: boolean; + providerId: string; }; /** @internal */ export const IntegrationResponseDto$outboundSchema: z.ZodType< - IntegrationResponseDto$Outbound, - z.ZodTypeDef, - IntegrationResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - active: z.boolean(), - channel: IntegrationResponseDtoChannel$outboundSchema, - conditions: z.array(StepFilter$outboundSchema).optional(), - credentials: CredentialsDto$outboundSchema, - deleted: z.boolean(), - deletedAt: z.string(), - deletedBy: z.string(), - identifier: z.string(), - name: z.string(), - primary: z.boolean(), - providerId: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); + IntegrationResponseDto$Outbound, + z.ZodTypeDef, + IntegrationResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + active: z.boolean(), + channel: IntegrationResponseDtoChannel$outboundSchema, + conditions: z.array(StepFilter$outboundSchema).optional(), + credentials: CredentialsDto$outboundSchema, + deleted: z.boolean(), + deletedAt: z.string(), + deletedBy: z.string(), + identifier: z.string(), + name: z.string(), + primary: z.boolean(), + providerId: z.string(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IntegrationResponseDto$ { - /** @deprecated use `IntegrationResponseDto$inboundSchema` instead. */ - export const inboundSchema = IntegrationResponseDto$inboundSchema; - /** @deprecated use `IntegrationResponseDto$outboundSchema` instead. */ - export const outboundSchema = IntegrationResponseDto$outboundSchema; - /** @deprecated use `IntegrationResponseDto$Outbound` instead. */ - export type Outbound = IntegrationResponseDto$Outbound; + /** @deprecated use `IntegrationResponseDto$inboundSchema` instead. */ + export const inboundSchema = IntegrationResponseDto$inboundSchema; + /** @deprecated use `IntegrationResponseDto$outboundSchema` instead. */ + export const outboundSchema = IntegrationResponseDto$outboundSchema; + /** @deprecated use `IntegrationResponseDto$Outbound` instead. */ + export type Outbound = IntegrationResponseDto$Outbound; } diff --git a/src/models/components/markallmessageasrequestdto.ts b/src/models/components/markallmessageasrequestdto.ts index 86a3c3c0..6c0956e1 100644 --- a/src/models/components/markallmessageasrequestdto.ts +++ b/src/models/components/markallmessageasrequestdto.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Optional feed identifier or array of feed identifiers @@ -14,10 +14,10 @@ export type FeedIdentifier = string | Array; * Mark all subscriber messages as read, unread, seen or unseen */ export const MarkAs = { - Read: "read", - Seen: "seen", - Unread: "unread", - Unseen: "unseen", + Read: "read", + Seen: "seen", + Unread: "unread", + Unseen: "unseen", } as const; /** * Mark all subscriber messages as read, unread, seen or unseen @@ -25,28 +25,31 @@ export const MarkAs = { export type MarkAs = ClosedEnum; export type MarkAllMessageAsRequestDto = { - /** - * Optional feed identifier or array of feed identifiers - */ - feedIdentifier?: string | Array | undefined; - /** - * Mark all subscriber messages as read, unread, seen or unseen - */ - markAs: MarkAs; + /** + * Optional feed identifier or array of feed identifiers + */ + feedIdentifier?: string | Array | undefined; + /** + * Mark all subscriber messages as read, unread, seen or unseen + */ + markAs: MarkAs; }; /** @internal */ -export const FeedIdentifier$inboundSchema: z.ZodType = - z.union([z.string(), z.array(z.string())]); +export const FeedIdentifier$inboundSchema: z.ZodType< + FeedIdentifier, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); /** @internal */ export type FeedIdentifier$Outbound = string | Array; /** @internal */ export const FeedIdentifier$outboundSchema: z.ZodType< - FeedIdentifier$Outbound, - z.ZodTypeDef, - FeedIdentifier + FeedIdentifier$Outbound, + z.ZodTypeDef, + FeedIdentifier > = z.union([z.string(), z.array(z.string())]); /** @@ -54,55 +57,57 @@ export const FeedIdentifier$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FeedIdentifier$ { - /** @deprecated use `FeedIdentifier$inboundSchema` instead. */ - export const inboundSchema = FeedIdentifier$inboundSchema; - /** @deprecated use `FeedIdentifier$outboundSchema` instead. */ - export const outboundSchema = FeedIdentifier$outboundSchema; - /** @deprecated use `FeedIdentifier$Outbound` instead. */ - export type Outbound = FeedIdentifier$Outbound; + /** @deprecated use `FeedIdentifier$inboundSchema` instead. */ + export const inboundSchema = FeedIdentifier$inboundSchema; + /** @deprecated use `FeedIdentifier$outboundSchema` instead. */ + export const outboundSchema = FeedIdentifier$outboundSchema; + /** @deprecated use `FeedIdentifier$Outbound` instead. */ + export type Outbound = FeedIdentifier$Outbound; } /** @internal */ -export const MarkAs$inboundSchema: z.ZodNativeEnum = z.nativeEnum(MarkAs); +export const MarkAs$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(MarkAs); /** @internal */ -export const MarkAs$outboundSchema: z.ZodNativeEnum = MarkAs$inboundSchema; +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; + /** @deprecated use `MarkAs$inboundSchema` instead. */ + export const inboundSchema = MarkAs$inboundSchema; + /** @deprecated use `MarkAs$outboundSchema` instead. */ + export const outboundSchema = MarkAs$outboundSchema; } /** @internal */ export const MarkAllMessageAsRequestDto$inboundSchema: z.ZodType< - MarkAllMessageAsRequestDto, - z.ZodTypeDef, - unknown + MarkAllMessageAsRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), - markAs: MarkAs$inboundSchema, + feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), + markAs: MarkAs$inboundSchema, }); /** @internal */ export type MarkAllMessageAsRequestDto$Outbound = { - feedIdentifier?: string | Array | undefined; - markAs: string; + feedIdentifier?: string | Array | undefined; + markAs: string; }; /** @internal */ export const MarkAllMessageAsRequestDto$outboundSchema: z.ZodType< - MarkAllMessageAsRequestDto$Outbound, - z.ZodTypeDef, - MarkAllMessageAsRequestDto + MarkAllMessageAsRequestDto$Outbound, + z.ZodTypeDef, + MarkAllMessageAsRequestDto > = z.object({ - feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), - markAs: MarkAs$outboundSchema, + feedIdentifier: z.union([z.string(), z.array(z.string())]).optional(), + markAs: MarkAs$outboundSchema, }); /** @@ -110,10 +115,10 @@ export const MarkAllMessageAsRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkAllMessageAsRequestDto$ { - /** @deprecated use `MarkAllMessageAsRequestDto$inboundSchema` instead. */ - export const inboundSchema = MarkAllMessageAsRequestDto$inboundSchema; - /** @deprecated use `MarkAllMessageAsRequestDto$outboundSchema` instead. */ - export const outboundSchema = MarkAllMessageAsRequestDto$outboundSchema; - /** @deprecated use `MarkAllMessageAsRequestDto$Outbound` instead. */ - export type Outbound = MarkAllMessageAsRequestDto$Outbound; + /** @deprecated use `MarkAllMessageAsRequestDto$inboundSchema` instead. */ + export const inboundSchema = MarkAllMessageAsRequestDto$inboundSchema; + /** @deprecated use `MarkAllMessageAsRequestDto$outboundSchema` instead. */ + export const outboundSchema = MarkAllMessageAsRequestDto$outboundSchema; + /** @deprecated use `MarkAllMessageAsRequestDto$Outbound` instead. */ + export type Outbound = MarkAllMessageAsRequestDto$Outbound; } diff --git a/src/models/components/markmessageactionasseendto.ts b/src/models/components/markmessageactionasseendto.ts index 6409519e..65444aa2 100644 --- a/src/models/components/markmessageactionasseendto.ts +++ b/src/models/components/markmessageactionasseendto.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Message action payload @@ -14,57 +14,62 @@ export type Payload = {}; * Message action status */ export const MarkMessageActionAsSeenDtoStatus = { - Pending: "pending", - Done: "done", + Pending: "pending", + Done: "done", } as const; /** * Message action status */ -export type MarkMessageActionAsSeenDtoStatus = ClosedEnum; +export type MarkMessageActionAsSeenDtoStatus = ClosedEnum< + typeof MarkMessageActionAsSeenDtoStatus +>; export type MarkMessageActionAsSeenDto = { - /** - * Message action payload - */ - payload?: Payload | undefined; - /** - * Message action status - */ - status: MarkMessageActionAsSeenDtoStatus; + /** + * Message action payload + */ + payload?: Payload | undefined; + /** + * Message action status + */ + status: MarkMessageActionAsSeenDtoStatus; }; /** @internal */ -export const Payload$inboundSchema: z.ZodType = z.object({}); +export const Payload$inboundSchema: z.ZodType = + z.object({}); /** @internal */ export type Payload$Outbound = {}; /** @internal */ -export const Payload$outboundSchema: z.ZodType = z.object( - {} -); +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; + /** @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 + typeof MarkMessageActionAsSeenDtoStatus > = z.nativeEnum(MarkMessageActionAsSeenDtoStatus); /** @internal */ export const MarkMessageActionAsSeenDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof MarkMessageActionAsSeenDtoStatus + typeof MarkMessageActionAsSeenDtoStatus > = MarkMessageActionAsSeenDtoStatus$inboundSchema; /** @@ -72,36 +77,36 @@ export const MarkMessageActionAsSeenDtoStatus$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkMessageActionAsSeenDtoStatus$ { - /** @deprecated use `MarkMessageActionAsSeenDtoStatus$inboundSchema` instead. */ - export const inboundSchema = MarkMessageActionAsSeenDtoStatus$inboundSchema; - /** @deprecated use `MarkMessageActionAsSeenDtoStatus$outboundSchema` instead. */ - export const outboundSchema = MarkMessageActionAsSeenDtoStatus$outboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDtoStatus$inboundSchema` instead. */ + export const inboundSchema = MarkMessageActionAsSeenDtoStatus$inboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDtoStatus$outboundSchema` instead. */ + export const outboundSchema = MarkMessageActionAsSeenDtoStatus$outboundSchema; } /** @internal */ export const MarkMessageActionAsSeenDto$inboundSchema: z.ZodType< - MarkMessageActionAsSeenDto, - z.ZodTypeDef, - unknown + MarkMessageActionAsSeenDto, + z.ZodTypeDef, + unknown > = z.object({ - payload: z.lazy(() => Payload$inboundSchema).optional(), - status: MarkMessageActionAsSeenDtoStatus$inboundSchema, + payload: z.lazy(() => Payload$inboundSchema).optional(), + status: MarkMessageActionAsSeenDtoStatus$inboundSchema, }); /** @internal */ export type MarkMessageActionAsSeenDto$Outbound = { - payload?: Payload$Outbound | undefined; - status: string; + payload?: Payload$Outbound | undefined; + status: string; }; /** @internal */ export const MarkMessageActionAsSeenDto$outboundSchema: z.ZodType< - MarkMessageActionAsSeenDto$Outbound, - z.ZodTypeDef, - MarkMessageActionAsSeenDto + MarkMessageActionAsSeenDto$Outbound, + z.ZodTypeDef, + MarkMessageActionAsSeenDto > = z.object({ - payload: z.lazy(() => Payload$outboundSchema).optional(), - status: MarkMessageActionAsSeenDtoStatus$outboundSchema, + payload: z.lazy(() => Payload$outboundSchema).optional(), + status: MarkMessageActionAsSeenDtoStatus$outboundSchema, }); /** @@ -109,10 +114,10 @@ export const MarkMessageActionAsSeenDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkMessageActionAsSeenDto$ { - /** @deprecated use `MarkMessageActionAsSeenDto$inboundSchema` instead. */ - export const inboundSchema = MarkMessageActionAsSeenDto$inboundSchema; - /** @deprecated use `MarkMessageActionAsSeenDto$outboundSchema` instead. */ - export const outboundSchema = MarkMessageActionAsSeenDto$outboundSchema; - /** @deprecated use `MarkMessageActionAsSeenDto$Outbound` instead. */ - export type Outbound = MarkMessageActionAsSeenDto$Outbound; + /** @deprecated use `MarkMessageActionAsSeenDto$inboundSchema` instead. */ + export const inboundSchema = MarkMessageActionAsSeenDto$inboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDto$outboundSchema` instead. */ + export const outboundSchema = MarkMessageActionAsSeenDto$outboundSchema; + /** @deprecated use `MarkMessageActionAsSeenDto$Outbound` instead. */ + export type Outbound = MarkMessageActionAsSeenDto$Outbound; } diff --git a/src/models/components/messageaction.ts b/src/models/components/messageaction.ts index ab483e7e..5fc17bca 100644 --- a/src/models/components/messageaction.ts +++ b/src/models/components/messageaction.ts @@ -2,76 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - MessageActionResult, - MessageActionResult$inboundSchema, - MessageActionResult$Outbound, - MessageActionResult$outboundSchema, + MessageActionResult, + MessageActionResult$inboundSchema, + MessageActionResult$Outbound, + MessageActionResult$outboundSchema, } from "./messageactionresult.js"; import { - MessageButton, - MessageButton$inboundSchema, - MessageButton$Outbound, - MessageButton$outboundSchema, + MessageButton, + MessageButton$inboundSchema, + MessageButton$Outbound, + MessageButton$outboundSchema, } from "./messagebutton.js"; -import * as z from "zod"; export const MessageActionStatus = { - Pending: "pending", - Done: "done", + Pending: "pending", + Done: "done", } as const; export type MessageActionStatus = ClosedEnum; export type MessageAction = { - buttons?: Array | undefined; - result?: MessageActionResult | undefined; - status?: MessageActionStatus | undefined; + buttons?: Array | undefined; + result?: MessageActionResult | undefined; + status?: MessageActionStatus | undefined; }; /** @internal */ -export const MessageActionStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MessageActionStatus); +export const MessageActionStatus$inboundSchema: z.ZodNativeEnum< + typeof MessageActionStatus +> = z.nativeEnum(MessageActionStatus); /** @internal */ -export const MessageActionStatus$outboundSchema: z.ZodNativeEnum = - MessageActionStatus$inboundSchema; +export const MessageActionStatus$outboundSchema: z.ZodNativeEnum< + typeof MessageActionStatus +> = MessageActionStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageActionStatus$ { - /** @deprecated use `MessageActionStatus$inboundSchema` instead. */ - export const inboundSchema = MessageActionStatus$inboundSchema; - /** @deprecated use `MessageActionStatus$outboundSchema` instead. */ - export const outboundSchema = MessageActionStatus$outboundSchema; + /** @deprecated use `MessageActionStatus$inboundSchema` instead. */ + export const inboundSchema = MessageActionStatus$inboundSchema; + /** @deprecated use `MessageActionStatus$outboundSchema` instead. */ + export const outboundSchema = MessageActionStatus$outboundSchema; } /** @internal */ -export const MessageAction$inboundSchema: z.ZodType = - z.object({ - buttons: z.array(MessageButton$inboundSchema).optional(), - result: MessageActionResult$inboundSchema.optional(), - status: MessageActionStatus$inboundSchema.optional(), - }); +export const MessageAction$inboundSchema: z.ZodType< + MessageAction, + z.ZodTypeDef, + unknown +> = z.object({ + buttons: z.array(MessageButton$inboundSchema).optional(), + result: MessageActionResult$inboundSchema.optional(), + status: MessageActionStatus$inboundSchema.optional(), +}); /** @internal */ export type MessageAction$Outbound = { - buttons?: Array | undefined; - result?: MessageActionResult$Outbound | undefined; - status?: string | undefined; + buttons?: Array | undefined; + result?: MessageActionResult$Outbound | undefined; + status?: string | undefined; }; /** @internal */ export const MessageAction$outboundSchema: z.ZodType< - MessageAction$Outbound, - z.ZodTypeDef, - MessageAction + MessageAction$Outbound, + z.ZodTypeDef, + MessageAction > = z.object({ - buttons: z.array(MessageButton$outboundSchema).optional(), - result: MessageActionResult$outboundSchema.optional(), - status: MessageActionStatus$outboundSchema.optional(), + buttons: z.array(MessageButton$outboundSchema).optional(), + result: MessageActionResult$outboundSchema.optional(), + status: MessageActionStatus$outboundSchema.optional(), }); /** @@ -79,10 +84,10 @@ export const MessageAction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageAction$ { - /** @deprecated use `MessageAction$inboundSchema` instead. */ - export const inboundSchema = MessageAction$inboundSchema; - /** @deprecated use `MessageAction$outboundSchema` instead. */ - export const outboundSchema = MessageAction$outboundSchema; - /** @deprecated use `MessageAction$Outbound` instead. */ - export type Outbound = MessageAction$Outbound; + /** @deprecated use `MessageAction$inboundSchema` instead. */ + export const inboundSchema = MessageAction$inboundSchema; + /** @deprecated use `MessageAction$outboundSchema` instead. */ + export const outboundSchema = MessageAction$outboundSchema; + /** @deprecated use `MessageAction$Outbound` instead. */ + export type Outbound = MessageAction$Outbound; } diff --git a/src/models/components/messageactionresult.ts b/src/models/components/messageactionresult.ts index 51465d35..f4372eb7 100644 --- a/src/models/components/messageactionresult.ts +++ b/src/models/components/messageactionresult.ts @@ -2,27 +2,29 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export type MessageActionResultPayload = {}; export const MessageActionResultType = { - Primary: "primary", - Secondary: "secondary", + Primary: "primary", + Secondary: "secondary", } as const; -export type MessageActionResultType = ClosedEnum; +export type MessageActionResultType = ClosedEnum< + typeof MessageActionResultType +>; export type MessageActionResult = { - payload?: MessageActionResultPayload | undefined; - type?: MessageActionResultType | undefined; + payload?: MessageActionResultPayload | undefined; + type?: MessageActionResultType | undefined; }; /** @internal */ export const MessageActionResultPayload$inboundSchema: z.ZodType< - MessageActionResultPayload, - z.ZodTypeDef, - unknown + MessageActionResultPayload, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -30,9 +32,9 @@ export type MessageActionResultPayload$Outbound = {}; /** @internal */ export const MessageActionResultPayload$outboundSchema: z.ZodType< - MessageActionResultPayload$Outbound, - z.ZodTypeDef, - MessageActionResultPayload + MessageActionResultPayload$Outbound, + z.ZodTypeDef, + MessageActionResultPayload > = z.object({}); /** @@ -40,22 +42,22 @@ export const MessageActionResultPayload$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageActionResultPayload$ { - /** @deprecated use `MessageActionResultPayload$inboundSchema` instead. */ - export const inboundSchema = MessageActionResultPayload$inboundSchema; - /** @deprecated use `MessageActionResultPayload$outboundSchema` instead. */ - export const outboundSchema = MessageActionResultPayload$outboundSchema; - /** @deprecated use `MessageActionResultPayload$Outbound` instead. */ - export type Outbound = MessageActionResultPayload$Outbound; + /** @deprecated use `MessageActionResultPayload$inboundSchema` instead. */ + export const inboundSchema = MessageActionResultPayload$inboundSchema; + /** @deprecated use `MessageActionResultPayload$outboundSchema` instead. */ + export const outboundSchema = MessageActionResultPayload$outboundSchema; + /** @deprecated use `MessageActionResultPayload$Outbound` instead. */ + export type Outbound = MessageActionResultPayload$Outbound; } /** @internal */ export const MessageActionResultType$inboundSchema: z.ZodNativeEnum< - typeof MessageActionResultType + typeof MessageActionResultType > = z.nativeEnum(MessageActionResultType); /** @internal */ export const MessageActionResultType$outboundSchema: z.ZodNativeEnum< - typeof MessageActionResultType + typeof MessageActionResultType > = MessageActionResultType$inboundSchema; /** @@ -63,36 +65,36 @@ export const MessageActionResultType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageActionResultType$ { - /** @deprecated use `MessageActionResultType$inboundSchema` instead. */ - export const inboundSchema = MessageActionResultType$inboundSchema; - /** @deprecated use `MessageActionResultType$outboundSchema` instead. */ - export const outboundSchema = MessageActionResultType$outboundSchema; + /** @deprecated use `MessageActionResultType$inboundSchema` instead. */ + export const inboundSchema = MessageActionResultType$inboundSchema; + /** @deprecated use `MessageActionResultType$outboundSchema` instead. */ + export const outboundSchema = MessageActionResultType$outboundSchema; } /** @internal */ export const MessageActionResult$inboundSchema: z.ZodType< - MessageActionResult, - z.ZodTypeDef, - unknown + MessageActionResult, + z.ZodTypeDef, + unknown > = z.object({ - payload: z.lazy(() => MessageActionResultPayload$inboundSchema).optional(), - type: MessageActionResultType$inboundSchema.optional(), + payload: z.lazy(() => MessageActionResultPayload$inboundSchema).optional(), + type: MessageActionResultType$inboundSchema.optional(), }); /** @internal */ export type MessageActionResult$Outbound = { - payload?: MessageActionResultPayload$Outbound | undefined; - type?: string | undefined; + payload?: MessageActionResultPayload$Outbound | undefined; + type?: string | undefined; }; /** @internal */ export const MessageActionResult$outboundSchema: z.ZodType< - MessageActionResult$Outbound, - z.ZodTypeDef, - MessageActionResult + MessageActionResult$Outbound, + z.ZodTypeDef, + MessageActionResult > = z.object({ - payload: z.lazy(() => MessageActionResultPayload$outboundSchema).optional(), - type: MessageActionResultType$outboundSchema.optional(), + payload: z.lazy(() => MessageActionResultPayload$outboundSchema).optional(), + type: MessageActionResultType$outboundSchema.optional(), }); /** @@ -100,10 +102,10 @@ export const MessageActionResult$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageActionResult$ { - /** @deprecated use `MessageActionResult$inboundSchema` instead. */ - export const inboundSchema = MessageActionResult$inboundSchema; - /** @deprecated use `MessageActionResult$outboundSchema` instead. */ - export const outboundSchema = MessageActionResult$outboundSchema; - /** @deprecated use `MessageActionResult$Outbound` instead. */ - export type Outbound = MessageActionResult$Outbound; + /** @deprecated use `MessageActionResult$inboundSchema` instead. */ + export const inboundSchema = MessageActionResult$inboundSchema; + /** @deprecated use `MessageActionResult$outboundSchema` instead. */ + export const outboundSchema = MessageActionResult$outboundSchema; + /** @deprecated use `MessageActionResult$Outbound` instead. */ + export type Outbound = MessageActionResult$Outbound; } diff --git a/src/models/components/messagebutton.ts b/src/models/components/messagebutton.ts index 4b78de6c..1b7e42a5 100644 --- a/src/models/components/messagebutton.ts +++ b/src/models/components/messagebutton.ts @@ -2,64 +2,69 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const MessageButtonType = { - Primary: "primary", - Secondary: "secondary", + Primary: "primary", + Secondary: "secondary", } as const; export type MessageButtonType = ClosedEnum; export type MessageButton = { - content: string; - resultContent?: string | undefined; - type: MessageButtonType; + content: string; + resultContent?: string | undefined; + type: MessageButtonType; }; /** @internal */ -export const MessageButtonType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MessageButtonType); +export const MessageButtonType$inboundSchema: z.ZodNativeEnum< + typeof MessageButtonType +> = z.nativeEnum(MessageButtonType); /** @internal */ -export const MessageButtonType$outboundSchema: z.ZodNativeEnum = - MessageButtonType$inboundSchema; +export const MessageButtonType$outboundSchema: z.ZodNativeEnum< + typeof MessageButtonType +> = MessageButtonType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageButtonType$ { - /** @deprecated use `MessageButtonType$inboundSchema` instead. */ - export const inboundSchema = MessageButtonType$inboundSchema; - /** @deprecated use `MessageButtonType$outboundSchema` instead. */ - export const outboundSchema = MessageButtonType$outboundSchema; + /** @deprecated use `MessageButtonType$inboundSchema` instead. */ + export const inboundSchema = MessageButtonType$inboundSchema; + /** @deprecated use `MessageButtonType$outboundSchema` instead. */ + export const outboundSchema = MessageButtonType$outboundSchema; } /** @internal */ -export const MessageButton$inboundSchema: z.ZodType = - z.object({ - content: z.string(), - resultContent: z.string().optional(), - type: MessageButtonType$inboundSchema, - }); +export const MessageButton$inboundSchema: z.ZodType< + MessageButton, + z.ZodTypeDef, + unknown +> = z.object({ + content: z.string(), + resultContent: z.string().optional(), + type: MessageButtonType$inboundSchema, +}); /** @internal */ export type MessageButton$Outbound = { - content: string; - resultContent?: string | undefined; - type: string; + content: string; + resultContent?: string | undefined; + type: string; }; /** @internal */ export const MessageButton$outboundSchema: z.ZodType< - MessageButton$Outbound, - z.ZodTypeDef, - MessageButton + MessageButton$Outbound, + z.ZodTypeDef, + MessageButton > = z.object({ - content: z.string(), - resultContent: z.string().optional(), - type: MessageButtonType$outboundSchema, + content: z.string(), + resultContent: z.string().optional(), + type: MessageButtonType$outboundSchema, }); /** @@ -67,10 +72,10 @@ export const MessageButton$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageButton$ { - /** @deprecated use `MessageButton$inboundSchema` instead. */ - export const inboundSchema = MessageButton$inboundSchema; - /** @deprecated use `MessageButton$outboundSchema` instead. */ - export const outboundSchema = MessageButton$outboundSchema; - /** @deprecated use `MessageButton$Outbound` instead. */ - export type Outbound = MessageButton$Outbound; + /** @deprecated use `MessageButton$inboundSchema` instead. */ + export const inboundSchema = MessageButton$inboundSchema; + /** @deprecated use `MessageButton$outboundSchema` instead. */ + export const outboundSchema = MessageButton$outboundSchema; + /** @deprecated use `MessageButton$Outbound` instead. */ + export type Outbound = MessageButton$Outbound; } diff --git a/src/models/components/messagecta.ts b/src/models/components/messagecta.ts index d16973fb..9ec5d267 100644 --- a/src/models/components/messagecta.ts +++ b/src/models/components/messagecta.ts @@ -2,82 +2,91 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - MessageAction, - MessageAction$inboundSchema, - MessageAction$Outbound, - MessageAction$outboundSchema, + MessageAction, + MessageAction$inboundSchema, + MessageAction$Outbound, + MessageAction$outboundSchema, } from "./messageaction.js"; import { - MessageCTAData, - MessageCTAData$inboundSchema, - MessageCTAData$Outbound, - MessageCTAData$outboundSchema, + MessageCTAData, + MessageCTAData$inboundSchema, + MessageCTAData$Outbound, + MessageCTAData$outboundSchema, } from "./messagectadata.js"; -import * as z from "zod"; export const MessageCTAType = { - Redirect: "redirect", + Redirect: "redirect", } as const; export type MessageCTAType = ClosedEnum; export type MessageCTA = { - action?: MessageAction | undefined; - data: MessageCTAData; - type?: MessageCTAType | undefined; + action?: MessageAction | undefined; + data: MessageCTAData; + type?: MessageCTAType | undefined; }; /** @internal */ -export const MessageCTAType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MessageCTAType); +export const MessageCTAType$inboundSchema: z.ZodNativeEnum< + typeof MessageCTAType +> = z.nativeEnum(MessageCTAType); /** @internal */ -export const MessageCTAType$outboundSchema: z.ZodNativeEnum = - MessageCTAType$inboundSchema; +export const MessageCTAType$outboundSchema: z.ZodNativeEnum< + typeof MessageCTAType +> = MessageCTAType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageCTAType$ { - /** @deprecated use `MessageCTAType$inboundSchema` instead. */ - export const inboundSchema = MessageCTAType$inboundSchema; - /** @deprecated use `MessageCTAType$outboundSchema` instead. */ - export const outboundSchema = MessageCTAType$outboundSchema; + /** @deprecated use `MessageCTAType$inboundSchema` instead. */ + export const inboundSchema = MessageCTAType$inboundSchema; + /** @deprecated use `MessageCTAType$outboundSchema` instead. */ + export const outboundSchema = MessageCTAType$outboundSchema; } /** @internal */ -export const MessageCTA$inboundSchema: z.ZodType = z.object({ - action: MessageAction$inboundSchema.optional(), - data: MessageCTAData$inboundSchema, - type: MessageCTAType$inboundSchema.optional(), +export const MessageCTA$inboundSchema: z.ZodType< + MessageCTA, + z.ZodTypeDef, + unknown +> = z.object({ + action: MessageAction$inboundSchema.optional(), + data: MessageCTAData$inboundSchema, + type: MessageCTAType$inboundSchema.optional(), }); /** @internal */ export type MessageCTA$Outbound = { - action?: MessageAction$Outbound | undefined; - data: MessageCTAData$Outbound; - type?: string | undefined; + action?: MessageAction$Outbound | undefined; + data: MessageCTAData$Outbound; + type?: string | undefined; }; /** @internal */ -export const MessageCTA$outboundSchema: z.ZodType = - z.object({ - action: MessageAction$outboundSchema.optional(), - data: MessageCTAData$outboundSchema, - type: MessageCTAType$outboundSchema.optional(), - }); +export const MessageCTA$outboundSchema: z.ZodType< + MessageCTA$Outbound, + z.ZodTypeDef, + MessageCTA +> = z.object({ + action: MessageAction$outboundSchema.optional(), + data: MessageCTAData$outboundSchema, + type: MessageCTAType$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 MessageCTA$ { - /** @deprecated use `MessageCTA$inboundSchema` instead. */ - export const inboundSchema = MessageCTA$inboundSchema; - /** @deprecated use `MessageCTA$outboundSchema` instead. */ - export const outboundSchema = MessageCTA$outboundSchema; - /** @deprecated use `MessageCTA$Outbound` instead. */ - export type Outbound = MessageCTA$Outbound; + /** @deprecated use `MessageCTA$inboundSchema` instead. */ + export const inboundSchema = MessageCTA$inboundSchema; + /** @deprecated use `MessageCTA$outboundSchema` instead. */ + export const outboundSchema = MessageCTA$outboundSchema; + /** @deprecated use `MessageCTA$Outbound` instead. */ + export type Outbound = MessageCTA$Outbound; } diff --git a/src/models/components/messagectadata.ts b/src/models/components/messagectadata.ts index 2c522707..0bfe4685 100644 --- a/src/models/components/messagectadata.ts +++ b/src/models/components/messagectadata.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type MessageCTAData = { - url?: string | undefined; + url?: string | undefined; }; /** @internal */ -export const MessageCTAData$inboundSchema: z.ZodType = - z.object({ - url: z.string().optional(), - }); +export const MessageCTAData$inboundSchema: z.ZodType< + MessageCTAData, + z.ZodTypeDef, + unknown +> = z.object({ + url: z.string().optional(), +}); /** @internal */ export type MessageCTAData$Outbound = { - url?: string | undefined; + url?: string | undefined; }; /** @internal */ export const MessageCTAData$outboundSchema: z.ZodType< - MessageCTAData$Outbound, - z.ZodTypeDef, - MessageCTAData + MessageCTAData$Outbound, + z.ZodTypeDef, + MessageCTAData > = z.object({ - url: z.string().optional(), + url: z.string().optional(), }); /** @@ -33,10 +36,10 @@ export const MessageCTAData$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageCTAData$ { - /** @deprecated use `MessageCTAData$inboundSchema` instead. */ - export const inboundSchema = MessageCTAData$inboundSchema; - /** @deprecated use `MessageCTAData$outboundSchema` instead. */ - export const outboundSchema = MessageCTAData$outboundSchema; - /** @deprecated use `MessageCTAData$Outbound` instead. */ - export type Outbound = MessageCTAData$Outbound; + /** @deprecated use `MessageCTAData$inboundSchema` instead. */ + export const inboundSchema = MessageCTAData$inboundSchema; + /** @deprecated use `MessageCTAData$outboundSchema` instead. */ + export const outboundSchema = MessageCTAData$outboundSchema; + /** @deprecated use `MessageCTAData$Outbound` instead. */ + export type Outbound = MessageCTAData$Outbound; } diff --git a/src/models/components/messageentity.ts b/src/models/components/messageentity.ts index 5276b962..173bd921 100644 --- a/src/models/components/messageentity.ts +++ b/src/models/components/messageentity.ts @@ -7,17 +7,20 @@ import * as z from "zod"; export type MessageEntity = {}; /** @internal */ -export const MessageEntity$inboundSchema: z.ZodType = - z.object({}); +export const MessageEntity$inboundSchema: z.ZodType< + MessageEntity, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type MessageEntity$Outbound = {}; /** @internal */ export const MessageEntity$outboundSchema: z.ZodType< - MessageEntity$Outbound, - z.ZodTypeDef, - MessageEntity + MessageEntity$Outbound, + z.ZodTypeDef, + MessageEntity > = z.object({}); /** @@ -25,10 +28,10 @@ export const MessageEntity$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageEntity$ { - /** @deprecated use `MessageEntity$inboundSchema` instead. */ - export const inboundSchema = MessageEntity$inboundSchema; - /** @deprecated use `MessageEntity$outboundSchema` instead. */ - export const outboundSchema = MessageEntity$outboundSchema; - /** @deprecated use `MessageEntity$Outbound` instead. */ - export type Outbound = MessageEntity$Outbound; + /** @deprecated use `MessageEntity$inboundSchema` instead. */ + export const inboundSchema = MessageEntity$inboundSchema; + /** @deprecated use `MessageEntity$outboundSchema` instead. */ + export const outboundSchema = MessageEntity$outboundSchema; + /** @deprecated use `MessageEntity$Outbound` instead. */ + export type Outbound = MessageEntity$Outbound; } diff --git a/src/models/components/messagemarkasrequestdto.ts b/src/models/components/messagemarkasrequestdto.ts index ba47924e..99f9bdad 100644 --- a/src/models/components/messagemarkasrequestdto.ts +++ b/src/models/components/messagemarkasrequestdto.ts @@ -2,32 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const MessageMarkAsRequestDtoMarkAs = { - Read: "read", - Seen: "seen", - Unread: "unread", - Unseen: "unseen", + Read: "read", + Seen: "seen", + Unread: "unread", + Unseen: "unseen", } as const; -export type MessageMarkAsRequestDtoMarkAs = ClosedEnum; +export type MessageMarkAsRequestDtoMarkAs = ClosedEnum< + typeof MessageMarkAsRequestDtoMarkAs +>; export type MessageId = string | Array; export type MessageMarkAsRequestDto = { - markAs: MessageMarkAsRequestDtoMarkAs; - messageId: string | Array; + markAs: MessageMarkAsRequestDtoMarkAs; + messageId: string | Array; }; /** @internal */ export const MessageMarkAsRequestDtoMarkAs$inboundSchema: z.ZodNativeEnum< - typeof MessageMarkAsRequestDtoMarkAs + typeof MessageMarkAsRequestDtoMarkAs > = z.nativeEnum(MessageMarkAsRequestDtoMarkAs); /** @internal */ export const MessageMarkAsRequestDtoMarkAs$outboundSchema: z.ZodNativeEnum< - typeof MessageMarkAsRequestDtoMarkAs + typeof MessageMarkAsRequestDtoMarkAs > = MessageMarkAsRequestDtoMarkAs$inboundSchema; /** @@ -35,62 +37,66 @@ export const MessageMarkAsRequestDtoMarkAs$outboundSchema: z.ZodNativeEnum< * @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; + /** @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 = z.union([ - z.string(), - z.array(z.string()), -]); +export const MessageId$inboundSchema: z.ZodType< + MessageId, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); /** @internal */ export type MessageId$Outbound = string | Array; /** @internal */ -export const MessageId$outboundSchema: z.ZodType = - z.union([z.string(), z.array(z.string())]); +export const MessageId$outboundSchema: z.ZodType< + MessageId$Outbound, + z.ZodTypeDef, + MessageId +> = z.union([z.string(), 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 MessageId$ { - /** @deprecated use `MessageId$inboundSchema` instead. */ - export const inboundSchema = MessageId$inboundSchema; - /** @deprecated use `MessageId$outboundSchema` instead. */ - export const outboundSchema = MessageId$outboundSchema; - /** @deprecated use `MessageId$Outbound` instead. */ - export type Outbound = MessageId$Outbound; + /** @deprecated use `MessageId$inboundSchema` instead. */ + export const inboundSchema = MessageId$inboundSchema; + /** @deprecated use `MessageId$outboundSchema` instead. */ + export const outboundSchema = MessageId$outboundSchema; + /** @deprecated use `MessageId$Outbound` instead. */ + export type Outbound = MessageId$Outbound; } /** @internal */ export const MessageMarkAsRequestDto$inboundSchema: z.ZodType< - MessageMarkAsRequestDto, - z.ZodTypeDef, - unknown + MessageMarkAsRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - markAs: MessageMarkAsRequestDtoMarkAs$inboundSchema, - messageId: z.union([z.string(), z.array(z.string())]), + markAs: MessageMarkAsRequestDtoMarkAs$inboundSchema, + messageId: z.union([z.string(), z.array(z.string())]), }); /** @internal */ export type MessageMarkAsRequestDto$Outbound = { - markAs: string; - messageId: string | Array; + markAs: string; + messageId: string | Array; }; /** @internal */ export const MessageMarkAsRequestDto$outboundSchema: z.ZodType< - MessageMarkAsRequestDto$Outbound, - z.ZodTypeDef, - MessageMarkAsRequestDto + MessageMarkAsRequestDto$Outbound, + z.ZodTypeDef, + MessageMarkAsRequestDto > = z.object({ - markAs: MessageMarkAsRequestDtoMarkAs$outboundSchema, - messageId: z.union([z.string(), z.array(z.string())]), + markAs: MessageMarkAsRequestDtoMarkAs$outboundSchema, + messageId: z.union([z.string(), z.array(z.string())]), }); /** @@ -98,10 +104,10 @@ export const MessageMarkAsRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageMarkAsRequestDto$ { - /** @deprecated use `MessageMarkAsRequestDto$inboundSchema` instead. */ - export const inboundSchema = MessageMarkAsRequestDto$inboundSchema; - /** @deprecated use `MessageMarkAsRequestDto$outboundSchema` instead. */ - export const outboundSchema = MessageMarkAsRequestDto$outboundSchema; - /** @deprecated use `MessageMarkAsRequestDto$Outbound` instead. */ - export type Outbound = MessageMarkAsRequestDto$Outbound; + /** @deprecated use `MessageMarkAsRequestDto$inboundSchema` instead. */ + export const inboundSchema = MessageMarkAsRequestDto$inboundSchema; + /** @deprecated use `MessageMarkAsRequestDto$outboundSchema` instead. */ + export const outboundSchema = MessageMarkAsRequestDto$outboundSchema; + /** @deprecated use `MessageMarkAsRequestDto$Outbound` instead. */ + export type Outbound = MessageMarkAsRequestDto$Outbound; } diff --git a/src/models/components/messageresponsedto.ts b/src/models/components/messageresponsedto.ts index 4b33c2e3..cbe22d8a 100644 --- a/src/models/components/messageresponsedto.ts +++ b/src/models/components/messageresponsedto.ts @@ -2,44 +2,46 @@ * 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"; import { - EmailBlock, - EmailBlock$inboundSchema, - EmailBlock$Outbound, - EmailBlock$outboundSchema, + EmailBlock, + EmailBlock$inboundSchema, + EmailBlock$Outbound, + EmailBlock$outboundSchema, } from "./emailblock.js"; import { - MessageCTA, - MessageCTA$inboundSchema, - MessageCTA$Outbound, - MessageCTA$outboundSchema, + MessageCTA, + MessageCTA$inboundSchema, + MessageCTA$Outbound, + MessageCTA$outboundSchema, } from "./messagecta.js"; import { - SubscriberResponseDto, - SubscriberResponseDto$inboundSchema, - SubscriberResponseDto$Outbound, - SubscriberResponseDto$outboundSchema, + SubscriberResponseDto, + SubscriberResponseDto$inboundSchema, + SubscriberResponseDto$Outbound, + SubscriberResponseDto$outboundSchema, } from "./subscriberresponsedto.js"; import { - WorkflowResponse, - WorkflowResponse$inboundSchema, - WorkflowResponse$Outbound, - WorkflowResponse$outboundSchema, + WorkflowResponse, + WorkflowResponse$inboundSchema, + WorkflowResponse$Outbound, + WorkflowResponse$outboundSchema, } from "./workflowresponse.js"; -import * as z from "zod"; export type FeedId = {}; export const MessageResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; -export type MessageResponseDtoChannel = ClosedEnum; +export type MessageResponseDtoChannel = ClosedEnum< + typeof MessageResponseDtoChannel +>; export type Content = EmailBlock | string; @@ -54,83 +56,90 @@ export type Overrides = {}; export type MessageResponseDtoPayload = {}; export const MessageResponseDtoStatus = { - Sent: "sent", - Error: "error", - Warning: "warning", + Sent: "sent", + Error: "error", + Warning: "warning", } as const; -export type MessageResponseDtoStatus = ClosedEnum; +export type MessageResponseDtoStatus = ClosedEnum< + typeof MessageResponseDtoStatus +>; export type MessageResponseDto = { - environmentId: string; - feedId?: FeedId | null | undefined; - id?: string | undefined; - messageTemplateId: string; - notificationId: string; - organizationId: string; - subscriberId: string; - templateId: string; - channel: MessageResponseDtoChannel; - content: EmailBlock | string; - createdAt: string; - cta: MessageCTA; - deviceTokens?: Array | undefined; - directWebhookUrl?: string | undefined; - email?: string | undefined; - 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; + environmentId: string; + feedId?: FeedId | null | undefined; + id?: string | undefined; + messageTemplateId: string; + notificationId: string; + organizationId: string; + subscriberId: string; + templateId: string; + channel: MessageResponseDtoChannel; + content: EmailBlock | string; + createdAt: string; + cta: MessageCTA; + deviceTokens?: Array | undefined; + directWebhookUrl?: string | undefined; + email?: string | undefined; + 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; }; /** @internal */ -export const FeedId$inboundSchema: z.ZodType = z.object({}); +export const FeedId$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type FeedId$Outbound = {}; /** @internal */ -export const FeedId$outboundSchema: z.ZodType = z.object({}); +export const FeedId$outboundSchema: z.ZodType< + FeedId$Outbound, + z.ZodTypeDef, + 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 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; + /** @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 MessageResponseDtoChannel$inboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoChannel + typeof MessageResponseDtoChannel > = z.nativeEnum(MessageResponseDtoChannel); /** @internal */ export const MessageResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoChannel + typeof MessageResponseDtoChannel > = MessageResponseDtoChannel$inboundSchema; /** @@ -138,68 +147,74 @@ export const MessageResponseDtoChannel$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageResponseDtoChannel$ { - /** @deprecated use `MessageResponseDtoChannel$inboundSchema` instead. */ - export const inboundSchema = MessageResponseDtoChannel$inboundSchema; - /** @deprecated use `MessageResponseDtoChannel$outboundSchema` instead. */ - export const outboundSchema = MessageResponseDtoChannel$outboundSchema; + /** @deprecated use `MessageResponseDtoChannel$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDtoChannel$inboundSchema; + /** @deprecated use `MessageResponseDtoChannel$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDtoChannel$outboundSchema; } /** @internal */ -export const Content$inboundSchema: z.ZodType = z.union([ - EmailBlock$inboundSchema, - z.string(), -]); +export const Content$inboundSchema: z.ZodType = + z.union([EmailBlock$inboundSchema, z.string()]); /** @internal */ export type Content$Outbound = EmailBlock$Outbound | string; /** @internal */ -export const Content$outboundSchema: z.ZodType = z.union([ - EmailBlock$outboundSchema, - z.string(), -]); +export const Content$outboundSchema: z.ZodType< + Content$Outbound, + z.ZodTypeDef, + 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 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; + /** @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; } /** @internal */ -export const Overrides$inboundSchema: z.ZodType = z.object({}); +export const Overrides$inboundSchema: z.ZodType< + Overrides, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type Overrides$Outbound = {}; /** @internal */ -export const Overrides$outboundSchema: z.ZodType = - z.object({}); +export const Overrides$outboundSchema: z.ZodType< + Overrides$Outbound, + z.ZodTypeDef, + 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 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; + /** @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; } /** @internal */ export const MessageResponseDtoPayload$inboundSchema: z.ZodType< - MessageResponseDtoPayload, - z.ZodTypeDef, - unknown + MessageResponseDtoPayload, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -207,9 +222,9 @@ export type MessageResponseDtoPayload$Outbound = {}; /** @internal */ export const MessageResponseDtoPayload$outboundSchema: z.ZodType< - MessageResponseDtoPayload$Outbound, - z.ZodTypeDef, - MessageResponseDtoPayload + MessageResponseDtoPayload$Outbound, + z.ZodTypeDef, + MessageResponseDtoPayload > = z.object({}); /** @@ -217,22 +232,22 @@ export const MessageResponseDtoPayload$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageResponseDtoPayload$ { - /** @deprecated use `MessageResponseDtoPayload$inboundSchema` instead. */ - export const inboundSchema = MessageResponseDtoPayload$inboundSchema; - /** @deprecated use `MessageResponseDtoPayload$outboundSchema` instead. */ - export const outboundSchema = MessageResponseDtoPayload$outboundSchema; - /** @deprecated use `MessageResponseDtoPayload$Outbound` instead. */ - export type Outbound = MessageResponseDtoPayload$Outbound; + /** @deprecated use `MessageResponseDtoPayload$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDtoPayload$inboundSchema; + /** @deprecated use `MessageResponseDtoPayload$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDtoPayload$outboundSchema; + /** @deprecated use `MessageResponseDtoPayload$Outbound` instead. */ + export type Outbound = MessageResponseDtoPayload$Outbound; } /** @internal */ export const MessageResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoStatus + typeof MessageResponseDtoStatus > = z.nativeEnum(MessageResponseDtoStatus); /** @internal */ export const MessageResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof MessageResponseDtoStatus + typeof MessageResponseDtoStatus > = MessageResponseDtoStatus$inboundSchema; /** @@ -240,163 +255,159 @@ export const MessageResponseDtoStatus$outboundSchema: z.ZodNativeEnum< * @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; + /** @deprecated use `MessageResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDtoStatus$inboundSchema; + /** @deprecated use `MessageResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDtoStatus$outboundSchema; } /** @internal */ export const MessageResponseDto$inboundSchema: z.ZodType< - MessageResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _feedId: z.nullable(z.lazy(() => FeedId$inboundSchema)).optional(), - _id: z.string().optional(), - _messageTemplateId: z.string(), - _notificationId: z.string(), - _organizationId: z.string(), - _subscriberId: z.string(), - _templateId: z.string(), - channel: MessageResponseDtoChannel$inboundSchema, - content: z.union([EmailBlock$inboundSchema, z.string()]), - 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(), - 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(), - title: z.string().optional(), - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _feedId: "feedId", - _id: "id", - _messageTemplateId: "messageTemplateId", - _notificationId: "notificationId", - _organizationId: "organizationId", - _subscriberId: "subscriberId", - _templateId: "templateId", - }); - }); + MessageResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _feedId: z.nullable(z.lazy(() => FeedId$inboundSchema)).optional(), + _id: z.string().optional(), + _messageTemplateId: z.string(), + _notificationId: z.string(), + _organizationId: z.string(), + _subscriberId: z.string(), + _templateId: z.string(), + channel: MessageResponseDtoChannel$inboundSchema, + content: z.union([EmailBlock$inboundSchema, z.string()]), + 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(), + 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(), + title: z.string().optional(), + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_feedId": "feedId", + "_id": "id", + "_messageTemplateId": "messageTemplateId", + "_notificationId": "notificationId", + "_organizationId": "organizationId", + "_subscriberId": "subscriberId", + "_templateId": "templateId", + }); +}); /** @internal */ export type MessageResponseDto$Outbound = { - _environmentId: string; - _feedId?: FeedId$Outbound | null | undefined; - _id?: string | undefined; - _messageTemplateId: string; - _notificationId: string; - _organizationId: string; - _subscriberId: string; - _templateId: string; - channel: string; - content: EmailBlock$Outbound | string; - 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; - read: boolean; - seen: boolean; - status: string; - subject?: string | undefined; - subscriber?: SubscriberResponseDto$Outbound | undefined; - template?: WorkflowResponse$Outbound | undefined; - templateIdentifier?: string | undefined; - title?: string | undefined; - transactionId: string; + _environmentId: string; + _feedId?: FeedId$Outbound | null | undefined; + _id?: string | undefined; + _messageTemplateId: string; + _notificationId: string; + _organizationId: string; + _subscriberId: string; + _templateId: string; + channel: string; + content: EmailBlock$Outbound | string; + 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; + read: boolean; + seen: boolean; + status: string; + subject?: string | undefined; + subscriber?: SubscriberResponseDto$Outbound | undefined; + template?: WorkflowResponse$Outbound | undefined; + templateIdentifier?: string | undefined; + title?: string | undefined; + transactionId: string; }; /** @internal */ export const MessageResponseDto$outboundSchema: z.ZodType< - MessageResponseDto$Outbound, - z.ZodTypeDef, - MessageResponseDto -> = z - .object({ - environmentId: z.string(), - feedId: z.nullable(z.lazy(() => FeedId$outboundSchema)).optional(), - id: z.string().optional(), - messageTemplateId: z.string(), - notificationId: z.string(), - organizationId: z.string(), - subscriberId: z.string(), - templateId: z.string(), - channel: MessageResponseDtoChannel$outboundSchema, - content: z.union([EmailBlock$outboundSchema, z.string()]), - 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(), - 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(), - title: z.string().optional(), - transactionId: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - feedId: "_feedId", - id: "_id", - messageTemplateId: "_messageTemplateId", - notificationId: "_notificationId", - organizationId: "_organizationId", - subscriberId: "_subscriberId", - templateId: "_templateId", - }); - }); + MessageResponseDto$Outbound, + z.ZodTypeDef, + MessageResponseDto +> = z.object({ + environmentId: z.string(), + feedId: z.nullable(z.lazy(() => FeedId$outboundSchema)).optional(), + id: z.string().optional(), + messageTemplateId: z.string(), + notificationId: z.string(), + organizationId: z.string(), + subscriberId: z.string(), + templateId: z.string(), + channel: MessageResponseDtoChannel$outboundSchema, + content: z.union([EmailBlock$outboundSchema, z.string()]), + 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(), + 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(), + title: z.string().optional(), + transactionId: z.string(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + feedId: "_feedId", + id: "_id", + messageTemplateId: "_messageTemplateId", + notificationId: "_notificationId", + organizationId: "_organizationId", + subscriberId: "_subscriberId", + templateId: "_templateId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageResponseDto$ { - /** @deprecated use `MessageResponseDto$inboundSchema` instead. */ - export const inboundSchema = MessageResponseDto$inboundSchema; - /** @deprecated use `MessageResponseDto$outboundSchema` instead. */ - export const outboundSchema = MessageResponseDto$outboundSchema; - /** @deprecated use `MessageResponseDto$Outbound` instead. */ - export type Outbound = MessageResponseDto$Outbound; + /** @deprecated use `MessageResponseDto$inboundSchema` instead. */ + export const inboundSchema = MessageResponseDto$inboundSchema; + /** @deprecated use `MessageResponseDto$outboundSchema` instead. */ + export const outboundSchema = MessageResponseDto$outboundSchema; + /** @deprecated use `MessageResponseDto$Outbound` instead. */ + export type Outbound = MessageResponseDto$Outbound; } diff --git a/src/models/components/messagetemplate.ts b/src/models/components/messagetemplate.ts index f8ba81c1..c4276ff1 100644 --- a/src/models/components/messagetemplate.ts +++ b/src/models/components/messagetemplate.ts @@ -7,17 +7,20 @@ import * as z from "zod"; export type MessageTemplate = {}; /** @internal */ -export const MessageTemplate$inboundSchema: z.ZodType = - z.object({}); +export const MessageTemplate$inboundSchema: z.ZodType< + MessageTemplate, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type MessageTemplate$Outbound = {}; /** @internal */ export const MessageTemplate$outboundSchema: z.ZodType< - MessageTemplate$Outbound, - z.ZodTypeDef, - MessageTemplate + MessageTemplate$Outbound, + z.ZodTypeDef, + MessageTemplate > = z.object({}); /** @@ -25,10 +28,10 @@ export const MessageTemplate$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessageTemplate$ { - /** @deprecated use `MessageTemplate$inboundSchema` instead. */ - export const inboundSchema = MessageTemplate$inboundSchema; - /** @deprecated use `MessageTemplate$outboundSchema` instead. */ - export const outboundSchema = MessageTemplate$outboundSchema; - /** @deprecated use `MessageTemplate$Outbound` instead. */ - export type Outbound = MessageTemplate$Outbound; + /** @deprecated use `MessageTemplate$inboundSchema` instead. */ + export const inboundSchema = MessageTemplate$inboundSchema; + /** @deprecated use `MessageTemplate$outboundSchema` instead. */ + export const outboundSchema = MessageTemplate$outboundSchema; + /** @deprecated use `MessageTemplate$Outbound` instead. */ + export type Outbound = MessageTemplate$Outbound; } diff --git a/src/models/components/notificationgroup.ts b/src/models/components/notificationgroup.ts index 9e16c31a..e7a2f74c 100644 --- a/src/models/components/notificationgroup.ts +++ b/src/models/components/notificationgroup.ts @@ -2,76 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type NotificationGroup = { - environmentId: string; - id?: string | undefined; - organizationId: string; - parentId?: string | undefined; - name: string; + environmentId: string; + id?: string | undefined; + organizationId: string; + parentId?: string | undefined; + name: string; }; /** @internal */ -export const NotificationGroup$inboundSchema: z.ZodType = - z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string().optional(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - _parentId: "parentId", - }); - }); +export const NotificationGroup$inboundSchema: z.ZodType< + NotificationGroup, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + _parentId: z.string().optional(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + "_parentId": "parentId", + }); +}); /** @internal */ export type NotificationGroup$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - _parentId?: string | undefined; - name: string; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + _parentId?: string | undefined; + name: string; }; /** @internal */ export const NotificationGroup$outboundSchema: z.ZodType< - NotificationGroup$Outbound, - z.ZodTypeDef, - NotificationGroup -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string().optional(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); - }); + NotificationGroup$Outbound, + z.ZodTypeDef, + NotificationGroup +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + parentId: z.string().optional(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + 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 NotificationGroup$ { - /** @deprecated use `NotificationGroup$inboundSchema` instead. */ - export const inboundSchema = NotificationGroup$inboundSchema; - /** @deprecated use `NotificationGroup$outboundSchema` instead. */ - export const outboundSchema = NotificationGroup$outboundSchema; - /** @deprecated use `NotificationGroup$Outbound` instead. */ - export type Outbound = NotificationGroup$Outbound; + /** @deprecated use `NotificationGroup$inboundSchema` instead. */ + export const inboundSchema = NotificationGroup$inboundSchema; + /** @deprecated use `NotificationGroup$outboundSchema` instead. */ + export const outboundSchema = NotificationGroup$outboundSchema; + /** @deprecated use `NotificationGroup$Outbound` instead. */ + export type Outbound = NotificationGroup$Outbound; } diff --git a/src/models/components/notificationgroupresponsedto.ts b/src/models/components/notificationgroupresponsedto.ts index b36a6ad2..679cb516 100644 --- a/src/models/components/notificationgroupresponsedto.ts +++ b/src/models/components/notificationgroupresponsedto.ts @@ -2,79 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type NotificationGroupResponseDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - parentId?: string | undefined; - name: string; + environmentId: string; + id?: string | undefined; + organizationId: string; + parentId?: string | undefined; + name: string; }; /** @internal */ export const NotificationGroupResponseDto$inboundSchema: z.ZodType< - NotificationGroupResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - _parentId: z.string().optional(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - _parentId: "parentId", - }); - }); + NotificationGroupResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + _parentId: z.string().optional(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + "_parentId": "parentId", + }); +}); /** @internal */ export type NotificationGroupResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - _parentId?: string | undefined; - name: string; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + _parentId?: string | undefined; + name: string; }; /** @internal */ export const NotificationGroupResponseDto$outboundSchema: z.ZodType< - NotificationGroupResponseDto$Outbound, - z.ZodTypeDef, - NotificationGroupResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - parentId: z.string().optional(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - parentId: "_parentId", - }); - }); + NotificationGroupResponseDto$Outbound, + z.ZodTypeDef, + NotificationGroupResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + parentId: z.string().optional(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + 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 NotificationGroupResponseDto$ { - /** @deprecated use `NotificationGroupResponseDto$inboundSchema` instead. */ - export const inboundSchema = NotificationGroupResponseDto$inboundSchema; - /** @deprecated use `NotificationGroupResponseDto$outboundSchema` instead. */ - export const outboundSchema = NotificationGroupResponseDto$outboundSchema; - /** @deprecated use `NotificationGroupResponseDto$Outbound` instead. */ - export type Outbound = NotificationGroupResponseDto$Outbound; + /** @deprecated use `NotificationGroupResponseDto$inboundSchema` instead. */ + export const inboundSchema = NotificationGroupResponseDto$inboundSchema; + /** @deprecated use `NotificationGroupResponseDto$outboundSchema` instead. */ + export const outboundSchema = NotificationGroupResponseDto$outboundSchema; + /** @deprecated use `NotificationGroupResponseDto$Outbound` instead. */ + export type Outbound = NotificationGroupResponseDto$Outbound; } diff --git a/src/models/components/notificationstep.ts b/src/models/components/notificationstep.ts index 91b366f3..f5270483 100644 --- a/src/models/components/notificationstep.ts +++ b/src/models/components/notificationstep.ts @@ -2,153 +2,170 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - DelayRegularMetadata, - DelayRegularMetadata$inboundSchema, - DelayRegularMetadata$Outbound, - DelayRegularMetadata$outboundSchema, + DelayRegularMetadata, + DelayRegularMetadata$inboundSchema, + DelayRegularMetadata$Outbound, + DelayRegularMetadata$outboundSchema, } from "./delayregularmetadata.js"; import { - DelayScheduledMetadata, - DelayScheduledMetadata$inboundSchema, - DelayScheduledMetadata$Outbound, - DelayScheduledMetadata$outboundSchema, + DelayScheduledMetadata, + DelayScheduledMetadata$inboundSchema, + DelayScheduledMetadata$Outbound, + DelayScheduledMetadata$outboundSchema, } from "./delayscheduledmetadata.js"; import { - DigestRegularMetadata, - DigestRegularMetadata$inboundSchema, - DigestRegularMetadata$Outbound, - DigestRegularMetadata$outboundSchema, + DigestRegularMetadata, + DigestRegularMetadata$inboundSchema, + DigestRegularMetadata$Outbound, + DigestRegularMetadata$outboundSchema, } from "./digestregularmetadata.js"; import { - DigestTimedMetadata, - DigestTimedMetadata$inboundSchema, - DigestTimedMetadata$Outbound, - DigestTimedMetadata$outboundSchema, + DigestTimedMetadata, + DigestTimedMetadata$inboundSchema, + DigestTimedMetadata$Outbound, + DigestTimedMetadata$outboundSchema, } from "./digesttimedmetadata.js"; import { - MessageTemplate, - MessageTemplate$inboundSchema, - MessageTemplate$Outbound, - MessageTemplate$outboundSchema, + MessageTemplate, + MessageTemplate$inboundSchema, + MessageTemplate$Outbound, + MessageTemplate$outboundSchema, } from "./messagetemplate.js"; import { - NotificationStepVariant, - NotificationStepVariant$inboundSchema, - NotificationStepVariant$Outbound, - NotificationStepVariant$outboundSchema, + NotificationStepVariant, + NotificationStepVariant$inboundSchema, + NotificationStepVariant$Outbound, + NotificationStepVariant$outboundSchema, } from "./notificationstepvariant.js"; import { - StepFilter, - StepFilter$inboundSchema, - StepFilter$Outbound, - StepFilter$outboundSchema, + StepFilter, + StepFilter$inboundSchema, + StepFilter$Outbound, + StepFilter$outboundSchema, } from "./stepfilter.js"; -import * as z from "zod"; export type ParentId = {}; export type Metadata = - | DelayScheduledMetadata - | DelayRegularMetadata - | DigestTimedMetadata - | DigestRegularMetadata; + | DelayScheduledMetadata + | DelayRegularMetadata + | DigestTimedMetadata + | DigestRegularMetadata; export type ReplyCallback = {}; export type NotificationStep = { - id?: string | undefined; - parentId?: ParentId | undefined; - templateId?: string | undefined; - active?: boolean | undefined; - filters?: Array | 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; + id?: string | undefined; + parentId?: ParentId | undefined; + templateId?: string | undefined; + active?: boolean | undefined; + filters?: Array | 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; }; /** @internal */ -export const ParentId$inboundSchema: z.ZodType = z.object({}); +export const ParentId$inboundSchema: z.ZodType< + ParentId, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type ParentId$Outbound = {}; /** @internal */ -export const ParentId$outboundSchema: z.ZodType = - z.object({}); +export const ParentId$outboundSchema: z.ZodType< + ParentId$Outbound, + z.ZodTypeDef, + ParentId +> = 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 ParentId$ { - /** @deprecated use `ParentId$inboundSchema` instead. */ - export const inboundSchema = ParentId$inboundSchema; - /** @deprecated use `ParentId$outboundSchema` instead. */ - export const outboundSchema = ParentId$outboundSchema; - /** @deprecated use `ParentId$Outbound` instead. */ - export type Outbound = ParentId$Outbound; + /** @deprecated use `ParentId$inboundSchema` instead. */ + export const inboundSchema = ParentId$inboundSchema; + /** @deprecated use `ParentId$outboundSchema` instead. */ + export const outboundSchema = ParentId$outboundSchema; + /** @deprecated use `ParentId$Outbound` instead. */ + export type Outbound = ParentId$Outbound; } /** @internal */ -export const Metadata$inboundSchema: z.ZodType = z.union([ - DelayScheduledMetadata$inboundSchema, - DelayRegularMetadata$inboundSchema, - DigestTimedMetadata$inboundSchema, - DigestRegularMetadata$inboundSchema, +export const Metadata$inboundSchema: z.ZodType< + Metadata, + z.ZodTypeDef, + unknown +> = z.union([ + DelayScheduledMetadata$inboundSchema, + DelayRegularMetadata$inboundSchema, + DigestTimedMetadata$inboundSchema, + DigestRegularMetadata$inboundSchema, ]); /** @internal */ export type Metadata$Outbound = - | DelayScheduledMetadata$Outbound - | DelayRegularMetadata$Outbound - | DigestTimedMetadata$Outbound - | DigestRegularMetadata$Outbound; + | DelayScheduledMetadata$Outbound + | DelayRegularMetadata$Outbound + | DigestTimedMetadata$Outbound + | DigestRegularMetadata$Outbound; /** @internal */ -export const Metadata$outboundSchema: z.ZodType = - z.union([ - DelayScheduledMetadata$outboundSchema, - DelayRegularMetadata$outboundSchema, - DigestTimedMetadata$outboundSchema, - DigestRegularMetadata$outboundSchema, - ]); +export const Metadata$outboundSchema: z.ZodType< + Metadata$Outbound, + z.ZodTypeDef, + Metadata +> = z.union([ + DelayScheduledMetadata$outboundSchema, + DelayRegularMetadata$outboundSchema, + DigestTimedMetadata$outboundSchema, + DigestRegularMetadata$outboundSchema, +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; + /** @deprecated use `Metadata$inboundSchema` instead. */ + export const inboundSchema = Metadata$inboundSchema; + /** @deprecated use `Metadata$outboundSchema` instead. */ + export const outboundSchema = Metadata$outboundSchema; + /** @deprecated use `Metadata$Outbound` instead. */ + export type Outbound = Metadata$Outbound; } /** @internal */ -export const ReplyCallback$inboundSchema: z.ZodType = - z.object({}); +export const ReplyCallback$inboundSchema: z.ZodType< + ReplyCallback, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type ReplyCallback$Outbound = {}; /** @internal */ export const ReplyCallback$outboundSchema: z.ZodType< - ReplyCallback$Outbound, - z.ZodTypeDef, - ReplyCallback + ReplyCallback$Outbound, + z.ZodTypeDef, + ReplyCallback > = z.object({}); /** @@ -156,110 +173,106 @@ export const ReplyCallback$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ReplyCallback$ { - /** @deprecated use `ReplyCallback$inboundSchema` instead. */ - export const inboundSchema = ReplyCallback$inboundSchema; - /** @deprecated use `ReplyCallback$outboundSchema` instead. */ - export const outboundSchema = ReplyCallback$outboundSchema; - /** @deprecated use `ReplyCallback$Outbound` instead. */ - export type Outbound = ReplyCallback$Outbound; + /** @deprecated use `ReplyCallback$inboundSchema` instead. */ + export const inboundSchema = ReplyCallback$inboundSchema; + /** @deprecated use `ReplyCallback$outboundSchema` instead. */ + export const outboundSchema = ReplyCallback$outboundSchema; + /** @deprecated use `ReplyCallback$Outbound` instead. */ + export type Outbound = ReplyCallback$Outbound; } /** @internal */ -export const NotificationStep$inboundSchema: z.ZodType = z - .object({ - _id: z.string().optional(), - _parentId: z.lazy(() => ParentId$inboundSchema).optional(), - _templateId: z.string().optional(), - active: z.boolean().optional(), - filters: z.array(StepFilter$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", - }); - }); +export const NotificationStep$inboundSchema: z.ZodType< + NotificationStep, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string().optional(), + _parentId: z.lazy(() => ParentId$inboundSchema).optional(), + _templateId: z.string().optional(), + active: z.boolean().optional(), + filters: z.array(StepFilter$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", + }); +}); /** @internal */ export type NotificationStep$Outbound = { - _id?: string | undefined; - _parentId?: ParentId$Outbound | undefined; - _templateId?: string | undefined; - active?: boolean | undefined; - filters?: Array | 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; + _id?: string | undefined; + _parentId?: ParentId$Outbound | undefined; + _templateId?: string | undefined; + active?: boolean | undefined; + filters?: Array | 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; }; /** @internal */ export const NotificationStep$outboundSchema: z.ZodType< - NotificationStep$Outbound, - z.ZodTypeDef, - NotificationStep -> = z - .object({ - id: z.string().optional(), - parentId: z.lazy(() => ParentId$outboundSchema).optional(), - templateId: z.string().optional(), - active: z.boolean().optional(), - filters: z.array(StepFilter$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", - }); - }); + NotificationStep$Outbound, + z.ZodTypeDef, + NotificationStep +> = z.object({ + id: z.string().optional(), + parentId: z.lazy(() => ParentId$outboundSchema).optional(), + templateId: z.string().optional(), + active: z.boolean().optional(), + filters: z.array(StepFilter$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", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationStep$ { - /** @deprecated use `NotificationStep$inboundSchema` instead. */ - export const inboundSchema = NotificationStep$inboundSchema; - /** @deprecated use `NotificationStep$outboundSchema` instead. */ - export const outboundSchema = NotificationStep$outboundSchema; - /** @deprecated use `NotificationStep$Outbound` instead. */ - export type Outbound = NotificationStep$Outbound; + /** @deprecated use `NotificationStep$inboundSchema` instead. */ + export const inboundSchema = NotificationStep$inboundSchema; + /** @deprecated use `NotificationStep$outboundSchema` instead. */ + export const outboundSchema = NotificationStep$outboundSchema; + /** @deprecated use `NotificationStep$Outbound` instead. */ + export type Outbound = NotificationStep$Outbound; } diff --git a/src/models/components/notificationstepvariant.ts b/src/models/components/notificationstepvariant.ts index 1f1088a5..8308a013 100644 --- a/src/models/components/notificationstepvariant.ts +++ b/src/models/components/notificationstepvariant.ts @@ -2,79 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - DelayRegularMetadata, - DelayRegularMetadata$inboundSchema, - DelayRegularMetadata$Outbound, - DelayRegularMetadata$outboundSchema, + DelayRegularMetadata, + DelayRegularMetadata$inboundSchema, + DelayRegularMetadata$Outbound, + DelayRegularMetadata$outboundSchema, } from "./delayregularmetadata.js"; import { - DelayScheduledMetadata, - DelayScheduledMetadata$inboundSchema, - DelayScheduledMetadata$Outbound, - DelayScheduledMetadata$outboundSchema, + DelayScheduledMetadata, + DelayScheduledMetadata$inboundSchema, + DelayScheduledMetadata$Outbound, + DelayScheduledMetadata$outboundSchema, } from "./delayscheduledmetadata.js"; import { - DigestRegularMetadata, - DigestRegularMetadata$inboundSchema, - DigestRegularMetadata$Outbound, - DigestRegularMetadata$outboundSchema, + DigestRegularMetadata, + DigestRegularMetadata$inboundSchema, + DigestRegularMetadata$Outbound, + DigestRegularMetadata$outboundSchema, } from "./digestregularmetadata.js"; import { - DigestTimedMetadata, - DigestTimedMetadata$inboundSchema, - DigestTimedMetadata$Outbound, - DigestTimedMetadata$outboundSchema, + DigestTimedMetadata, + DigestTimedMetadata$inboundSchema, + DigestTimedMetadata$Outbound, + DigestTimedMetadata$outboundSchema, } from "./digesttimedmetadata.js"; import { - MessageTemplate, - MessageTemplate$inboundSchema, - MessageTemplate$Outbound, - MessageTemplate$outboundSchema, + MessageTemplate, + MessageTemplate$inboundSchema, + MessageTemplate$Outbound, + MessageTemplate$outboundSchema, } from "./messagetemplate.js"; import { - StepFilter, - StepFilter$inboundSchema, - StepFilter$Outbound, - StepFilter$outboundSchema, + StepFilter, + StepFilter$inboundSchema, + StepFilter$Outbound, + StepFilter$outboundSchema, } from "./stepfilter.js"; -import * as z from "zod"; export type NotificationStepVariantParentId = {}; export type NotificationStepVariantMetadata = - | DelayScheduledMetadata - | DelayRegularMetadata - | DigestTimedMetadata - | DigestRegularMetadata; + | DelayScheduledMetadata + | DelayRegularMetadata + | DigestTimedMetadata + | DigestRegularMetadata; export type NotificationStepVariantReplyCallback = {}; export type NotificationStepVariant = { - id?: string | undefined; - parentId?: NotificationStepVariantParentId | undefined; - templateId?: string | undefined; - active?: boolean | undefined; - filters?: Array | undefined; - metadata?: - | DelayScheduledMetadata - | DelayRegularMetadata - | DigestTimedMetadata - | DigestRegularMetadata - | undefined; - name?: string | undefined; - replyCallback?: NotificationStepVariantReplyCallback | undefined; - shouldStopOnFail?: boolean | undefined; - template?: MessageTemplate | undefined; - uuid?: string | undefined; + id?: string | undefined; + parentId?: NotificationStepVariantParentId | undefined; + templateId?: string | undefined; + active?: boolean | undefined; + filters?: Array | undefined; + metadata?: + | DelayScheduledMetadata + | DelayRegularMetadata + | DigestTimedMetadata + | DigestRegularMetadata + | undefined; + name?: string | undefined; + replyCallback?: NotificationStepVariantReplyCallback | undefined; + shouldStopOnFail?: boolean | undefined; + template?: MessageTemplate | undefined; + uuid?: string | undefined; }; /** @internal */ export const NotificationStepVariantParentId$inboundSchema: z.ZodType< - NotificationStepVariantParentId, - z.ZodTypeDef, - unknown + NotificationStepVariantParentId, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -82,9 +82,9 @@ export type NotificationStepVariantParentId$Outbound = {}; /** @internal */ export const NotificationStepVariantParentId$outboundSchema: z.ZodType< - NotificationStepVariantParentId$Outbound, - z.ZodTypeDef, - NotificationStepVariantParentId + NotificationStepVariantParentId$Outbound, + z.ZodTypeDef, + NotificationStepVariantParentId > = z.object({}); /** @@ -92,43 +92,43 @@ export const NotificationStepVariantParentId$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationStepVariantParentId$ { - /** @deprecated use `NotificationStepVariantParentId$inboundSchema` instead. */ - export const inboundSchema = NotificationStepVariantParentId$inboundSchema; - /** @deprecated use `NotificationStepVariantParentId$outboundSchema` instead. */ - export const outboundSchema = NotificationStepVariantParentId$outboundSchema; - /** @deprecated use `NotificationStepVariantParentId$Outbound` instead. */ - export type Outbound = NotificationStepVariantParentId$Outbound; + /** @deprecated use `NotificationStepVariantParentId$inboundSchema` instead. */ + export const inboundSchema = NotificationStepVariantParentId$inboundSchema; + /** @deprecated use `NotificationStepVariantParentId$outboundSchema` instead. */ + export const outboundSchema = NotificationStepVariantParentId$outboundSchema; + /** @deprecated use `NotificationStepVariantParentId$Outbound` instead. */ + export type Outbound = NotificationStepVariantParentId$Outbound; } /** @internal */ export const NotificationStepVariantMetadata$inboundSchema: z.ZodType< - NotificationStepVariantMetadata, - z.ZodTypeDef, - unknown + NotificationStepVariantMetadata, + z.ZodTypeDef, + unknown > = z.union([ - DelayScheduledMetadata$inboundSchema, - DelayRegularMetadata$inboundSchema, - DigestTimedMetadata$inboundSchema, - DigestRegularMetadata$inboundSchema, + DelayScheduledMetadata$inboundSchema, + DelayRegularMetadata$inboundSchema, + DigestTimedMetadata$inboundSchema, + DigestRegularMetadata$inboundSchema, ]); /** @internal */ export type NotificationStepVariantMetadata$Outbound = - | DelayScheduledMetadata$Outbound - | DelayRegularMetadata$Outbound - | DigestTimedMetadata$Outbound - | DigestRegularMetadata$Outbound; + | DelayScheduledMetadata$Outbound + | DelayRegularMetadata$Outbound + | DigestTimedMetadata$Outbound + | DigestRegularMetadata$Outbound; /** @internal */ export const NotificationStepVariantMetadata$outboundSchema: z.ZodType< - NotificationStepVariantMetadata$Outbound, - z.ZodTypeDef, - NotificationStepVariantMetadata + NotificationStepVariantMetadata$Outbound, + z.ZodTypeDef, + NotificationStepVariantMetadata > = z.union([ - DelayScheduledMetadata$outboundSchema, - DelayRegularMetadata$outboundSchema, - DigestTimedMetadata$outboundSchema, - DigestRegularMetadata$outboundSchema, + DelayScheduledMetadata$outboundSchema, + DelayRegularMetadata$outboundSchema, + DigestTimedMetadata$outboundSchema, + DigestRegularMetadata$outboundSchema, ]); /** @@ -136,19 +136,19 @@ export const NotificationStepVariantMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationStepVariantMetadata$ { - /** @deprecated use `NotificationStepVariantMetadata$inboundSchema` instead. */ - export const inboundSchema = NotificationStepVariantMetadata$inboundSchema; - /** @deprecated use `NotificationStepVariantMetadata$outboundSchema` instead. */ - export const outboundSchema = NotificationStepVariantMetadata$outboundSchema; - /** @deprecated use `NotificationStepVariantMetadata$Outbound` instead. */ - export type Outbound = NotificationStepVariantMetadata$Outbound; + /** @deprecated use `NotificationStepVariantMetadata$inboundSchema` instead. */ + export const inboundSchema = NotificationStepVariantMetadata$inboundSchema; + /** @deprecated use `NotificationStepVariantMetadata$outboundSchema` instead. */ + export const outboundSchema = NotificationStepVariantMetadata$outboundSchema; + /** @deprecated use `NotificationStepVariantMetadata$Outbound` instead. */ + export type Outbound = NotificationStepVariantMetadata$Outbound; } /** @internal */ export const NotificationStepVariantReplyCallback$inboundSchema: z.ZodType< - NotificationStepVariantReplyCallback, - z.ZodTypeDef, - unknown + NotificationStepVariantReplyCallback, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -156,9 +156,9 @@ export type NotificationStepVariantReplyCallback$Outbound = {}; /** @internal */ export const NotificationStepVariantReplyCallback$outboundSchema: z.ZodType< - NotificationStepVariantReplyCallback$Outbound, - z.ZodTypeDef, - NotificationStepVariantReplyCallback + NotificationStepVariantReplyCallback$Outbound, + z.ZodTypeDef, + NotificationStepVariantReplyCallback > = z.object({}); /** @@ -166,111 +166,111 @@ export const NotificationStepVariantReplyCallback$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationStepVariantReplyCallback$ { - /** @deprecated use `NotificationStepVariantReplyCallback$inboundSchema` instead. */ - export const inboundSchema = NotificationStepVariantReplyCallback$inboundSchema; - /** @deprecated use `NotificationStepVariantReplyCallback$outboundSchema` instead. */ - export const outboundSchema = NotificationStepVariantReplyCallback$outboundSchema; - /** @deprecated use `NotificationStepVariantReplyCallback$Outbound` instead. */ - export type Outbound = NotificationStepVariantReplyCallback$Outbound; + /** @deprecated use `NotificationStepVariantReplyCallback$inboundSchema` instead. */ + export const inboundSchema = + NotificationStepVariantReplyCallback$inboundSchema; + /** @deprecated use `NotificationStepVariantReplyCallback$outboundSchema` instead. */ + export const outboundSchema = + NotificationStepVariantReplyCallback$outboundSchema; + /** @deprecated use `NotificationStepVariantReplyCallback$Outbound` instead. */ + export type Outbound = NotificationStepVariantReplyCallback$Outbound; } /** @internal */ export const NotificationStepVariant$inboundSchema: z.ZodType< - NotificationStepVariant, - z.ZodTypeDef, - unknown -> = z - .object({ - _id: z.string().optional(), - _parentId: z.lazy(() => NotificationStepVariantParentId$inboundSchema).optional(), - _templateId: z.string().optional(), - active: z.boolean().optional(), - filters: z.array(StepFilter$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", - }); - }); + NotificationStepVariant, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string().optional(), + _parentId: z.lazy(() => NotificationStepVariantParentId$inboundSchema) + .optional(), + _templateId: z.string().optional(), + active: z.boolean().optional(), + filters: z.array(StepFilter$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", + }); +}); /** @internal */ export type NotificationStepVariant$Outbound = { - _id?: string | undefined; - _parentId?: NotificationStepVariantParentId$Outbound | undefined; - _templateId?: string | undefined; - active?: boolean | undefined; - filters?: Array | 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; + _id?: string | undefined; + _parentId?: NotificationStepVariantParentId$Outbound | undefined; + _templateId?: string | undefined; + active?: boolean | undefined; + filters?: Array | 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 */ export const NotificationStepVariant$outboundSchema: z.ZodType< - NotificationStepVariant$Outbound, - z.ZodTypeDef, - NotificationStepVariant -> = z - .object({ - id: z.string().optional(), - parentId: z.lazy(() => NotificationStepVariantParentId$outboundSchema).optional(), - templateId: z.string().optional(), - active: z.boolean().optional(), - filters: z.array(StepFilter$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", - }); - }); + NotificationStepVariant$Outbound, + z.ZodTypeDef, + NotificationStepVariant +> = z.object({ + id: z.string().optional(), + parentId: z.lazy(() => NotificationStepVariantParentId$outboundSchema) + .optional(), + templateId: z.string().optional(), + active: z.boolean().optional(), + filters: z.array(StepFilter$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", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationStepVariant$ { - /** @deprecated use `NotificationStepVariant$inboundSchema` instead. */ - export const inboundSchema = NotificationStepVariant$inboundSchema; - /** @deprecated use `NotificationStepVariant$outboundSchema` instead. */ - export const outboundSchema = NotificationStepVariant$outboundSchema; - /** @deprecated use `NotificationStepVariant$Outbound` instead. */ - export type Outbound = NotificationStepVariant$Outbound; + /** @deprecated use `NotificationStepVariant$inboundSchema` instead. */ + export const inboundSchema = NotificationStepVariant$inboundSchema; + /** @deprecated use `NotificationStepVariant$outboundSchema` instead. */ + export const outboundSchema = NotificationStepVariant$outboundSchema; + /** @deprecated use `NotificationStepVariant$Outbound` instead. */ + export type Outbound = NotificationStepVariant$Outbound; } diff --git a/src/models/components/notificationtrigger.ts b/src/models/components/notificationtrigger.ts index 11d936ce..e9b8cc0e 100644 --- a/src/models/components/notificationtrigger.ts +++ b/src/models/components/notificationtrigger.ts @@ -2,35 +2,37 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - NotificationTriggerVariable, - NotificationTriggerVariable$inboundSchema, - NotificationTriggerVariable$Outbound, - NotificationTriggerVariable$outboundSchema, + NotificationTriggerVariable, + NotificationTriggerVariable$inboundSchema, + NotificationTriggerVariable$Outbound, + NotificationTriggerVariable$outboundSchema, } from "./notificationtriggervariable.js"; -import * as z from "zod"; export const NotificationTriggerType = { - Event: "event", + Event: "event", } as const; -export type NotificationTriggerType = ClosedEnum; +export type NotificationTriggerType = ClosedEnum< + typeof NotificationTriggerType +>; export type NotificationTrigger = { - identifier: string; - subscriberVariables?: Array | undefined; - type: NotificationTriggerType; - variables: Array; + identifier: string; + subscriberVariables?: Array | undefined; + type: NotificationTriggerType; + variables: Array; }; /** @internal */ export const NotificationTriggerType$inboundSchema: z.ZodNativeEnum< - typeof NotificationTriggerType + typeof NotificationTriggerType > = z.nativeEnum(NotificationTriggerType); /** @internal */ export const NotificationTriggerType$outboundSchema: z.ZodNativeEnum< - typeof NotificationTriggerType + typeof NotificationTriggerType > = NotificationTriggerType$inboundSchema; /** @@ -38,42 +40,44 @@ export const NotificationTriggerType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationTriggerType$ { - /** @deprecated use `NotificationTriggerType$inboundSchema` instead. */ - export const inboundSchema = NotificationTriggerType$inboundSchema; - /** @deprecated use `NotificationTriggerType$outboundSchema` instead. */ - export const outboundSchema = NotificationTriggerType$outboundSchema; + /** @deprecated use `NotificationTriggerType$inboundSchema` instead. */ + export const inboundSchema = NotificationTriggerType$inboundSchema; + /** @deprecated use `NotificationTriggerType$outboundSchema` instead. */ + export const outboundSchema = NotificationTriggerType$outboundSchema; } /** @internal */ export const NotificationTrigger$inboundSchema: z.ZodType< - NotificationTrigger, - z.ZodTypeDef, - unknown + NotificationTrigger, + z.ZodTypeDef, + unknown > = z.object({ - identifier: z.string(), - subscriberVariables: z.array(NotificationTriggerVariable$inboundSchema).optional(), - type: NotificationTriggerType$inboundSchema, - variables: z.array(NotificationTriggerVariable$inboundSchema), + identifier: z.string(), + 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; - variables: Array; + identifier: string; + subscriberVariables?: Array | undefined; + type: string; + variables: Array; }; /** @internal */ export const NotificationTrigger$outboundSchema: z.ZodType< - NotificationTrigger$Outbound, - z.ZodTypeDef, - NotificationTrigger + NotificationTrigger$Outbound, + z.ZodTypeDef, + NotificationTrigger > = z.object({ - identifier: z.string(), - subscriberVariables: z.array(NotificationTriggerVariable$outboundSchema).optional(), - type: NotificationTriggerType$outboundSchema, - variables: z.array(NotificationTriggerVariable$outboundSchema), + identifier: z.string(), + subscriberVariables: z.array(NotificationTriggerVariable$outboundSchema) + .optional(), + type: NotificationTriggerType$outboundSchema, + variables: z.array(NotificationTriggerVariable$outboundSchema), }); /** @@ -81,10 +85,10 @@ export const NotificationTrigger$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationTrigger$ { - /** @deprecated use `NotificationTrigger$inboundSchema` instead. */ - export const inboundSchema = NotificationTrigger$inboundSchema; - /** @deprecated use `NotificationTrigger$outboundSchema` instead. */ - export const outboundSchema = NotificationTrigger$outboundSchema; - /** @deprecated use `NotificationTrigger$Outbound` instead. */ - export type Outbound = NotificationTrigger$Outbound; + /** @deprecated use `NotificationTrigger$inboundSchema` instead. */ + export const inboundSchema = NotificationTrigger$inboundSchema; + /** @deprecated use `NotificationTrigger$outboundSchema` instead. */ + export const outboundSchema = NotificationTrigger$outboundSchema; + /** @deprecated use `NotificationTrigger$Outbound` instead. */ + export type Outbound = NotificationTrigger$Outbound; } diff --git a/src/models/components/notificationtriggervariable.ts b/src/models/components/notificationtriggervariable.ts index 47ec7cd3..273d454e 100644 --- a/src/models/components/notificationtriggervariable.ts +++ b/src/models/components/notificationtriggervariable.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type NotificationTriggerVariable = { - name: string; + name: string; }; /** @internal */ export const NotificationTriggerVariable$inboundSchema: z.ZodType< - NotificationTriggerVariable, - z.ZodTypeDef, - unknown + NotificationTriggerVariable, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type NotificationTriggerVariable$Outbound = { - name: string; + name: string; }; /** @internal */ export const NotificationTriggerVariable$outboundSchema: z.ZodType< - NotificationTriggerVariable$Outbound, - z.ZodTypeDef, - NotificationTriggerVariable + NotificationTriggerVariable$Outbound, + z.ZodTypeDef, + NotificationTriggerVariable > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -36,10 +36,10 @@ export const NotificationTriggerVariable$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationTriggerVariable$ { - /** @deprecated use `NotificationTriggerVariable$inboundSchema` instead. */ - export const inboundSchema = NotificationTriggerVariable$inboundSchema; - /** @deprecated use `NotificationTriggerVariable$outboundSchema` instead. */ - export const outboundSchema = NotificationTriggerVariable$outboundSchema; - /** @deprecated use `NotificationTriggerVariable$Outbound` instead. */ - export type Outbound = NotificationTriggerVariable$Outbound; + /** @deprecated use `NotificationTriggerVariable$inboundSchema` instead. */ + export const inboundSchema = NotificationTriggerVariable$inboundSchema; + /** @deprecated use `NotificationTriggerVariable$outboundSchema` instead. */ + export const outboundSchema = NotificationTriggerVariable$outboundSchema; + /** @deprecated use `NotificationTriggerVariable$Outbound` instead. */ + export type Outbound = NotificationTriggerVariable$Outbound; } diff --git a/src/models/components/organizationbrandingresponsedto.ts b/src/models/components/organizationbrandingresponsedto.ts index fbd72221..8f59189d 100644 --- a/src/models/components/organizationbrandingresponsedto.ts +++ b/src/models/components/organizationbrandingresponsedto.ts @@ -2,77 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const Direction = { - Ltr: "ltr", - Trl: "trl", + 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; + color: string; + contentBackground: string; + direction?: Direction | undefined; + fontColor: string; + fontFamily?: string | undefined; + logo: string; }; /** @internal */ -export const Direction$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Direction); +export const Direction$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Direction); /** @internal */ -export const Direction$outboundSchema: z.ZodNativeEnum = Direction$inboundSchema; +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; + /** @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 + 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(), + 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; + 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 + 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(), + color: z.string(), + contentBackground: z.string(), + direction: Direction$outboundSchema.optional(), + fontColor: z.string(), + fontFamily: z.string().optional(), + logo: z.string(), }); /** @@ -80,10 +82,10 @@ export const OrganizationBrandingResponseDto$outboundSchema: z.ZodType< * @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; + /** @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 index a0d51a43..adce10a6 100644 --- a/src/models/components/organizationresponsedto.ts +++ b/src/models/components/organizationresponsedto.ts @@ -2,51 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - OrganizationBrandingResponseDto, - OrganizationBrandingResponseDto$inboundSchema, - OrganizationBrandingResponseDto$Outbound, - OrganizationBrandingResponseDto$outboundSchema, + OrganizationBrandingResponseDto, + OrganizationBrandingResponseDto$inboundSchema, + OrganizationBrandingResponseDto$Outbound, + OrganizationBrandingResponseDto$outboundSchema, } from "./organizationbrandingresponsedto.js"; -import * as z from "zod"; export type OrganizationResponseDto = { - branding: OrganizationBrandingResponseDto; - logo?: string | undefined; - name: string; - partnerConfigurations?: Array | undefined; + branding: OrganizationBrandingResponseDto; + logo?: string | undefined; + name: string; + partnerConfigurations?: Array | undefined; }; /** @internal */ export const OrganizationResponseDto$inboundSchema: z.ZodType< - OrganizationResponseDto, - z.ZodTypeDef, - unknown + OrganizationResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - branding: OrganizationBrandingResponseDto$inboundSchema, - logo: z.string().optional(), - name: z.string(), - partnerConfigurations: z.array(z.string()).optional(), + 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; + branding: OrganizationBrandingResponseDto$Outbound; + logo?: string | undefined; + name: string; + partnerConfigurations?: Array | undefined; }; /** @internal */ export const OrganizationResponseDto$outboundSchema: z.ZodType< - OrganizationResponseDto$Outbound, - z.ZodTypeDef, - OrganizationResponseDto + OrganizationResponseDto$Outbound, + z.ZodTypeDef, + OrganizationResponseDto > = z.object({ - branding: OrganizationBrandingResponseDto$outboundSchema, - logo: z.string().optional(), - name: z.string(), - partnerConfigurations: z.array(z.string()).optional(), + branding: OrganizationBrandingResponseDto$outboundSchema, + logo: z.string().optional(), + name: z.string(), + partnerConfigurations: z.array(z.string()).optional(), }); /** @@ -54,10 +54,10 @@ export const OrganizationResponseDto$outboundSchema: z.ZodType< * @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; + /** @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 48187f49..6b66833a 100644 --- a/src/models/components/preference.ts +++ b/src/models/components/preference.ts @@ -2,53 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, + PreferenceChannels, + PreferenceChannels$inboundSchema, + PreferenceChannels$Outbound, + PreferenceChannels$outboundSchema, } from "./preferencechannels.js"; -import * as z from "zod"; 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; + /** + * Sets if the workflow is fully enabled for all channels or not for the subscriber. + */ + enabled: boolean; }; /** @internal */ -export const Preference$inboundSchema: z.ZodType = z.object({ - channels: PreferenceChannels$inboundSchema, - enabled: z.boolean(), +export const Preference$inboundSchema: z.ZodType< + Preference, + z.ZodTypeDef, + unknown +> = z.object({ + channels: PreferenceChannels$inboundSchema, + enabled: z.boolean(), }); /** @internal */ export type Preference$Outbound = { - channels: PreferenceChannels$Outbound; - enabled: boolean; + channels: PreferenceChannels$Outbound; + enabled: boolean; }; /** @internal */ -export const Preference$outboundSchema: z.ZodType = - z.object({ - channels: PreferenceChannels$outboundSchema, - enabled: z.boolean(), - }); +export const Preference$outboundSchema: z.ZodType< + Preference$Outbound, + z.ZodTypeDef, + Preference +> = z.object({ + channels: PreferenceChannels$outboundSchema, + enabled: 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 Preference$ { - /** @deprecated use `Preference$inboundSchema` instead. */ - export const inboundSchema = Preference$inboundSchema; - /** @deprecated use `Preference$outboundSchema` instead. */ - export const outboundSchema = Preference$outboundSchema; - /** @deprecated use `Preference$Outbound` instead. */ - export type Outbound = Preference$Outbound; + /** @deprecated use `Preference$inboundSchema` instead. */ + export const inboundSchema = Preference$inboundSchema; + /** @deprecated use `Preference$outboundSchema` instead. */ + export const outboundSchema = Preference$outboundSchema; + /** @deprecated use `Preference$Outbound` instead. */ + export type Outbound = Preference$Outbound; } diff --git a/src/models/components/preferencechannels.ts b/src/models/components/preferencechannels.ts index 2d473208..a0c356c6 100644 --- a/src/models/components/preferencechannels.ts +++ b/src/models/components/preferencechannels.ts @@ -2,73 +2,69 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type PreferenceChannels = { - chat?: boolean | undefined; - email?: boolean | undefined; - inApp?: boolean | undefined; - push?: boolean | undefined; - sms?: boolean | undefined; + chat?: boolean | undefined; + email?: boolean | undefined; + inApp?: boolean | undefined; + push?: boolean | undefined; + sms?: boolean | undefined; }; /** @internal */ export const PreferenceChannels$inboundSchema: z.ZodType< - PreferenceChannels, - z.ZodTypeDef, - unknown -> = z - .object({ - chat: z.boolean().optional(), - email: z.boolean().optional(), - in_app: z.boolean().optional(), - push: z.boolean().optional(), - sms: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - in_app: "inApp", - }); - }); + PreferenceChannels, + z.ZodTypeDef, + unknown +> = z.object({ + chat: z.boolean().optional(), + email: z.boolean().optional(), + in_app: z.boolean().optional(), + push: z.boolean().optional(), + sms: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "in_app": "inApp", + }); +}); /** @internal */ export type PreferenceChannels$Outbound = { - chat?: boolean | undefined; - email?: boolean | undefined; - in_app?: boolean | undefined; - push?: boolean | undefined; - sms?: boolean | undefined; + chat?: boolean | undefined; + email?: boolean | undefined; + in_app?: boolean | undefined; + push?: boolean | undefined; + sms?: boolean | undefined; }; /** @internal */ export const PreferenceChannels$outboundSchema: z.ZodType< - PreferenceChannels$Outbound, - z.ZodTypeDef, - PreferenceChannels -> = z - .object({ - chat: z.boolean().optional(), - email: z.boolean().optional(), - inApp: z.boolean().optional(), - push: z.boolean().optional(), - sms: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - inApp: "in_app", - }); - }); + PreferenceChannels$Outbound, + z.ZodTypeDef, + PreferenceChannels +> = z.object({ + chat: z.boolean().optional(), + email: z.boolean().optional(), + inApp: z.boolean().optional(), + push: z.boolean().optional(), + sms: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + inApp: "in_app", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PreferenceChannels$ { - /** @deprecated use `PreferenceChannels$inboundSchema` instead. */ - export const inboundSchema = PreferenceChannels$inboundSchema; - /** @deprecated use `PreferenceChannels$outboundSchema` instead. */ - export const outboundSchema = PreferenceChannels$outboundSchema; - /** @deprecated use `PreferenceChannels$Outbound` instead. */ - export type Outbound = PreferenceChannels$Outbound; + /** @deprecated use `PreferenceChannels$inboundSchema` instead. */ + export const inboundSchema = PreferenceChannels$inboundSchema; + /** @deprecated use `PreferenceChannels$outboundSchema` instead. */ + export const outboundSchema = PreferenceChannels$outboundSchema; + /** @deprecated use `PreferenceChannels$Outbound` instead. */ + export type Outbound = PreferenceChannels$Outbound; } diff --git a/src/models/components/removesubscribersrequestdto.ts b/src/models/components/removesubscribersrequestdto.ts index b178d683..6fb22794 100644 --- a/src/models/components/removesubscribersrequestdto.ts +++ b/src/models/components/removesubscribersrequestdto.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type RemoveSubscribersRequestDto = { - /** - * List of subscriber identifiers that will be removed to the topic - */ - subscribers: Array; + /** + * List of subscriber identifiers that will be removed to the topic + */ + subscribers: Array; }; /** @internal */ export const RemoveSubscribersRequestDto$inboundSchema: z.ZodType< - RemoveSubscribersRequestDto, - z.ZodTypeDef, - unknown + RemoveSubscribersRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @internal */ export type RemoveSubscribersRequestDto$Outbound = { - subscribers: Array; + subscribers: Array; }; /** @internal */ export const RemoveSubscribersRequestDto$outboundSchema: z.ZodType< - RemoveSubscribersRequestDto$Outbound, - z.ZodTypeDef, - RemoveSubscribersRequestDto + RemoveSubscribersRequestDto$Outbound, + z.ZodTypeDef, + RemoveSubscribersRequestDto > = z.object({ - subscribers: z.array(z.string()), + subscribers: z.array(z.string()), }); /** @@ -39,10 +39,10 @@ export const RemoveSubscribersRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveSubscribersRequestDto$ { - /** @deprecated use `RemoveSubscribersRequestDto$inboundSchema` instead. */ - export const inboundSchema = RemoveSubscribersRequestDto$inboundSchema; - /** @deprecated use `RemoveSubscribersRequestDto$outboundSchema` instead. */ - export const outboundSchema = RemoveSubscribersRequestDto$outboundSchema; - /** @deprecated use `RemoveSubscribersRequestDto$Outbound` instead. */ - export type Outbound = RemoveSubscribersRequestDto$Outbound; + /** @deprecated use `RemoveSubscribersRequestDto$inboundSchema` instead. */ + export const inboundSchema = RemoveSubscribersRequestDto$inboundSchema; + /** @deprecated use `RemoveSubscribersRequestDto$outboundSchema` instead. */ + export const outboundSchema = RemoveSubscribersRequestDto$outboundSchema; + /** @deprecated use `RemoveSubscribersRequestDto$Outbound` instead. */ + export type Outbound = RemoveSubscribersRequestDto$Outbound; } diff --git a/src/models/components/renameorganizationdto.ts b/src/models/components/renameorganizationdto.ts index c1f37216..c0d1d6dd 100644 --- a/src/models/components/renameorganizationdto.ts +++ b/src/models/components/renameorganizationdto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type RenameOrganizationDto = { - name: string; + name: string; }; /** @internal */ export const RenameOrganizationDto$inboundSchema: z.ZodType< - RenameOrganizationDto, - z.ZodTypeDef, - unknown + RenameOrganizationDto, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type RenameOrganizationDto$Outbound = { - name: string; + name: string; }; /** @internal */ export const RenameOrganizationDto$outboundSchema: z.ZodType< - RenameOrganizationDto$Outbound, - z.ZodTypeDef, - RenameOrganizationDto + RenameOrganizationDto$Outbound, + z.ZodTypeDef, + RenameOrganizationDto > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -36,10 +36,10 @@ export const RenameOrganizationDto$outboundSchema: z.ZodType< * @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; + /** @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 13c4635c..794dd1e6 100644 --- a/src/models/components/renametopicrequestdto.ts +++ b/src/models/components/renametopicrequestdto.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type RenameTopicRequestDto = { - /** - * User defined custom name and provided by the user to rename the topic. - */ - name: string; + /** + * User defined custom name and provided by the user to rename the topic. + */ + name: string; }; /** @internal */ export const RenameTopicRequestDto$inboundSchema: z.ZodType< - RenameTopicRequestDto, - z.ZodTypeDef, - unknown + RenameTopicRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type RenameTopicRequestDto$Outbound = { - name: string; + name: string; }; /** @internal */ export const RenameTopicRequestDto$outboundSchema: z.ZodType< - RenameTopicRequestDto$Outbound, - z.ZodTypeDef, - RenameTopicRequestDto + RenameTopicRequestDto$Outbound, + z.ZodTypeDef, + RenameTopicRequestDto > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -39,10 +39,10 @@ export const RenameTopicRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RenameTopicRequestDto$ { - /** @deprecated use `RenameTopicRequestDto$inboundSchema` instead. */ - export const inboundSchema = RenameTopicRequestDto$inboundSchema; - /** @deprecated use `RenameTopicRequestDto$outboundSchema` instead. */ - export const outboundSchema = RenameTopicRequestDto$outboundSchema; - /** @deprecated use `RenameTopicRequestDto$Outbound` instead. */ - export type Outbound = RenameTopicRequestDto$Outbound; + /** @deprecated use `RenameTopicRequestDto$inboundSchema` instead. */ + export const inboundSchema = RenameTopicRequestDto$inboundSchema; + /** @deprecated use `RenameTopicRequestDto$outboundSchema` instead. */ + export const outboundSchema = RenameTopicRequestDto$outboundSchema; + /** @deprecated use `RenameTopicRequestDto$Outbound` instead. */ + export type Outbound = RenameTopicRequestDto$Outbound; } diff --git a/src/models/components/renametopicresponsedto.ts b/src/models/components/renametopicresponsedto.ts index cddcdad9..cbebc2e0 100644 --- a/src/models/components/renametopicresponsedto.ts +++ b/src/models/components/renametopicresponsedto.ts @@ -2,81 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type RenameTopicResponseDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - key: string; - name: string; - subscribers: Array; + environmentId: string; + id?: string | undefined; + organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ export const RenameTopicResponseDto$inboundSchema: z.ZodType< - RenameTopicResponseDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); + RenameTopicResponseDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @internal */ export type RenameTopicResponseDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - key: string; - name: string; - subscribers: Array; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ export const RenameTopicResponseDto$outboundSchema: z.ZodType< - RenameTopicResponseDto$Outbound, - z.ZodTypeDef, - RenameTopicResponseDto -> = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); + RenameTopicResponseDto$Outbound, + z.ZodTypeDef, + RenameTopicResponseDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RenameTopicResponseDto$ { - /** @deprecated use `RenameTopicResponseDto$inboundSchema` instead. */ - export const inboundSchema = RenameTopicResponseDto$inboundSchema; - /** @deprecated use `RenameTopicResponseDto$outboundSchema` instead. */ - export const outboundSchema = RenameTopicResponseDto$outboundSchema; - /** @deprecated use `RenameTopicResponseDto$Outbound` instead. */ - export type Outbound = RenameTopicResponseDto$Outbound; + /** @deprecated use `RenameTopicResponseDto$inboundSchema` instead. */ + export const inboundSchema = RenameTopicResponseDto$inboundSchema; + /** @deprecated use `RenameTopicResponseDto$outboundSchema` instead. */ + export const outboundSchema = RenameTopicResponseDto$outboundSchema; + /** @deprecated use `RenameTopicResponseDto$Outbound` instead. */ + export type Outbound = RenameTopicResponseDto$Outbound; } diff --git a/src/models/components/security.ts b/src/models/components/security.ts index c269daed..7d21f891 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.ts @@ -2,49 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type Security = { - apiKey: string; + apiKey: string; }; /** @internal */ -export const Security$inboundSchema: z.ZodType = z - .object({ - "api-key": z.string(), - }) - .transform((v) => { - return remap$(v, { - "api-key": "apiKey", - }); - }); +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + "api-key": z.string(), +}).transform((v) => { + return remap$(v, { + "api-key": "apiKey", + }); +}); /** @internal */ export type Security$Outbound = { - "api-key": string; + "api-key": string; }; /** @internal */ -export const Security$outboundSchema: z.ZodType = z - .object({ - apiKey: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "api-key", - }); - }); +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + apiKey: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "api-key", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; } diff --git a/src/models/components/stepfilter.ts b/src/models/components/stepfilter.ts index ee267718..2d1c702f 100644 --- a/src/models/components/stepfilter.ts +++ b/src/models/components/stepfilter.ts @@ -2,110 +2,122 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - FieldFilterPart, - FieldFilterPart$inboundSchema, - FieldFilterPart$Outbound, - FieldFilterPart$outboundSchema, + FieldFilterPart, + FieldFilterPart$inboundSchema, + FieldFilterPart$Outbound, + FieldFilterPart$outboundSchema, } from "./fieldfilterpart.js"; -import * as z from "zod"; export const StepFilterType = { - Boolean: "BOOLEAN", - Text: "TEXT", - Date: "DATE", - Number: "NUMBER", - Statement: "STATEMENT", - List: "LIST", - MultiList: "MULTI_LIST", - Group: "GROUP", + Boolean: "BOOLEAN", + Text: "TEXT", + Date: "DATE", + Number: "NUMBER", + Statement: "STATEMENT", + List: "LIST", + MultiList: "MULTI_LIST", + Group: "GROUP", } as const; export type StepFilterType = ClosedEnum; export const Value = { - And: "AND", - Or: "OR", + And: "AND", + Or: "OR", } as const; export type Value = ClosedEnum; export type StepFilter = { - children: Array; - isNegated: boolean; - type: StepFilterType; - value: Value; + children: Array; + isNegated: boolean; + type: StepFilterType; + value: Value; }; /** @internal */ -export const StepFilterType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(StepFilterType); +export const StepFilterType$inboundSchema: z.ZodNativeEnum< + typeof StepFilterType +> = z.nativeEnum(StepFilterType); /** @internal */ -export const StepFilterType$outboundSchema: z.ZodNativeEnum = - StepFilterType$inboundSchema; +export const StepFilterType$outboundSchema: z.ZodNativeEnum< + typeof StepFilterType +> = StepFilterType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StepFilterType$ { - /** @deprecated use `StepFilterType$inboundSchema` instead. */ - export const inboundSchema = StepFilterType$inboundSchema; - /** @deprecated use `StepFilterType$outboundSchema` instead. */ - export const outboundSchema = StepFilterType$outboundSchema; + /** @deprecated use `StepFilterType$inboundSchema` instead. */ + export const inboundSchema = StepFilterType$inboundSchema; + /** @deprecated use `StepFilterType$outboundSchema` instead. */ + export const outboundSchema = StepFilterType$outboundSchema; } /** @internal */ -export const Value$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Value); +export const Value$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Value, +); /** @internal */ -export const Value$outboundSchema: z.ZodNativeEnum = Value$inboundSchema; +export const Value$outboundSchema: z.ZodNativeEnum = + Value$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Value$ { - /** @deprecated use `Value$inboundSchema` instead. */ - export const inboundSchema = Value$inboundSchema; - /** @deprecated use `Value$outboundSchema` instead. */ - export const outboundSchema = Value$outboundSchema; + /** @deprecated use `Value$inboundSchema` instead. */ + export const inboundSchema = Value$inboundSchema; + /** @deprecated use `Value$outboundSchema` instead. */ + export const outboundSchema = Value$outboundSchema; } /** @internal */ -export const StepFilter$inboundSchema: z.ZodType = z.object({ - children: z.array(FieldFilterPart$inboundSchema), - isNegated: z.boolean(), - type: StepFilterType$inboundSchema, - value: Value$inboundSchema, +export const StepFilter$inboundSchema: z.ZodType< + StepFilter, + z.ZodTypeDef, + unknown +> = z.object({ + children: z.array(FieldFilterPart$inboundSchema), + isNegated: z.boolean(), + type: StepFilterType$inboundSchema, + value: Value$inboundSchema, }); /** @internal */ export type StepFilter$Outbound = { - children: Array; - isNegated: boolean; - type: string; - value: string; + children: Array; + isNegated: boolean; + type: string; + value: string; }; /** @internal */ -export const StepFilter$outboundSchema: z.ZodType = - z.object({ - children: z.array(FieldFilterPart$outboundSchema), - isNegated: z.boolean(), - type: StepFilterType$outboundSchema, - value: Value$outboundSchema, - }); +export const StepFilter$outboundSchema: z.ZodType< + StepFilter$Outbound, + z.ZodTypeDef, + StepFilter +> = z.object({ + children: z.array(FieldFilterPart$outboundSchema), + isNegated: z.boolean(), + type: StepFilterType$outboundSchema, + value: Value$outboundSchema, +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StepFilter$ { - /** @deprecated use `StepFilter$inboundSchema` instead. */ - export const inboundSchema = StepFilter$inboundSchema; - /** @deprecated use `StepFilter$outboundSchema` instead. */ - export const outboundSchema = StepFilter$outboundSchema; - /** @deprecated use `StepFilter$Outbound` instead. */ - export type Outbound = StepFilter$Outbound; + /** @deprecated use `StepFilter$inboundSchema` instead. */ + export const inboundSchema = StepFilter$inboundSchema; + /** @deprecated use `StepFilter$outboundSchema` instead. */ + export const outboundSchema = StepFilter$outboundSchema; + /** @deprecated use `StepFilter$Outbound` instead. */ + export type Outbound = StepFilter$Outbound; } diff --git a/src/models/components/subscriberpayloaddto.ts b/src/models/components/subscriberpayloaddto.ts index 079fb0b3..74e1ffe1 100644 --- a/src/models/components/subscriberpayloaddto.ts +++ b/src/models/components/subscriberpayloaddto.ts @@ -7,28 +7,28 @@ import * as z from "zod"; export type SubscriberPayloadDtoData = {}; export type SubscriberPayloadDto = { - /** - * An http url to the profile image of your subscriber - */ - avatar?: string | undefined; - channels?: Array | undefined; - data?: SubscriberPayloadDtoData | undefined; - 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 - */ - subscriberId: string; + /** + * An http url to the profile image of your subscriber + */ + avatar?: string | undefined; + channels?: Array | undefined; + data?: SubscriberPayloadDtoData | undefined; + 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 + */ + subscriberId: string; }; /** @internal */ export const SubscriberPayloadDtoData$inboundSchema: z.ZodType< - SubscriberPayloadDtoData, - z.ZodTypeDef, - unknown + SubscriberPayloadDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -36,9 +36,9 @@ export type SubscriberPayloadDtoData$Outbound = {}; /** @internal */ export const SubscriberPayloadDtoData$outboundSchema: z.ZodType< - SubscriberPayloadDtoData$Outbound, - z.ZodTypeDef, - SubscriberPayloadDtoData + SubscriberPayloadDtoData$Outbound, + z.ZodTypeDef, + SubscriberPayloadDtoData > = z.object({}); /** @@ -46,59 +46,59 @@ export const SubscriberPayloadDtoData$outboundSchema: z.ZodType< * @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; + /** @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; } /** @internal */ export const SubscriberPayloadDto$inboundSchema: z.ZodType< - SubscriberPayloadDto, - z.ZodTypeDef, - unknown + SubscriberPayloadDto, + z.ZodTypeDef, + unknown > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => SubscriberPayloadDtoData$inboundSchema).optional(), - 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(), + channels: z.array(z.string()).optional(), + data: z.lazy(() => SubscriberPayloadDtoData$inboundSchema).optional(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + locale: z.string().optional(), + phone: z.string().optional(), + subscriberId: z.string(), }); /** @internal */ export type SubscriberPayloadDto$Outbound = { - avatar?: string | undefined; - channels?: Array | undefined; - data?: SubscriberPayloadDtoData$Outbound | undefined; - email?: string | undefined; - firstName?: string | undefined; - lastName?: string | undefined; - locale?: string | undefined; - phone?: string | undefined; - subscriberId: string; + avatar?: string | undefined; + channels?: Array | undefined; + data?: SubscriberPayloadDtoData$Outbound | undefined; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + locale?: string | undefined; + phone?: string | undefined; + subscriberId: string; }; /** @internal */ export const SubscriberPayloadDto$outboundSchema: z.ZodType< - SubscriberPayloadDto$Outbound, - z.ZodTypeDef, - SubscriberPayloadDto + SubscriberPayloadDto$Outbound, + z.ZodTypeDef, + SubscriberPayloadDto > = z.object({ - avatar: z.string().optional(), - channels: z.array(z.string()).optional(), - data: z.lazy(() => SubscriberPayloadDtoData$outboundSchema).optional(), - 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(), + channels: z.array(z.string()).optional(), + data: z.lazy(() => SubscriberPayloadDtoData$outboundSchema).optional(), + email: z.string().optional(), + firstName: z.string().optional(), + lastName: z.string().optional(), + locale: z.string().optional(), + phone: z.string().optional(), + subscriberId: z.string(), }); /** @@ -106,10 +106,10 @@ export const SubscriberPayloadDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscriberPayloadDto$ { - /** @deprecated use `SubscriberPayloadDto$inboundSchema` instead. */ - export const inboundSchema = SubscriberPayloadDto$inboundSchema; - /** @deprecated use `SubscriberPayloadDto$outboundSchema` instead. */ - export const outboundSchema = SubscriberPayloadDto$outboundSchema; - /** @deprecated use `SubscriberPayloadDto$Outbound` instead. */ - export type Outbound = SubscriberPayloadDto$Outbound; + /** @deprecated use `SubscriberPayloadDto$inboundSchema` instead. */ + export const inboundSchema = SubscriberPayloadDto$inboundSchema; + /** @deprecated use `SubscriberPayloadDto$outboundSchema` instead. */ + export const outboundSchema = SubscriberPayloadDto$outboundSchema; + /** @deprecated use `SubscriberPayloadDto$Outbound` instead. */ + export type Outbound = SubscriberPayloadDto$Outbound; } diff --git a/src/models/components/subscriberresponsedto.ts b/src/models/components/subscriberresponsedto.ts index fdba4975..200f0616 100644 --- a/src/models/components/subscriberresponsedto.ts +++ b/src/models/components/subscriberresponsedto.ts @@ -2,142 +2,138 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - ChannelSettings, - ChannelSettings$inboundSchema, - ChannelSettings$Outbound, - ChannelSettings$outboundSchema, + ChannelSettings, + ChannelSettings$inboundSchema, + ChannelSettings$Outbound, + ChannelSettings$outboundSchema, } from "./channelsettings.js"; -import * as z from "zod"; 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; - phone?: string | undefined; - /** - * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems - */ - subscriberId: string; - updatedAt: string; + 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; + phone?: string | undefined; + /** + * The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems + */ + subscriberId: string; + updatedAt: string; }; /** @internal */ export const SubscriberResponseDto$inboundSchema: z.ZodType< - SubscriberResponseDto, - 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(), - phone: z.string().optional(), - subscriberId: z.string(), - updatedAt: z.string(), - }) - .transform((v) => { - return remap$(v, { - __v: "v", - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); + SubscriberResponseDto, + 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(), + phone: z.string().optional(), + subscriberId: z.string(), + updatedAt: z.string(), +}).transform((v) => { + return remap$(v, { + "__v": "v", + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @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; - phone?: string | undefined; - subscriberId: string; - updatedAt: string; + __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; + phone?: string | undefined; + subscriberId: string; + updatedAt: string; }; /** @internal */ export const SubscriberResponseDto$outboundSchema: z.ZodType< - SubscriberResponseDto$Outbound, - 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(), - phone: z.string().optional(), - subscriberId: z.string(), - updatedAt: z.string(), - }) - .transform((v) => { - return remap$(v, { - v: "__v", - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); + SubscriberResponseDto$Outbound, + 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(), + phone: z.string().optional(), + subscriberId: z.string(), + updatedAt: z.string(), +}).transform((v) => { + return remap$(v, { + v: "__v", + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscriberResponseDto$ { - /** @deprecated use `SubscriberResponseDto$inboundSchema` instead. */ - export const inboundSchema = SubscriberResponseDto$inboundSchema; - /** @deprecated use `SubscriberResponseDto$outboundSchema` instead. */ - export const outboundSchema = SubscriberResponseDto$outboundSchema; - /** @deprecated use `SubscriberResponseDto$Outbound` instead. */ - export type Outbound = SubscriberResponseDto$Outbound; + /** @deprecated use `SubscriberResponseDto$inboundSchema` instead. */ + export const inboundSchema = SubscriberResponseDto$inboundSchema; + /** @deprecated use `SubscriberResponseDto$outboundSchema` instead. */ + export const outboundSchema = SubscriberResponseDto$outboundSchema; + /** @deprecated use `SubscriberResponseDto$Outbound` instead. */ + export type Outbound = SubscriberResponseDto$Outbound; } diff --git a/src/models/components/templateresponse.ts b/src/models/components/templateresponse.ts index dba76a14..042b992b 100644 --- a/src/models/components/templateresponse.ts +++ b/src/models/components/templateresponse.ts @@ -2,77 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.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; - /** - * Triggers are the events that will trigger the workflow. - */ - triggers: Array; + /** + * 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; + /** + * Triggers are the events that will trigger the workflow. + */ + triggers: Array; }; /** @internal */ -export const TemplateResponse$inboundSchema: z.ZodType = z - .object({ - _id: z.string(), - critical: z.boolean(), - name: z.string(), - triggers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _id: "id", - }); - }); +export const TemplateResponse$inboundSchema: z.ZodType< + TemplateResponse, + z.ZodTypeDef, + unknown +> = z.object({ + _id: z.string(), + critical: z.boolean(), + name: z.string(), + triggers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_id": "id", + }); +}); /** @internal */ export type TemplateResponse$Outbound = { - _id: string; - critical: boolean; - name: string; - triggers: Array; + _id: string; + critical: boolean; + name: string; + triggers: Array; }; /** @internal */ export const TemplateResponse$outboundSchema: z.ZodType< - TemplateResponse$Outbound, - z.ZodTypeDef, - TemplateResponse -> = z - .object({ - id: z.string(), - critical: z.boolean(), - name: z.string(), - triggers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - id: "_id", - }); - }); + TemplateResponse$Outbound, + z.ZodTypeDef, + TemplateResponse +> = z.object({ + id: z.string(), + critical: z.boolean(), + name: z.string(), + triggers: z.array(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 TemplateResponse$ { - /** @deprecated use `TemplateResponse$inboundSchema` instead. */ - export const inboundSchema = TemplateResponse$inboundSchema; - /** @deprecated use `TemplateResponse$outboundSchema` instead. */ - export const outboundSchema = TemplateResponse$outboundSchema; - /** @deprecated use `TemplateResponse$Outbound` instead. */ - export type Outbound = TemplateResponse$Outbound; + /** @deprecated use `TemplateResponse$inboundSchema` instead. */ + export const inboundSchema = TemplateResponse$inboundSchema; + /** @deprecated use `TemplateResponse$outboundSchema` instead. */ + export const outboundSchema = TemplateResponse$outboundSchema; + /** @deprecated use `TemplateResponse$Outbound` instead. */ + export type Outbound = TemplateResponse$Outbound; } diff --git a/src/models/components/tenantpayloaddto.ts b/src/models/components/tenantpayloaddto.ts index af4b9052..146daada 100644 --- a/src/models/components/tenantpayloaddto.ts +++ b/src/models/components/tenantpayloaddto.ts @@ -7,16 +7,16 @@ import * as z from "zod"; export type TenantPayloadDtoData = {}; export type TenantPayloadDto = { - data?: TenantPayloadDtoData | undefined; - identifier?: string | undefined; - name?: string | undefined; + data?: TenantPayloadDtoData | undefined; + identifier?: string | undefined; + name?: string | undefined; }; /** @internal */ export const TenantPayloadDtoData$inboundSchema: z.ZodType< - TenantPayloadDtoData, - z.ZodTypeDef, - unknown + TenantPayloadDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -24,9 +24,9 @@ export type TenantPayloadDtoData$Outbound = {}; /** @internal */ export const TenantPayloadDtoData$outboundSchema: z.ZodType< - TenantPayloadDtoData$Outbound, - z.ZodTypeDef, - TenantPayloadDtoData + TenantPayloadDtoData$Outbound, + z.ZodTypeDef, + TenantPayloadDtoData > = z.object({}); /** @@ -34,38 +34,41 @@ export const TenantPayloadDtoData$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TenantPayloadDtoData$ { - /** @deprecated use `TenantPayloadDtoData$inboundSchema` instead. */ - export const inboundSchema = TenantPayloadDtoData$inboundSchema; - /** @deprecated use `TenantPayloadDtoData$outboundSchema` instead. */ - export const outboundSchema = TenantPayloadDtoData$outboundSchema; - /** @deprecated use `TenantPayloadDtoData$Outbound` instead. */ - export type Outbound = TenantPayloadDtoData$Outbound; + /** @deprecated use `TenantPayloadDtoData$inboundSchema` instead. */ + export const inboundSchema = TenantPayloadDtoData$inboundSchema; + /** @deprecated use `TenantPayloadDtoData$outboundSchema` instead. */ + export const outboundSchema = TenantPayloadDtoData$outboundSchema; + /** @deprecated use `TenantPayloadDtoData$Outbound` instead. */ + export type Outbound = TenantPayloadDtoData$Outbound; } /** @internal */ -export const TenantPayloadDto$inboundSchema: z.ZodType = - z.object({ - data: z.lazy(() => TenantPayloadDtoData$inboundSchema).optional(), - identifier: z.string().optional(), - name: z.string().optional(), - }); +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(), +}); /** @internal */ export type TenantPayloadDto$Outbound = { - data?: TenantPayloadDtoData$Outbound | undefined; - identifier?: string | undefined; - name?: string | undefined; + data?: TenantPayloadDtoData$Outbound | undefined; + identifier?: string | undefined; + name?: string | undefined; }; /** @internal */ export const TenantPayloadDto$outboundSchema: z.ZodType< - TenantPayloadDto$Outbound, - z.ZodTypeDef, - TenantPayloadDto + TenantPayloadDto$Outbound, + 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(), + identifier: z.string().optional(), + name: z.string().optional(), }); /** @@ -73,10 +76,10 @@ export const TenantPayloadDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TenantPayloadDto$ { - /** @deprecated use `TenantPayloadDto$inboundSchema` instead. */ - export const inboundSchema = TenantPayloadDto$inboundSchema; - /** @deprecated use `TenantPayloadDto$outboundSchema` instead. */ - export const outboundSchema = TenantPayloadDto$outboundSchema; - /** @deprecated use `TenantPayloadDto$Outbound` instead. */ - export type Outbound = TenantPayloadDto$Outbound; + /** @deprecated use `TenantPayloadDto$inboundSchema` instead. */ + export const inboundSchema = TenantPayloadDto$inboundSchema; + /** @deprecated use `TenantPayloadDto$outboundSchema` instead. */ + export const outboundSchema = TenantPayloadDto$outboundSchema; + /** @deprecated use `TenantPayloadDto$Outbound` instead. */ + export type Outbound = TenantPayloadDto$Outbound; } diff --git a/src/models/components/timedconfig.ts b/src/models/components/timedconfig.ts index efd70d80..b9cb534d 100644 --- a/src/models/components/timedconfig.ts +++ b/src/models/components/timedconfig.ts @@ -2,163 +2,171 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const MonthlyType = { - Each: "each", - On: "on", + Each: "each", + On: "on", } as const; export type MonthlyType = ClosedEnum; export const Ordinal = { - One: "1", - Two: "2", - Three: "3", - Four: "4", - Five: "5", - Last: "last", + One: "1", + Two: "2", + Three: "3", + Four: "4", + Five: "5", + Last: "last", } as const; export type Ordinal = ClosedEnum; export const OrdinalValue = { - Day: "day", - Weekday: "weekday", - Weekend: "weekend", - Sunday: "sunday", - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", + Day: "day", + Weekday: "weekday", + Weekend: "weekend", + Sunday: "sunday", + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", } as const; export type OrdinalValue = ClosedEnum; export const WeekDays = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", } as const; export type WeekDays = ClosedEnum; export type TimedConfig = { - atTime?: string | undefined; - monthDays?: Array | undefined; - monthlyType?: MonthlyType | undefined; - ordinal?: Ordinal | undefined; - ordinalValue?: OrdinalValue | undefined; - weekDays?: Array | undefined; + atTime?: string | undefined; + monthDays?: Array | undefined; + monthlyType?: MonthlyType | undefined; + ordinal?: Ordinal | undefined; + ordinalValue?: OrdinalValue | undefined; + weekDays?: Array | undefined; }; /** @internal */ -export const MonthlyType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MonthlyType); +export const MonthlyType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(MonthlyType); /** @internal */ export const MonthlyType$outboundSchema: z.ZodNativeEnum = - MonthlyType$inboundSchema; + 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 MonthlyType$ { - /** @deprecated use `MonthlyType$inboundSchema` instead. */ - export const inboundSchema = MonthlyType$inboundSchema; - /** @deprecated use `MonthlyType$outboundSchema` instead. */ - export const outboundSchema = MonthlyType$outboundSchema; + /** @deprecated use `MonthlyType$inboundSchema` instead. */ + export const inboundSchema = MonthlyType$inboundSchema; + /** @deprecated use `MonthlyType$outboundSchema` instead. */ + export const outboundSchema = MonthlyType$outboundSchema; } /** @internal */ -export const Ordinal$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Ordinal); +export const Ordinal$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Ordinal); /** @internal */ -export const Ordinal$outboundSchema: z.ZodNativeEnum = Ordinal$inboundSchema; +export const Ordinal$outboundSchema: z.ZodNativeEnum = + Ordinal$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Ordinal$ { - /** @deprecated use `Ordinal$inboundSchema` instead. */ - export const inboundSchema = Ordinal$inboundSchema; - /** @deprecated use `Ordinal$outboundSchema` instead. */ - export const outboundSchema = Ordinal$outboundSchema; + /** @deprecated use `Ordinal$inboundSchema` instead. */ + export const inboundSchema = Ordinal$inboundSchema; + /** @deprecated use `Ordinal$outboundSchema` instead. */ + export const outboundSchema = Ordinal$outboundSchema; } /** @internal */ export const OrdinalValue$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(OrdinalValue); + z.nativeEnum(OrdinalValue); /** @internal */ export const OrdinalValue$outboundSchema: z.ZodNativeEnum = - OrdinalValue$inboundSchema; + OrdinalValue$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OrdinalValue$ { - /** @deprecated use `OrdinalValue$inboundSchema` instead. */ - export const inboundSchema = OrdinalValue$inboundSchema; - /** @deprecated use `OrdinalValue$outboundSchema` instead. */ - export const outboundSchema = OrdinalValue$outboundSchema; + /** @deprecated use `OrdinalValue$inboundSchema` instead. */ + export const inboundSchema = OrdinalValue$inboundSchema; + /** @deprecated use `OrdinalValue$outboundSchema` instead. */ + export const outboundSchema = OrdinalValue$outboundSchema; } /** @internal */ -export const WeekDays$inboundSchema: z.ZodNativeEnum = z.nativeEnum(WeekDays); +export const WeekDays$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(WeekDays); /** @internal */ -export const WeekDays$outboundSchema: z.ZodNativeEnum = WeekDays$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 WeekDays$ { - /** @deprecated use `WeekDays$inboundSchema` instead. */ - export const inboundSchema = WeekDays$inboundSchema; - /** @deprecated use `WeekDays$outboundSchema` instead. */ - export const outboundSchema = WeekDays$outboundSchema; + /** @deprecated use `WeekDays$inboundSchema` instead. */ + export const inboundSchema = WeekDays$inboundSchema; + /** @deprecated use `WeekDays$outboundSchema` instead. */ + export const outboundSchema = WeekDays$outboundSchema; } /** @internal */ -export const TimedConfig$inboundSchema: z.ZodType = z.object({ - atTime: z.string().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(), +export const TimedConfig$inboundSchema: z.ZodType< + TimedConfig, + z.ZodTypeDef, + unknown +> = z.object({ + atTime: z.string().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(), }); /** @internal */ export type TimedConfig$Outbound = { - atTime?: string | undefined; - monthDays?: Array | undefined; - monthlyType?: string | undefined; - ordinal?: string | undefined; - ordinalValue?: string | undefined; - weekDays?: Array | undefined; + atTime?: string | undefined; + monthDays?: Array | undefined; + monthlyType?: string | undefined; + ordinal?: string | undefined; + ordinalValue?: string | undefined; + weekDays?: Array | undefined; }; /** @internal */ export const TimedConfig$outboundSchema: z.ZodType< - TimedConfig$Outbound, - z.ZodTypeDef, - TimedConfig + TimedConfig$Outbound, + z.ZodTypeDef, + TimedConfig > = z.object({ - atTime: z.string().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(), + atTime: z.string().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(), }); /** @@ -166,10 +174,10 @@ export const TimedConfig$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TimedConfig$ { - /** @deprecated use `TimedConfig$inboundSchema` instead. */ - export const inboundSchema = TimedConfig$inboundSchema; - /** @deprecated use `TimedConfig$outboundSchema` instead. */ - export const outboundSchema = TimedConfig$outboundSchema; - /** @deprecated use `TimedConfig$Outbound` instead. */ - export type Outbound = TimedConfig$Outbound; + /** @deprecated use `TimedConfig$inboundSchema` instead. */ + export const inboundSchema = TimedConfig$inboundSchema; + /** @deprecated use `TimedConfig$outboundSchema` instead. */ + export const outboundSchema = TimedConfig$outboundSchema; + /** @deprecated use `TimedConfig$Outbound` instead. */ + export type Outbound = TimedConfig$Outbound; } diff --git a/src/models/components/topicdto.ts b/src/models/components/topicdto.ts index 01f85036..0ba8c552 100644 --- a/src/models/components/topicdto.ts +++ b/src/models/components/topicdto.ts @@ -2,73 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type TopicDto = { - environmentId: string; - id?: string | undefined; - organizationId: string; - key: string; - name: string; - subscribers: Array; + environmentId: string; + id?: string | undefined; + organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ -export const TopicDto$inboundSchema: z.ZodType = z - .object({ - _environmentId: z.string(), - _id: z.string().optional(), - _organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _id: "id", - _organizationId: "organizationId", - }); - }); +export const TopicDto$inboundSchema: z.ZodType< + TopicDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _id: z.string().optional(), + _organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_id": "id", + "_organizationId": "organizationId", + }); +}); /** @internal */ export type TopicDto$Outbound = { - _environmentId: string; - _id?: string | undefined; - _organizationId: string; - key: string; - name: string; - subscribers: Array; + _environmentId: string; + _id?: string | undefined; + _organizationId: string; + key: string; + name: string; + subscribers: Array; }; /** @internal */ -export const TopicDto$outboundSchema: z.ZodType = z - .object({ - environmentId: z.string(), - id: z.string().optional(), - organizationId: z.string(), - key: z.string(), - name: z.string(), - subscribers: z.array(z.string()), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - id: "_id", - organizationId: "_organizationId", - }); - }); +export const TopicDto$outboundSchema: z.ZodType< + TopicDto$Outbound, + z.ZodTypeDef, + TopicDto +> = z.object({ + environmentId: z.string(), + id: z.string().optional(), + organizationId: z.string(), + key: z.string(), + name: z.string(), + subscribers: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + id: "_id", + organizationId: "_organizationId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicDto$ { - /** @deprecated use `TopicDto$inboundSchema` instead. */ - export const inboundSchema = TopicDto$inboundSchema; - /** @deprecated use `TopicDto$outboundSchema` instead. */ - export const outboundSchema = TopicDto$outboundSchema; - /** @deprecated use `TopicDto$Outbound` instead. */ - export type Outbound = TopicDto$Outbound; + /** @deprecated use `TopicDto$inboundSchema` instead. */ + export const inboundSchema = TopicDto$inboundSchema; + /** @deprecated use `TopicDto$outboundSchema` instead. */ + export const outboundSchema = TopicDto$outboundSchema; + /** @deprecated use `TopicDto$Outbound` instead. */ + export type Outbound = TopicDto$Outbound; } diff --git a/src/models/components/topicpayloaddto.ts b/src/models/components/topicpayloaddto.ts index 0a00e899..b1bc59c8 100644 --- a/src/models/components/topicpayloaddto.ts +++ b/src/models/components/topicpayloaddto.ts @@ -2,60 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TopicPayloadDtoType = { - Subscriber: "Subscriber", - Topic: "Topic", + Subscriber: "Subscriber", + Topic: "Topic", } as const; export type TopicPayloadDtoType = ClosedEnum; export type TopicPayloadDto = { - topicKey: string; - type: TopicPayloadDtoType; + topicKey: string; + type: TopicPayloadDtoType; }; /** @internal */ -export const TopicPayloadDtoType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(TopicPayloadDtoType); +export const TopicPayloadDtoType$inboundSchema: z.ZodNativeEnum< + typeof TopicPayloadDtoType +> = z.nativeEnum(TopicPayloadDtoType); /** @internal */ -export const TopicPayloadDtoType$outboundSchema: z.ZodNativeEnum = - TopicPayloadDtoType$inboundSchema; +export const TopicPayloadDtoType$outboundSchema: z.ZodNativeEnum< + typeof TopicPayloadDtoType +> = TopicPayloadDtoType$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; + /** @deprecated use `TopicPayloadDtoType$inboundSchema` instead. */ + export const inboundSchema = TopicPayloadDtoType$inboundSchema; + /** @deprecated use `TopicPayloadDtoType$outboundSchema` instead. */ + export const outboundSchema = TopicPayloadDtoType$outboundSchema; } /** @internal */ -export const TopicPayloadDto$inboundSchema: z.ZodType = - z.object({ - topicKey: z.string(), - type: TopicPayloadDtoType$inboundSchema, - }); +export const TopicPayloadDto$inboundSchema: z.ZodType< + TopicPayloadDto, + z.ZodTypeDef, + unknown +> = z.object({ + topicKey: z.string(), + type: TopicPayloadDtoType$inboundSchema, +}); /** @internal */ export type TopicPayloadDto$Outbound = { - topicKey: string; - type: string; + topicKey: string; + type: string; }; /** @internal */ export const TopicPayloadDto$outboundSchema: z.ZodType< - TopicPayloadDto$Outbound, - z.ZodTypeDef, - TopicPayloadDto + TopicPayloadDto$Outbound, + z.ZodTypeDef, + TopicPayloadDto > = z.object({ - topicKey: z.string(), - type: TopicPayloadDtoType$outboundSchema, + topicKey: z.string(), + type: TopicPayloadDtoType$outboundSchema, }); /** @@ -63,10 +68,10 @@ export const TopicPayloadDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicPayloadDto$ { - /** @deprecated use `TopicPayloadDto$inboundSchema` instead. */ - export const inboundSchema = TopicPayloadDto$inboundSchema; - /** @deprecated use `TopicPayloadDto$outboundSchema` instead. */ - export const outboundSchema = TopicPayloadDto$outboundSchema; - /** @deprecated use `TopicPayloadDto$Outbound` instead. */ - export type Outbound = TopicPayloadDto$Outbound; + /** @deprecated use `TopicPayloadDto$inboundSchema` instead. */ + export const inboundSchema = TopicPayloadDto$inboundSchema; + /** @deprecated use `TopicPayloadDto$outboundSchema` instead. */ + export const outboundSchema = TopicPayloadDto$outboundSchema; + /** @deprecated use `TopicPayloadDto$Outbound` instead. */ + export type Outbound = TopicPayloadDto$Outbound; } diff --git a/src/models/components/topicsubscriberdto.ts b/src/models/components/topicsubscriberdto.ts index 25629e24..72a16f4a 100644 --- a/src/models/components/topicsubscriberdto.ts +++ b/src/models/components/topicsubscriberdto.ts @@ -2,83 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; export type TopicSubscriberDto = { - environmentId: string; - organizationId: string; - subscriberId: string; - topicId: string; - externalSubscriberId: string; - topicKey: string; + environmentId: string; + organizationId: string; + subscriberId: string; + topicId: string; + externalSubscriberId: string; + topicKey: string; }; /** @internal */ export const TopicSubscriberDto$inboundSchema: z.ZodType< - TopicSubscriberDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _environmentId: z.string(), - _organizationId: z.string(), - _subscriberId: z.string(), - _topicId: z.string(), - externalSubscriberId: z.string(), - topicKey: z.string(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - _organizationId: "organizationId", - _subscriberId: "subscriberId", - _topicId: "topicId", - }); - }); + TopicSubscriberDto, + z.ZodTypeDef, + unknown +> = z.object({ + _environmentId: z.string(), + _organizationId: z.string(), + _subscriberId: z.string(), + _topicId: z.string(), + externalSubscriberId: z.string(), + topicKey: z.string(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + "_organizationId": "organizationId", + "_subscriberId": "subscriberId", + "_topicId": "topicId", + }); +}); /** @internal */ export type TopicSubscriberDto$Outbound = { - _environmentId: string; - _organizationId: string; - _subscriberId: string; - _topicId: string; - externalSubscriberId: string; - topicKey: string; + _environmentId: string; + _organizationId: string; + _subscriberId: string; + _topicId: string; + externalSubscriberId: string; + topicKey: string; }; /** @internal */ export const TopicSubscriberDto$outboundSchema: z.ZodType< - TopicSubscriberDto$Outbound, - z.ZodTypeDef, - TopicSubscriberDto -> = z - .object({ - environmentId: z.string(), - organizationId: z.string(), - subscriberId: z.string(), - topicId: z.string(), - externalSubscriberId: z.string(), - topicKey: z.string(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - organizationId: "_organizationId", - subscriberId: "_subscriberId", - topicId: "_topicId", - }); - }); + TopicSubscriberDto$Outbound, + z.ZodTypeDef, + TopicSubscriberDto +> = z.object({ + environmentId: z.string(), + organizationId: z.string(), + subscriberId: z.string(), + topicId: z.string(), + externalSubscriberId: z.string(), + topicKey: z.string(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + organizationId: "_organizationId", + subscriberId: "_subscriberId", + topicId: "_topicId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicSubscriberDto$ { - /** @deprecated use `TopicSubscriberDto$inboundSchema` instead. */ - export const inboundSchema = TopicSubscriberDto$inboundSchema; - /** @deprecated use `TopicSubscriberDto$outboundSchema` instead. */ - export const outboundSchema = TopicSubscriberDto$outboundSchema; - /** @deprecated use `TopicSubscriberDto$Outbound` instead. */ - export type Outbound = TopicSubscriberDto$Outbound; + /** @deprecated use `TopicSubscriberDto$inboundSchema` instead. */ + export const inboundSchema = TopicSubscriberDto$inboundSchema; + /** @deprecated use `TopicSubscriberDto$outboundSchema` instead. */ + export const outboundSchema = TopicSubscriberDto$outboundSchema; + /** @deprecated use `TopicSubscriberDto$Outbound` instead. */ + export type Outbound = TopicSubscriberDto$Outbound; } diff --git a/src/models/components/triggereventrequestdto.ts b/src/models/components/triggereventrequestdto.ts index 37e53078..608ff75e 100644 --- a/src/models/components/triggereventrequestdto.ts +++ b/src/models/components/triggereventrequestdto.ts @@ -2,32 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - SubscriberPayloadDto, - SubscriberPayloadDto$inboundSchema, - SubscriberPayloadDto$Outbound, - SubscriberPayloadDto$outboundSchema, + SubscriberPayloadDto, + SubscriberPayloadDto$inboundSchema, + SubscriberPayloadDto$Outbound, + SubscriberPayloadDto$outboundSchema, } from "./subscriberpayloaddto.js"; import { - TenantPayloadDto, - TenantPayloadDto$inboundSchema, - TenantPayloadDto$Outbound, - TenantPayloadDto$outboundSchema, + TenantPayloadDto, + TenantPayloadDto$inboundSchema, + TenantPayloadDto$Outbound, + TenantPayloadDto$outboundSchema, } from "./tenantpayloaddto.js"; import { - TopicPayloadDto, - TopicPayloadDto$inboundSchema, - TopicPayloadDto$Outbound, - TopicPayloadDto$outboundSchema, + TopicPayloadDto, + TopicPayloadDto$inboundSchema, + TopicPayloadDto$Outbound, + TopicPayloadDto$outboundSchema, } from "./topicpayloaddto.js"; -import * as z from "zod"; /** * 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 - * */ export type Actor = SubscriberPayloadDto | string; @@ -51,112 +50,115 @@ export type TriggerEventRequestDtoPayload = {}; * * @remarks * Existing tenants will be updated with the provided details. - * */ export type Tenant = TenantPayloadDto | string; export type To = TopicPayloadDto | SubscriberPayloadDto | string; 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; - /** - * 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; - /** - * The recipients list of people who will receive the notification. - */ - to: Array; - /** - * 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; + 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; + /** + * 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; + /** + * The recipients list of people who will receive the notification. + */ + to: Array; + /** + * A unique identifier for this transaction, we will generated a UUID if not provided. + */ + transactionId?: string | undefined; }; /** @internal */ -export const Actor$inboundSchema: z.ZodType = z.union([ - SubscriberPayloadDto$inboundSchema, - z.string(), -]); +export const Actor$inboundSchema: z.ZodType = z + .union([SubscriberPayloadDto$inboundSchema, z.string()]); /** @internal */ export type Actor$Outbound = SubscriberPayloadDto$Outbound | string; /** @internal */ -export const Actor$outboundSchema: z.ZodType = z.union([ - SubscriberPayloadDto$outboundSchema, - z.string(), -]); +export const Actor$outboundSchema: z.ZodType< + Actor$Outbound, + z.ZodTypeDef, + 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 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; + /** @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; } /** @internal */ -export const Controls$inboundSchema: z.ZodType = z.object({}); +export const Controls$inboundSchema: z.ZodType< + Controls, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type Controls$Outbound = {}; /** @internal */ -export const Controls$outboundSchema: z.ZodType = - z.object({}); +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 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; + /** @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; } /** @internal */ export const TriggerEventRequestDtoOverrides$inboundSchema: z.ZodType< - TriggerEventRequestDtoOverrides, - z.ZodTypeDef, - unknown + TriggerEventRequestDtoOverrides, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -164,9 +166,9 @@ export type TriggerEventRequestDtoOverrides$Outbound = {}; /** @internal */ export const TriggerEventRequestDtoOverrides$outboundSchema: z.ZodType< - TriggerEventRequestDtoOverrides$Outbound, - z.ZodTypeDef, - TriggerEventRequestDtoOverrides + TriggerEventRequestDtoOverrides$Outbound, + z.ZodTypeDef, + TriggerEventRequestDtoOverrides > = z.object({}); /** @@ -174,19 +176,19 @@ export const TriggerEventRequestDtoOverrides$outboundSchema: z.ZodType< * @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; + /** @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; } /** @internal */ export const TriggerEventRequestDtoPayload$inboundSchema: z.ZodType< - TriggerEventRequestDtoPayload, - z.ZodTypeDef, - unknown + TriggerEventRequestDtoPayload, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -194,9 +196,9 @@ export type TriggerEventRequestDtoPayload$Outbound = {}; /** @internal */ export const TriggerEventRequestDtoPayload$outboundSchema: z.ZodType< - TriggerEventRequestDtoPayload$Outbound, - z.ZodTypeDef, - TriggerEventRequestDtoPayload + TriggerEventRequestDtoPayload$Outbound, + z.ZodTypeDef, + TriggerEventRequestDtoPayload > = z.object({}); /** @@ -204,121 +206,135 @@ export const TriggerEventRequestDtoPayload$outboundSchema: z.ZodType< * @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; + /** @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; } /** @internal */ -export const Tenant$inboundSchema: z.ZodType = z.union([ - TenantPayloadDto$inboundSchema, - z.string(), -]); +export const Tenant$inboundSchema: z.ZodType = z + .union([TenantPayloadDto$inboundSchema, z.string()]); /** @internal */ export type Tenant$Outbound = TenantPayloadDto$Outbound | string; /** @internal */ -export const Tenant$outboundSchema: z.ZodType = z.union([ - TenantPayloadDto$outboundSchema, - z.string(), -]); +export const Tenant$outboundSchema: z.ZodType< + Tenant$Outbound, + z.ZodTypeDef, + Tenant +> = z.union([TenantPayloadDto$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 Tenant$ { - /** @deprecated use `Tenant$inboundSchema` instead. */ - export const inboundSchema = Tenant$inboundSchema; - /** @deprecated use `Tenant$outboundSchema` instead. */ - export const outboundSchema = Tenant$outboundSchema; - /** @deprecated use `Tenant$Outbound` instead. */ - export type Outbound = Tenant$Outbound; + /** @deprecated use `Tenant$inboundSchema` instead. */ + export const inboundSchema = Tenant$inboundSchema; + /** @deprecated use `Tenant$outboundSchema` instead. */ + export const outboundSchema = Tenant$outboundSchema; + /** @deprecated use `Tenant$Outbound` instead. */ + export type Outbound = Tenant$Outbound; } /** @internal */ export const To$inboundSchema: z.ZodType = z.union([ - TopicPayloadDto$inboundSchema, - SubscriberPayloadDto$inboundSchema, - z.string(), + TopicPayloadDto$inboundSchema, + SubscriberPayloadDto$inboundSchema, + z.string(), ]); /** @internal */ -export type To$Outbound = TopicPayloadDto$Outbound | SubscriberPayloadDto$Outbound | string; +export type To$Outbound = + | TopicPayloadDto$Outbound + | SubscriberPayloadDto$Outbound + | string; /** @internal */ -export const To$outboundSchema: z.ZodType = z.union([ +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 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; + /** @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; } /** @internal */ export const TriggerEventRequestDto$inboundSchema: z.ZodType< - TriggerEventRequestDto, - z.ZodTypeDef, - unknown + TriggerEventRequestDto, + 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(), - to: z.array( - z.union([TopicPayloadDto$inboundSchema, SubscriberPayloadDto$inboundSchema, z.string()]) - ), - transactionId: z.string().optional(), + 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(), + to: z.array( + z.union([ + TopicPayloadDto$inboundSchema, + SubscriberPayloadDto$inboundSchema, + z.string(), + ]), + ), + transactionId: z.string().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; - to: Array; - transactionId?: string | undefined; + 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; + to: Array; + transactionId?: string | undefined; }; /** @internal */ export const TriggerEventRequestDto$outboundSchema: z.ZodType< - TriggerEventRequestDto$Outbound, - z.ZodTypeDef, - TriggerEventRequestDto + TriggerEventRequestDto$Outbound, + 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(), - to: z.array( - z.union([TopicPayloadDto$outboundSchema, SubscriberPayloadDto$outboundSchema, z.string()]) - ), - transactionId: z.string().optional(), + 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(), + to: z.array( + z.union([ + TopicPayloadDto$outboundSchema, + SubscriberPayloadDto$outboundSchema, + z.string(), + ]), + ), + transactionId: z.string().optional(), }); /** @@ -326,10 +342,10 @@ export const TriggerEventRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventRequestDto$ { - /** @deprecated use `TriggerEventRequestDto$inboundSchema` instead. */ - export const inboundSchema = TriggerEventRequestDto$inboundSchema; - /** @deprecated use `TriggerEventRequestDto$outboundSchema` instead. */ - export const outboundSchema = TriggerEventRequestDto$outboundSchema; - /** @deprecated use `TriggerEventRequestDto$Outbound` instead. */ - export type Outbound = TriggerEventRequestDto$Outbound; + /** @deprecated use `TriggerEventRequestDto$inboundSchema` instead. */ + export const inboundSchema = TriggerEventRequestDto$inboundSchema; + /** @deprecated use `TriggerEventRequestDto$outboundSchema` instead. */ + export const outboundSchema = TriggerEventRequestDto$outboundSchema; + /** @deprecated use `TriggerEventRequestDto$Outbound` instead. */ + export type Outbound = TriggerEventRequestDto$Outbound; } diff --git a/src/models/components/triggereventresponsedto.ts b/src/models/components/triggereventresponsedto.ts index b005a7e0..5192c411 100644 --- a/src/models/components/triggereventresponsedto.ts +++ b/src/models/components/triggereventresponsedto.ts @@ -2,53 +2,55 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Status for trigger */ export const TriggerEventResponseDtoStatus = { - Error: "error", - TriggerNotActive: "trigger_not_active", - NoWorkflowActiveStepsDefined: "no_workflow_active_steps_defined", - NoWorkflowStepsDefined: "no_workflow_steps_defined", - Processed: "processed", - SubscriberIdMissing: "subscriber_id_missing", - NoTenantFound: "no_tenant_found", + Error: "error", + TriggerNotActive: "trigger_not_active", + NoWorkflowActiveStepsDefined: "no_workflow_active_steps_defined", + NoWorkflowStepsDefined: "no_workflow_steps_defined", + Processed: "processed", + SubscriberIdMissing: "subscriber_id_missing", + NoTenantFound: "no_tenant_found", } as const; /** * Status for trigger */ -export type TriggerEventResponseDtoStatus = ClosedEnum; +export type TriggerEventResponseDtoStatus = ClosedEnum< + typeof TriggerEventResponseDtoStatus +>; 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; - /** - * Transaction id for trigger - */ - transactionId?: string | undefined; + /** + * 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; + /** + * Transaction id for trigger + */ + transactionId?: string | undefined; }; /** @internal */ export const TriggerEventResponseDtoStatus$inboundSchema: z.ZodNativeEnum< - typeof TriggerEventResponseDtoStatus + typeof TriggerEventResponseDtoStatus > = z.nativeEnum(TriggerEventResponseDtoStatus); /** @internal */ export const TriggerEventResponseDtoStatus$outboundSchema: z.ZodNativeEnum< - typeof TriggerEventResponseDtoStatus + typeof TriggerEventResponseDtoStatus > = TriggerEventResponseDtoStatus$inboundSchema; /** @@ -56,42 +58,42 @@ export const TriggerEventResponseDtoStatus$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventResponseDtoStatus$ { - /** @deprecated use `TriggerEventResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = TriggerEventResponseDtoStatus$inboundSchema; - /** @deprecated use `TriggerEventResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = TriggerEventResponseDtoStatus$outboundSchema; + /** @deprecated use `TriggerEventResponseDtoStatus$inboundSchema` instead. */ + export const inboundSchema = TriggerEventResponseDtoStatus$inboundSchema; + /** @deprecated use `TriggerEventResponseDtoStatus$outboundSchema` instead. */ + export const outboundSchema = TriggerEventResponseDtoStatus$outboundSchema; } /** @internal */ export const TriggerEventResponseDto$inboundSchema: z.ZodType< - TriggerEventResponseDto, - z.ZodTypeDef, - unknown + TriggerEventResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - acknowledged: z.boolean(), - error: z.array(z.string()).optional(), - status: TriggerEventResponseDtoStatus$inboundSchema, - transactionId: z.string().optional(), + acknowledged: z.boolean(), + error: z.array(z.string()).optional(), + status: TriggerEventResponseDtoStatus$inboundSchema, + transactionId: z.string().optional(), }); /** @internal */ export type TriggerEventResponseDto$Outbound = { - acknowledged: boolean; - error?: Array | undefined; - status: string; - transactionId?: string | undefined; + acknowledged: boolean; + error?: Array | undefined; + status: string; + transactionId?: string | undefined; }; /** @internal */ export const TriggerEventResponseDto$outboundSchema: z.ZodType< - TriggerEventResponseDto$Outbound, - z.ZodTypeDef, - TriggerEventResponseDto + TriggerEventResponseDto$Outbound, + z.ZodTypeDef, + TriggerEventResponseDto > = z.object({ - acknowledged: z.boolean(), - error: z.array(z.string()).optional(), - status: TriggerEventResponseDtoStatus$outboundSchema, - transactionId: z.string().optional(), + acknowledged: z.boolean(), + error: z.array(z.string()).optional(), + status: TriggerEventResponseDtoStatus$outboundSchema, + transactionId: z.string().optional(), }); /** @@ -99,10 +101,10 @@ export const TriggerEventResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventResponseDto$ { - /** @deprecated use `TriggerEventResponseDto$inboundSchema` instead. */ - export const inboundSchema = TriggerEventResponseDto$inboundSchema; - /** @deprecated use `TriggerEventResponseDto$outboundSchema` instead. */ - export const outboundSchema = TriggerEventResponseDto$outboundSchema; - /** @deprecated use `TriggerEventResponseDto$Outbound` instead. */ - export type Outbound = TriggerEventResponseDto$Outbound; + /** @deprecated use `TriggerEventResponseDto$inboundSchema` instead. */ + export const inboundSchema = TriggerEventResponseDto$inboundSchema; + /** @deprecated use `TriggerEventResponseDto$outboundSchema` instead. */ + export const outboundSchema = TriggerEventResponseDto$outboundSchema; + /** @deprecated use `TriggerEventResponseDto$Outbound` instead. */ + export type Outbound = TriggerEventResponseDto$Outbound; } diff --git a/src/models/components/triggereventtoallrequestdto.ts b/src/models/components/triggereventtoallrequestdto.ts index 0791b9f0..37525eed 100644 --- a/src/models/components/triggereventtoallrequestdto.ts +++ b/src/models/components/triggereventtoallrequestdto.ts @@ -2,26 +2,25 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - SubscriberPayloadDto, - SubscriberPayloadDto$inboundSchema, - SubscriberPayloadDto$Outbound, - SubscriberPayloadDto$outboundSchema, + SubscriberPayloadDto, + SubscriberPayloadDto$inboundSchema, + SubscriberPayloadDto$Outbound, + SubscriberPayloadDto$outboundSchema, } from "./subscriberpayloaddto.js"; import { - TenantPayloadDto, - TenantPayloadDto$inboundSchema, - TenantPayloadDto$Outbound, - TenantPayloadDto$outboundSchema, + TenantPayloadDto, + TenantPayloadDto$inboundSchema, + TenantPayloadDto$Outbound, + TenantPayloadDto$outboundSchema, } from "./tenantpayloaddto.js"; -import * as z from "zod"; /** * 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 - * */ export type TriggerEventToAllRequestDtoActor = SubscriberPayloadDto | string; @@ -43,63 +42,62 @@ export type TriggerEventToAllRequestDtoPayload = {}; * * @remarks * If a new tenant object is provided, we will create a new tenant. - * */ 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; - /** - * 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. - * - * @remarks - * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. - */ - payload: TriggerEventToAllRequestDtoPayload; - /** - * It is used to specify a tenant context during trigger event. - * - * @remarks - * 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; + /** + * 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; + /** + * 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. + * + * @remarks + * This data will also be available when fetching the notifications feed from the API to display certain parts of the UI. + */ + payload: TriggerEventToAllRequestDtoPayload; + /** + * It is used to specify a tenant context during trigger event. + * + * @remarks + * 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, - z.ZodTypeDef, - unknown + TriggerEventToAllRequestDtoActor, + z.ZodTypeDef, + unknown > = z.union([SubscriberPayloadDto$inboundSchema, z.string()]); /** @internal */ -export type TriggerEventToAllRequestDtoActor$Outbound = SubscriberPayloadDto$Outbound | string; +export type TriggerEventToAllRequestDtoActor$Outbound = + | SubscriberPayloadDto$Outbound + | string; /** @internal */ export const TriggerEventToAllRequestDtoActor$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoActor$Outbound, - z.ZodTypeDef, - TriggerEventToAllRequestDtoActor + TriggerEventToAllRequestDtoActor$Outbound, + z.ZodTypeDef, + TriggerEventToAllRequestDtoActor > = z.union([SubscriberPayloadDto$outboundSchema, z.string()]); /** @@ -107,19 +105,19 @@ export const TriggerEventToAllRequestDtoActor$outboundSchema: z.ZodType< * @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; + /** @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; } /** @internal */ export const TriggerEventToAllRequestDtoOverrides$inboundSchema: z.ZodType< - TriggerEventToAllRequestDtoOverrides, - z.ZodTypeDef, - unknown + TriggerEventToAllRequestDtoOverrides, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -127,9 +125,9 @@ export type TriggerEventToAllRequestDtoOverrides$Outbound = {}; /** @internal */ export const TriggerEventToAllRequestDtoOverrides$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoOverrides$Outbound, - z.ZodTypeDef, - TriggerEventToAllRequestDtoOverrides + TriggerEventToAllRequestDtoOverrides$Outbound, + z.ZodTypeDef, + TriggerEventToAllRequestDtoOverrides > = z.object({}); /** @@ -137,19 +135,21 @@ export const TriggerEventToAllRequestDtoOverrides$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventToAllRequestDtoOverrides$ { - /** @deprecated use `TriggerEventToAllRequestDtoOverrides$inboundSchema` instead. */ - export const inboundSchema = TriggerEventToAllRequestDtoOverrides$inboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoOverrides$outboundSchema` instead. */ - export const outboundSchema = TriggerEventToAllRequestDtoOverrides$outboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoOverrides$Outbound` instead. */ - export type Outbound = TriggerEventToAllRequestDtoOverrides$Outbound; + /** @deprecated use `TriggerEventToAllRequestDtoOverrides$inboundSchema` instead. */ + export const inboundSchema = + TriggerEventToAllRequestDtoOverrides$inboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoOverrides$outboundSchema` instead. */ + export const outboundSchema = + TriggerEventToAllRequestDtoOverrides$outboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoOverrides$Outbound` instead. */ + export type Outbound = TriggerEventToAllRequestDtoOverrides$Outbound; } /** @internal */ export const TriggerEventToAllRequestDtoPayload$inboundSchema: z.ZodType< - TriggerEventToAllRequestDtoPayload, - z.ZodTypeDef, - unknown + TriggerEventToAllRequestDtoPayload, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -157,9 +157,9 @@ export type TriggerEventToAllRequestDtoPayload$Outbound = {}; /** @internal */ export const TriggerEventToAllRequestDtoPayload$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoPayload$Outbound, - z.ZodTypeDef, - TriggerEventToAllRequestDtoPayload + TriggerEventToAllRequestDtoPayload$Outbound, + z.ZodTypeDef, + TriggerEventToAllRequestDtoPayload > = z.object({}); /** @@ -167,29 +167,32 @@ export const TriggerEventToAllRequestDtoPayload$outboundSchema: z.ZodType< * @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; + /** @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; } /** @internal */ export const TriggerEventToAllRequestDtoTenant$inboundSchema: z.ZodType< - TriggerEventToAllRequestDtoTenant, - z.ZodTypeDef, - unknown + TriggerEventToAllRequestDtoTenant, + z.ZodTypeDef, + unknown > = z.union([TenantPayloadDto$inboundSchema, z.string()]); /** @internal */ -export type TriggerEventToAllRequestDtoTenant$Outbound = TenantPayloadDto$Outbound | string; +export type TriggerEventToAllRequestDtoTenant$Outbound = + | TenantPayloadDto$Outbound + | string; /** @internal */ export const TriggerEventToAllRequestDtoTenant$outboundSchema: z.ZodType< - TriggerEventToAllRequestDtoTenant$Outbound, - z.ZodTypeDef, - TriggerEventToAllRequestDtoTenant + TriggerEventToAllRequestDtoTenant$Outbound, + z.ZodTypeDef, + TriggerEventToAllRequestDtoTenant > = z.union([TenantPayloadDto$outboundSchema, z.string()]); /** @@ -197,50 +200,53 @@ export const TriggerEventToAllRequestDtoTenant$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventToAllRequestDtoTenant$ { - /** @deprecated use `TriggerEventToAllRequestDtoTenant$inboundSchema` instead. */ - export const inboundSchema = TriggerEventToAllRequestDtoTenant$inboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoTenant$outboundSchema` instead. */ - export const outboundSchema = TriggerEventToAllRequestDtoTenant$outboundSchema; - /** @deprecated use `TriggerEventToAllRequestDtoTenant$Outbound` instead. */ - export type Outbound = TriggerEventToAllRequestDtoTenant$Outbound; + /** @deprecated use `TriggerEventToAllRequestDtoTenant$inboundSchema` instead. */ + export const inboundSchema = TriggerEventToAllRequestDtoTenant$inboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoTenant$outboundSchema` instead. */ + export const outboundSchema = + TriggerEventToAllRequestDtoTenant$outboundSchema; + /** @deprecated use `TriggerEventToAllRequestDtoTenant$Outbound` instead. */ + export type Outbound = TriggerEventToAllRequestDtoTenant$Outbound; } /** @internal */ export const TriggerEventToAllRequestDto$inboundSchema: z.ZodType< - TriggerEventToAllRequestDto, - z.ZodTypeDef, - unknown + TriggerEventToAllRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - actor: z.union([SubscriberPayloadDto$inboundSchema, z.string()]).optional(), - name: z.string(), - 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(), + name: z.string(), + overrides: z.lazy(() => TriggerEventToAllRequestDtoOverrides$inboundSchema) + .optional(), + payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$inboundSchema), + tenant: z.union([TenantPayloadDto$inboundSchema, z.string()]).optional(), + transactionId: 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; - transactionId?: string | undefined; + actor?: SubscriberPayloadDto$Outbound | string | undefined; + name: string; + overrides?: TriggerEventToAllRequestDtoOverrides$Outbound | undefined; + payload: TriggerEventToAllRequestDtoPayload$Outbound; + tenant?: TenantPayloadDto$Outbound | string | undefined; + transactionId?: string | undefined; }; /** @internal */ export const TriggerEventToAllRequestDto$outboundSchema: z.ZodType< - TriggerEventToAllRequestDto$Outbound, - z.ZodTypeDef, - TriggerEventToAllRequestDto + TriggerEventToAllRequestDto$Outbound, + z.ZodTypeDef, + TriggerEventToAllRequestDto > = z.object({ - actor: z.union([SubscriberPayloadDto$outboundSchema, z.string()]).optional(), - name: z.string(), - 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(), + name: z.string(), + overrides: z.lazy(() => TriggerEventToAllRequestDtoOverrides$outboundSchema) + .optional(), + payload: z.lazy(() => TriggerEventToAllRequestDtoPayload$outboundSchema), + tenant: z.union([TenantPayloadDto$outboundSchema, z.string()]).optional(), + transactionId: z.string().optional(), }); /** @@ -248,10 +254,10 @@ export const TriggerEventToAllRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TriggerEventToAllRequestDto$ { - /** @deprecated use `TriggerEventToAllRequestDto$inboundSchema` instead. */ - export const inboundSchema = TriggerEventToAllRequestDto$inboundSchema; - /** @deprecated use `TriggerEventToAllRequestDto$outboundSchema` instead. */ - export const outboundSchema = TriggerEventToAllRequestDto$outboundSchema; - /** @deprecated use `TriggerEventToAllRequestDto$Outbound` instead. */ - export type Outbound = TriggerEventToAllRequestDto$Outbound; + /** @deprecated use `TriggerEventToAllRequestDto$inboundSchema` instead. */ + export const inboundSchema = TriggerEventToAllRequestDto$inboundSchema; + /** @deprecated use `TriggerEventToAllRequestDto$outboundSchema` instead. */ + export const outboundSchema = TriggerEventToAllRequestDto$outboundSchema; + /** @deprecated use `TriggerEventToAllRequestDto$Outbound` instead. */ + export type Outbound = TriggerEventToAllRequestDto$Outbound; } diff --git a/src/models/components/unseencountresponse.ts b/src/models/components/unseencountresponse.ts index e0510748..23ee2b60 100644 --- a/src/models/components/unseencountresponse.ts +++ b/src/models/components/unseencountresponse.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type UnseenCountResponse = { - count: number; + count: number; }; /** @internal */ export const UnseenCountResponse$inboundSchema: z.ZodType< - UnseenCountResponse, - z.ZodTypeDef, - unknown + UnseenCountResponse, + z.ZodTypeDef, + unknown > = z.object({ - count: z.number(), + count: z.number(), }); /** @internal */ export type UnseenCountResponse$Outbound = { - count: number; + count: number; }; /** @internal */ export const UnseenCountResponse$outboundSchema: z.ZodType< - UnseenCountResponse$Outbound, - z.ZodTypeDef, - UnseenCountResponse + UnseenCountResponse$Outbound, + z.ZodTypeDef, + UnseenCountResponse > = z.object({ - count: z.number(), + count: z.number(), }); /** @@ -36,10 +36,10 @@ export const UnseenCountResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UnseenCountResponse$ { - /** @deprecated use `UnseenCountResponse$inboundSchema` instead. */ - export const inboundSchema = UnseenCountResponse$inboundSchema; - /** @deprecated use `UnseenCountResponse$outboundSchema` instead. */ - export const outboundSchema = UnseenCountResponse$outboundSchema; - /** @deprecated use `UnseenCountResponse$Outbound` instead. */ - export type Outbound = UnseenCountResponse$Outbound; + /** @deprecated use `UnseenCountResponse$inboundSchema` instead. */ + export const inboundSchema = UnseenCountResponse$inboundSchema; + /** @deprecated use `UnseenCountResponse$outboundSchema` instead. */ + export const outboundSchema = UnseenCountResponse$outboundSchema; + /** @deprecated use `UnseenCountResponse$Outbound` instead. */ + export type Outbound = UnseenCountResponse$Outbound; } diff --git a/src/models/components/updatebrandingdetailsdto.ts b/src/models/components/updatebrandingdetailsdto.ts index fe8dffae..c86e70b7 100644 --- a/src/models/components/updatebrandingdetailsdto.ts +++ b/src/models/components/updatebrandingdetailsdto.ts @@ -5,46 +5,46 @@ import * as z from "zod"; export type UpdateBrandingDetailsDto = { - color: string; - contentBackground: string; - fontColor: string; - fontFamily?: string | undefined; - logo: string; + color: string; + contentBackground: string; + fontColor: string; + fontFamily?: string | undefined; + logo: string; }; /** @internal */ export const UpdateBrandingDetailsDto$inboundSchema: z.ZodType< - UpdateBrandingDetailsDto, - z.ZodTypeDef, - unknown + UpdateBrandingDetailsDto, + z.ZodTypeDef, + unknown > = z.object({ - color: z.string(), - contentBackground: z.string(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: z.string(), + 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; + color: string; + contentBackground: string; + fontColor: string; + fontFamily?: string | undefined; + logo: string; }; /** @internal */ export const UpdateBrandingDetailsDto$outboundSchema: z.ZodType< - UpdateBrandingDetailsDto$Outbound, - z.ZodTypeDef, - UpdateBrandingDetailsDto + UpdateBrandingDetailsDto$Outbound, + z.ZodTypeDef, + UpdateBrandingDetailsDto > = z.object({ - color: z.string(), - contentBackground: z.string(), - fontColor: z.string(), - fontFamily: z.string().optional(), - logo: z.string(), + color: z.string(), + contentBackground: z.string(), + fontColor: z.string(), + fontFamily: z.string().optional(), + logo: z.string(), }); /** @@ -52,10 +52,10 @@ export const UpdateBrandingDetailsDto$outboundSchema: z.ZodType< * @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; + /** @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 c4a2c810..f26e006f 100644 --- a/src/models/components/updateintegrationrequestdto.ts +++ b/src/models/components/updateintegrationrequestdto.ts @@ -2,96 +2,99 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - CredentialsDto, - CredentialsDto$inboundSchema, - CredentialsDto$Outbound, - CredentialsDto$outboundSchema, + CredentialsDto, + CredentialsDto$inboundSchema, + CredentialsDto$Outbound, + CredentialsDto$outboundSchema, } from "./credentialsdto.js"; import { - StepFilter, - StepFilter$inboundSchema, - StepFilter$Outbound, - StepFilter$outboundSchema, + StepFilter, + StepFilter$inboundSchema, + StepFilter$Outbound, + StepFilter$outboundSchema, } from "./stepfilter.js"; -import * as z from "zod"; export type UpdateIntegrationRequestDto = { - 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; + 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; }; /** @internal */ export const UpdateIntegrationRequestDto$inboundSchema: z.ZodType< - UpdateIntegrationRequestDto, - z.ZodTypeDef, - unknown -> = z - .object({ - _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(), - }) - .transform((v) => { - return remap$(v, { - _environmentId: "environmentId", - }); - }); + UpdateIntegrationRequestDto, + z.ZodTypeDef, + unknown +> = z.object({ + _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(), +}).transform((v) => { + return remap$(v, { + "_environmentId": "environmentId", + }); +}); /** @internal */ export type UpdateIntegrationRequestDto$Outbound = { - _environmentId?: string | undefined; - active?: boolean | undefined; - check?: boolean | undefined; - conditions?: Array | undefined; - credentials?: CredentialsDto$Outbound | undefined; - identifier?: string | undefined; - name?: 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; }; /** @internal */ export const UpdateIntegrationRequestDto$outboundSchema: z.ZodType< - UpdateIntegrationRequestDto$Outbound, - z.ZodTypeDef, - UpdateIntegrationRequestDto -> = z - .object({ - 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(), - }) - .transform((v) => { - return remap$(v, { - environmentId: "_environmentId", - }); - }); + UpdateIntegrationRequestDto$Outbound, + z.ZodTypeDef, + UpdateIntegrationRequestDto +> = z.object({ + 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(), +}).transform((v) => { + return remap$(v, { + environmentId: "_environmentId", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateIntegrationRequestDto$ { - /** @deprecated use `UpdateIntegrationRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateIntegrationRequestDto$inboundSchema; - /** @deprecated use `UpdateIntegrationRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateIntegrationRequestDto$outboundSchema; - /** @deprecated use `UpdateIntegrationRequestDto$Outbound` instead. */ - export type Outbound = UpdateIntegrationRequestDto$Outbound; + /** @deprecated use `UpdateIntegrationRequestDto$inboundSchema` instead. */ + export const inboundSchema = UpdateIntegrationRequestDto$inboundSchema; + /** @deprecated use `UpdateIntegrationRequestDto$outboundSchema` instead. */ + export const outboundSchema = UpdateIntegrationRequestDto$outboundSchema; + /** @deprecated use `UpdateIntegrationRequestDto$Outbound` instead. */ + export type Outbound = UpdateIntegrationRequestDto$Outbound; } diff --git a/src/models/components/updatelayoutrequestdto.ts b/src/models/components/updatelayoutrequestdto.ts index b93132c7..dc810739 100644 --- a/src/models/components/updatelayoutrequestdto.ts +++ b/src/models/components/updatelayoutrequestdto.ts @@ -10,91 +10,98 @@ import * as z from "zod"; 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; + /** + * 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 = z.object({}); +export const Variables$inboundSchema: z.ZodType< + Variables, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type Variables$Outbound = {}; /** @internal */ -export const Variables$outboundSchema: z.ZodType = - z.object({}); +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; + /** @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 + 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(), + 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; + 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 + 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(), + 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(), }); /** @@ -102,10 +109,10 @@ export const UpdateLayoutRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 index 85af2031..194cd34b 100644 --- a/src/models/components/updatelayoutresponsedto.ts +++ b/src/models/components/updatelayoutresponsedto.ts @@ -2,46 +2,48 @@ * 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"; -import * as z from "zod"; export const UpdateLayoutResponseDtoChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; -export type UpdateLayoutResponseDtoChannel = ClosedEnum; +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; + 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 + typeof UpdateLayoutResponseDtoChannel > = z.nativeEnum(UpdateLayoutResponseDtoChannel); /** @internal */ export const UpdateLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< - typeof UpdateLayoutResponseDtoChannel + typeof UpdateLayoutResponseDtoChannel > = UpdateLayoutResponseDtoChannel$inboundSchema; /** @@ -49,109 +51,105 @@ export const UpdateLayoutResponseDtoChannel$outboundSchema: z.ZodNativeEnum< * @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; + /** @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", - }); - }); + 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; + _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", - }); - }); + 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; + /** @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 f0af1ea6..8ff74839 100644 --- a/src/models/components/updatesubscriberchannelrequestdto.ts +++ b/src/models/components/updatesubscriberchannelrequestdto.ts @@ -2,56 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChannelCredentials, - ChannelCredentials$inboundSchema, - ChannelCredentials$Outbound, - ChannelCredentials$outboundSchema, + ChannelCredentials, + ChannelCredentials$inboundSchema, + ChannelCredentials$Outbound, + ChannelCredentials$outboundSchema, } from "./channelcredentials.js"; -import * as z from "zod"; export type UpdateSubscriberChannelRequestDto = { - /** - * Credentials payload for the specified provider - */ - credentials: ChannelCredentials; - /** - * The integration identifier - */ - integrationIdentifier?: string | undefined; - /** - * The provider identifier for the credentials - */ - providerId: number; + /** + * Credentials payload for the specified provider + */ + credentials: ChannelCredentials; + /** + * The integration identifier + */ + integrationIdentifier?: string | undefined; + /** + * The provider identifier for the credentials + */ + providerId: number; }; /** @internal */ export const UpdateSubscriberChannelRequestDto$inboundSchema: z.ZodType< - UpdateSubscriberChannelRequestDto, - z.ZodTypeDef, - unknown + UpdateSubscriberChannelRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - credentials: ChannelCredentials$inboundSchema, - integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$inboundSchema, + integrationIdentifier: z.string().optional(), + providerId: z.number(), }); /** @internal */ export type UpdateSubscriberChannelRequestDto$Outbound = { - credentials: ChannelCredentials$Outbound; - integrationIdentifier?: string | undefined; - providerId: number; + credentials: ChannelCredentials$Outbound; + integrationIdentifier?: string | undefined; + providerId: number; }; /** @internal */ export const UpdateSubscriberChannelRequestDto$outboundSchema: z.ZodType< - UpdateSubscriberChannelRequestDto$Outbound, - z.ZodTypeDef, - UpdateSubscriberChannelRequestDto + UpdateSubscriberChannelRequestDto$Outbound, + z.ZodTypeDef, + UpdateSubscriberChannelRequestDto > = z.object({ - credentials: ChannelCredentials$outboundSchema, - integrationIdentifier: z.string().optional(), - providerId: z.number(), + credentials: ChannelCredentials$outboundSchema, + integrationIdentifier: z.string().optional(), + providerId: z.number(), }); /** @@ -59,10 +59,11 @@ export const UpdateSubscriberChannelRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberChannelRequestDto$ { - /** @deprecated use `UpdateSubscriberChannelRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberChannelRequestDto$inboundSchema; - /** @deprecated use `UpdateSubscriberChannelRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberChannelRequestDto$outboundSchema; - /** @deprecated use `UpdateSubscriberChannelRequestDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberChannelRequestDto$Outbound; + /** @deprecated use `UpdateSubscriberChannelRequestDto$inboundSchema` instead. */ + export const inboundSchema = UpdateSubscriberChannelRequestDto$inboundSchema; + /** @deprecated use `UpdateSubscriberChannelRequestDto$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberChannelRequestDto$outboundSchema; + /** @deprecated use `UpdateSubscriberChannelRequestDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberChannelRequestDto$Outbound; } diff --git a/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts b/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts index ecff7af3..67d0fc82 100644 --- a/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts +++ b/src/models/components/updatesubscriberglobalpreferencesrequestdto.ts @@ -2,60 +2,64 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChannelPreference, - ChannelPreference$inboundSchema, - ChannelPreference$Outbound, - ChannelPreference$outboundSchema, + ChannelPreference, + ChannelPreference$inboundSchema, + ChannelPreference$Outbound, + ChannelPreference$outboundSchema, } from "./channelpreference.js"; -import * as z from "zod"; export type UpdateSubscriberGlobalPreferencesRequestDto = { - /** - * Enable or disable the subscriber global preferences. - */ - enabled?: boolean | undefined; - /** - * The subscriber global preferences for every ChannelTypeEnum. - */ - preferences?: Array | undefined; + /** + * Enable or disable the subscriber global preferences. + */ + enabled?: boolean | undefined; + /** + * The subscriber global preferences for every ChannelTypeEnum. + */ + preferences?: Array | undefined; }; /** @internal */ -export const UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema: z.ZodType< +export const UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema: + z.ZodType< UpdateSubscriberGlobalPreferencesRequestDto, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ enabled: z.boolean().optional(), preferences: z.array(ChannelPreference$inboundSchema).optional(), -}); + }); /** @internal */ export type UpdateSubscriberGlobalPreferencesRequestDto$Outbound = { - enabled?: boolean | undefined; - preferences?: Array | undefined; + enabled?: boolean | undefined; + preferences?: Array | undefined; }; /** @internal */ -export const UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema: z.ZodType< +export const UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema: + z.ZodType< UpdateSubscriberGlobalPreferencesRequestDto$Outbound, z.ZodTypeDef, UpdateSubscriberGlobalPreferencesRequestDto -> = z.object({ + > = z.object({ enabled: z.boolean().optional(), preferences: z.array(ChannelPreference$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 UpdateSubscriberGlobalPreferencesRequestDto$ { - /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema; - /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema; - /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberGlobalPreferencesRequestDto$Outbound; + /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema` instead. */ + export const inboundSchema = + UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema; + /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema; + /** @deprecated use `UpdateSubscriberGlobalPreferencesRequestDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberGlobalPreferencesRequestDto$Outbound; } diff --git a/src/models/components/updatesubscriberonlineflagrequestdto.ts b/src/models/components/updatesubscriberonlineflagrequestdto.ts index 05b2912b..0008604f 100644 --- a/src/models/components/updatesubscriberonlineflagrequestdto.ts +++ b/src/models/components/updatesubscriberonlineflagrequestdto.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type UpdateSubscriberOnlineFlagRequestDto = { - isOnline: boolean; + isOnline: boolean; }; /** @internal */ export const UpdateSubscriberOnlineFlagRequestDto$inboundSchema: z.ZodType< - UpdateSubscriberOnlineFlagRequestDto, - z.ZodTypeDef, - unknown + UpdateSubscriberOnlineFlagRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - isOnline: z.boolean(), + isOnline: z.boolean(), }); /** @internal */ export type UpdateSubscriberOnlineFlagRequestDto$Outbound = { - isOnline: boolean; + isOnline: boolean; }; /** @internal */ export const UpdateSubscriberOnlineFlagRequestDto$outboundSchema: z.ZodType< - UpdateSubscriberOnlineFlagRequestDto$Outbound, - z.ZodTypeDef, - UpdateSubscriberOnlineFlagRequestDto + UpdateSubscriberOnlineFlagRequestDto$Outbound, + z.ZodTypeDef, + UpdateSubscriberOnlineFlagRequestDto > = z.object({ - isOnline: z.boolean(), + isOnline: z.boolean(), }); /** @@ -36,10 +36,12 @@ export const UpdateSubscriberOnlineFlagRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberOnlineFlagRequestDto$ { - /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberOnlineFlagRequestDto$inboundSchema; - /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberOnlineFlagRequestDto$outboundSchema; - /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberOnlineFlagRequestDto$Outbound; + /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$inboundSchema` instead. */ + export const inboundSchema = + UpdateSubscriberOnlineFlagRequestDto$inboundSchema; + /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberOnlineFlagRequestDto$outboundSchema; + /** @deprecated use `UpdateSubscriberOnlineFlagRequestDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberOnlineFlagRequestDto$Outbound; } diff --git a/src/models/components/updatesubscriberpreferencerequestdto.ts b/src/models/components/updatesubscriberpreferencerequestdto.ts index 32c868c0..06f04d32 100644 --- a/src/models/components/updatesubscriberpreferencerequestdto.ts +++ b/src/models/components/updatesubscriberpreferencerequestdto.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChannelPreference, - ChannelPreference$inboundSchema, - ChannelPreference$Outbound, - ChannelPreference$outboundSchema, + ChannelPreference, + ChannelPreference$inboundSchema, + ChannelPreference$Outbound, + ChannelPreference$outboundSchema, } from "./channelpreference.js"; -import * as z from "zod"; export type UpdateSubscriberPreferenceRequestDto = { - /** - * The subscriber preferences for every ChannelTypeEnum for the workflow assigned. - */ - channel?: ChannelPreference | undefined; - /** - * Sets if the workflow is fully enabled for all channels or not for the subscriber. - */ - enabled?: boolean | undefined; + /** + * The subscriber preferences for every ChannelTypeEnum for the workflow assigned. + */ + channel?: ChannelPreference | undefined; + /** + * Sets if the workflow is fully enabled for all channels or not for the subscriber. + */ + enabled?: boolean | undefined; }; /** @internal */ export const UpdateSubscriberPreferenceRequestDto$inboundSchema: z.ZodType< - UpdateSubscriberPreferenceRequestDto, - z.ZodTypeDef, - unknown + UpdateSubscriberPreferenceRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - channel: ChannelPreference$inboundSchema.optional(), - enabled: z.boolean().optional(), + channel: ChannelPreference$inboundSchema.optional(), + enabled: z.boolean().optional(), }); /** @internal */ export type UpdateSubscriberPreferenceRequestDto$Outbound = { - channel?: ChannelPreference$Outbound | undefined; - enabled?: boolean | undefined; + channel?: ChannelPreference$Outbound | undefined; + enabled?: boolean | undefined; }; /** @internal */ export const UpdateSubscriberPreferenceRequestDto$outboundSchema: z.ZodType< - UpdateSubscriberPreferenceRequestDto$Outbound, - z.ZodTypeDef, - UpdateSubscriberPreferenceRequestDto + UpdateSubscriberPreferenceRequestDto$Outbound, + z.ZodTypeDef, + UpdateSubscriberPreferenceRequestDto > = z.object({ - channel: ChannelPreference$outboundSchema.optional(), - enabled: z.boolean().optional(), + channel: ChannelPreference$outboundSchema.optional(), + enabled: z.boolean().optional(), }); /** @@ -52,10 +52,12 @@ export const UpdateSubscriberPreferenceRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberPreferenceRequestDto$ { - /** @deprecated use `UpdateSubscriberPreferenceRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberPreferenceRequestDto$inboundSchema; - /** @deprecated use `UpdateSubscriberPreferenceRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberPreferenceRequestDto$outboundSchema; - /** @deprecated use `UpdateSubscriberPreferenceRequestDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberPreferenceRequestDto$Outbound; + /** @deprecated use `UpdateSubscriberPreferenceRequestDto$inboundSchema` instead. */ + export const inboundSchema = + UpdateSubscriberPreferenceRequestDto$inboundSchema; + /** @deprecated use `UpdateSubscriberPreferenceRequestDto$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberPreferenceRequestDto$outboundSchema; + /** @deprecated use `UpdateSubscriberPreferenceRequestDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberPreferenceRequestDto$Outbound; } diff --git a/src/models/components/updatesubscriberpreferenceresponsedto.ts b/src/models/components/updatesubscriberpreferenceresponsedto.ts index dbdec0db..adb6b83c 100644 --- a/src/models/components/updatesubscriberpreferenceresponsedto.ts +++ b/src/models/components/updatesubscriberpreferenceresponsedto.ts @@ -2,55 +2,55 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Preference, - Preference$inboundSchema, - Preference$Outbound, - Preference$outboundSchema, + Preference, + Preference$inboundSchema, + Preference$Outbound, + Preference$outboundSchema, } from "./preference.js"; import { - TemplateResponse, - TemplateResponse$inboundSchema, - TemplateResponse$Outbound, - TemplateResponse$outboundSchema, + TemplateResponse, + TemplateResponse$inboundSchema, + TemplateResponse$Outbound, + TemplateResponse$outboundSchema, } from "./templateresponse.js"; -import * as z from "zod"; 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; + /** + * The workflow information and if it is critical or not + */ + template: TemplateResponse; }; /** @internal */ export const UpdateSubscriberPreferenceResponseDto$inboundSchema: z.ZodType< - UpdateSubscriberPreferenceResponseDto, - z.ZodTypeDef, - unknown + UpdateSubscriberPreferenceResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - preference: Preference$inboundSchema, - template: TemplateResponse$inboundSchema, + preference: Preference$inboundSchema, + template: TemplateResponse$inboundSchema, }); /** @internal */ export type UpdateSubscriberPreferenceResponseDto$Outbound = { - preference: Preference$Outbound; - template: TemplateResponse$Outbound; + preference: Preference$Outbound; + template: TemplateResponse$Outbound; }; /** @internal */ export const UpdateSubscriberPreferenceResponseDto$outboundSchema: z.ZodType< - UpdateSubscriberPreferenceResponseDto$Outbound, - z.ZodTypeDef, - UpdateSubscriberPreferenceResponseDto + UpdateSubscriberPreferenceResponseDto$Outbound, + z.ZodTypeDef, + UpdateSubscriberPreferenceResponseDto > = z.object({ - preference: Preference$outboundSchema, - template: TemplateResponse$outboundSchema, + preference: Preference$outboundSchema, + template: TemplateResponse$outboundSchema, }); /** @@ -58,10 +58,12 @@ export const UpdateSubscriberPreferenceResponseDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberPreferenceResponseDto$ { - /** @deprecated use `UpdateSubscriberPreferenceResponseDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberPreferenceResponseDto$inboundSchema; - /** @deprecated use `UpdateSubscriberPreferenceResponseDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberPreferenceResponseDto$outboundSchema; - /** @deprecated use `UpdateSubscriberPreferenceResponseDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberPreferenceResponseDto$Outbound; + /** @deprecated use `UpdateSubscriberPreferenceResponseDto$inboundSchema` instead. */ + export const inboundSchema = + UpdateSubscriberPreferenceResponseDto$inboundSchema; + /** @deprecated use `UpdateSubscriberPreferenceResponseDto$outboundSchema` instead. */ + export const outboundSchema = + UpdateSubscriberPreferenceResponseDto$outboundSchema; + /** @deprecated use `UpdateSubscriberPreferenceResponseDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberPreferenceResponseDto$Outbound; } diff --git a/src/models/components/updatesubscriberrequestdto.ts b/src/models/components/updatesubscriberrequestdto.ts index 90f7e686..9385a2f1 100644 --- a/src/models/components/updatesubscriberrequestdto.ts +++ b/src/models/components/updatesubscriberrequestdto.ts @@ -7,20 +7,20 @@ import * as z from "zod"; 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; + data?: UpdateSubscriberRequestDtoData | undefined; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + locale?: string | undefined; + phone?: string | undefined; }; /** @internal */ export const UpdateSubscriberRequestDtoData$inboundSchema: z.ZodType< - UpdateSubscriberRequestDtoData, - z.ZodTypeDef, - unknown + UpdateSubscriberRequestDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -28,9 +28,9 @@ export type UpdateSubscriberRequestDtoData$Outbound = {}; /** @internal */ export const UpdateSubscriberRequestDtoData$outboundSchema: z.ZodType< - UpdateSubscriberRequestDtoData$Outbound, - z.ZodTypeDef, - UpdateSubscriberRequestDtoData + UpdateSubscriberRequestDtoData$Outbound, + z.ZodTypeDef, + UpdateSubscriberRequestDtoData > = z.object({}); /** @@ -38,53 +38,53 @@ export const UpdateSubscriberRequestDtoData$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberRequestDtoData$ { - /** @deprecated use `UpdateSubscriberRequestDtoData$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberRequestDtoData$inboundSchema; - /** @deprecated use `UpdateSubscriberRequestDtoData$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberRequestDtoData$outboundSchema; - /** @deprecated use `UpdateSubscriberRequestDtoData$Outbound` instead. */ - export type Outbound = UpdateSubscriberRequestDtoData$Outbound; + /** @deprecated use `UpdateSubscriberRequestDtoData$inboundSchema` instead. */ + export const inboundSchema = UpdateSubscriberRequestDtoData$inboundSchema; + /** @deprecated use `UpdateSubscriberRequestDtoData$outboundSchema` instead. */ + export const outboundSchema = UpdateSubscriberRequestDtoData$outboundSchema; + /** @deprecated use `UpdateSubscriberRequestDtoData$Outbound` instead. */ + export type Outbound = UpdateSubscriberRequestDtoData$Outbound; } /** @internal */ export const UpdateSubscriberRequestDto$inboundSchema: z.ZodType< - UpdateSubscriberRequestDto, - z.ZodTypeDef, - unknown + 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(), + 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(), }); /** @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; + data?: UpdateSubscriberRequestDtoData$Outbound | undefined; + email?: string | undefined; + firstName?: string | undefined; + lastName?: string | undefined; + locale?: string | undefined; + phone?: string | undefined; }; /** @internal */ export const UpdateSubscriberRequestDto$outboundSchema: z.ZodType< - UpdateSubscriberRequestDto$Outbound, - z.ZodTypeDef, - UpdateSubscriberRequestDto + UpdateSubscriberRequestDto$Outbound, + 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(), + 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(), }); /** @@ -92,10 +92,10 @@ export const UpdateSubscriberRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateSubscriberRequestDto$ { - /** @deprecated use `UpdateSubscriberRequestDto$inboundSchema` instead. */ - export const inboundSchema = UpdateSubscriberRequestDto$inboundSchema; - /** @deprecated use `UpdateSubscriberRequestDto$outboundSchema` instead. */ - export const outboundSchema = UpdateSubscriberRequestDto$outboundSchema; - /** @deprecated use `UpdateSubscriberRequestDto$Outbound` instead. */ - export type Outbound = UpdateSubscriberRequestDto$Outbound; + /** @deprecated use `UpdateSubscriberRequestDto$inboundSchema` instead. */ + export const inboundSchema = UpdateSubscriberRequestDto$inboundSchema; + /** @deprecated use `UpdateSubscriberRequestDto$outboundSchema` instead. */ + export const outboundSchema = UpdateSubscriberRequestDto$outboundSchema; + /** @deprecated use `UpdateSubscriberRequestDto$Outbound` instead. */ + export type Outbound = UpdateSubscriberRequestDto$Outbound; } diff --git a/src/models/components/updatetenantrequestdto.ts b/src/models/components/updatetenantrequestdto.ts index 8cddbf69..126e3cd0 100644 --- a/src/models/components/updatetenantrequestdto.ts +++ b/src/models/components/updatetenantrequestdto.ts @@ -7,16 +7,16 @@ import * as z from "zod"; export type UpdateTenantRequestDtoData = {}; export type UpdateTenantRequestDto = { - data?: UpdateTenantRequestDtoData | undefined; - identifier?: string | undefined; - name?: string | undefined; + data?: UpdateTenantRequestDtoData | undefined; + identifier?: string | undefined; + name?: string | undefined; }; /** @internal */ export const UpdateTenantRequestDtoData$inboundSchema: z.ZodType< - UpdateTenantRequestDtoData, - z.ZodTypeDef, - unknown + UpdateTenantRequestDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -24,9 +24,9 @@ export type UpdateTenantRequestDtoData$Outbound = {}; /** @internal */ export const UpdateTenantRequestDtoData$outboundSchema: z.ZodType< - UpdateTenantRequestDtoData$Outbound, - z.ZodTypeDef, - UpdateTenantRequestDtoData + UpdateTenantRequestDtoData$Outbound, + z.ZodTypeDef, + UpdateTenantRequestDtoData > = z.object({}); /** @@ -34,41 +34,41 @@ export const UpdateTenantRequestDtoData$outboundSchema: z.ZodType< * @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; + /** @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 + UpdateTenantRequestDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.lazy(() => UpdateTenantRequestDtoData$inboundSchema).optional(), - identifier: z.string().optional(), - name: z.string().optional(), + 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; + data?: UpdateTenantRequestDtoData$Outbound | undefined; + identifier?: string | undefined; + name?: string | undefined; }; /** @internal */ export const UpdateTenantRequestDto$outboundSchema: z.ZodType< - UpdateTenantRequestDto$Outbound, - z.ZodTypeDef, - UpdateTenantRequestDto + UpdateTenantRequestDto$Outbound, + z.ZodTypeDef, + UpdateTenantRequestDto > = z.object({ - data: z.lazy(() => UpdateTenantRequestDtoData$outboundSchema).optional(), - identifier: z.string().optional(), - name: z.string().optional(), + data: z.lazy(() => UpdateTenantRequestDtoData$outboundSchema).optional(), + identifier: z.string().optional(), + name: z.string().optional(), }); /** @@ -76,10 +76,10 @@ export const UpdateTenantRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 index 671a0ad7..242af071 100644 --- a/src/models/components/updatetenantresponsedto.ts +++ b/src/models/components/updatetenantresponsedto.ts @@ -2,26 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../lib/primitives.js"; 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; + 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 + UpdateTenantResponseDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -29,9 +29,9 @@ export type UpdateTenantResponseDtoData$Outbound = {}; /** @internal */ export const UpdateTenantResponseDtoData$outboundSchema: z.ZodType< - UpdateTenantResponseDtoData$Outbound, - z.ZodTypeDef, - UpdateTenantResponseDtoData + UpdateTenantResponseDtoData$Outbound, + z.ZodTypeDef, + UpdateTenantResponseDtoData > = z.object({}); /** @@ -39,78 +39,74 @@ export const UpdateTenantResponseDtoData$outboundSchema: z.ZodType< * @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; + /** @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", - }); - }); + 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; + _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", - }); - }); + 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; + /** @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 index dfe4d280..aa289d24 100644 --- a/src/models/components/updateworkflowrequestdto.ts +++ b/src/models/components/updateworkflowrequestdto.ts @@ -2,33 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, + PreferenceChannels, + PreferenceChannels$inboundSchema, + PreferenceChannels$Outbound, + PreferenceChannels$outboundSchema, } from "./preferencechannels.js"; -import * as z from "zod"; 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; + 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 + UpdateWorkflowRequestDtoData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -36,9 +36,9 @@ export type UpdateWorkflowRequestDtoData$Outbound = {}; /** @internal */ export const UpdateWorkflowRequestDtoData$outboundSchema: z.ZodType< - UpdateWorkflowRequestDtoData$Outbound, - z.ZodTypeDef, - UpdateWorkflowRequestDtoData + UpdateWorkflowRequestDtoData$Outbound, + z.ZodTypeDef, + UpdateWorkflowRequestDtoData > = z.object({}); /** @@ -46,59 +46,59 @@ export const UpdateWorkflowRequestDtoData$outboundSchema: z.ZodType< * @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; + /** @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 + 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(), + 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; + 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 + 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(), + 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(), }); /** @@ -106,10 +106,10 @@ export const UpdateWorkflowRequestDto$outboundSchema: z.ZodType< * @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; + /** @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 index 0f044d87..2cbba0f9 100644 --- a/src/models/components/variablesresponsedto.ts +++ b/src/models/components/variablesresponsedto.ts @@ -9,45 +9,52 @@ export type System = {}; export type Translations = {}; export type VariablesResponseDto = { - system: System; - translations: Translations; + system: System; + translations: Translations; }; /** @internal */ -export const System$inboundSchema: z.ZodType = z.object({}); +export const System$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type System$Outbound = {}; /** @internal */ -export const System$outboundSchema: z.ZodType = z.object({}); +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; + /** @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 = z.object( - {} -); +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 + Translations$Outbound, + z.ZodTypeDef, + Translations > = z.object({}); /** @@ -55,38 +62,38 @@ export const Translations$outboundSchema: z.ZodType< * @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; + /** @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 + VariablesResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - system: z.lazy(() => System$inboundSchema), - translations: z.lazy(() => Translations$inboundSchema), + system: z.lazy(() => System$inboundSchema), + translations: z.lazy(() => Translations$inboundSchema), }); /** @internal */ export type VariablesResponseDto$Outbound = { - system: System$Outbound; - translations: Translations$Outbound; + system: System$Outbound; + translations: Translations$Outbound; }; /** @internal */ export const VariablesResponseDto$outboundSchema: z.ZodType< - VariablesResponseDto$Outbound, - z.ZodTypeDef, - VariablesResponseDto + VariablesResponseDto$Outbound, + z.ZodTypeDef, + VariablesResponseDto > = z.object({ - system: z.lazy(() => System$outboundSchema), - translations: z.lazy(() => Translations$outboundSchema), + system: z.lazy(() => System$outboundSchema), + translations: z.lazy(() => Translations$outboundSchema), }); /** @@ -94,10 +101,10 @@ export const VariablesResponseDto$outboundSchema: z.ZodType< * @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; + /** @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 d542f511..b94e92f8 100644 --- a/src/models/components/workflowresponse.ts +++ b/src/models/components/workflowresponse.ts @@ -2,66 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - NotificationGroup, - NotificationGroup$inboundSchema, - NotificationGroup$Outbound, - NotificationGroup$outboundSchema, + NotificationGroup, + NotificationGroup$inboundSchema, + NotificationGroup$Outbound, + NotificationGroup$outboundSchema, } from "./notificationgroup.js"; import { - NotificationStep, - NotificationStep$inboundSchema, - NotificationStep$Outbound, - NotificationStep$outboundSchema, + NotificationStep, + NotificationStep$inboundSchema, + NotificationStep$Outbound, + NotificationStep$outboundSchema, } from "./notificationstep.js"; import { - NotificationTrigger, - NotificationTrigger$inboundSchema, - NotificationTrigger$Outbound, - NotificationTrigger$outboundSchema, + NotificationTrigger, + NotificationTrigger$inboundSchema, + NotificationTrigger$Outbound, + NotificationTrigger$outboundSchema, } from "./notificationtrigger.js"; import { - PreferenceChannels, - PreferenceChannels$inboundSchema, - PreferenceChannels$Outbound, - PreferenceChannels$outboundSchema, + PreferenceChannels, + PreferenceChannels$inboundSchema, + PreferenceChannels$Outbound, + PreferenceChannels$outboundSchema, } from "./preferencechannels.js"; -import * as z from "zod"; export type WorkflowResponseData = {}; export type WorkflowIntegrationStatus = {}; export type WorkflowResponse = { - creatorId: string; - environmentId: string; - id?: string | undefined; - 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; - workflowIntegrationStatus?: WorkflowIntegrationStatus | undefined; + creatorId: string; + environmentId: string; + id?: string | undefined; + 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; + workflowIntegrationStatus?: WorkflowIntegrationStatus | undefined; }; /** @internal */ export const WorkflowResponseData$inboundSchema: z.ZodType< - WorkflowResponseData, - z.ZodTypeDef, - unknown + WorkflowResponseData, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -69,9 +69,9 @@ export type WorkflowResponseData$Outbound = {}; /** @internal */ export const WorkflowResponseData$outboundSchema: z.ZodType< - WorkflowResponseData$Outbound, - z.ZodTypeDef, - WorkflowResponseData + WorkflowResponseData$Outbound, + z.ZodTypeDef, + WorkflowResponseData > = z.object({}); /** @@ -79,19 +79,19 @@ export const WorkflowResponseData$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WorkflowResponseData$ { - /** @deprecated use `WorkflowResponseData$inboundSchema` instead. */ - export const inboundSchema = WorkflowResponseData$inboundSchema; - /** @deprecated use `WorkflowResponseData$outboundSchema` instead. */ - export const outboundSchema = WorkflowResponseData$outboundSchema; - /** @deprecated use `WorkflowResponseData$Outbound` instead. */ - export type Outbound = WorkflowResponseData$Outbound; + /** @deprecated use `WorkflowResponseData$inboundSchema` instead. */ + export const inboundSchema = WorkflowResponseData$inboundSchema; + /** @deprecated use `WorkflowResponseData$outboundSchema` instead. */ + export const outboundSchema = WorkflowResponseData$outboundSchema; + /** @deprecated use `WorkflowResponseData$Outbound` instead. */ + export type Outbound = WorkflowResponseData$Outbound; } /** @internal */ export const WorkflowIntegrationStatus$inboundSchema: z.ZodType< - WorkflowIntegrationStatus, - z.ZodTypeDef, - unknown + WorkflowIntegrationStatus, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -99,9 +99,9 @@ export type WorkflowIntegrationStatus$Outbound = {}; /** @internal */ export const WorkflowIntegrationStatus$outboundSchema: z.ZodType< - WorkflowIntegrationStatus$Outbound, - z.ZodTypeDef, - WorkflowIntegrationStatus + WorkflowIntegrationStatus$Outbound, + z.ZodTypeDef, + WorkflowIntegrationStatus > = z.object({}); /** @@ -109,126 +109,128 @@ export const WorkflowIntegrationStatus$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WorkflowIntegrationStatus$ { - /** @deprecated use `WorkflowIntegrationStatus$inboundSchema` instead. */ - export const inboundSchema = WorkflowIntegrationStatus$inboundSchema; - /** @deprecated use `WorkflowIntegrationStatus$outboundSchema` instead. */ - export const outboundSchema = WorkflowIntegrationStatus$outboundSchema; - /** @deprecated use `WorkflowIntegrationStatus$Outbound` instead. */ - export type Outbound = WorkflowIntegrationStatus$Outbound; + /** @deprecated use `WorkflowIntegrationStatus$inboundSchema` instead. */ + export const inboundSchema = WorkflowIntegrationStatus$inboundSchema; + /** @deprecated use `WorkflowIntegrationStatus$outboundSchema` instead. */ + export const outboundSchema = WorkflowIntegrationStatus$outboundSchema; + /** @deprecated use `WorkflowIntegrationStatus$Outbound` instead. */ + export type Outbound = WorkflowIntegrationStatus$Outbound; } /** @internal */ -export const WorkflowResponse$inboundSchema: z.ZodType = z - .object({ - _creatorId: z.string(), - _environmentId: z.string(), - _id: z.string().optional(), - _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), - workflowIntegrationStatus: z.lazy(() => WorkflowIntegrationStatus$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - _creatorId: "creatorId", - _environmentId: "environmentId", - _id: "id", - _notificationGroupId: "notificationGroupId", - _organizationId: "organizationId", - _parentId: "parentId", - }); - }); +export const WorkflowResponse$inboundSchema: z.ZodType< + WorkflowResponse, + z.ZodTypeDef, + unknown +> = z.object({ + _creatorId: z.string(), + _environmentId: z.string(), + _id: z.string().optional(), + _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), + workflowIntegrationStatus: z.lazy(() => + WorkflowIntegrationStatus$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "_creatorId": "creatorId", + "_environmentId": "environmentId", + "_id": "id", + "_notificationGroupId": "notificationGroupId", + "_organizationId": "organizationId", + "_parentId": "parentId", + }); +}); /** @internal */ export type WorkflowResponse$Outbound = { - _creatorId: string; - _environmentId: string; - _id?: string | undefined; - _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; - workflowIntegrationStatus?: WorkflowIntegrationStatus$Outbound | undefined; + _creatorId: string; + _environmentId: string; + _id?: string | undefined; + _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; + workflowIntegrationStatus?: WorkflowIntegrationStatus$Outbound | undefined; }; /** @internal */ export const WorkflowResponse$outboundSchema: z.ZodType< - WorkflowResponse$Outbound, - z.ZodTypeDef, - WorkflowResponse -> = z - .object({ - creatorId: z.string(), - environmentId: z.string(), - id: z.string().optional(), - 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), - workflowIntegrationStatus: z - .lazy(() => WorkflowIntegrationStatus$outboundSchema) - .optional(), - }) - .transform((v) => { - return remap$(v, { - creatorId: "_creatorId", - environmentId: "_environmentId", - id: "_id", - notificationGroupId: "_notificationGroupId", - organizationId: "_organizationId", - parentId: "_parentId", - }); - }); + WorkflowResponse$Outbound, + z.ZodTypeDef, + WorkflowResponse +> = z.object({ + creatorId: z.string(), + environmentId: z.string(), + id: z.string().optional(), + 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), + workflowIntegrationStatus: z.lazy(() => + WorkflowIntegrationStatus$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + creatorId: "_creatorId", + environmentId: "_environmentId", + id: "_id", + notificationGroupId: "_notificationGroupId", + 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 WorkflowResponse$ { - /** @deprecated use `WorkflowResponse$inboundSchema` instead. */ - export const inboundSchema = WorkflowResponse$inboundSchema; - /** @deprecated use `WorkflowResponse$outboundSchema` instead. */ - export const outboundSchema = WorkflowResponse$outboundSchema; - /** @deprecated use `WorkflowResponse$Outbound` instead. */ - export type Outbound = WorkflowResponse$Outbound; + /** @deprecated use `WorkflowResponse$inboundSchema` instead. */ + export const inboundSchema = WorkflowResponse$inboundSchema; + /** @deprecated use `WorkflowResponse$outboundSchema` instead. */ + export const outboundSchema = WorkflowResponse$outboundSchema; + /** @deprecated use `WorkflowResponse$Outbound` instead. */ + export type Outbound = WorkflowResponse$Outbound; } diff --git a/src/models/components/workflowsresponsedto.ts b/src/models/components/workflowsresponsedto.ts index a66893e8..af8e74d6 100644 --- a/src/models/components/workflowsresponsedto.ts +++ b/src/models/components/workflowsresponsedto.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type WorkflowsResponseDto = { - data: Array; - page: number; - pageSize: number; - totalCount: number; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const WorkflowsResponseDto$inboundSchema: z.ZodType< - WorkflowsResponseDto, - z.ZodTypeDef, - unknown + WorkflowsResponseDto, + z.ZodTypeDef, + unknown > = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + 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; + data: Array; + page: number; + pageSize: number; + totalCount: number; }; /** @internal */ export const WorkflowsResponseDto$outboundSchema: z.ZodType< - WorkflowsResponseDto$Outbound, - z.ZodTypeDef, - WorkflowsResponseDto + WorkflowsResponseDto$Outbound, + z.ZodTypeDef, + WorkflowsResponseDto > = z.object({ - data: z.array(z.string()), - page: z.number(), - pageSize: z.number(), - totalCount: z.number(), + data: z.array(z.string()), + page: z.number(), + pageSize: z.number(), + totalCount: z.number(), }); /** @@ -48,10 +48,10 @@ export const WorkflowsResponseDto$outboundSchema: z.ZodType< * @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; + /** @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/errors/httpclienterrors.ts b/src/models/errors/httpclienterrors.ts index cdb2995f..b34f6121 100644 --- a/src/models/errors/httpclienterrors.ts +++ b/src/models/errors/httpclienterrors.ts @@ -6,43 +6,43 @@ * Base class for all HTTP errors. */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; - } + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; } + } } /** * An error to capture unrecognised or unexpected errors when making HTTP calls. */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + override name = "UnexpectedClientError"; } /** * An error that is raised when any inputs used to create a request are invalid. */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + override name = "InvalidRequestError"; } /** * An error that is raised when a HTTP request was aborted by the client error. */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + override readonly name = "RequestAbortedError"; } /** @@ -50,7 +50,7 @@ export class RequestAbortedError extends HTTPClientError { * signal timeout. */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + override readonly name = "RequestTimeoutError"; } /** @@ -58,5 +58,5 @@ export class RequestTimeoutError extends HTTPClientError { * a server. */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + override readonly name = "ConnectionError"; } diff --git a/src/models/errors/sdkerror.ts b/src/models/errors/sdkerror.ts index 80e3aa42..001f4659 100644 --- a/src/models/errors/sdkerror.ts +++ b/src/models/errors/sdkerror.ts @@ -3,23 +3,25 @@ */ export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; + public readonly statusCode: number; + public readonly contentType: string; - constructor( - message: string, - public readonly rawResponse: Response, - public readonly body: string = "" - ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; - super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`); + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); - this.statusCode = statusCode; - this.contentType = contentType; + this.statusCode = statusCode; + this.contentType = contentType; - this.name = "SDKError"; - } + this.name = "SDKError"; + } } diff --git a/src/models/operations/changescontrollerapplydiff.ts b/src/models/operations/changescontrollerapplydiff.ts index e0cddbfc..45467b86 100644 --- a/src/models/operations/changescontrollerapplydiff.ts +++ b/src/models/operations/changescontrollerapplydiff.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type ChangesControllerApplyDiffRequest = { - changeId: string; + changeId: string; }; /** @internal */ export const ChangesControllerApplyDiffRequest$inboundSchema: z.ZodType< - ChangesControllerApplyDiffRequest, - z.ZodTypeDef, - unknown + ChangesControllerApplyDiffRequest, + z.ZodTypeDef, + unknown > = z.object({ - changeId: z.string(), + changeId: z.string(), }); /** @internal */ export type ChangesControllerApplyDiffRequest$Outbound = { - changeId: string; + changeId: string; }; /** @internal */ export const ChangesControllerApplyDiffRequest$outboundSchema: z.ZodType< - ChangesControllerApplyDiffRequest$Outbound, - z.ZodTypeDef, - ChangesControllerApplyDiffRequest + ChangesControllerApplyDiffRequest$Outbound, + z.ZodTypeDef, + ChangesControllerApplyDiffRequest > = z.object({ - changeId: z.string(), + changeId: z.string(), }); /** @@ -36,10 +36,11 @@ export const ChangesControllerApplyDiffRequest$outboundSchema: z.ZodType< * @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; + /** @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 index 48c7431a..fc7ab666 100644 --- a/src/models/operations/changescontrollergetchanges.ts +++ b/src/models/operations/changescontrollergetchanges.ts @@ -5,38 +5,38 @@ import * as z from "zod"; export type ChangesControllerGetChangesRequest = { - page?: number | undefined; - limit?: number | undefined; - promoted?: string | undefined; + page?: number | undefined; + limit?: number | undefined; + promoted?: string | undefined; }; /** @internal */ export const ChangesControllerGetChangesRequest$inboundSchema: z.ZodType< - ChangesControllerGetChangesRequest, - z.ZodTypeDef, - unknown + ChangesControllerGetChangesRequest, + z.ZodTypeDef, + unknown > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - promoted: z.string().default("false"), + 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; + page?: number | undefined; + limit: number; + promoted: string; }; /** @internal */ export const ChangesControllerGetChangesRequest$outboundSchema: z.ZodType< - ChangesControllerGetChangesRequest$Outbound, - z.ZodTypeDef, - ChangesControllerGetChangesRequest + ChangesControllerGetChangesRequest$Outbound, + z.ZodTypeDef, + ChangesControllerGetChangesRequest > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - promoted: z.string().default("false"), + page: z.number().optional(), + limit: z.number().default(10), + promoted: z.string().default("false"), }); /** @@ -44,10 +44,11 @@ export const ChangesControllerGetChangesRequest$outboundSchema: z.ZodType< * @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; + /** @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/eventscontrollercancel.ts b/src/models/operations/eventscontrollercancel.ts index 8fd8537e..742e1681 100644 --- a/src/models/operations/eventscontrollercancel.ts +++ b/src/models/operations/eventscontrollercancel.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type EventsControllerCancelRequest = { - transactionId: string; + transactionId: string; }; /** @internal */ export const EventsControllerCancelRequest$inboundSchema: z.ZodType< - EventsControllerCancelRequest, - z.ZodTypeDef, - unknown + EventsControllerCancelRequest, + z.ZodTypeDef, + unknown > = z.object({ - transactionId: z.string(), + transactionId: z.string(), }); /** @internal */ export type EventsControllerCancelRequest$Outbound = { - transactionId: string; + transactionId: string; }; /** @internal */ export const EventsControllerCancelRequest$outboundSchema: z.ZodType< - EventsControllerCancelRequest$Outbound, - z.ZodTypeDef, - EventsControllerCancelRequest + EventsControllerCancelRequest$Outbound, + z.ZodTypeDef, + EventsControllerCancelRequest > = z.object({ - transactionId: z.string(), + transactionId: z.string(), }); /** @@ -36,10 +36,10 @@ export const EventsControllerCancelRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EventsControllerCancelRequest$ { - /** @deprecated use `EventsControllerCancelRequest$inboundSchema` instead. */ - export const inboundSchema = EventsControllerCancelRequest$inboundSchema; - /** @deprecated use `EventsControllerCancelRequest$outboundSchema` instead. */ - export const outboundSchema = EventsControllerCancelRequest$outboundSchema; - /** @deprecated use `EventsControllerCancelRequest$Outbound` instead. */ - export type Outbound = EventsControllerCancelRequest$Outbound; + /** @deprecated use `EventsControllerCancelRequest$inboundSchema` instead. */ + export const inboundSchema = EventsControllerCancelRequest$inboundSchema; + /** @deprecated use `EventsControllerCancelRequest$outboundSchema` instead. */ + export const outboundSchema = EventsControllerCancelRequest$outboundSchema; + /** @deprecated use `EventsControllerCancelRequest$Outbound` instead. */ + export type Outbound = EventsControllerCancelRequest$Outbound; } diff --git a/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts b/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts index 3d073865..dc547765 100644 --- a/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts +++ b/src/models/operations/executiondetailscontrollergetexecutiondetailsfornotification.ts @@ -4,49 +4,53 @@ import * as z from "zod"; -export type ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = { +export type ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest = + { notificationId: string; subscriberId: string; -}; + }; /** @internal */ -export const ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema: z.ZodType< +export const ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema: + z.ZodType< ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ notificationId: z.string(), subscriberId: z.string(), -}); + }); /** @internal */ -export type ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound = { +export type ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound = + { notificationId: string; subscriberId: string; -}; + }; /** @internal */ -export const ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema: z.ZodType< +export const ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema: + z.ZodType< ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound, z.ZodTypeDef, ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest -> = z.object({ + > = z.object({ notificationId: z.string(), subscriberId: 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 ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$ { - /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema` instead. */ - export const inboundSchema = - ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema; - /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema` instead. */ - export const outboundSchema = - ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema; - /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound` instead. */ - export type Outbound = - ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound; + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema` instead. */ + export const inboundSchema = + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$inboundSchema; + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema` instead. */ + export const outboundSchema = + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$outboundSchema; + /** @deprecated use `ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound` instead. */ + export type Outbound = + ExecutionDetailsControllerGetExecutionDetailsForNotificationRequest$Outbound; } diff --git a/src/models/operations/feedscontrollerdeletefeedbyid.ts b/src/models/operations/feedscontrollerdeletefeedbyid.ts index 5564cd08..0524d351 100644 --- a/src/models/operations/feedscontrollerdeletefeedbyid.ts +++ b/src/models/operations/feedscontrollerdeletefeedbyid.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type FeedsControllerDeleteFeedByIdRequest = { - feedId: string; + feedId: string; }; /** @internal */ export const FeedsControllerDeleteFeedByIdRequest$inboundSchema: z.ZodType< - FeedsControllerDeleteFeedByIdRequest, - z.ZodTypeDef, - unknown + FeedsControllerDeleteFeedByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - feedId: z.string(), + feedId: z.string(), }); /** @internal */ export type FeedsControllerDeleteFeedByIdRequest$Outbound = { - feedId: string; + feedId: string; }; /** @internal */ export const FeedsControllerDeleteFeedByIdRequest$outboundSchema: z.ZodType< - FeedsControllerDeleteFeedByIdRequest$Outbound, - z.ZodTypeDef, - FeedsControllerDeleteFeedByIdRequest + FeedsControllerDeleteFeedByIdRequest$Outbound, + z.ZodTypeDef, + FeedsControllerDeleteFeedByIdRequest > = z.object({ - feedId: z.string(), + feedId: z.string(), }); /** @@ -36,10 +36,12 @@ export const FeedsControllerDeleteFeedByIdRequest$outboundSchema: z.ZodType< * @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; + /** @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/integrationscontrollergetwebhooksupportstatus.ts b/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts index 517416cd..3bec0d80 100644 --- a/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts +++ b/src/models/operations/integrationscontrollergetwebhooksupportstatus.ts @@ -5,42 +5,46 @@ import * as z from "zod"; export type IntegrationsControllerGetWebhookSupportStatusRequest = { - providerOrIntegrationId: string; + providerOrIntegrationId: string; }; /** @internal */ -export const IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema: z.ZodType< +export const IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema: + z.ZodType< IntegrationsControllerGetWebhookSupportStatusRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ providerOrIntegrationId: z.string(), -}); + }); /** @internal */ export type IntegrationsControllerGetWebhookSupportStatusRequest$Outbound = { - providerOrIntegrationId: string; + providerOrIntegrationId: string; }; /** @internal */ -export const IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema: z.ZodType< +export const IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema: + z.ZodType< IntegrationsControllerGetWebhookSupportStatusRequest$Outbound, z.ZodTypeDef, IntegrationsControllerGetWebhookSupportStatusRequest -> = z.object({ + > = z.object({ providerOrIntegrationId: 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 IntegrationsControllerGetWebhookSupportStatusRequest$ { - /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema` instead. */ - export const inboundSchema = IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema; - /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema` instead. */ - export const outboundSchema = - IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema; - /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$Outbound` instead. */ - export type Outbound = IntegrationsControllerGetWebhookSupportStatusRequest$Outbound; + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerGetWebhookSupportStatusRequest$inboundSchema; + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerGetWebhookSupportStatusRequest$outboundSchema; + /** @deprecated use `IntegrationsControllerGetWebhookSupportStatusRequest$Outbound` instead. */ + export type Outbound = + IntegrationsControllerGetWebhookSupportStatusRequest$Outbound; } diff --git a/src/models/operations/integrationscontrollerremoveintegration.ts b/src/models/operations/integrationscontrollerremoveintegration.ts index 6b6ef392..cd3eeaa8 100644 --- a/src/models/operations/integrationscontrollerremoveintegration.ts +++ b/src/models/operations/integrationscontrollerremoveintegration.ts @@ -5,41 +5,46 @@ import * as z from "zod"; export type IntegrationsControllerRemoveIntegrationRequest = { - integrationId: string; + integrationId: string; }; /** @internal */ -export const IntegrationsControllerRemoveIntegrationRequest$inboundSchema: z.ZodType< +export const IntegrationsControllerRemoveIntegrationRequest$inboundSchema: + z.ZodType< IntegrationsControllerRemoveIntegrationRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ integrationId: z.string(), -}); + }); /** @internal */ export type IntegrationsControllerRemoveIntegrationRequest$Outbound = { - integrationId: string; + integrationId: string; }; /** @internal */ -export const IntegrationsControllerRemoveIntegrationRequest$outboundSchema: z.ZodType< +export const IntegrationsControllerRemoveIntegrationRequest$outboundSchema: + z.ZodType< IntegrationsControllerRemoveIntegrationRequest$Outbound, z.ZodTypeDef, IntegrationsControllerRemoveIntegrationRequest -> = z.object({ + > = z.object({ integrationId: 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 IntegrationsControllerRemoveIntegrationRequest$ { - /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$inboundSchema` instead. */ - export const inboundSchema = IntegrationsControllerRemoveIntegrationRequest$inboundSchema; - /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$outboundSchema` instead. */ - export const outboundSchema = IntegrationsControllerRemoveIntegrationRequest$outboundSchema; - /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$Outbound` instead. */ - export type Outbound = IntegrationsControllerRemoveIntegrationRequest$Outbound; + /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerRemoveIntegrationRequest$inboundSchema; + /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerRemoveIntegrationRequest$outboundSchema; + /** @deprecated use `IntegrationsControllerRemoveIntegrationRequest$Outbound` instead. */ + export type Outbound = + IntegrationsControllerRemoveIntegrationRequest$Outbound; } diff --git a/src/models/operations/integrationscontrollersetintegrationasprimary.ts b/src/models/operations/integrationscontrollersetintegrationasprimary.ts index 7a79d691..0a2011fd 100644 --- a/src/models/operations/integrationscontrollersetintegrationasprimary.ts +++ b/src/models/operations/integrationscontrollersetintegrationasprimary.ts @@ -5,42 +5,46 @@ import * as z from "zod"; export type IntegrationsControllerSetIntegrationAsPrimaryRequest = { - integrationId: string; + integrationId: string; }; /** @internal */ -export const IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema: z.ZodType< +export const IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema: + z.ZodType< IntegrationsControllerSetIntegrationAsPrimaryRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ integrationId: z.string(), -}); + }); /** @internal */ export type IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound = { - integrationId: string; + integrationId: string; }; /** @internal */ -export const IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema: z.ZodType< +export const IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema: + z.ZodType< IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound, z.ZodTypeDef, IntegrationsControllerSetIntegrationAsPrimaryRequest -> = z.object({ + > = z.object({ integrationId: 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 IntegrationsControllerSetIntegrationAsPrimaryRequest$ { - /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema` instead. */ - export const inboundSchema = IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema; - /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema` instead. */ - export const outboundSchema = - IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema; - /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound` instead. */ - export type Outbound = IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound; + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerSetIntegrationAsPrimaryRequest$inboundSchema; + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerSetIntegrationAsPrimaryRequest$outboundSchema; + /** @deprecated use `IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound` instead. */ + export type Outbound = + IntegrationsControllerSetIntegrationAsPrimaryRequest$Outbound; } diff --git a/src/models/operations/integrationscontrollerupdateintegrationbyid.ts b/src/models/operations/integrationscontrollerupdateintegrationbyid.ts index b143eea2..3c76a2c5 100644 --- a/src/models/operations/integrationscontrollerupdateintegrationbyid.ts +++ b/src/models/operations/integrationscontrollerupdateintegrationbyid.ts @@ -2,62 +2,65 @@ * 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"; -import * as z from "zod"; export type IntegrationsControllerUpdateIntegrationByIdRequest = { - integrationId: string; - updateIntegrationRequestDto: components.UpdateIntegrationRequestDto; + integrationId: string; + updateIntegrationRequestDto: components.UpdateIntegrationRequestDto; }; /** @internal */ -export const IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema: z.ZodType< +export const IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema: + z.ZodType< IntegrationsControllerUpdateIntegrationByIdRequest, z.ZodTypeDef, unknown -> = z - .object({ - integrationId: z.string(), - UpdateIntegrationRequestDto: components.UpdateIntegrationRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateIntegrationRequestDto: "updateIntegrationRequestDto", - }); + > = z.object({ + integrationId: z.string(), + UpdateIntegrationRequestDto: + components.UpdateIntegrationRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateIntegrationRequestDto": "updateIntegrationRequestDto", }); + }); /** @internal */ export type IntegrationsControllerUpdateIntegrationByIdRequest$Outbound = { - integrationId: string; - UpdateIntegrationRequestDto: components.UpdateIntegrationRequestDto$Outbound; + integrationId: string; + UpdateIntegrationRequestDto: components.UpdateIntegrationRequestDto$Outbound; }; /** @internal */ -export const IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema: z.ZodType< +export const IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema: + z.ZodType< IntegrationsControllerUpdateIntegrationByIdRequest$Outbound, z.ZodTypeDef, IntegrationsControllerUpdateIntegrationByIdRequest -> = z - .object({ - integrationId: z.string(), - updateIntegrationRequestDto: components.UpdateIntegrationRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateIntegrationRequestDto: "UpdateIntegrationRequestDto", - }); + > = z.object({ + integrationId: z.string(), + updateIntegrationRequestDto: + components.UpdateIntegrationRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateIntegrationRequestDto: "UpdateIntegrationRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IntegrationsControllerUpdateIntegrationByIdRequest$ { - /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema` instead. */ - export const inboundSchema = IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema; - /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema` instead. */ - export const outboundSchema = IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema; - /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$Outbound` instead. */ - export type Outbound = IntegrationsControllerUpdateIntegrationByIdRequest$Outbound; + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsControllerUpdateIntegrationByIdRequest$inboundSchema; + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsControllerUpdateIntegrationByIdRequest$outboundSchema; + /** @deprecated use `IntegrationsControllerUpdateIntegrationByIdRequest$Outbound` instead. */ + export type Outbound = + IntegrationsControllerUpdateIntegrationByIdRequest$Outbound; } diff --git a/src/models/operations/layoutscontrollerdeletelayout.ts b/src/models/operations/layoutscontrollerdeletelayout.ts index 88cf6c3a..a9f863fc 100644 --- a/src/models/operations/layoutscontrollerdeletelayout.ts +++ b/src/models/operations/layoutscontrollerdeletelayout.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type LayoutsControllerDeleteLayoutRequest = { - /** - * The layout id - */ - layoutId: string; + /** + * The layout id + */ + layoutId: string; }; /** @internal */ export const LayoutsControllerDeleteLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerDeleteLayoutRequest, - z.ZodTypeDef, - unknown + LayoutsControllerDeleteLayoutRequest, + z.ZodTypeDef, + unknown > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @internal */ export type LayoutsControllerDeleteLayoutRequest$Outbound = { - layoutId: string; + layoutId: string; }; /** @internal */ export const LayoutsControllerDeleteLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerDeleteLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerDeleteLayoutRequest + LayoutsControllerDeleteLayoutRequest$Outbound, + z.ZodTypeDef, + LayoutsControllerDeleteLayoutRequest > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @@ -39,10 +39,12 @@ export const LayoutsControllerDeleteLayoutRequest$outboundSchema: z.ZodType< * @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; + /** @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 index e26f7427..972044e8 100644 --- a/src/models/operations/layoutscontrollergetlayout.ts +++ b/src/models/operations/layoutscontrollergetlayout.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type LayoutsControllerGetLayoutRequest = { - /** - * The layout id - */ - layoutId: string; + /** + * The layout id + */ + layoutId: string; }; /** @internal */ export const LayoutsControllerGetLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerGetLayoutRequest, - z.ZodTypeDef, - unknown + LayoutsControllerGetLayoutRequest, + z.ZodTypeDef, + unknown > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @internal */ export type LayoutsControllerGetLayoutRequest$Outbound = { - layoutId: string; + layoutId: string; }; /** @internal */ export const LayoutsControllerGetLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerGetLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerGetLayoutRequest + LayoutsControllerGetLayoutRequest$Outbound, + z.ZodTypeDef, + LayoutsControllerGetLayoutRequest > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @@ -39,10 +39,11 @@ export const LayoutsControllerGetLayoutRequest$outboundSchema: z.ZodType< * @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; + /** @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 index a948cc19..3d7e1a80 100644 --- a/src/models/operations/layoutscontrollerlistlayouts.ts +++ b/src/models/operations/layoutscontrollerlistlayouts.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Direction of the sorting query param */ export const OrderBy = { - Asc: "ASC", - Desc: "DESC", + Asc: "ASC", + Desc: "DESC", } as const; /** * Direction of the sorting query param @@ -18,71 +18,73 @@ export const OrderBy = { 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; + /** + * 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); +export const OrderBy$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(OrderBy); /** @internal */ -export const OrderBy$outboundSchema: z.ZodNativeEnum = OrderBy$inboundSchema; +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; + /** @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 + LayoutsControllerListLayoutsRequest, + z.ZodTypeDef, + unknown > = z.object({ - page: z.number().optional(), - pageSize: z.number().optional(), - sortBy: z.string().optional(), - orderBy: OrderBy$inboundSchema.optional(), + 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; + page?: number | undefined; + pageSize?: number | undefined; + sortBy?: string | undefined; + orderBy?: string | undefined; }; /** @internal */ export const LayoutsControllerListLayoutsRequest$outboundSchema: z.ZodType< - LayoutsControllerListLayoutsRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerListLayoutsRequest + LayoutsControllerListLayoutsRequest$Outbound, + z.ZodTypeDef, + LayoutsControllerListLayoutsRequest > = z.object({ - page: z.number().optional(), - pageSize: z.number().optional(), - sortBy: z.string().optional(), - orderBy: OrderBy$outboundSchema.optional(), + page: z.number().optional(), + pageSize: z.number().optional(), + sortBy: z.string().optional(), + orderBy: OrderBy$outboundSchema.optional(), }); /** @@ -90,10 +92,12 @@ export const LayoutsControllerListLayoutsRequest$outboundSchema: z.ZodType< * @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; + /** @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 index 622b5730..e0c014cb 100644 --- a/src/models/operations/layoutscontrollersetdefaultlayout.ts +++ b/src/models/operations/layoutscontrollersetdefaultlayout.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type LayoutsControllerSetDefaultLayoutRequest = { - /** - * The layout id - */ - layoutId: string; + /** + * The layout id + */ + layoutId: string; }; /** @internal */ export const LayoutsControllerSetDefaultLayoutRequest$inboundSchema: z.ZodType< - LayoutsControllerSetDefaultLayoutRequest, - z.ZodTypeDef, - unknown + LayoutsControllerSetDefaultLayoutRequest, + z.ZodTypeDef, + unknown > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @internal */ export type LayoutsControllerSetDefaultLayoutRequest$Outbound = { - layoutId: string; + layoutId: string; }; /** @internal */ export const LayoutsControllerSetDefaultLayoutRequest$outboundSchema: z.ZodType< - LayoutsControllerSetDefaultLayoutRequest$Outbound, - z.ZodTypeDef, - LayoutsControllerSetDefaultLayoutRequest + LayoutsControllerSetDefaultLayoutRequest$Outbound, + z.ZodTypeDef, + LayoutsControllerSetDefaultLayoutRequest > = z.object({ - layoutId: z.string(), + layoutId: z.string(), }); /** @@ -39,10 +39,12 @@ export const LayoutsControllerSetDefaultLayoutRequest$outboundSchema: z.ZodType< * @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; + /** @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 index 683f1fa9..9891dd3d 100644 --- a/src/models/operations/layoutscontrollerupdatelayout.ts +++ b/src/models/operations/layoutscontrollerupdatelayout.ts @@ -2,65 +2,63 @@ * 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"; -import * as z from "zod"; export type LayoutsControllerUpdateLayoutRequest = { - /** - * The layout id - */ - layoutId: string; - updateLayoutRequestDto: components.UpdateLayoutRequestDto; + /** + * 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", - }); - }); + 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; + 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", - }); - }); + 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; + /** @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 71da9ee9..7785ee8e 100644 --- a/src/models/operations/messagescontrollerdeletemessage.ts +++ b/src/models/operations/messagescontrollerdeletemessage.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type MessagesControllerDeleteMessageRequest = { - messageId: string; + messageId: string; }; /** @internal */ export const MessagesControllerDeleteMessageRequest$inboundSchema: z.ZodType< - MessagesControllerDeleteMessageRequest, - z.ZodTypeDef, - unknown + MessagesControllerDeleteMessageRequest, + z.ZodTypeDef, + unknown > = z.object({ - messageId: z.string(), + messageId: z.string(), }); /** @internal */ export type MessagesControllerDeleteMessageRequest$Outbound = { - messageId: string; + messageId: string; }; /** @internal */ export const MessagesControllerDeleteMessageRequest$outboundSchema: z.ZodType< - MessagesControllerDeleteMessageRequest$Outbound, - z.ZodTypeDef, - MessagesControllerDeleteMessageRequest + MessagesControllerDeleteMessageRequest$Outbound, + z.ZodTypeDef, + MessagesControllerDeleteMessageRequest > = z.object({ - messageId: z.string(), + messageId: z.string(), }); /** @@ -36,10 +36,12 @@ export const MessagesControllerDeleteMessageRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessagesControllerDeleteMessageRequest$ { - /** @deprecated use `MessagesControllerDeleteMessageRequest$inboundSchema` instead. */ - export const inboundSchema = MessagesControllerDeleteMessageRequest$inboundSchema; - /** @deprecated use `MessagesControllerDeleteMessageRequest$outboundSchema` instead. */ - export const outboundSchema = MessagesControllerDeleteMessageRequest$outboundSchema; - /** @deprecated use `MessagesControllerDeleteMessageRequest$Outbound` instead. */ - export type Outbound = MessagesControllerDeleteMessageRequest$Outbound; + /** @deprecated use `MessagesControllerDeleteMessageRequest$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerDeleteMessageRequest$inboundSchema; + /** @deprecated use `MessagesControllerDeleteMessageRequest$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerDeleteMessageRequest$outboundSchema; + /** @deprecated use `MessagesControllerDeleteMessageRequest$Outbound` instead. */ + export type Outbound = MessagesControllerDeleteMessageRequest$Outbound; } diff --git a/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts b/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts index e6b22315..f9e0d735 100644 --- a/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts +++ b/src/models/operations/messagescontrollerdeletemessagesbytransactionid.ts @@ -2,18 +2,18 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The channel of the message to be deleted */ export const Channel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; /** * The channel of the message to be deleted @@ -21,67 +21,72 @@ export const Channel = { export type Channel = ClosedEnum; export type MessagesControllerDeleteMessagesByTransactionIdRequest = { - /** - * The channel of the message to be deleted - */ - channel?: Channel | undefined; - transactionId: string; + /** + * The channel of the message to be deleted + */ + channel?: Channel | undefined; + transactionId: string; }; /** @internal */ -export const Channel$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Channel); +export const Channel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channel); /** @internal */ -export const Channel$outboundSchema: z.ZodNativeEnum = Channel$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 Channel$ { - /** @deprecated use `Channel$inboundSchema` instead. */ - export const inboundSchema = Channel$inboundSchema; - /** @deprecated use `Channel$outboundSchema` instead. */ - export const outboundSchema = Channel$outboundSchema; + /** @deprecated use `Channel$inboundSchema` instead. */ + export const inboundSchema = Channel$inboundSchema; + /** @deprecated use `Channel$outboundSchema` instead. */ + export const outboundSchema = Channel$outboundSchema; } /** @internal */ -export const MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema: z.ZodType< +export const MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema: + z.ZodType< MessagesControllerDeleteMessagesByTransactionIdRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ channel: Channel$inboundSchema.optional(), transactionId: z.string(), -}); + }); /** @internal */ export type MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound = { - channel?: string | undefined; - transactionId: string; + channel?: string | undefined; + transactionId: string; }; /** @internal */ -export const MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema: z.ZodType< +export const MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema: + z.ZodType< MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound, z.ZodTypeDef, MessagesControllerDeleteMessagesByTransactionIdRequest -> = z.object({ + > = z.object({ channel: Channel$outboundSchema.optional(), transactionId: 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 MessagesControllerDeleteMessagesByTransactionIdRequest$ { - /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema` instead. */ - export const inboundSchema = - MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema; - /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema` instead. */ - export const outboundSchema = - MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema; - /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound` instead. */ - export type Outbound = MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound; + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerDeleteMessagesByTransactionIdRequest$inboundSchema; + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerDeleteMessagesByTransactionIdRequest$outboundSchema; + /** @deprecated use `MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound` instead. */ + export type Outbound = + MessagesControllerDeleteMessagesByTransactionIdRequest$Outbound; } diff --git a/src/models/operations/messagescontrollergetmessages.ts b/src/models/operations/messagescontrollergetmessages.ts index 705d4622..bd77fc5d 100644 --- a/src/models/operations/messagescontrollergetmessages.ts +++ b/src/models/operations/messagescontrollergetmessages.ts @@ -2,78 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const QueryParamChannel = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; export type QueryParamChannel = ClosedEnum; export type MessagesControllerGetMessagesRequest = { - channel?: QueryParamChannel | undefined; - subscriberId?: string | undefined; - transactionId?: Array | undefined; - page?: number | undefined; - limit?: number | undefined; + channel?: QueryParamChannel | undefined; + subscriberId?: string | undefined; + transactionId?: Array | undefined; + page?: number | undefined; + limit?: number | undefined; }; /** @internal */ -export const QueryParamChannel$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamChannel); +export const QueryParamChannel$inboundSchema: z.ZodNativeEnum< + typeof QueryParamChannel +> = z.nativeEnum(QueryParamChannel); /** @internal */ -export const QueryParamChannel$outboundSchema: z.ZodNativeEnum = - QueryParamChannel$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 QueryParamChannel$ { - /** @deprecated use `QueryParamChannel$inboundSchema` instead. */ - export const inboundSchema = QueryParamChannel$inboundSchema; - /** @deprecated use `QueryParamChannel$outboundSchema` instead. */ - export const outboundSchema = QueryParamChannel$outboundSchema; + /** @deprecated use `QueryParamChannel$inboundSchema` instead. */ + export const inboundSchema = QueryParamChannel$inboundSchema; + /** @deprecated use `QueryParamChannel$outboundSchema` instead. */ + export const outboundSchema = QueryParamChannel$outboundSchema; } /** @internal */ export const MessagesControllerGetMessagesRequest$inboundSchema: z.ZodType< - MessagesControllerGetMessagesRequest, - z.ZodTypeDef, - unknown + MessagesControllerGetMessagesRequest, + z.ZodTypeDef, + unknown > = z.object({ - channel: QueryParamChannel$inboundSchema.optional(), - subscriberId: z.string().optional(), - transactionId: z.array(z.string()).optional(), - page: z.number().default(0), - limit: z.number().default(10), + channel: QueryParamChannel$inboundSchema.optional(), + subscriberId: z.string().optional(), + transactionId: z.array(z.string()).optional(), + page: z.number().default(0), + limit: z.number().default(10), }); /** @internal */ export type MessagesControllerGetMessagesRequest$Outbound = { - channel?: string | undefined; - subscriberId?: string | undefined; - transactionId?: Array | undefined; - page: number; - limit: number; + channel?: string | undefined; + subscriberId?: string | undefined; + transactionId?: Array | undefined; + page: number; + limit: number; }; /** @internal */ export const MessagesControllerGetMessagesRequest$outboundSchema: z.ZodType< - MessagesControllerGetMessagesRequest$Outbound, - z.ZodTypeDef, - MessagesControllerGetMessagesRequest + MessagesControllerGetMessagesRequest$Outbound, + z.ZodTypeDef, + MessagesControllerGetMessagesRequest > = z.object({ - channel: QueryParamChannel$outboundSchema.optional(), - subscriberId: z.string().optional(), - transactionId: z.array(z.string()).optional(), - page: z.number().default(0), - limit: z.number().default(10), + channel: QueryParamChannel$outboundSchema.optional(), + subscriberId: z.string().optional(), + transactionId: z.array(z.string()).optional(), + page: z.number().default(0), + limit: z.number().default(10), }); /** @@ -81,10 +83,12 @@ export const MessagesControllerGetMessagesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MessagesControllerGetMessagesRequest$ { - /** @deprecated use `MessagesControllerGetMessagesRequest$inboundSchema` instead. */ - export const inboundSchema = MessagesControllerGetMessagesRequest$inboundSchema; - /** @deprecated use `MessagesControllerGetMessagesRequest$outboundSchema` instead. */ - export const outboundSchema = MessagesControllerGetMessagesRequest$outboundSchema; - /** @deprecated use `MessagesControllerGetMessagesRequest$Outbound` instead. */ - export type Outbound = MessagesControllerGetMessagesRequest$Outbound; + /** @deprecated use `MessagesControllerGetMessagesRequest$inboundSchema` instead. */ + export const inboundSchema = + MessagesControllerGetMessagesRequest$inboundSchema; + /** @deprecated use `MessagesControllerGetMessagesRequest$outboundSchema` instead. */ + export const outboundSchema = + MessagesControllerGetMessagesRequest$outboundSchema; + /** @deprecated use `MessagesControllerGetMessagesRequest$Outbound` instead. */ + export type Outbound = MessagesControllerGetMessagesRequest$Outbound; } diff --git a/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts b/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts index 3f04f8dd..2a456ee2 100644 --- a/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollerdeletenotificationgroup.ts @@ -5,43 +5,47 @@ import * as z from "zod"; export type NotificationGroupsControllerDeleteNotificationGroupRequest = { - id: string; + id: string; }; /** @internal */ -export const NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema: z.ZodType< +export const NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema: + z.ZodType< NotificationGroupsControllerDeleteNotificationGroupRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ id: z.string(), -}); + }); /** @internal */ -export type NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound = { +export type NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound = + { id: string; -}; + }; /** @internal */ -export const NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema: z.ZodType< +export const NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema: + z.ZodType< NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound, z.ZodTypeDef, NotificationGroupsControllerDeleteNotificationGroupRequest -> = z.object({ + > = z.object({ id: 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 NotificationGroupsControllerDeleteNotificationGroupRequest$ { - /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema; - /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema; - /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound` instead. */ - export type Outbound = NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound; + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerDeleteNotificationGroupRequest$inboundSchema; + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerDeleteNotificationGroupRequest$outboundSchema; + /** @deprecated use `NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerDeleteNotificationGroupRequest$Outbound; } diff --git a/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts b/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts index 8a4f3e2a..ed8870f6 100644 --- a/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollergetnotificationgroup.ts @@ -5,43 +5,46 @@ import * as z from "zod"; export type NotificationGroupsControllerGetNotificationGroupRequest = { - id: string; + id: string; }; /** @internal */ -export const NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema: z.ZodType< +export const NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema: + z.ZodType< NotificationGroupsControllerGetNotificationGroupRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ id: z.string(), -}); + }); /** @internal */ export type NotificationGroupsControllerGetNotificationGroupRequest$Outbound = { - id: string; + id: string; }; /** @internal */ -export const NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema: z.ZodType< +export const NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema: + z.ZodType< NotificationGroupsControllerGetNotificationGroupRequest$Outbound, z.ZodTypeDef, NotificationGroupsControllerGetNotificationGroupRequest -> = z.object({ + > = z.object({ id: 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 NotificationGroupsControllerGetNotificationGroupRequest$ { - /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema; - /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema; - /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$Outbound` instead. */ - export type Outbound = NotificationGroupsControllerGetNotificationGroupRequest$Outbound; + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerGetNotificationGroupRequest$inboundSchema; + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerGetNotificationGroupRequest$outboundSchema; + /** @deprecated use `NotificationGroupsControllerGetNotificationGroupRequest$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerGetNotificationGroupRequest$Outbound; } diff --git a/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts b/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts index 72fea630..ca99c034 100644 --- a/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts +++ b/src/models/operations/notificationgroupscontrollerupdatenotificationgroup.ts @@ -2,66 +2,68 @@ * 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"; -import * as z from "zod"; export type NotificationGroupsControllerUpdateNotificationGroupRequest = { - id: string; - createNotificationGroupRequestDto: components.CreateNotificationGroupRequestDto; + id: string; + createNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto; }; /** @internal */ -export const NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema: z.ZodType< +export const NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema: + z.ZodType< NotificationGroupsControllerUpdateNotificationGroupRequest, z.ZodTypeDef, unknown -> = z - .object({ - id: z.string(), - CreateNotificationGroupRequestDto: - components.CreateNotificationGroupRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - CreateNotificationGroupRequestDto: "createNotificationGroupRequestDto", - }); + > = z.object({ + id: z.string(), + CreateNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "CreateNotificationGroupRequestDto": "createNotificationGroupRequestDto", }); + }); /** @internal */ -export type NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound = { +export type NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound = + { id: string; - CreateNotificationGroupRequestDto: components.CreateNotificationGroupRequestDto$Outbound; -}; + CreateNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto$Outbound; + }; /** @internal */ -export const NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema: z.ZodType< +export const NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema: + z.ZodType< NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound, z.ZodTypeDef, NotificationGroupsControllerUpdateNotificationGroupRequest -> = z - .object({ - id: z.string(), - createNotificationGroupRequestDto: - components.CreateNotificationGroupRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - createNotificationGroupRequestDto: "CreateNotificationGroupRequestDto", - }); + > = z.object({ + id: z.string(), + createNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + createNotificationGroupRequestDto: "CreateNotificationGroupRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationGroupsControllerUpdateNotificationGroupRequest$ { - /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema; - /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema; - /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound` instead. */ - export type Outbound = NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound; + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationGroupsControllerUpdateNotificationGroupRequest$inboundSchema; + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationGroupsControllerUpdateNotificationGroupRequest$outboundSchema; + /** @deprecated use `NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound` instead. */ + export type Outbound = + NotificationGroupsControllerUpdateNotificationGroupRequest$Outbound; } diff --git a/src/models/operations/notificationscontrollergetactivitygraphstats.ts b/src/models/operations/notificationscontrollergetactivitygraphstats.ts index 4c177b9d..cc0814dd 100644 --- a/src/models/operations/notificationscontrollergetactivitygraphstats.ts +++ b/src/models/operations/notificationscontrollergetactivitygraphstats.ts @@ -5,42 +5,46 @@ import * as z from "zod"; export type NotificationsControllerGetActivityGraphStatsRequest = { - days?: number | undefined; + days?: number | undefined; }; /** @internal */ -export const NotificationsControllerGetActivityGraphStatsRequest$inboundSchema: z.ZodType< +export const NotificationsControllerGetActivityGraphStatsRequest$inboundSchema: + z.ZodType< NotificationsControllerGetActivityGraphStatsRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ days: z.number().optional(), -}); + }); /** @internal */ export type NotificationsControllerGetActivityGraphStatsRequest$Outbound = { - days?: number | undefined; + days?: number | undefined; }; /** @internal */ -export const NotificationsControllerGetActivityGraphStatsRequest$outboundSchema: z.ZodType< +export const NotificationsControllerGetActivityGraphStatsRequest$outboundSchema: + z.ZodType< NotificationsControllerGetActivityGraphStatsRequest$Outbound, z.ZodTypeDef, NotificationsControllerGetActivityGraphStatsRequest -> = z.object({ + > = z.object({ days: z.number().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationsControllerGetActivityGraphStatsRequest$ { - /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$inboundSchema` instead. */ - export const inboundSchema = NotificationsControllerGetActivityGraphStatsRequest$inboundSchema; - /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$outboundSchema` instead. */ - export const outboundSchema = - NotificationsControllerGetActivityGraphStatsRequest$outboundSchema; - /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$Outbound` instead. */ - export type Outbound = NotificationsControllerGetActivityGraphStatsRequest$Outbound; + /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerGetActivityGraphStatsRequest$inboundSchema; + /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerGetActivityGraphStatsRequest$outboundSchema; + /** @deprecated use `NotificationsControllerGetActivityGraphStatsRequest$Outbound` instead. */ + export type Outbound = + NotificationsControllerGetActivityGraphStatsRequest$Outbound; } diff --git a/src/models/operations/notificationscontrollergetnotification.ts b/src/models/operations/notificationscontrollergetnotification.ts index 23780b15..1f7fa92b 100644 --- a/src/models/operations/notificationscontrollergetnotification.ts +++ b/src/models/operations/notificationscontrollergetnotification.ts @@ -5,41 +5,45 @@ import * as z from "zod"; export type NotificationsControllerGetNotificationRequest = { - notificationId: string; + notificationId: string; }; /** @internal */ -export const NotificationsControllerGetNotificationRequest$inboundSchema: z.ZodType< +export const NotificationsControllerGetNotificationRequest$inboundSchema: + z.ZodType< NotificationsControllerGetNotificationRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ notificationId: z.string(), -}); + }); /** @internal */ export type NotificationsControllerGetNotificationRequest$Outbound = { - notificationId: string; + notificationId: string; }; /** @internal */ -export const NotificationsControllerGetNotificationRequest$outboundSchema: z.ZodType< +export const NotificationsControllerGetNotificationRequest$outboundSchema: + z.ZodType< NotificationsControllerGetNotificationRequest$Outbound, z.ZodTypeDef, NotificationsControllerGetNotificationRequest -> = z.object({ + > = z.object({ notificationId: 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 NotificationsControllerGetNotificationRequest$ { - /** @deprecated use `NotificationsControllerGetNotificationRequest$inboundSchema` instead. */ - export const inboundSchema = NotificationsControllerGetNotificationRequest$inboundSchema; - /** @deprecated use `NotificationsControllerGetNotificationRequest$outboundSchema` instead. */ - export const outboundSchema = NotificationsControllerGetNotificationRequest$outboundSchema; - /** @deprecated use `NotificationsControllerGetNotificationRequest$Outbound` instead. */ - export type Outbound = NotificationsControllerGetNotificationRequest$Outbound; + /** @deprecated use `NotificationsControllerGetNotificationRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerGetNotificationRequest$inboundSchema; + /** @deprecated use `NotificationsControllerGetNotificationRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerGetNotificationRequest$outboundSchema; + /** @deprecated use `NotificationsControllerGetNotificationRequest$Outbound` instead. */ + export type Outbound = NotificationsControllerGetNotificationRequest$Outbound; } diff --git a/src/models/operations/notificationscontrollerlistnotifications.ts b/src/models/operations/notificationscontrollerlistnotifications.ts index 0465f07f..e7d953a6 100644 --- a/src/models/operations/notificationscontrollerlistnotifications.ts +++ b/src/models/operations/notificationscontrollerlistnotifications.ts @@ -2,54 +2,57 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const Channels = { - InApp: "in_app", - Email: "email", - Sms: "sms", - Chat: "chat", - Push: "push", + InApp: "in_app", + Email: "email", + Sms: "sms", + Chat: "chat", + Push: "push", } as const; export type Channels = ClosedEnum; export type NotificationsControllerListNotificationsRequest = { - channels: Array; - templates: Array; - emails: Array; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - search: string; - subscriberIds: Array; - page?: number | undefined; - transactionId?: string | undefined; + channels: Array; + templates: Array; + emails: Array; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + search: string; + subscriberIds: Array; + page?: number | undefined; + transactionId?: string | undefined; }; /** @internal */ -export const Channels$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Channels); +export const Channels$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Channels); /** @internal */ -export const Channels$outboundSchema: z.ZodNativeEnum = Channels$inboundSchema; +export const Channels$outboundSchema: z.ZodNativeEnum = + Channels$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Channels$ { - /** @deprecated use `Channels$inboundSchema` instead. */ - export const inboundSchema = Channels$inboundSchema; - /** @deprecated use `Channels$outboundSchema` instead. */ - export const outboundSchema = Channels$outboundSchema; + /** @deprecated use `Channels$inboundSchema` instead. */ + export const inboundSchema = Channels$inboundSchema; + /** @deprecated use `Channels$outboundSchema` instead. */ + export const outboundSchema = Channels$outboundSchema; } /** @internal */ -export const NotificationsControllerListNotificationsRequest$inboundSchema: z.ZodType< +export const NotificationsControllerListNotificationsRequest$inboundSchema: + z.ZodType< NotificationsControllerListNotificationsRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ channels: z.array(Channels$inboundSchema), templates: z.array(z.string()), emails: z.array(z.string()), @@ -57,25 +60,26 @@ export const NotificationsControllerListNotificationsRequest$inboundSchema: z.Zo subscriberIds: z.array(z.string()), page: z.number().default(0), transactionId: z.string().optional(), -}); + }); /** @internal */ export type NotificationsControllerListNotificationsRequest$Outbound = { - channels: Array; - templates: Array; - emails: Array; - search: string; - subscriberIds: Array; - page: number; - transactionId?: string | undefined; + channels: Array; + templates: Array; + emails: Array; + search: string; + subscriberIds: Array; + page: number; + transactionId?: string | undefined; }; /** @internal */ -export const NotificationsControllerListNotificationsRequest$outboundSchema: z.ZodType< +export const NotificationsControllerListNotificationsRequest$outboundSchema: + z.ZodType< NotificationsControllerListNotificationsRequest$Outbound, z.ZodTypeDef, NotificationsControllerListNotificationsRequest -> = z.object({ + > = z.object({ channels: z.array(Channels$outboundSchema), templates: z.array(z.string()), emails: z.array(z.string()), @@ -83,17 +87,20 @@ export const NotificationsControllerListNotificationsRequest$outboundSchema: z.Z subscriberIds: z.array(z.string()), page: z.number().default(0), transactionId: 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 NotificationsControllerListNotificationsRequest$ { - /** @deprecated use `NotificationsControllerListNotificationsRequest$inboundSchema` instead. */ - export const inboundSchema = NotificationsControllerListNotificationsRequest$inboundSchema; - /** @deprecated use `NotificationsControllerListNotificationsRequest$outboundSchema` instead. */ - export const outboundSchema = NotificationsControllerListNotificationsRequest$outboundSchema; - /** @deprecated use `NotificationsControllerListNotificationsRequest$Outbound` instead. */ - export type Outbound = NotificationsControllerListNotificationsRequest$Outbound; + /** @deprecated use `NotificationsControllerListNotificationsRequest$inboundSchema` instead. */ + export const inboundSchema = + NotificationsControllerListNotificationsRequest$inboundSchema; + /** @deprecated use `NotificationsControllerListNotificationsRequest$outboundSchema` instead. */ + export const outboundSchema = + NotificationsControllerListNotificationsRequest$outboundSchema; + /** @deprecated use `NotificationsControllerListNotificationsRequest$Outbound` instead. */ + export type Outbound = + NotificationsControllerListNotificationsRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerchataccessoauth.ts b/src/models/operations/subscriberscontrollerchataccessoauth.ts index 295f1849..e22a6cd8 100644 --- a/src/models/operations/subscriberscontrollerchataccessoauth.ts +++ b/src/models/operations/subscriberscontrollerchataccessoauth.ts @@ -5,57 +5,61 @@ import * as z from "zod"; export type SubscribersControllerChatAccessOauthRequest = { - subscriberId: string; - providerId?: any | undefined; - hmacHash: string; - environmentId: string; - integrationIdentifier?: string | undefined; + subscriberId: string; + providerId?: any | undefined; + hmacHash: string; + environmentId: string; + integrationIdentifier?: string | undefined; }; /** @internal */ -export const SubscribersControllerChatAccessOauthRequest$inboundSchema: z.ZodType< +export const SubscribersControllerChatAccessOauthRequest$inboundSchema: + z.ZodType< SubscribersControllerChatAccessOauthRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: z.any().optional(), hmacHash: z.string(), environmentId: z.string(), integrationIdentifier: z.string().optional(), -}); + }); /** @internal */ export type SubscribersControllerChatAccessOauthRequest$Outbound = { - subscriberId: string; - providerId?: any | undefined; - hmacHash: string; - environmentId: string; - integrationIdentifier?: string | undefined; + subscriberId: string; + providerId?: any | undefined; + hmacHash: string; + environmentId: string; + integrationIdentifier?: string | undefined; }; /** @internal */ -export const SubscribersControllerChatAccessOauthRequest$outboundSchema: z.ZodType< +export const SubscribersControllerChatAccessOauthRequest$outboundSchema: + z.ZodType< SubscribersControllerChatAccessOauthRequest$Outbound, z.ZodTypeDef, SubscribersControllerChatAccessOauthRequest -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: z.any().optional(), hmacHash: z.string(), environmentId: z.string(), integrationIdentifier: 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 SubscribersControllerChatAccessOauthRequest$ { - /** @deprecated use `SubscribersControllerChatAccessOauthRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerChatAccessOauthRequest$inboundSchema; - /** @deprecated use `SubscribersControllerChatAccessOauthRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerChatAccessOauthRequest$outboundSchema; - /** @deprecated use `SubscribersControllerChatAccessOauthRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerChatAccessOauthRequest$Outbound; + /** @deprecated use `SubscribersControllerChatAccessOauthRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerChatAccessOauthRequest$inboundSchema; + /** @deprecated use `SubscribersControllerChatAccessOauthRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerChatAccessOauthRequest$outboundSchema; + /** @deprecated use `SubscribersControllerChatAccessOauthRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerChatAccessOauthRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerchatoauthcallback.ts b/src/models/operations/subscriberscontrollerchatoauthcallback.ts index ef2f12f2..5b03acc8 100644 --- a/src/models/operations/subscriberscontrollerchatoauthcallback.ts +++ b/src/models/operations/subscriberscontrollerchatoauthcallback.ts @@ -5,93 +5,102 @@ import * as z from "zod"; export type SubscribersControllerChatOauthCallbackRequest = { - subscriberId: string; - providerId?: any | undefined; - code: string; - hmacHash: string; - environmentId: string; - integrationIdentifier?: string | undefined; + subscriberId: string; + providerId?: any | undefined; + code: string; + hmacHash: string; + environmentId: string; + integrationIdentifier?: string | undefined; }; export type SubscribersControllerChatOauthCallbackResponseBody = {}; /** @internal */ -export const SubscribersControllerChatOauthCallbackRequest$inboundSchema: z.ZodType< +export const SubscribersControllerChatOauthCallbackRequest$inboundSchema: + z.ZodType< SubscribersControllerChatOauthCallbackRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: z.any().optional(), code: z.string(), hmacHash: z.string(), environmentId: z.string(), integrationIdentifier: z.string().optional(), -}); + }); /** @internal */ export type SubscribersControllerChatOauthCallbackRequest$Outbound = { - subscriberId: string; - providerId?: any | undefined; - code: string; - hmacHash: string; - environmentId: string; - integrationIdentifier?: string | undefined; + subscriberId: string; + providerId?: any | undefined; + code: string; + hmacHash: string; + environmentId: string; + integrationIdentifier?: string | undefined; }; /** @internal */ -export const SubscribersControllerChatOauthCallbackRequest$outboundSchema: z.ZodType< +export const SubscribersControllerChatOauthCallbackRequest$outboundSchema: + z.ZodType< SubscribersControllerChatOauthCallbackRequest$Outbound, z.ZodTypeDef, SubscribersControllerChatOauthCallbackRequest -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: z.any().optional(), code: z.string(), hmacHash: z.string(), environmentId: z.string(), integrationIdentifier: 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 SubscribersControllerChatOauthCallbackRequest$ { - /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerChatOauthCallbackRequest$inboundSchema; - /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerChatOauthCallbackRequest$outboundSchema; - /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerChatOauthCallbackRequest$Outbound; + /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerChatOauthCallbackRequest$inboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerChatOauthCallbackRequest$outboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerChatOauthCallbackRequest$Outbound; } /** @internal */ -export const SubscribersControllerChatOauthCallbackResponseBody$inboundSchema: z.ZodType< +export const SubscribersControllerChatOauthCallbackResponseBody$inboundSchema: + z.ZodType< SubscribersControllerChatOauthCallbackResponseBody, z.ZodTypeDef, unknown -> = z.object({}); + > = z.object({}); /** @internal */ export type SubscribersControllerChatOauthCallbackResponseBody$Outbound = {}; /** @internal */ -export const SubscribersControllerChatOauthCallbackResponseBody$outboundSchema: z.ZodType< +export const SubscribersControllerChatOauthCallbackResponseBody$outboundSchema: + z.ZodType< SubscribersControllerChatOauthCallbackResponseBody$Outbound, z.ZodTypeDef, SubscribersControllerChatOauthCallbackResponseBody -> = z.object({}); + > = 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 SubscribersControllerChatOauthCallbackResponseBody$ { - /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerChatOauthCallbackResponseBody$inboundSchema; - /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerChatOauthCallbackResponseBody$outboundSchema; - /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$Outbound` instead. */ - export type Outbound = SubscribersControllerChatOauthCallbackResponseBody$Outbound; + /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerChatOauthCallbackResponseBody$inboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerChatOauthCallbackResponseBody$outboundSchema; + /** @deprecated use `SubscribersControllerChatOauthCallbackResponseBody$Outbound` instead. */ + export type Outbound = + SubscribersControllerChatOauthCallbackResponseBody$Outbound; } diff --git a/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts b/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts index 7ebd675f..f9bfc547 100644 --- a/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts +++ b/src/models/operations/subscriberscontrollerdeletesubscribercredentials.ts @@ -5,47 +5,50 @@ import * as z from "zod"; export type SubscribersControllerDeleteSubscriberCredentialsRequest = { - subscriberId: string; - providerId: string; + subscriberId: string; + providerId: string; }; /** @internal */ -export const SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema: z.ZodType< +export const SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema: + z.ZodType< SubscribersControllerDeleteSubscriberCredentialsRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: z.string(), -}); + }); /** @internal */ export type SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound = { - subscriberId: string; - providerId: string; + subscriberId: string; + providerId: string; }; /** @internal */ -export const SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema: z.ZodType< +export const SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema: + z.ZodType< SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound, z.ZodTypeDef, SubscribersControllerDeleteSubscriberCredentialsRequest -> = z.object({ + > = z.object({ subscriberId: z.string(), providerId: 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 SubscribersControllerDeleteSubscriberCredentialsRequest$ { - /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema; - /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema; - /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound; + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerDeleteSubscriberCredentialsRequest$inboundSchema; + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerDeleteSubscriberCredentialsRequest$outboundSchema; + /** @deprecated use `SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerDeleteSubscriberCredentialsRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollergetnotificationsfeed.ts b/src/models/operations/subscriberscontrollergetnotificationsfeed.ts index b3a17c71..47dbd4d7 100644 --- a/src/models/operations/subscriberscontrollergetnotificationsfeed.ts +++ b/src/models/operations/subscriberscontrollergetnotificationsfeed.ts @@ -2,131 +2,139 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; export type SubscribersControllerGetNotificationsFeedRequest = { - subscriberId: string; - page?: number | undefined; - limit?: number | undefined; - read?: boolean | undefined; - seen?: boolean | undefined; - /** - * Base64 encoded string of the partial payload JSON object - */ - payload?: string | undefined; + subscriberId: string; + page?: number | undefined; + limit?: number | undefined; + read?: boolean | undefined; + seen?: boolean | undefined; + /** + * Base64 encoded string of the partial payload JSON object + */ + payload?: string | undefined; }; export type SubscribersControllerGetNotificationsFeedResponseBody = { - 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; + 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; }; /** @internal */ -export const SubscribersControllerGetNotificationsFeedRequest$inboundSchema: z.ZodType< +export const SubscribersControllerGetNotificationsFeedRequest$inboundSchema: + z.ZodType< SubscribersControllerGetNotificationsFeedRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), page: z.number().optional(), limit: z.number().default(10), read: z.boolean().optional(), seen: z.boolean().optional(), payload: z.string().optional(), -}); + }); /** @internal */ export type SubscribersControllerGetNotificationsFeedRequest$Outbound = { - subscriberId: string; - page?: number | undefined; - limit: number; - read?: boolean | undefined; - seen?: boolean | undefined; - payload?: string | undefined; + subscriberId: string; + page?: number | undefined; + limit: number; + read?: boolean | undefined; + seen?: boolean | undefined; + payload?: string | undefined; }; /** @internal */ -export const SubscribersControllerGetNotificationsFeedRequest$outboundSchema: z.ZodType< +export const SubscribersControllerGetNotificationsFeedRequest$outboundSchema: + z.ZodType< SubscribersControllerGetNotificationsFeedRequest$Outbound, z.ZodTypeDef, SubscribersControllerGetNotificationsFeedRequest -> = z.object({ + > = z.object({ subscriberId: z.string(), page: z.number().optional(), limit: z.number().default(10), read: z.boolean().optional(), seen: z.boolean().optional(), payload: 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 SubscribersControllerGetNotificationsFeedRequest$ { - /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerGetNotificationsFeedRequest$inboundSchema; - /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerGetNotificationsFeedRequest$outboundSchema; - /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerGetNotificationsFeedRequest$Outbound; + /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetNotificationsFeedRequest$inboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetNotificationsFeedRequest$outboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerGetNotificationsFeedRequest$Outbound; } /** @internal */ -export const SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema: z.ZodType< +export const SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema: + z.ZodType< SubscribersControllerGetNotificationsFeedResponseBody, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ data: z.array(components.FeedResponseDto$inboundSchema), hasMore: z.boolean(), page: z.number(), pageSize: z.number(), -}); + }); /** @internal */ export type SubscribersControllerGetNotificationsFeedResponseBody$Outbound = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; }; /** @internal */ -export const SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema: z.ZodType< +export const SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema: + z.ZodType< SubscribersControllerGetNotificationsFeedResponseBody$Outbound, z.ZodTypeDef, SubscribersControllerGetNotificationsFeedResponseBody -> = z.object({ + > = z.object({ data: z.array(components.FeedResponseDto$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 SubscribersControllerGetNotificationsFeedResponseBody$ { - /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema; - /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema; - /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$Outbound` instead. */ - export type Outbound = SubscribersControllerGetNotificationsFeedResponseBody$Outbound; + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetNotificationsFeedResponseBody$inboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetNotificationsFeedResponseBody$outboundSchema; + /** @deprecated use `SubscribersControllerGetNotificationsFeedResponseBody$Outbound` instead. */ + export type Outbound = + SubscribersControllerGetNotificationsFeedResponseBody$Outbound; } diff --git a/src/models/operations/subscriberscontrollergetsubscriber.ts b/src/models/operations/subscriberscontrollergetsubscriber.ts index 0a94c96d..fb99b213 100644 --- a/src/models/operations/subscriberscontrollergetsubscriber.ts +++ b/src/models/operations/subscriberscontrollergetsubscriber.ts @@ -5,41 +5,44 @@ import * as z from "zod"; export type SubscribersControllerGetSubscriberRequest = { - subscriberId: string; + subscriberId: string; }; /** @internal */ export const SubscribersControllerGetSubscriberRequest$inboundSchema: z.ZodType< - SubscribersControllerGetSubscriberRequest, - z.ZodTypeDef, - unknown + SubscribersControllerGetSubscriberRequest, + z.ZodTypeDef, + unknown > = z.object({ - subscriberId: z.string(), + subscriberId: z.string(), }); /** @internal */ export type SubscribersControllerGetSubscriberRequest$Outbound = { - subscriberId: string; + subscriberId: string; }; /** @internal */ -export const SubscribersControllerGetSubscriberRequest$outboundSchema: z.ZodType< +export const SubscribersControllerGetSubscriberRequest$outboundSchema: + z.ZodType< SubscribersControllerGetSubscriberRequest$Outbound, z.ZodTypeDef, SubscribersControllerGetSubscriberRequest -> = z.object({ + > = z.object({ subscriberId: 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 SubscribersControllerGetSubscriberRequest$ { - /** @deprecated use `SubscribersControllerGetSubscriberRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerGetSubscriberRequest$inboundSchema; - /** @deprecated use `SubscribersControllerGetSubscriberRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerGetSubscriberRequest$outboundSchema; - /** @deprecated use `SubscribersControllerGetSubscriberRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerGetSubscriberRequest$Outbound; + /** @deprecated use `SubscribersControllerGetSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetSubscriberRequest$inboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetSubscriberRequest$outboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerGetSubscriberRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts b/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts index fc2bcb41..15386fd2 100644 --- a/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts +++ b/src/models/operations/subscriberscontrollergetsubscriberpreferencebylevel.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * the preferences level to be retrieved( Subscriber / Topic) */ export const Parameter = { - Subscriber: "Subscriber", - Topic: "Topic", + Subscriber: "Subscriber", + Topic: "Topic", } as const; /** * the preferences level to be retrieved( Subscriber / Topic) @@ -18,67 +18,73 @@ export const Parameter = { export type Parameter = ClosedEnum; export type SubscribersControllerGetSubscriberPreferenceByLevelRequest = { - /** - * the preferences level to be retrieved( Subscriber / Topic) - */ - parameter: Parameter; - subscriberId: string; + /** + * the preferences level to be retrieved( Subscriber / Topic) + */ + parameter: Parameter; + subscriberId: string; }; /** @internal */ -export const Parameter$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Parameter); +export const Parameter$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Parameter); /** @internal */ -export const Parameter$outboundSchema: z.ZodNativeEnum = Parameter$inboundSchema; +export const Parameter$outboundSchema: z.ZodNativeEnum = + Parameter$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Parameter$ { - /** @deprecated use `Parameter$inboundSchema` instead. */ - export const inboundSchema = Parameter$inboundSchema; - /** @deprecated use `Parameter$outboundSchema` instead. */ - export const outboundSchema = Parameter$outboundSchema; + /** @deprecated use `Parameter$inboundSchema` instead. */ + export const inboundSchema = Parameter$inboundSchema; + /** @deprecated use `Parameter$outboundSchema` instead. */ + export const outboundSchema = Parameter$outboundSchema; } /** @internal */ -export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema: z.ZodType< +export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema: + z.ZodType< SubscribersControllerGetSubscriberPreferenceByLevelRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ parameter: Parameter$inboundSchema, subscriberId: z.string(), -}); + }); /** @internal */ -export type SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound = { +export type SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound = + { parameter: string; subscriberId: string; -}; + }; /** @internal */ -export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema: z.ZodType< +export const SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema: + z.ZodType< SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound, z.ZodTypeDef, SubscribersControllerGetSubscriberPreferenceByLevelRequest -> = z.object({ + > = z.object({ parameter: Parameter$outboundSchema, subscriberId: 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 SubscribersControllerGetSubscriberPreferenceByLevelRequest$ { - /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema; - /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema; - /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound; + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetSubscriberPreferenceByLevelRequest$inboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetSubscriberPreferenceByLevelRequest$outboundSchema; + /** @deprecated use `SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerGetSubscriberPreferenceByLevelRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollergetunseencount.ts b/src/models/operations/subscriberscontrollergetunseencount.ts index 420f0683..fc9e6dc4 100644 --- a/src/models/operations/subscriberscontrollergetunseencount.ts +++ b/src/models/operations/subscriberscontrollergetunseencount.ts @@ -5,49 +5,50 @@ import * as z from "zod"; export type SubscribersControllerGetUnseenCountRequest = { - seen: boolean; - subscriberId: string; - limit: number; + seen: boolean; + subscriberId: string; + limit: number; }; /** @internal */ -export const SubscribersControllerGetUnseenCountRequest$inboundSchema: z.ZodType< - SubscribersControllerGetUnseenCountRequest, - z.ZodTypeDef, - unknown -> = z.object({ - seen: z.boolean(), - subscriberId: z.string(), - limit: z.number(), -}); +export const SubscribersControllerGetUnseenCountRequest$inboundSchema: + z.ZodType = + z.object({ + seen: z.boolean(), + subscriberId: z.string(), + limit: z.number(), + }); /** @internal */ export type SubscribersControllerGetUnseenCountRequest$Outbound = { - seen: boolean; - subscriberId: string; - limit: number; + seen: boolean; + subscriberId: string; + limit: number; }; /** @internal */ -export const SubscribersControllerGetUnseenCountRequest$outboundSchema: z.ZodType< +export const SubscribersControllerGetUnseenCountRequest$outboundSchema: + z.ZodType< SubscribersControllerGetUnseenCountRequest$Outbound, z.ZodTypeDef, SubscribersControllerGetUnseenCountRequest -> = z.object({ + > = z.object({ seen: z.boolean(), subscriberId: z.string(), limit: 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 SubscribersControllerGetUnseenCountRequest$ { - /** @deprecated use `SubscribersControllerGetUnseenCountRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerGetUnseenCountRequest$inboundSchema; - /** @deprecated use `SubscribersControllerGetUnseenCountRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerGetUnseenCountRequest$outboundSchema; - /** @deprecated use `SubscribersControllerGetUnseenCountRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerGetUnseenCountRequest$Outbound; + /** @deprecated use `SubscribersControllerGetUnseenCountRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerGetUnseenCountRequest$inboundSchema; + /** @deprecated use `SubscribersControllerGetUnseenCountRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerGetUnseenCountRequest$outboundSchema; + /** @deprecated use `SubscribersControllerGetUnseenCountRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerGetUnseenCountRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts b/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts index 04f4a73a..2fef7144 100644 --- a/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts +++ b/src/models/operations/subscriberscontrollerlistsubscriberpreferences.ts @@ -5,43 +5,46 @@ import * as z from "zod"; export type SubscribersControllerListSubscriberPreferencesRequest = { - subscriberId: string; + subscriberId: string; }; /** @internal */ -export const SubscribersControllerListSubscriberPreferencesRequest$inboundSchema: z.ZodType< +export const SubscribersControllerListSubscriberPreferencesRequest$inboundSchema: + z.ZodType< SubscribersControllerListSubscriberPreferencesRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), -}); + }); /** @internal */ export type SubscribersControllerListSubscriberPreferencesRequest$Outbound = { - subscriberId: string; + subscriberId: string; }; /** @internal */ -export const SubscribersControllerListSubscriberPreferencesRequest$outboundSchema: z.ZodType< +export const SubscribersControllerListSubscriberPreferencesRequest$outboundSchema: + z.ZodType< SubscribersControllerListSubscriberPreferencesRequest$Outbound, z.ZodTypeDef, SubscribersControllerListSubscriberPreferencesRequest -> = z.object({ + > = z.object({ subscriberId: 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 SubscribersControllerListSubscriberPreferencesRequest$ { - /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerListSubscriberPreferencesRequest$inboundSchema; - /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerListSubscriberPreferencesRequest$outboundSchema; - /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerListSubscriberPreferencesRequest$Outbound; + /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerListSubscriberPreferencesRequest$inboundSchema; + /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerListSubscriberPreferencesRequest$outboundSchema; + /** @deprecated use `SubscribersControllerListSubscriberPreferencesRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerListSubscriberPreferencesRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerlistsubscribers.ts b/src/models/operations/subscriberscontrollerlistsubscribers.ts index 8f6ffa6a..f4118442 100644 --- a/src/models/operations/subscriberscontrollerlistsubscribers.ts +++ b/src/models/operations/subscriberscontrollerlistsubscribers.ts @@ -2,163 +2,176 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerListSubscribersRequest = { - page?: number | undefined; - limit?: number | undefined; + page?: number | undefined; + limit?: number | undefined; }; export type SubscribersControllerListSubscribersResponseBody = { - 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; + 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 SubscribersControllerListSubscribersResponse = { - result: SubscribersControllerListSubscribersResponseBody; + result: SubscribersControllerListSubscribersResponseBody; }; /** @internal */ -export const SubscribersControllerListSubscribersRequest$inboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersRequest$inboundSchema: + z.ZodType< SubscribersControllerListSubscribersRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ page: z.number().optional(), limit: z.number().default(10), -}); + }); /** @internal */ export type SubscribersControllerListSubscribersRequest$Outbound = { - page?: number | undefined; - limit: number; + page?: number | undefined; + limit: number; }; /** @internal */ -export const SubscribersControllerListSubscribersRequest$outboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersRequest$outboundSchema: + z.ZodType< SubscribersControllerListSubscribersRequest$Outbound, z.ZodTypeDef, SubscribersControllerListSubscribersRequest -> = z.object({ + > = 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 SubscribersControllerListSubscribersRequest$ { - /** @deprecated use `SubscribersControllerListSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerListSubscribersRequest$inboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerListSubscribersRequest$outboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerListSubscribersRequest$Outbound; + /** @deprecated use `SubscribersControllerListSubscribersRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerListSubscribersRequest$inboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerListSubscribersRequest$outboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerListSubscribersRequest$Outbound; } /** @internal */ -export const SubscribersControllerListSubscribersResponseBody$inboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersResponseBody$inboundSchema: + z.ZodType< SubscribersControllerListSubscribersResponseBody, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ data: z.array(components.SubscriberResponseDto$inboundSchema), hasMore: z.boolean(), page: z.number(), pageSize: z.number(), -}); + }); /** @internal */ export type SubscribersControllerListSubscribersResponseBody$Outbound = { - data: Array; - hasMore: boolean; - page: number; - pageSize: number; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; }; /** @internal */ -export const SubscribersControllerListSubscribersResponseBody$outboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersResponseBody$outboundSchema: + z.ZodType< SubscribersControllerListSubscribersResponseBody$Outbound, z.ZodTypeDef, SubscribersControllerListSubscribersResponseBody -> = z.object({ + > = z.object({ data: z.array(components.SubscriberResponseDto$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 SubscribersControllerListSubscribersResponseBody$ { - /** @deprecated use `SubscribersControllerListSubscribersResponseBody$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerListSubscribersResponseBody$inboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersResponseBody$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerListSubscribersResponseBody$outboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersResponseBody$Outbound` instead. */ - export type Outbound = SubscribersControllerListSubscribersResponseBody$Outbound; + /** @deprecated use `SubscribersControllerListSubscribersResponseBody$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerListSubscribersResponseBody$inboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersResponseBody$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerListSubscribersResponseBody$outboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersResponseBody$Outbound` instead. */ + export type Outbound = + SubscribersControllerListSubscribersResponseBody$Outbound; } /** @internal */ -export const SubscribersControllerListSubscribersResponse$inboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersResponse$inboundSchema: + z.ZodType< SubscribersControllerListSubscribersResponse, z.ZodTypeDef, unknown -> = z - .object({ - Result: z.lazy(() => SubscribersControllerListSubscribersResponseBody$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); + > = z.object({ + Result: z.lazy(() => + SubscribersControllerListSubscribersResponseBody$inboundSchema + ), + }).transform((v) => { + return remap$(v, { + "Result": "result", }); + }); /** @internal */ export type SubscribersControllerListSubscribersResponse$Outbound = { - Result: SubscribersControllerListSubscribersResponseBody$Outbound; + Result: SubscribersControllerListSubscribersResponseBody$Outbound; }; /** @internal */ -export const SubscribersControllerListSubscribersResponse$outboundSchema: z.ZodType< +export const SubscribersControllerListSubscribersResponse$outboundSchema: + z.ZodType< SubscribersControllerListSubscribersResponse$Outbound, z.ZodTypeDef, SubscribersControllerListSubscribersResponse -> = z - .object({ - result: z.lazy(() => SubscribersControllerListSubscribersResponseBody$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); + > = z.object({ + result: z.lazy(() => + SubscribersControllerListSubscribersResponseBody$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 SubscribersControllerListSubscribersResponse$ { - /** @deprecated use `SubscribersControllerListSubscribersResponse$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerListSubscribersResponse$inboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersResponse$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerListSubscribersResponse$outboundSchema; - /** @deprecated use `SubscribersControllerListSubscribersResponse$Outbound` instead. */ - export type Outbound = SubscribersControllerListSubscribersResponse$Outbound; + /** @deprecated use `SubscribersControllerListSubscribersResponse$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerListSubscribersResponse$inboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersResponse$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerListSubscribersResponse$outboundSchema; + /** @deprecated use `SubscribersControllerListSubscribersResponse$Outbound` instead. */ + export type Outbound = SubscribersControllerListSubscribersResponse$Outbound; } diff --git a/src/models/operations/subscriberscontrollermarkactionasseen.ts b/src/models/operations/subscriberscontrollermarkactionasseen.ts index ae6419ca..34ddca26 100644 --- a/src/models/operations/subscriberscontrollermarkactionasseen.ts +++ b/src/models/operations/subscriberscontrollermarkactionasseen.ts @@ -2,70 +2,72 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerMarkActionAsSeenRequest = { - messageId: string; - type?: any | undefined; - subscriberId: string; - markMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto; + messageId: string; + type?: any | undefined; + subscriberId: string; + markMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto; }; /** @internal */ -export const SubscribersControllerMarkActionAsSeenRequest$inboundSchema: z.ZodType< +export const SubscribersControllerMarkActionAsSeenRequest$inboundSchema: + z.ZodType< SubscribersControllerMarkActionAsSeenRequest, z.ZodTypeDef, unknown -> = z - .object({ - messageId: z.string(), - type: z.any().optional(), - subscriberId: z.string(), - MarkMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - MarkMessageActionAsSeenDto: "markMessageActionAsSeenDto", - }); + > = z.object({ + messageId: z.string(), + type: z.any().optional(), + subscriberId: z.string(), + MarkMessageActionAsSeenDto: + components.MarkMessageActionAsSeenDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "MarkMessageActionAsSeenDto": "markMessageActionAsSeenDto", }); + }); /** @internal */ export type SubscribersControllerMarkActionAsSeenRequest$Outbound = { - messageId: string; - type?: any | undefined; - subscriberId: string; - MarkMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto$Outbound; + messageId: string; + type?: any | undefined; + subscriberId: string; + MarkMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto$Outbound; }; /** @internal */ -export const SubscribersControllerMarkActionAsSeenRequest$outboundSchema: z.ZodType< +export const SubscribersControllerMarkActionAsSeenRequest$outboundSchema: + z.ZodType< SubscribersControllerMarkActionAsSeenRequest$Outbound, z.ZodTypeDef, SubscribersControllerMarkActionAsSeenRequest -> = z - .object({ - messageId: z.string(), - type: z.any().optional(), - subscriberId: z.string(), - markMessageActionAsSeenDto: components.MarkMessageActionAsSeenDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - markMessageActionAsSeenDto: "MarkMessageActionAsSeenDto", - }); + > = z.object({ + messageId: z.string(), + type: z.any().optional(), + subscriberId: z.string(), + markMessageActionAsSeenDto: + components.MarkMessageActionAsSeenDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + markMessageActionAsSeenDto: "MarkMessageActionAsSeenDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerMarkActionAsSeenRequest$ { - /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerMarkActionAsSeenRequest$inboundSchema; - /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerMarkActionAsSeenRequest$outboundSchema; - /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerMarkActionAsSeenRequest$Outbound; + /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkActionAsSeenRequest$inboundSchema; + /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkActionAsSeenRequest$outboundSchema; + /** @deprecated use `SubscribersControllerMarkActionAsSeenRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerMarkActionAsSeenRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollermarkallunreadasread.ts b/src/models/operations/subscriberscontrollermarkallunreadasread.ts index 2e038109..b6d74664 100644 --- a/src/models/operations/subscriberscontrollermarkallunreadasread.ts +++ b/src/models/operations/subscriberscontrollermarkallunreadasread.ts @@ -2,62 +2,65 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerMarkAllUnreadAsReadRequest = { - subscriberId: string; - markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto; + subscriberId: string; + markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto; }; /** @internal */ -export const SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema: z.ZodType< +export const SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema: + z.ZodType< SubscribersControllerMarkAllUnreadAsReadRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - MarkAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - MarkAllMessageAsRequestDto: "markAllMessageAsRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + MarkAllMessageAsRequestDto: + components.MarkAllMessageAsRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "MarkAllMessageAsRequestDto": "markAllMessageAsRequestDto", }); + }); /** @internal */ export type SubscribersControllerMarkAllUnreadAsReadRequest$Outbound = { - subscriberId: string; - MarkAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto$Outbound; + subscriberId: string; + MarkAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema: z.ZodType< +export const SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema: + z.ZodType< SubscribersControllerMarkAllUnreadAsReadRequest$Outbound, z.ZodTypeDef, SubscribersControllerMarkAllUnreadAsReadRequest -> = z - .object({ - subscriberId: z.string(), - markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - markAllMessageAsRequestDto: "MarkAllMessageAsRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + markAllMessageAsRequestDto: + components.MarkAllMessageAsRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + markAllMessageAsRequestDto: "MarkAllMessageAsRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerMarkAllUnreadAsReadRequest$ { - /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema; - /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema; - /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerMarkAllUnreadAsReadRequest$Outbound; + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkAllUnreadAsReadRequest$inboundSchema; + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkAllUnreadAsReadRequest$outboundSchema; + /** @deprecated use `SubscribersControllerMarkAllUnreadAsReadRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerMarkAllUnreadAsReadRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollermarkmessagesas.ts b/src/models/operations/subscriberscontrollermarkmessagesas.ts index efb5a98b..150f17f3 100644 --- a/src/models/operations/subscriberscontrollermarkmessagesas.ts +++ b/src/models/operations/subscriberscontrollermarkmessagesas.ts @@ -2,62 +2,59 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerMarkMessagesAsRequest = { - subscriberId: string; - messageMarkAsRequestDto: components.MessageMarkAsRequestDto; + subscriberId: string; + messageMarkAsRequestDto: components.MessageMarkAsRequestDto; }; /** @internal */ -export const SubscribersControllerMarkMessagesAsRequest$inboundSchema: z.ZodType< - SubscribersControllerMarkMessagesAsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - subscriberId: z.string(), - MessageMarkAsRequestDto: components.MessageMarkAsRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - MessageMarkAsRequestDto: "messageMarkAsRequestDto", - }); +export const SubscribersControllerMarkMessagesAsRequest$inboundSchema: + z.ZodType = + z.object({ + subscriberId: z.string(), + MessageMarkAsRequestDto: components.MessageMarkAsRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "MessageMarkAsRequestDto": "messageMarkAsRequestDto", + }); }); /** @internal */ export type SubscribersControllerMarkMessagesAsRequest$Outbound = { - subscriberId: string; - MessageMarkAsRequestDto: components.MessageMarkAsRequestDto$Outbound; + subscriberId: string; + MessageMarkAsRequestDto: components.MessageMarkAsRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerMarkMessagesAsRequest$outboundSchema: z.ZodType< +export const SubscribersControllerMarkMessagesAsRequest$outboundSchema: + z.ZodType< SubscribersControllerMarkMessagesAsRequest$Outbound, z.ZodTypeDef, SubscribersControllerMarkMessagesAsRequest -> = z - .object({ - subscriberId: z.string(), - messageMarkAsRequestDto: components.MessageMarkAsRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - messageMarkAsRequestDto: "MessageMarkAsRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + messageMarkAsRequestDto: components.MessageMarkAsRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + messageMarkAsRequestDto: "MessageMarkAsRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerMarkMessagesAsRequest$ { - /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerMarkMessagesAsRequest$inboundSchema; - /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerMarkMessagesAsRequest$outboundSchema; - /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerMarkMessagesAsRequest$Outbound; + /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerMarkMessagesAsRequest$inboundSchema; + /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerMarkMessagesAsRequest$outboundSchema; + /** @deprecated use `SubscribersControllerMarkMessagesAsRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerMarkMessagesAsRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts b/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts index da7bb82b..a2b29050 100644 --- a/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts +++ b/src/models/operations/subscriberscontrollermodifysubscriberchannel.ts @@ -2,65 +2,67 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerModifySubscriberChannelRequest = { - subscriberId: string; - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto; + subscriberId: string; + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto; }; /** @internal */ -export const SubscribersControllerModifySubscriberChannelRequest$inboundSchema: z.ZodType< +export const SubscribersControllerModifySubscriberChannelRequest$inboundSchema: + z.ZodType< SubscribersControllerModifySubscriberChannelRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - UpdateSubscriberChannelRequestDto: - components.UpdateSubscriberChannelRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberChannelRequestDto: "updateSubscriberChannelRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + UpdateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberChannelRequestDto": "updateSubscriberChannelRequestDto", }); + }); /** @internal */ export type SubscribersControllerModifySubscriberChannelRequest$Outbound = { - subscriberId: string; - UpdateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto$Outbound; + subscriberId: string; + UpdateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerModifySubscriberChannelRequest$outboundSchema: z.ZodType< +export const SubscribersControllerModifySubscriberChannelRequest$outboundSchema: + z.ZodType< SubscribersControllerModifySubscriberChannelRequest$Outbound, z.ZodTypeDef, SubscribersControllerModifySubscriberChannelRequest -> = z - .object({ - subscriberId: z.string(), - updateSubscriberChannelRequestDto: - components.UpdateSubscriberChannelRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberChannelRequestDto: "UpdateSubscriberChannelRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberChannelRequestDto: "UpdateSubscriberChannelRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerModifySubscriberChannelRequest$ { - /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerModifySubscriberChannelRequest$inboundSchema; - /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerModifySubscriberChannelRequest$outboundSchema; - /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerModifySubscriberChannelRequest$Outbound; + /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerModifySubscriberChannelRequest$inboundSchema; + /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerModifySubscriberChannelRequest$outboundSchema; + /** @deprecated use `SubscribersControllerModifySubscriberChannelRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerModifySubscriberChannelRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerremovesubscriber.ts b/src/models/operations/subscriberscontrollerremovesubscriber.ts index abd4627f..f5e9a0f4 100644 --- a/src/models/operations/subscriberscontrollerremovesubscriber.ts +++ b/src/models/operations/subscriberscontrollerremovesubscriber.ts @@ -5,41 +5,45 @@ import * as z from "zod"; export type SubscribersControllerRemoveSubscriberRequest = { - subscriberId: string; + subscriberId: string; }; /** @internal */ -export const SubscribersControllerRemoveSubscriberRequest$inboundSchema: z.ZodType< +export const SubscribersControllerRemoveSubscriberRequest$inboundSchema: + z.ZodType< SubscribersControllerRemoveSubscriberRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ subscriberId: z.string(), -}); + }); /** @internal */ export type SubscribersControllerRemoveSubscriberRequest$Outbound = { - subscriberId: string; + subscriberId: string; }; /** @internal */ -export const SubscribersControllerRemoveSubscriberRequest$outboundSchema: z.ZodType< +export const SubscribersControllerRemoveSubscriberRequest$outboundSchema: + z.ZodType< SubscribersControllerRemoveSubscriberRequest$Outbound, z.ZodTypeDef, SubscribersControllerRemoveSubscriberRequest -> = z.object({ + > = z.object({ subscriberId: 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 SubscribersControllerRemoveSubscriberRequest$ { - /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerRemoveSubscriberRequest$inboundSchema; - /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerRemoveSubscriberRequest$outboundSchema; - /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerRemoveSubscriberRequest$Outbound; + /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerRemoveSubscriberRequest$inboundSchema; + /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerRemoveSubscriberRequest$outboundSchema; + /** @deprecated use `SubscribersControllerRemoveSubscriberRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerRemoveSubscriberRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerupdatesubscriber.ts b/src/models/operations/subscriberscontrollerupdatesubscriber.ts index ad4eaa9b..55db5a72 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriber.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriber.ts @@ -2,62 +2,64 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerUpdateSubscriberRequest = { - subscriberId: string; - updateSubscriberRequestDto: components.UpdateSubscriberRequestDto; + subscriberId: string; + updateSubscriberRequestDto: components.UpdateSubscriberRequestDto; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberRequest$inboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberRequest$inboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - UpdateSubscriberRequestDto: components.UpdateSubscriberRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberRequestDto: "updateSubscriberRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + UpdateSubscriberRequestDto: + components.UpdateSubscriberRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberRequestDto": "updateSubscriberRequestDto", }); + }); /** @internal */ export type SubscribersControllerUpdateSubscriberRequest$Outbound = { - subscriberId: string; - UpdateSubscriberRequestDto: components.UpdateSubscriberRequestDto$Outbound; + subscriberId: string; + UpdateSubscriberRequestDto: components.UpdateSubscriberRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberRequest$outboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberRequest$outboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberRequest -> = z - .object({ - subscriberId: z.string(), - updateSubscriberRequestDto: components.UpdateSubscriberRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberRequestDto: "UpdateSubscriberRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + updateSubscriberRequestDto: + components.UpdateSubscriberRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberRequestDto: "UpdateSubscriberRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerUpdateSubscriberRequest$ { - /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerUpdateSubscriberRequest$inboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$outboundSchema` instead. */ - export const outboundSchema = SubscribersControllerUpdateSubscriberRequest$outboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerUpdateSubscriberRequest$Outbound; + /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberRequest$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberRequest$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberRequest$Outbound` instead. */ + export type Outbound = SubscribersControllerUpdateSubscriberRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts b/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts index 0c8b4115..0bb4df05 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberchannel.ts @@ -2,65 +2,67 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerUpdateSubscriberChannelRequest = { - subscriberId: string; - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto; + subscriberId: string; + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberChannelRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - UpdateSubscriberChannelRequestDto: - components.UpdateSubscriberChannelRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberChannelRequestDto: "updateSubscriberChannelRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + UpdateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberChannelRequestDto": "updateSubscriberChannelRequestDto", }); + }); /** @internal */ export type SubscribersControllerUpdateSubscriberChannelRequest$Outbound = { - subscriberId: string; - UpdateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto$Outbound; + subscriberId: string; + UpdateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberChannelRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberChannelRequest -> = z - .object({ - subscriberId: z.string(), - updateSubscriberChannelRequestDto: - components.UpdateSubscriberChannelRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberChannelRequestDto: "UpdateSubscriberChannelRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberChannelRequestDto: "UpdateSubscriberChannelRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerUpdateSubscriberChannelRequest$ { - /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema` instead. */ - export const inboundSchema = SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerUpdateSubscriberChannelRequest$Outbound; + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberChannelRequest$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberChannelRequest$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberChannelRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberChannelRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts b/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts index 76f7f7d5..bb76cda5 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts @@ -2,68 +2,70 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerUpdateSubscriberGlobalPreferencesRequest = { - subscriberId: string; - updateSubscriberGlobalPreferencesRequestDto: components.UpdateSubscriberGlobalPreferencesRequestDto; + subscriberId: string; + updateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberGlobalPreferencesRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - UpdateSubscriberGlobalPreferencesRequestDto: - components.UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberGlobalPreferencesRequestDto: - "updateSubscriberGlobalPreferencesRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + UpdateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberGlobalPreferencesRequestDto": + "updateSubscriberGlobalPreferencesRequestDto", }); + }); /** @internal */ -export type SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound = { +export type SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound = + { subscriberId: string; - UpdateSubscriberGlobalPreferencesRequestDto: components.UpdateSubscriberGlobalPreferencesRequestDto$Outbound; -}; + UpdateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto$Outbound; + }; /** @internal */ -export const SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberGlobalPreferencesRequest -> = z - .object({ - subscriberId: z.string(), - updateSubscriberGlobalPreferencesRequestDto: - components.UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberGlobalPreferencesRequestDto: - "UpdateSubscriberGlobalPreferencesRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + updateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberGlobalPreferencesRequestDto: + "UpdateSubscriberGlobalPreferencesRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$ { - /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound; + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberGlobalPreferencesRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts b/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts index 36d2d728..b5e2c970 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts @@ -2,66 +2,69 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerUpdateSubscriberOnlineFlagRequest = { - subscriberId: string; - updateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto; + subscriberId: string; + updateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberOnlineFlagRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - UpdateSubscriberOnlineFlagRequestDto: - components.UpdateSubscriberOnlineFlagRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberOnlineFlagRequestDto: "updateSubscriberOnlineFlagRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + UpdateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberOnlineFlagRequestDto": + "updateSubscriberOnlineFlagRequestDto", }); + }); /** @internal */ export type SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound = { - subscriberId: string; - UpdateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto$Outbound; + subscriberId: string; + UpdateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberOnlineFlagRequest -> = z - .object({ - subscriberId: z.string(), - updateSubscriberOnlineFlagRequestDto: - components.UpdateSubscriberOnlineFlagRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberOnlineFlagRequestDto: "UpdateSubscriberOnlineFlagRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + updateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberOnlineFlagRequestDto: + "UpdateSubscriberOnlineFlagRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerUpdateSubscriberOnlineFlagRequest$ { - /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound; + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberOnlineFlagRequest$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberOnlineFlagRequest$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberOnlineFlagRequest$Outbound; } diff --git a/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts b/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts index d9ad51db..d38173ac 100644 --- a/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts +++ b/src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts @@ -2,70 +2,73 @@ * 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"; -import * as z from "zod"; export type SubscribersControllerUpdateSubscriberPreferenceRequest = { - subscriberId: string; - parameter: string; - updateSubscriberPreferenceRequestDto: components.UpdateSubscriberPreferenceRequestDto; + subscriberId: string; + parameter: string; + updateSubscriberPreferenceRequestDto: + components.UpdateSubscriberPreferenceRequestDto; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberPreferenceRequest, z.ZodTypeDef, unknown -> = z - .object({ - subscriberId: z.string(), - parameter: z.string(), - UpdateSubscriberPreferenceRequestDto: - components.UpdateSubscriberPreferenceRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateSubscriberPreferenceRequestDto: "updateSubscriberPreferenceRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + parameter: z.string(), + UpdateSubscriberPreferenceRequestDto: + components.UpdateSubscriberPreferenceRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "UpdateSubscriberPreferenceRequestDto": + "updateSubscriberPreferenceRequestDto", }); + }); /** @internal */ export type SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound = { - subscriberId: string; - parameter: string; - UpdateSubscriberPreferenceRequestDto: components.UpdateSubscriberPreferenceRequestDto$Outbound; + subscriberId: string; + parameter: string; + UpdateSubscriberPreferenceRequestDto: + components.UpdateSubscriberPreferenceRequestDto$Outbound; }; /** @internal */ -export const SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema: z.ZodType< +export const SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema: + z.ZodType< SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound, z.ZodTypeDef, SubscribersControllerUpdateSubscriberPreferenceRequest -> = z - .object({ - subscriberId: z.string(), - parameter: z.string(), - updateSubscriberPreferenceRequestDto: - components.UpdateSubscriberPreferenceRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateSubscriberPreferenceRequestDto: "UpdateSubscriberPreferenceRequestDto", - }); + > = z.object({ + subscriberId: z.string(), + parameter: z.string(), + updateSubscriberPreferenceRequestDto: + components.UpdateSubscriberPreferenceRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + updateSubscriberPreferenceRequestDto: + "UpdateSubscriberPreferenceRequestDto", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscribersControllerUpdateSubscriberPreferenceRequest$ { - /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema` instead. */ - export const inboundSchema = - SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema` instead. */ - export const outboundSchema = - SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema; - /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound` instead. */ - export type Outbound = SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound; + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema` instead. */ + export const inboundSchema = + SubscribersControllerUpdateSubscriberPreferenceRequest$inboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema` instead. */ + export const outboundSchema = + SubscribersControllerUpdateSubscriberPreferenceRequest$outboundSchema; + /** @deprecated use `SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound` instead. */ + export type Outbound = + SubscribersControllerUpdateSubscriberPreferenceRequest$Outbound; } diff --git a/src/models/operations/tenantcontrollergettenantbyid.ts b/src/models/operations/tenantcontrollergettenantbyid.ts index e6b3eeab..0fce80f3 100644 --- a/src/models/operations/tenantcontrollergettenantbyid.ts +++ b/src/models/operations/tenantcontrollergettenantbyid.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type TenantControllerGetTenantByIdRequest = { - identifier: string; + identifier: string; }; /** @internal */ export const TenantControllerGetTenantByIdRequest$inboundSchema: z.ZodType< - TenantControllerGetTenantByIdRequest, - z.ZodTypeDef, - unknown + TenantControllerGetTenantByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - identifier: z.string(), + identifier: z.string(), }); /** @internal */ export type TenantControllerGetTenantByIdRequest$Outbound = { - identifier: string; + identifier: string; }; /** @internal */ export const TenantControllerGetTenantByIdRequest$outboundSchema: z.ZodType< - TenantControllerGetTenantByIdRequest$Outbound, - z.ZodTypeDef, - TenantControllerGetTenantByIdRequest + TenantControllerGetTenantByIdRequest$Outbound, + z.ZodTypeDef, + TenantControllerGetTenantByIdRequest > = z.object({ - identifier: z.string(), + identifier: z.string(), }); /** @@ -36,10 +36,12 @@ export const TenantControllerGetTenantByIdRequest$outboundSchema: z.ZodType< * @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; + /** @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 index e2ba3485..b1673a50 100644 --- a/src/models/operations/tenantcontrollerlisttenants.ts +++ b/src/models/operations/tenantcontrollerlisttenants.ts @@ -2,59 +2,59 @@ * 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"; -import * as z from "zod"; export type TenantControllerListTenantsRequest = { - page?: number | undefined; - limit?: number | undefined; + 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; + 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; + result: TenantControllerListTenantsResponseBody; }; /** @internal */ export const TenantControllerListTenantsRequest$inboundSchema: z.ZodType< - TenantControllerListTenantsRequest, - z.ZodTypeDef, - unknown + TenantControllerListTenantsRequest, + z.ZodTypeDef, + unknown > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), + page: z.number().optional(), + limit: z.number().default(10), }); /** @internal */ export type TenantControllerListTenantsRequest$Outbound = { - page?: number | undefined; - limit: number; + page?: number | undefined; + limit: number; }; /** @internal */ export const TenantControllerListTenantsRequest$outboundSchema: z.ZodType< - TenantControllerListTenantsRequest$Outbound, - z.ZodTypeDef, - TenantControllerListTenantsRequest + TenantControllerListTenantsRequest$Outbound, + z.ZodTypeDef, + TenantControllerListTenantsRequest > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), + page: z.number().optional(), + limit: z.number().default(10), }); /** @@ -62,44 +62,45 @@ export const TenantControllerListTenantsRequest$outboundSchema: z.ZodType< * @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; + /** @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 + TenantControllerListTenantsResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - data: z.array(components.GetTenantResponseDto$inboundSchema), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), + 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; + data: Array; + hasMore: boolean; + page: number; + pageSize: number; }; /** @internal */ export const TenantControllerListTenantsResponseBody$outboundSchema: z.ZodType< - TenantControllerListTenantsResponseBody$Outbound, - z.ZodTypeDef, - TenantControllerListTenantsResponseBody + TenantControllerListTenantsResponseBody$Outbound, + z.ZodTypeDef, + TenantControllerListTenantsResponseBody > = z.object({ - data: z.array(components.GetTenantResponseDto$outboundSchema), - hasMore: z.boolean(), - page: z.number(), - pageSize: z.number(), + data: z.array(components.GetTenantResponseDto$outboundSchema), + hasMore: z.boolean(), + page: z.number(), + pageSize: z.number(), }); /** @@ -107,58 +108,58 @@ export const TenantControllerListTenantsResponseBody$outboundSchema: z.ZodType< * @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; + /** @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", - }); - }); + 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; + 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", - }); - }); + 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; + /** @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 index ac7b0c03..1febb16f 100644 --- a/src/models/operations/tenantcontrollerremovetenant.ts +++ b/src/models/operations/tenantcontrollerremovetenant.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type TenantControllerRemoveTenantRequest = { - identifier: string; + identifier: string; }; /** @internal */ export const TenantControllerRemoveTenantRequest$inboundSchema: z.ZodType< - TenantControllerRemoveTenantRequest, - z.ZodTypeDef, - unknown + TenantControllerRemoveTenantRequest, + z.ZodTypeDef, + unknown > = z.object({ - identifier: z.string(), + identifier: z.string(), }); /** @internal */ export type TenantControllerRemoveTenantRequest$Outbound = { - identifier: string; + identifier: string; }; /** @internal */ export const TenantControllerRemoveTenantRequest$outboundSchema: z.ZodType< - TenantControllerRemoveTenantRequest$Outbound, - z.ZodTypeDef, - TenantControllerRemoveTenantRequest + TenantControllerRemoveTenantRequest$Outbound, + z.ZodTypeDef, + TenantControllerRemoveTenantRequest > = z.object({ - identifier: z.string(), + identifier: z.string(), }); /** @@ -36,10 +36,12 @@ export const TenantControllerRemoveTenantRequest$outboundSchema: z.ZodType< * @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; + /** @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 index f3daec24..c0c99bf5 100644 --- a/src/models/operations/tenantcontrollerupdatetenant.ts +++ b/src/models/operations/tenantcontrollerupdatetenant.ts @@ -2,62 +2,60 @@ * 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"; -import * as z from "zod"; export type TenantControllerUpdateTenantRequest = { - identifier: string; - updateTenantRequestDto: components.UpdateTenantRequestDto; + 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", - }); - }); + 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; + 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", - }); - }); + 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; + /** @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 579b55b7..56df0864 100644 --- a/src/models/operations/topicscontrolleraddsubscribers.ts +++ b/src/models/operations/topicscontrolleraddsubscribers.ts @@ -2,65 +2,63 @@ * 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"; -import * as z from "zod"; export type TopicsControllerAddSubscribersRequest = { - /** - * The topic key - */ - topicKey: string; - addSubscribersRequestDto: components.AddSubscribersRequestDto; + /** + * The topic key + */ + topicKey: string; + addSubscribersRequestDto: components.AddSubscribersRequestDto; }; /** @internal */ export const TopicsControllerAddSubscribersRequest$inboundSchema: z.ZodType< - TopicsControllerAddSubscribersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - topicKey: z.string(), - AddSubscribersRequestDto: components.AddSubscribersRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - AddSubscribersRequestDto: "addSubscribersRequestDto", - }); - }); + TopicsControllerAddSubscribersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + topicKey: z.string(), + AddSubscribersRequestDto: components.AddSubscribersRequestDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "AddSubscribersRequestDto": "addSubscribersRequestDto", + }); +}); /** @internal */ export type TopicsControllerAddSubscribersRequest$Outbound = { - topicKey: string; - AddSubscribersRequestDto: components.AddSubscribersRequestDto$Outbound; + topicKey: string; + AddSubscribersRequestDto: components.AddSubscribersRequestDto$Outbound; }; /** @internal */ export const TopicsControllerAddSubscribersRequest$outboundSchema: z.ZodType< - TopicsControllerAddSubscribersRequest$Outbound, - z.ZodTypeDef, - TopicsControllerAddSubscribersRequest -> = z - .object({ - topicKey: z.string(), - addSubscribersRequestDto: components.AddSubscribersRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - addSubscribersRequestDto: "AddSubscribersRequestDto", - }); - }); + TopicsControllerAddSubscribersRequest$Outbound, + z.ZodTypeDef, + TopicsControllerAddSubscribersRequest +> = z.object({ + topicKey: z.string(), + addSubscribersRequestDto: components.AddSubscribersRequestDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + addSubscribersRequestDto: "AddSubscribersRequestDto", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerAddSubscribersRequest$ { - /** @deprecated use `TopicsControllerAddSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerAddSubscribersRequest$inboundSchema; - /** @deprecated use `TopicsControllerAddSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerAddSubscribersRequest$outboundSchema; - /** @deprecated use `TopicsControllerAddSubscribersRequest$Outbound` instead. */ - export type Outbound = TopicsControllerAddSubscribersRequest$Outbound; + /** @deprecated use `TopicsControllerAddSubscribersRequest$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerAddSubscribersRequest$inboundSchema; + /** @deprecated use `TopicsControllerAddSubscribersRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerAddSubscribersRequest$outboundSchema; + /** @deprecated use `TopicsControllerAddSubscribersRequest$Outbound` instead. */ + export type Outbound = TopicsControllerAddSubscribersRequest$Outbound; } diff --git a/src/models/operations/topicscontrollerdeletetopic.ts b/src/models/operations/topicscontrollerdeletetopic.ts index 3e6ab31b..33d96424 100644 --- a/src/models/operations/topicscontrollerdeletetopic.ts +++ b/src/models/operations/topicscontrollerdeletetopic.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type TopicsControllerDeleteTopicRequest = { - /** - * The topic key - */ - topicKey: string; + /** + * The topic key + */ + topicKey: string; }; /** @internal */ export const TopicsControllerDeleteTopicRequest$inboundSchema: z.ZodType< - TopicsControllerDeleteTopicRequest, - z.ZodTypeDef, - unknown + TopicsControllerDeleteTopicRequest, + z.ZodTypeDef, + unknown > = z.object({ - topicKey: z.string(), + topicKey: z.string(), }); /** @internal */ export type TopicsControllerDeleteTopicRequest$Outbound = { - topicKey: string; + topicKey: string; }; /** @internal */ export const TopicsControllerDeleteTopicRequest$outboundSchema: z.ZodType< - TopicsControllerDeleteTopicRequest$Outbound, - z.ZodTypeDef, - TopicsControllerDeleteTopicRequest + TopicsControllerDeleteTopicRequest$Outbound, + z.ZodTypeDef, + TopicsControllerDeleteTopicRequest > = z.object({ - topicKey: z.string(), + topicKey: z.string(), }); /** @@ -39,10 +39,11 @@ export const TopicsControllerDeleteTopicRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerDeleteTopicRequest$ { - /** @deprecated use `TopicsControllerDeleteTopicRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerDeleteTopicRequest$inboundSchema; - /** @deprecated use `TopicsControllerDeleteTopicRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerDeleteTopicRequest$outboundSchema; - /** @deprecated use `TopicsControllerDeleteTopicRequest$Outbound` instead. */ - export type Outbound = TopicsControllerDeleteTopicRequest$Outbound; + /** @deprecated use `TopicsControllerDeleteTopicRequest$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerDeleteTopicRequest$inboundSchema; + /** @deprecated use `TopicsControllerDeleteTopicRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerDeleteTopicRequest$outboundSchema; + /** @deprecated use `TopicsControllerDeleteTopicRequest$Outbound` instead. */ + export type Outbound = TopicsControllerDeleteTopicRequest$Outbound; } diff --git a/src/models/operations/topicscontrollergettopic.ts b/src/models/operations/topicscontrollergettopic.ts index 5efff29a..370d4066 100644 --- a/src/models/operations/topicscontrollergettopic.ts +++ b/src/models/operations/topicscontrollergettopic.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type TopicsControllerGetTopicRequest = { - /** - * The topic key - */ - topicKey: string; + /** + * The topic key + */ + topicKey: string; }; /** @internal */ export const TopicsControllerGetTopicRequest$inboundSchema: z.ZodType< - TopicsControllerGetTopicRequest, - z.ZodTypeDef, - unknown + TopicsControllerGetTopicRequest, + z.ZodTypeDef, + unknown > = z.object({ - topicKey: z.string(), + topicKey: z.string(), }); /** @internal */ export type TopicsControllerGetTopicRequest$Outbound = { - topicKey: string; + topicKey: string; }; /** @internal */ export const TopicsControllerGetTopicRequest$outboundSchema: z.ZodType< - TopicsControllerGetTopicRequest$Outbound, - z.ZodTypeDef, - TopicsControllerGetTopicRequest + TopicsControllerGetTopicRequest$Outbound, + z.ZodTypeDef, + TopicsControllerGetTopicRequest > = z.object({ - topicKey: z.string(), + topicKey: z.string(), }); /** @@ -39,10 +39,10 @@ export const TopicsControllerGetTopicRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerGetTopicRequest$ { - /** @deprecated use `TopicsControllerGetTopicRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerGetTopicRequest$inboundSchema; - /** @deprecated use `TopicsControllerGetTopicRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerGetTopicRequest$outboundSchema; - /** @deprecated use `TopicsControllerGetTopicRequest$Outbound` instead. */ - export type Outbound = TopicsControllerGetTopicRequest$Outbound; + /** @deprecated use `TopicsControllerGetTopicRequest$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerGetTopicRequest$inboundSchema; + /** @deprecated use `TopicsControllerGetTopicRequest$outboundSchema` instead. */ + export const outboundSchema = TopicsControllerGetTopicRequest$outboundSchema; + /** @deprecated use `TopicsControllerGetTopicRequest$Outbound` instead. */ + export type Outbound = TopicsControllerGetTopicRequest$Outbound; } diff --git a/src/models/operations/topicscontrollergettopicsubscriber.ts b/src/models/operations/topicscontrollergettopicsubscriber.ts index 162b8e0c..e70132d9 100644 --- a/src/models/operations/topicscontrollergettopicsubscriber.ts +++ b/src/models/operations/topicscontrollergettopicsubscriber.ts @@ -5,51 +5,54 @@ import * as z from "zod"; export type TopicsControllerGetTopicSubscriberRequest = { - /** - * The external subscriber id - */ - externalSubscriberId: string; - /** - * The topic key - */ - topicKey: string; + /** + * The external subscriber id + */ + externalSubscriberId: string; + /** + * The topic key + */ + topicKey: string; }; /** @internal */ export const TopicsControllerGetTopicSubscriberRequest$inboundSchema: z.ZodType< - TopicsControllerGetTopicSubscriberRequest, - z.ZodTypeDef, - unknown + TopicsControllerGetTopicSubscriberRequest, + z.ZodTypeDef, + unknown > = z.object({ - externalSubscriberId: z.string(), - topicKey: z.string(), + externalSubscriberId: z.string(), + topicKey: z.string(), }); /** @internal */ export type TopicsControllerGetTopicSubscriberRequest$Outbound = { - externalSubscriberId: string; - topicKey: string; + externalSubscriberId: string; + topicKey: string; }; /** @internal */ -export const TopicsControllerGetTopicSubscriberRequest$outboundSchema: z.ZodType< +export const TopicsControllerGetTopicSubscriberRequest$outboundSchema: + z.ZodType< TopicsControllerGetTopicSubscriberRequest$Outbound, z.ZodTypeDef, TopicsControllerGetTopicSubscriberRequest -> = z.object({ + > = z.object({ externalSubscriberId: z.string(), topicKey: 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 TopicsControllerGetTopicSubscriberRequest$ { - /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerGetTopicSubscriberRequest$inboundSchema; - /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerGetTopicSubscriberRequest$outboundSchema; - /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$Outbound` instead. */ - export type Outbound = TopicsControllerGetTopicSubscriberRequest$Outbound; + /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerGetTopicSubscriberRequest$inboundSchema; + /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerGetTopicSubscriberRequest$outboundSchema; + /** @deprecated use `TopicsControllerGetTopicSubscriberRequest$Outbound` instead. */ + export type Outbound = TopicsControllerGetTopicSubscriberRequest$Outbound; } diff --git a/src/models/operations/topicscontrollerlisttopics.ts b/src/models/operations/topicscontrollerlisttopics.ts index f531d8e3..935077ad 100644 --- a/src/models/operations/topicscontrollerlisttopics.ts +++ b/src/models/operations/topicscontrollerlisttopics.ts @@ -5,47 +5,47 @@ import * as z from "zod"; export type TopicsControllerListTopicsRequest = { - /** - * Number of page for the pagination - */ - page?: number | undefined; - /** - * Size of page for the pagination - */ - pageSize?: number | undefined; - /** - * Topic key - */ - key?: string | undefined; + /** + * Number of page for the pagination + */ + page?: number | undefined; + /** + * Size of page for the pagination + */ + pageSize?: number | undefined; + /** + * Topic key + */ + key?: string | undefined; }; /** @internal */ export const TopicsControllerListTopicsRequest$inboundSchema: z.ZodType< - TopicsControllerListTopicsRequest, - z.ZodTypeDef, - unknown + TopicsControllerListTopicsRequest, + z.ZodTypeDef, + unknown > = z.object({ - page: z.number().default(0), - pageSize: z.number().default(10), - key: z.string().optional(), + page: z.number().default(0), + pageSize: z.number().default(10), + key: z.string().optional(), }); /** @internal */ export type TopicsControllerListTopicsRequest$Outbound = { - page: number; - pageSize: number; - key?: string | undefined; + page: number; + pageSize: number; + key?: string | undefined; }; /** @internal */ export const TopicsControllerListTopicsRequest$outboundSchema: z.ZodType< - TopicsControllerListTopicsRequest$Outbound, - z.ZodTypeDef, - TopicsControllerListTopicsRequest + TopicsControllerListTopicsRequest$Outbound, + z.ZodTypeDef, + TopicsControllerListTopicsRequest > = z.object({ - page: z.number().default(0), - pageSize: z.number().default(10), - key: z.string().optional(), + page: z.number().default(0), + pageSize: z.number().default(10), + key: z.string().optional(), }); /** @@ -53,10 +53,11 @@ export const TopicsControllerListTopicsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerListTopicsRequest$ { - /** @deprecated use `TopicsControllerListTopicsRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerListTopicsRequest$inboundSchema; - /** @deprecated use `TopicsControllerListTopicsRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerListTopicsRequest$outboundSchema; - /** @deprecated use `TopicsControllerListTopicsRequest$Outbound` instead. */ - export type Outbound = TopicsControllerListTopicsRequest$Outbound; + /** @deprecated use `TopicsControllerListTopicsRequest$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerListTopicsRequest$inboundSchema; + /** @deprecated use `TopicsControllerListTopicsRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerListTopicsRequest$outboundSchema; + /** @deprecated use `TopicsControllerListTopicsRequest$Outbound` instead. */ + export type Outbound = TopicsControllerListTopicsRequest$Outbound; } diff --git a/src/models/operations/topicscontrollerremovesubscribers.ts b/src/models/operations/topicscontrollerremovesubscribers.ts index 58a49b67..c5f8df15 100644 --- a/src/models/operations/topicscontrollerremovesubscribers.ts +++ b/src/models/operations/topicscontrollerremovesubscribers.ts @@ -2,65 +2,65 @@ * 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"; -import * as z from "zod"; export type TopicsControllerRemoveSubscribersRequest = { - /** - * The topic key - */ - topicKey: string; - removeSubscribersRequestDto: components.RemoveSubscribersRequestDto; + /** + * The topic key + */ + topicKey: string; + removeSubscribersRequestDto: components.RemoveSubscribersRequestDto; }; /** @internal */ export const TopicsControllerRemoveSubscribersRequest$inboundSchema: z.ZodType< - TopicsControllerRemoveSubscribersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - topicKey: z.string(), - RemoveSubscribersRequestDto: components.RemoveSubscribersRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - RemoveSubscribersRequestDto: "removeSubscribersRequestDto", - }); - }); + TopicsControllerRemoveSubscribersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + topicKey: z.string(), + RemoveSubscribersRequestDto: + components.RemoveSubscribersRequestDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "RemoveSubscribersRequestDto": "removeSubscribersRequestDto", + }); +}); /** @internal */ export type TopicsControllerRemoveSubscribersRequest$Outbound = { - topicKey: string; - RemoveSubscribersRequestDto: components.RemoveSubscribersRequestDto$Outbound; + topicKey: string; + RemoveSubscribersRequestDto: components.RemoveSubscribersRequestDto$Outbound; }; /** @internal */ export const TopicsControllerRemoveSubscribersRequest$outboundSchema: z.ZodType< - TopicsControllerRemoveSubscribersRequest$Outbound, - z.ZodTypeDef, - TopicsControllerRemoveSubscribersRequest -> = z - .object({ - topicKey: z.string(), - removeSubscribersRequestDto: components.RemoveSubscribersRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - removeSubscribersRequestDto: "RemoveSubscribersRequestDto", - }); - }); + TopicsControllerRemoveSubscribersRequest$Outbound, + z.ZodTypeDef, + TopicsControllerRemoveSubscribersRequest +> = z.object({ + topicKey: z.string(), + removeSubscribersRequestDto: + components.RemoveSubscribersRequestDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + removeSubscribersRequestDto: "RemoveSubscribersRequestDto", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerRemoveSubscribersRequest$ { - /** @deprecated use `TopicsControllerRemoveSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerRemoveSubscribersRequest$inboundSchema; - /** @deprecated use `TopicsControllerRemoveSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerRemoveSubscribersRequest$outboundSchema; - /** @deprecated use `TopicsControllerRemoveSubscribersRequest$Outbound` instead. */ - export type Outbound = TopicsControllerRemoveSubscribersRequest$Outbound; + /** @deprecated use `TopicsControllerRemoveSubscribersRequest$inboundSchema` instead. */ + export const inboundSchema = + TopicsControllerRemoveSubscribersRequest$inboundSchema; + /** @deprecated use `TopicsControllerRemoveSubscribersRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerRemoveSubscribersRequest$outboundSchema; + /** @deprecated use `TopicsControllerRemoveSubscribersRequest$Outbound` instead. */ + export type Outbound = TopicsControllerRemoveSubscribersRequest$Outbound; } diff --git a/src/models/operations/topicscontrollerrenametopic.ts b/src/models/operations/topicscontrollerrenametopic.ts index a9e8679e..aa0489f6 100644 --- a/src/models/operations/topicscontrollerrenametopic.ts +++ b/src/models/operations/topicscontrollerrenametopic.ts @@ -2,65 +2,62 @@ * 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"; -import * as z from "zod"; export type TopicsControllerRenameTopicRequest = { - /** - * The topic key - */ - topicKey: string; - renameTopicRequestDto: components.RenameTopicRequestDto; + /** + * The topic key + */ + topicKey: string; + renameTopicRequestDto: components.RenameTopicRequestDto; }; /** @internal */ export const TopicsControllerRenameTopicRequest$inboundSchema: z.ZodType< - TopicsControllerRenameTopicRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - topicKey: z.string(), - RenameTopicRequestDto: components.RenameTopicRequestDto$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - RenameTopicRequestDto: "renameTopicRequestDto", - }); - }); + TopicsControllerRenameTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + topicKey: z.string(), + RenameTopicRequestDto: components.RenameTopicRequestDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "RenameTopicRequestDto": "renameTopicRequestDto", + }); +}); /** @internal */ export type TopicsControllerRenameTopicRequest$Outbound = { - topicKey: string; - RenameTopicRequestDto: components.RenameTopicRequestDto$Outbound; + topicKey: string; + RenameTopicRequestDto: components.RenameTopicRequestDto$Outbound; }; /** @internal */ export const TopicsControllerRenameTopicRequest$outboundSchema: z.ZodType< - TopicsControllerRenameTopicRequest$Outbound, - z.ZodTypeDef, - TopicsControllerRenameTopicRequest -> = z - .object({ - topicKey: z.string(), - renameTopicRequestDto: components.RenameTopicRequestDto$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - renameTopicRequestDto: "RenameTopicRequestDto", - }); - }); + TopicsControllerRenameTopicRequest$Outbound, + z.ZodTypeDef, + TopicsControllerRenameTopicRequest +> = z.object({ + topicKey: z.string(), + renameTopicRequestDto: components.RenameTopicRequestDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + renameTopicRequestDto: "RenameTopicRequestDto", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicsControllerRenameTopicRequest$ { - /** @deprecated use `TopicsControllerRenameTopicRequest$inboundSchema` instead. */ - export const inboundSchema = TopicsControllerRenameTopicRequest$inboundSchema; - /** @deprecated use `TopicsControllerRenameTopicRequest$outboundSchema` instead. */ - export const outboundSchema = TopicsControllerRenameTopicRequest$outboundSchema; - /** @deprecated use `TopicsControllerRenameTopicRequest$Outbound` instead. */ - export type Outbound = TopicsControllerRenameTopicRequest$Outbound; + /** @deprecated use `TopicsControllerRenameTopicRequest$inboundSchema` instead. */ + export const inboundSchema = TopicsControllerRenameTopicRequest$inboundSchema; + /** @deprecated use `TopicsControllerRenameTopicRequest$outboundSchema` instead. */ + export const outboundSchema = + TopicsControllerRenameTopicRequest$outboundSchema; + /** @deprecated use `TopicsControllerRenameTopicRequest$Outbound` instead. */ + export type Outbound = TopicsControllerRenameTopicRequest$Outbound; } diff --git a/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts b/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts index eda96404..46f43e69 100644 --- a/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts +++ b/src/models/operations/workflowcontrollerdeleteworkflowbyid.ts @@ -5,41 +5,45 @@ import * as z from "zod"; export type WorkflowControllerDeleteWorkflowByIdRequest = { - workflowId: string; + workflowId: string; }; /** @internal */ -export const WorkflowControllerDeleteWorkflowByIdRequest$inboundSchema: z.ZodType< +export const WorkflowControllerDeleteWorkflowByIdRequest$inboundSchema: + z.ZodType< WorkflowControllerDeleteWorkflowByIdRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ workflowId: z.string(), -}); + }); /** @internal */ export type WorkflowControllerDeleteWorkflowByIdRequest$Outbound = { - workflowId: string; + workflowId: string; }; /** @internal */ -export const WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema: z.ZodType< +export const WorkflowControllerDeleteWorkflowByIdRequest$outboundSchema: + z.ZodType< WorkflowControllerDeleteWorkflowByIdRequest$Outbound, z.ZodTypeDef, WorkflowControllerDeleteWorkflowByIdRequest -> = z.object({ + > = 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; + /** @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 index bdee564d..65d9419f 100644 --- a/src/models/operations/workflowcontrollergetworkflowbyid.ts +++ b/src/models/operations/workflowcontrollergetworkflowbyid.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type WorkflowControllerGetWorkflowByIdRequest = { - workflowId: string; + workflowId: string; }; /** @internal */ export const WorkflowControllerGetWorkflowByIdRequest$inboundSchema: z.ZodType< - WorkflowControllerGetWorkflowByIdRequest, - z.ZodTypeDef, - unknown + WorkflowControllerGetWorkflowByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - workflowId: z.string(), + workflowId: z.string(), }); /** @internal */ export type WorkflowControllerGetWorkflowByIdRequest$Outbound = { - workflowId: string; + workflowId: string; }; /** @internal */ export const WorkflowControllerGetWorkflowByIdRequest$outboundSchema: z.ZodType< - WorkflowControllerGetWorkflowByIdRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerGetWorkflowByIdRequest + WorkflowControllerGetWorkflowByIdRequest$Outbound, + z.ZodTypeDef, + WorkflowControllerGetWorkflowByIdRequest > = z.object({ - workflowId: z.string(), + workflowId: z.string(), }); /** @@ -36,10 +36,12 @@ export const WorkflowControllerGetWorkflowByIdRequest$outboundSchema: z.ZodType< * @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; + /** @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 index 4f14d3c2..fbbeb038 100644 --- a/src/models/operations/workflowcontrollerlistworkflows.ts +++ b/src/models/operations/workflowcontrollerlistworkflows.ts @@ -5,41 +5,41 @@ 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; + 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 + WorkflowControllerListWorkflowsRequest, + z.ZodTypeDef, + unknown > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - query: z.string().optional(), + 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; + page?: number | undefined; + limit: number; + query?: string | undefined; }; /** @internal */ export const WorkflowControllerListWorkflowsRequest$outboundSchema: z.ZodType< - WorkflowControllerListWorkflowsRequest$Outbound, - z.ZodTypeDef, - WorkflowControllerListWorkflowsRequest + WorkflowControllerListWorkflowsRequest$Outbound, + z.ZodTypeDef, + WorkflowControllerListWorkflowsRequest > = z.object({ - page: z.number().optional(), - limit: z.number().default(10), - query: z.string().optional(), + page: z.number().optional(), + limit: z.number().default(10), + query: z.string().optional(), }); /** @@ -47,10 +47,12 @@ export const WorkflowControllerListWorkflowsRequest$outboundSchema: z.ZodType< * @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; + /** @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 index b5dd7777..0ed440bf 100644 --- a/src/models/operations/workflowcontrollerupdateactivestatus.ts +++ b/src/models/operations/workflowcontrollerupdateactivestatus.ts @@ -2,62 +2,65 @@ * 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"; -import * as z from "zod"; export type WorkflowControllerUpdateActiveStatusRequest = { - workflowId: string; - changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto; + workflowId: string; + changeWorkflowStatusRequestDto: components.ChangeWorkflowStatusRequestDto; }; /** @internal */ -export const WorkflowControllerUpdateActiveStatusRequest$inboundSchema: z.ZodType< +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", - }); + > = 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; + workflowId: string; + ChangeWorkflowStatusRequestDto: + components.ChangeWorkflowStatusRequestDto$Outbound; }; /** @internal */ -export const WorkflowControllerUpdateActiveStatusRequest$outboundSchema: z.ZodType< +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", - }); + > = 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; + /** @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 index 4a773600..3cac92a4 100644 --- a/src/models/operations/workflowcontrollerupdateworkflowbyid.ts +++ b/src/models/operations/workflowcontrollerupdateworkflowbyid.ts @@ -2,62 +2,63 @@ * 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"; -import * as z from "zod"; export type WorkflowControllerUpdateWorkflowByIdRequest = { - workflowId: string; - updateWorkflowRequestDto: components.UpdateWorkflowRequestDto; + workflowId: string; + updateWorkflowRequestDto: components.UpdateWorkflowRequestDto; }; /** @internal */ -export const WorkflowControllerUpdateWorkflowByIdRequest$inboundSchema: z.ZodType< +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", - }); + > = 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; + workflowId: string; + UpdateWorkflowRequestDto: components.UpdateWorkflowRequestDto$Outbound; }; /** @internal */ -export const WorkflowControllerUpdateWorkflowByIdRequest$outboundSchema: z.ZodType< +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", - }); + > = 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; + /** @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 cb350e00..f2ca05d7 100644 --- a/src/sdk/apikeys.ts +++ b/src/sdk/apikeys.ts @@ -8,10 +8,15 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ApiKeys extends ClientSDK { - /** - * Get api keys - */ - async list(options?: RequestOptions): Promise> { - return unwrapAsync(environmentsApiKeysList(this, options)); - } + /** + * Get api keys + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(environmentsApiKeysList( + this, + options, + )); + } } diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index e066979d..6d078cde 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -9,25 +9,31 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Authentication extends ClientSDK { - /** - * Handle chat oauth - */ - async chatAccessOauth( - request: operations.SubscribersControllerChatAccessOauthRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersAuthenticationChatAccessOauth(this, request, options)); - } + /** + * Handle chat oauth + */ + async chatAccessOauth( + request: operations.SubscribersControllerChatAccessOauthRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersAuthenticationChatAccessOauth( + this, + request, + options, + )); + } - /** - * Handle providers oauth redirect - */ - async chatAccessOauthCallBack( - request: operations.SubscribersControllerChatOauthCallbackRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersAuthenticationChatAccessOauthCallBack(this, request, options) - ); - } + /** + * Handle providers oauth redirect + */ + async chatAccessOauthCallBack( + request: operations.SubscribersControllerChatOauthCallbackRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersAuthenticationChatAccessOauthCallBack( + this, + request, + options, + )); + } } diff --git a/src/sdk/changes.ts b/src/sdk/changes.ts index c830057f..45bacac7 100644 --- a/src/sdk/changes.ts +++ b/src/sdk/changes.ts @@ -12,40 +12,57 @@ 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 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)); - } + /** + * 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 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)); - } + /** + * 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 c2925b23..27a591af 100644 --- a/src/sdk/credentials.ts +++ b/src/sdk/credentials.ts @@ -10,60 +10,63 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Credentials extends ClientSDK { - /** - * Modify 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, - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersCredentialsAppend( - this, - subscriberId, - updateSubscriberChannelRequestDto, - options - ) - ); - } + /** + * Modify 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, + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersCredentialsAppend( + this, + subscriberId, + updateSubscriberChannelRequestDto, + options, + )); + } - /** - * Delete subscriber credentials by providerId - * - * @remarks - * Delete subscriber credentials such as slack and expo tokens. - */ - async delete( - subscriberId: string, - providerId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersCredentialsDelete(this, subscriberId, providerId, options)); - } + /** + * Delete subscriber credentials by providerId + * + * @remarks + * Delete subscriber credentials such as slack and expo tokens. + */ + async delete( + subscriberId: string, + providerId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersCredentialsDelete( + this, + subscriberId, + providerId, + options, + )); + } - /** - * Update subscriber credentials - * - * @remarks - * Subscriber credentials associated to the delivery methods such as slack and push tokens. - */ - async update( - subscriberId: string, - updateSubscriberChannelRequestDto: components.UpdateSubscriberChannelRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersCredentialsUpdate( - this, - subscriberId, - updateSubscriberChannelRequestDto, - options - ) - ); - } + /** + * Update subscriber credentials + * + * @remarks + * Subscriber credentials associated to the delivery methods such as slack and push tokens. + */ + async update( + subscriberId: string, + updateSubscriberChannelRequestDto: + components.UpdateSubscriberChannelRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersCredentialsUpdate( + this, + subscriberId, + updateSubscriberChannelRequestDto, + options, + )); + } } diff --git a/src/sdk/environments.ts b/src/sdk/environments.ts index 1c25a7fe..39009c6f 100644 --- a/src/sdk/environments.ts +++ b/src/sdk/environments.ts @@ -10,22 +10,32 @@ 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$)); - } + private _apiKeys?: ApiKeys; + get apiKeys(): ApiKeys { + return (this._apiKeys ??= new ApiKeys(this.options$)); + } - /** - * Get environments - */ - async list(options?: RequestOptions): Promise> { - return unwrapAsync(environmentsList(this, options)); - } + /** + * Get environments + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(environmentsList( + this, + options, + )); + } - /** - * Get current environment - */ - async retrieve(options?: RequestOptions): Promise { - return unwrapAsync(environmentsRetrieve(this, options)); - } + /** + * Get current environment + */ + async retrieve( + options?: RequestOptions, + ): Promise { + return unwrapAsync(environmentsRetrieve( + this, + options, + )); + } } diff --git a/src/sdk/executiondetails.ts b/src/sdk/executiondetails.ts index ec61c459..0d223d3a 100644 --- a/src/sdk/executiondetails.ts +++ b/src/sdk/executiondetails.ts @@ -8,14 +8,19 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ExecutionDetails extends ClientSDK { - /** - * Get execution details - */ - async retrieve( - notificationId: string, - subscriberId: string, - options?: RequestOptions - ): Promise> { - return unwrapAsync(executionDetailsRetrieve(this, notificationId, subscriberId, options)); - } + /** + * Get execution details + */ + async retrieve( + notificationId: string, + subscriberId: string, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(executionDetailsRetrieve( + this, + notificationId, + subscriberId, + options, + )); + } } diff --git a/src/sdk/feeds.ts b/src/sdk/feeds.ts index 92f2ba46..39ceb000 100644 --- a/src/sdk/feeds.ts +++ b/src/sdk/feeds.ts @@ -10,30 +10,43 @@ 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)); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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 d2e0f739..6702c4f1 100644 --- a/src/sdk/integrations.ts +++ b/src/sdk/integrations.ts @@ -14,74 +14,99 @@ 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$)); - } + private _webhooks?: Webhooks; + get webhooks(): Webhooks { + return (this._webhooks ??= new Webhooks(this.options$)); + } - /** - * Create integration - * - * @remarks - * Create an integration for the current environment the user is based on the API key provided - */ - async create( - request: components.CreateIntegrationRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(integrationsCreate(this, request, options)); - } + /** + * Create integration + * + * @remarks + * Create an integration for the current environment the user is based on the API key provided + */ + async create( + request: components.CreateIntegrationRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsCreate( + this, + request, + options, + )); + } - /** - * Delete integration - */ - async delete( - integrationId: string, - options?: RequestOptions - ): Promise> { - return unwrapAsync(integrationsDelete(this, integrationId, options)); - } + /** + * Delete integration + */ + async delete( + integrationId: string, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(integrationsDelete( + this, + integrationId, + options, + )); + } - /** - * Get integrations - * - * @remarks - * Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change - */ - async list(options?: RequestOptions): Promise> { - return unwrapAsync(integrationsList(this, options)); - } + /** + * Get integrations + * + * @remarks + * Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(integrationsList( + 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 - */ - async listActive(options?: RequestOptions): 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 + */ + async listActive( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(integrationsListActive( + this, + options, + )); + } - /** - * Set integration as primary - */ - async setAsPrimary( - integrationId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(integrationsSetAsPrimary(this, integrationId, options)); - } + /** + * Set integration as primary + */ + async setAsPrimary( + integrationId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsSetAsPrimary( + this, + integrationId, + options, + )); + } - /** - * Update integration - */ - async update( - integrationId: string, - updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - integrationsUpdate(this, integrationId, updateIntegrationRequestDto, options) - ); - } + /** + * Update integration + */ + async update( + integrationId: string, + updateIntegrationRequestDto: components.UpdateIntegrationRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsUpdate( + this, + integrationId, + updateIntegrationRequestDto, + options, + )); + } } diff --git a/src/sdk/layouts.ts b/src/sdk/layouts.ts index 79fdf758..b50b418a 100644 --- a/src/sdk/layouts.ts +++ b/src/sdk/layouts.ts @@ -14,73 +14,105 @@ 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)); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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 87e10a65..eb7d0541 100644 --- a/src/sdk/messages.ts +++ b/src/sdk/messages.ts @@ -11,43 +11,56 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Messages extends ClientSDK { - /** - * Delete message - * - * @remarks - * Deletes a message entity from the Novu platform - */ - async delete( - messageId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(messagesDelete(this, messageId, options)); - } + /** + * Delete message + * + * @remarks + * Deletes a message entity from the Novu platform + */ + async delete( + messageId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(messagesDelete( + this, + messageId, + options, + )); + } - /** - * Delete messages by transactionId - * - * @remarks - * Deletes messages entity from the Novu platform using TransactionId of message - */ - async deleteByTransactionId( - transactionId: string, - channel?: operations.Channel | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(messagesDeleteByTransactionId(this, transactionId, channel, options)); - } + /** + * Delete messages by transactionId + * + * @remarks + * Deletes messages entity from the Novu platform using TransactionId of message + */ + async deleteByTransactionId( + transactionId: string, + channel?: operations.Channel | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(messagesDeleteByTransactionId( + this, + transactionId, + channel, + 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)); - } + /** + * 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 f088e6e6..ec0b8b2c 100644 --- a/src/sdk/notifications.ts +++ b/src/sdk/notifications.ts @@ -11,28 +11,36 @@ import { unwrapAsync } from "../types/fp.js"; import { Stats } from "./stats.js"; export class Notifications extends ClientSDK { - private _stats?: Stats; - get stats(): Stats { - return (this._stats ??= new Stats(this.options$)); - } + private _stats?: Stats; + get stats(): Stats { + return (this._stats ??= new Stats(this.options$)); + } - /** - * Get notifications - */ - async list( - request: operations.NotificationsControllerListNotificationsRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(notificationsList(this, request, options)); - } + /** + * Get notifications + */ + async list( + request: operations.NotificationsControllerListNotificationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsList( + this, + request, + options, + )); + } - /** - * Get notification - */ - async retrieve( - notificationId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(notificationsRetrieve(this, notificationId, options)); - } + /** + * Get notification + */ + async retrieve( + notificationId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsRetrieve( + this, + notificationId, + options, + )); + } } diff --git a/src/sdk/novumessages.ts b/src/sdk/novumessages.ts index 25a26912..6a8e9f01 100644 --- a/src/sdk/novumessages.ts +++ b/src/sdk/novumessages.ts @@ -11,39 +11,49 @@ import * as operations from "../models/operations/index.js"; 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. - */ - async markAll( - subscriberId: string, - markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersMessagesMarkAll(this, subscriberId, markAllMessageAsRequestDto, options) - ); - } + /** + * 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 markAll( + subscriberId: string, + markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersMessagesMarkAll( + this, + subscriberId, + markAllMessageAsRequestDto, + options, + )); + } - /** - * Mark a subscriber messages as seen, read, unseen or unread - */ - async markAllAs( - subscriberId: string, - messageMarkAsRequestDto: components.MessageMarkAsRequestDto, - options?: RequestOptions - ): Promise> { - return unwrapAsync( - subscribersMessagesMarkAllAs(this, subscriberId, messageMarkAsRequestDto, options) - ); - } + /** + * Mark a subscriber messages as seen, read, unseen or unread + */ + async markAllAs( + subscriberId: string, + messageMarkAsRequestDto: components.MessageMarkAsRequestDto, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(subscribersMessagesMarkAllAs( + this, + subscriberId, + messageMarkAsRequestDto, + options, + )); + } - /** - * Mark message action as seen - */ - async updateAsSeen( - request: operations.SubscribersControllerMarkActionAsSeenRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersMessagesUpdateAsSeen(this, request, options)); - } + /** + * Mark message action as seen + */ + async updateAsSeen( + request: operations.SubscribersControllerMarkActionAsSeenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersMessagesUpdateAsSeen( + this, + request, + options, + )); + } } diff --git a/src/sdk/novunotifications.ts b/src/sdk/novunotifications.ts index 71379e53..dfaecb0d 100644 --- a/src/sdk/novunotifications.ts +++ b/src/sdk/novunotifications.ts @@ -10,23 +10,31 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class NovuNotifications extends ClientSDK { - /** - * Get in-app notification feed for a particular subscriber - */ - async retrieve( - request: operations.SubscribersControllerGetNotificationsFeedRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersNotificationsRetrieve(this, request, options)); - } + /** + * Get in-app notification feed for a particular subscriber + */ + async retrieve( + request: operations.SubscribersControllerGetNotificationsFeedRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersNotificationsRetrieve( + this, + request, + options, + )); + } - /** - * Get the unseen in-app notifications count for subscribers feed - */ - async unseenCount( - request: operations.SubscribersControllerGetUnseenCountRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersNotificationsUnseenCount(this, request, options)); - } + /** + * Get the unseen in-app notifications count for subscribers feed + */ + async unseenCount( + request: operations.SubscribersControllerGetUnseenCountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersNotificationsUnseenCount( + this, + request, + options, + )); + } } diff --git a/src/sdk/novusubscribers.ts b/src/sdk/novusubscribers.ts index ee1a37da..4bd49a05 100644 --- a/src/sdk/novusubscribers.ts +++ b/src/sdk/novusubscribers.ts @@ -10,51 +10,60 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class NovuSubscribers extends ClientSDK { - /** - * Subscribers addition - * - * @remarks - * Add subscribers to a topic by key - */ - async assign( - topicKey: string, - addSubscribersRequestDto: components.AddSubscribersRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsSubscribersAssign(this, topicKey, addSubscribersRequestDto, options) - ); - } + /** + * Subscribers addition + * + * @remarks + * Add subscribers to a topic by key + */ + async assign( + topicKey: string, + addSubscribersRequestDto: components.AddSubscribersRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsSubscribersAssign( + this, + topicKey, + addSubscribersRequestDto, + options, + )); + } - /** - * Subscribers removal - * - * @remarks - * Remove subscribers from a topic - */ - async delete( - topicKey: string, - removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsSubscribersDelete(this, topicKey, removeSubscribersRequestDto, options) - ); - } + /** + * Subscribers removal + * + * @remarks + * Remove subscribers from a topic + */ + async delete( + topicKey: string, + removeSubscribersRequestDto: components.RemoveSubscribersRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsSubscribersDelete( + this, + topicKey, + removeSubscribersRequestDto, + options, + )); + } - /** - * Check topic subscriber - * - * @remarks - * Check if a subscriber belongs to a certain topic - */ - async retrieve( - externalSubscriberId: string, - topicKey: string, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsSubscribersRetrieve(this, externalSubscriberId, topicKey, options) - ); - } + /** + * Check topic subscriber + * + * @remarks + * Check if a subscriber belongs to a certain topic + */ + async retrieve( + externalSubscriberId: string, + topicKey: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsSubscribersRetrieve( + this, + externalSubscriberId, + topicKey, + options, + )); + } } diff --git a/src/sdk/organizations.ts b/src/sdk/organizations.ts index d78b764c..2670269d 100644 --- a/src/sdk/organizations.ts +++ b/src/sdk/organizations.ts @@ -10,32 +10,43 @@ 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) - ); - } + /** + * 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)); - } + /** + * 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)); - } + /** + * 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 44a6b0bf..c7652ddb 100644 --- a/src/sdk/preferences.ts +++ b/src/sdk/preferences.ts @@ -12,54 +12,64 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Preferences extends ClientSDK { - /** - * Get subscriber preferences - */ - async list( - subscriberId: string, - options?: RequestOptions - ): Promise> { - return unwrapAsync(subscribersPreferencesList(this, subscriberId, options)); - } + /** + * Get subscriber preferences + */ + async list( + subscriberId: string, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(subscribersPreferencesList( + this, + subscriberId, + options, + )); + } - /** - * Get subscriber preferences by level - */ - async retrieveByLevel( - parameter: operations.Parameter, - subscriberId: string, - options?: RequestOptions - ): Promise> { - return unwrapAsync( - subscribersPreferencesRetrieveByLevel(this, parameter, subscriberId, options) - ); - } + /** + * Get subscriber preferences by level + */ + async retrieveByLevel( + parameter: operations.Parameter, + subscriberId: string, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(subscribersPreferencesRetrieveByLevel( + this, + parameter, + subscriberId, + options, + )); + } - /** - * Update subscriber preference - */ - async update( - request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersPreferencesUpdate(this, request, options)); - } + /** + * Update subscriber preference + */ + async update( + request: operations.SubscribersControllerUpdateSubscriberPreferenceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersPreferencesUpdate( + this, + request, + options, + )); + } - /** - * Update subscriber global preferences - */ - async updateGlobal( - subscriberId: string, - updateSubscriberGlobalPreferencesRequestDto: components.UpdateSubscriberGlobalPreferencesRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersPreferencesUpdateGlobal( - this, - subscriberId, - updateSubscriberGlobalPreferencesRequestDto, - options - ) - ); - } + /** + * Update subscriber global preferences + */ + async updateGlobal( + subscriberId: string, + updateSubscriberGlobalPreferencesRequestDto: + components.UpdateSubscriberGlobalPreferencesRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersPreferencesUpdateGlobal( + this, + subscriberId, + updateSubscriberGlobalPreferencesRequestDto, + options, + )); + } } diff --git a/src/sdk/properties.ts b/src/sdk/properties.ts index a8b2c7a7..1948ae52 100644 --- a/src/sdk/properties.ts +++ b/src/sdk/properties.ts @@ -8,24 +8,23 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Properties extends ClientSDK { - /** - * Update subscriber online status - * - * @remarks - * Used to update the subscriber isOnline flag. - */ - async updateOnlineFlag( - subscriberId: string, - updateSubscriberOnlineFlagRequestDto: components.UpdateSubscriberOnlineFlagRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersPropertiesUpdateOnlineFlag( - this, - subscriberId, - updateSubscriberOnlineFlagRequestDto, - options - ) - ); - } + /** + * Update subscriber online status + * + * @remarks + * Used to update the subscriber isOnline flag. + */ + async updateOnlineFlag( + subscriberId: string, + updateSubscriberOnlineFlagRequestDto: + components.UpdateSubscriberOnlineFlagRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersPropertiesUpdateOnlineFlag( + this, + subscriberId, + updateSubscriberOnlineFlagRequestDto, + options, + )); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 7b69ed80..98c805ff 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -25,136 +25,149 @@ 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$)); - } - - private _executionDetails?: ExecutionDetails; - get executionDetails(): ExecutionDetails { - 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 _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$)); - } - - private _organizations?: Organizations; - get organizations(): Organizations { - return (this._organizations ??= new Organizations(this.options$)); - } - - private _subscribers?: Subscribers; - get subscribers(): Subscribers { - return (this._subscribers ??= new Subscribers(this.options$)); - } - - private _tenants?: Tenants; - get tenants(): Tenants { - return (this._tenants ??= new Tenants(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$)); - } - - /** - * Cancel triggered 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... - * - */ - async cancel( - transactionId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(cancel(this, transactionId, options)); - } - - /** - * 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. - * - */ - async trigger( - request: components.TriggerEventRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(trigger(this, request, options)); - } - - /** - * Broadcast event to all - * - * @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 { - return unwrapAsync(triggerBroadcast(this, request, options)); - } - - /** - * Bulk trigger 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. - * - */ - async triggerBulk( - request: components.BulkTriggerEventDto, - options?: RequestOptions - ): Promise> { - return unwrapAsync(triggerBulk(this, request, options)); - } + 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$)); + } + + private _executionDetails?: ExecutionDetails; + get executionDetails(): ExecutionDetails { + 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 _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$)); + } + + private _organizations?: Organizations; + get organizations(): Organizations { + return (this._organizations ??= new Organizations(this.options$)); + } + + private _subscribers?: Subscribers; + get subscribers(): Subscribers { + return (this._subscribers ??= new Subscribers(this.options$)); + } + + private _tenants?: Tenants; + get tenants(): Tenants { + return (this._tenants ??= new Tenants(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$)); + } + + /** + * Cancel triggered 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... + */ + async cancel( + transactionId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(cancel( + this, + transactionId, + options, + )); + } + + /** + * 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. + */ + async trigger( + request: components.TriggerEventRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(trigger( + this, + request, + options, + )); + } + + /** + * Broadcast event to all + * + * @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 { + return unwrapAsync(triggerBroadcast( + this, + request, + options, + )); + } + + /** + * Bulk trigger 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. + */ + async triggerBulk( + request: components.BulkTriggerEventDto, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(triggerBulk( + this, + request, + options, + )); + } } diff --git a/src/sdk/stats.ts b/src/sdk/stats.ts index 24e44a96..4656836b 100644 --- a/src/sdk/stats.ts +++ b/src/sdk/stats.ts @@ -9,20 +9,29 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Stats extends ClientSDK { - /** - * Get notification graph statistics - */ - async graph( - days?: number | undefined, - options?: RequestOptions - ): Promise> { - return unwrapAsync(notificationsStatsGraph(this, days, options)); - } + /** + * Get notification graph statistics + */ + async graph( + days?: number | undefined, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(notificationsStatsGraph( + this, + days, + options, + )); + } - /** - * Get notification statistics - */ - async retrieve(options?: RequestOptions): Promise { - return unwrapAsync(notificationsStatsRetrieve(this, options)); - } + /** + * Get notification statistics + */ + async retrieve( + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsStatsRetrieve( + this, + options, + )); + } } diff --git a/src/sdk/status.ts b/src/sdk/status.ts index 7587a4ac..80730e30 100644 --- a/src/sdk/status.ts +++ b/src/sdk/status.ts @@ -8,19 +8,22 @@ 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) - ); - } + /** + * 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 4b47f740..dcfe25e3 100644 --- a/src/sdk/subscribers.ts +++ b/src/sdk/subscribers.ts @@ -21,118 +21,143 @@ import { Preferences } from "./preferences.js"; import { Properties } from "./properties.js"; export class Subscribers extends ClientSDK { - private _credentials?: Credentials; - get credentials(): Credentials { - return (this._credentials ??= new Credentials(this.options$)); - } + private _credentials?: Credentials; + get credentials(): Credentials { + return (this._credentials ??= new Credentials(this.options$)); + } - private _authentication?: Authentication; - get authentication(): Authentication { - return (this._authentication ??= new Authentication(this.options$)); - } + private _authentication?: Authentication; + get authentication(): Authentication { + return (this._authentication ??= new Authentication(this.options$)); + } - private _messages?: NovuMessages; - get messages(): NovuMessages { - return (this._messages ??= new NovuMessages(this.options$)); - } + private _messages?: NovuMessages; + get messages(): NovuMessages { + return (this._messages ??= new NovuMessages(this.options$)); + } - private _notifications?: NovuNotifications; - get notifications(): NovuNotifications { - return (this._notifications ??= new NovuNotifications(this.options$)); - } + private _notifications?: NovuNotifications; + get notifications(): NovuNotifications { + return (this._notifications ??= new NovuNotifications(this.options$)); + } - private _properties?: Properties; - get properties(): Properties { - return (this._properties ??= new Properties(this.options$)); - } + private _properties?: Properties; + get properties(): Properties { + return (this._properties ??= new Properties(this.options$)); + } - private _preferences?: Preferences; - get preferences(): Preferences { - return (this._preferences ??= new Preferences(this.options$)); - } + private _preferences?: Preferences; + get preferences(): Preferences { + return (this._preferences ??= new Preferences(this.options$)); + } - /** - * Create subscriber - * - * @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. - */ - async create( - request: components.CreateSubscriberRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersCreate(this, request, options)); - } + /** + * Create subscriber + * + * @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. + */ + async create( + request: components.CreateSubscriberRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersCreate( + this, + request, + options, + )); + } - /** - * Bulk create subscribers - * - * @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. - * - */ - async createBulk( - request: components.BulkSubscriberCreateDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersCreateBulk(this, request, options)); - } + /** + * Bulk create subscribers + * + * @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. + */ + async createBulk( + request: components.BulkSubscriberCreateDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersCreateBulk( + this, + request, + options, + )); + } - /** - * Delete subscriber - * - * @remarks - * Deletes a subscriber entity from the Novu platform - */ - async delete( - subscriberId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersDelete(this, subscriberId, options)); - } + /** + * Delete subscriber + * + * @remarks + * Deletes a subscriber entity from the Novu platform + */ + async delete( + subscriberId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersDelete( + this, + subscriberId, + options, + )); + } - /** - * Get subscribers - * - * @remarks - * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter - */ - async list( - page?: number | undefined, - limit?: number | undefined, - options?: RequestOptions - ): Promise> { - return unwrapResultIterator(subscribersList(this, page, limit, options)); - } + /** + * Get subscribers + * + * @remarks + * Returns a list of subscribers, could paginated using the `page` and `limit` query parameter + */ + async list( + page?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, + ): Promise< + PageIterator + > { + return unwrapResultIterator(subscribersList( + this, + page, + limit, + options, + )); + } - /** - * Get subscriber - * - * @remarks - * Get subscriber by your internal id used to identify the subscriber - */ - async retrieve( - subscriberId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(subscribersRetrieve(this, subscriberId, options)); - } + /** + * Get subscriber + * + * @remarks + * Get subscriber by your internal id used to identify the subscriber + */ + async retrieve( + subscriberId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersRetrieve( + this, + subscriberId, + options, + )); + } - /** - * Update subscriber - * - * @remarks - * Used to update the subscriber entity with new information - */ - async update( - subscriberId: string, - updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - subscribersUpdate(this, subscriberId, updateSubscriberRequestDto, options) - ); - } + /** + * Update subscriber + * + * @remarks + * Used to update the subscriber entity with new information + */ + async update( + subscriberId: string, + updateSubscriberRequestDto: components.UpdateSubscriberRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(subscribersUpdate( + this, + subscriberId, + updateSubscriberRequestDto, + options, + )); + } } diff --git a/src/sdk/tenants.ts b/src/sdk/tenants.ts index e169d1c2..b2f070f6 100644 --- a/src/sdk/tenants.ts +++ b/src/sdk/tenants.ts @@ -14,67 +14,92 @@ 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)); - } + /** + * 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)); - } + /** + * 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 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)); - } + /** + * 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)); - } + /** + * 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 4c53188c..a7a1f39f 100644 --- a/src/sdk/topics.ts +++ b/src/sdk/topics.ts @@ -14,71 +14,95 @@ import { unwrapAsync } from "../types/fp.js"; import { NovuSubscribers } from "./novusubscribers.js"; export class Topics extends ClientSDK { - private _subscribers?: NovuSubscribers; - get subscribers(): NovuSubscribers { - return (this._subscribers ??= new NovuSubscribers(this.options$)); - } + private _subscribers?: NovuSubscribers; + get subscribers(): NovuSubscribers { + return (this._subscribers ??= new NovuSubscribers(this.options$)); + } - /** - * Topic creation - * - * @remarks - * Create a topic - */ - async create( - request: components.CreateTopicRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsCreate(this, request, options)); - } + /** + * Topic creation + * + * @remarks + * Create a topic + */ + async create( + request: components.CreateTopicRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsCreate( + this, + request, + options, + )); + } - /** - * 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)); - } + /** + * 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 - * - * @remarks - * 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 - */ - async list( - request: operations.TopicsControllerListTopicsRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsList(this, request, options)); - } + /** + * Filter topics + * + * @remarks + * 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 + */ + async list( + request: operations.TopicsControllerListTopicsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsList( + this, + request, + options, + )); + } - /** - * Rename a topic - * - * @remarks - * Rename a topic by providing a new name - */ - async rename( - topicKey: string, - renameTopicRequestDto: components.RenameTopicRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsRename(this, topicKey, renameTopicRequestDto, options)); - } + /** + * Rename a topic + * + * @remarks + * Rename a topic by providing a new name + */ + async rename( + topicKey: string, + renameTopicRequestDto: components.RenameTopicRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsRename( + this, + topicKey, + renameTopicRequestDto, + options, + )); + } - /** - * Get topic - * - * @remarks - * Get a topic by its topic key - */ - async retrieve( - topicKey: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsRetrieve(this, topicKey, options)); - } + /** + * Get topic + * + * @remarks + * Get a topic by its topic key + */ + async retrieve( + topicKey: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsRetrieve( + this, + topicKey, + options, + )); + } } diff --git a/src/sdk/variables.ts b/src/sdk/variables.ts index a2ec6eaa..019a3b88 100644 --- a/src/sdk/variables.ts +++ b/src/sdk/variables.ts @@ -8,13 +8,18 @@ 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)); - } + /** + * 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 63201101..d456c74a 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -7,13 +7,20 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; export class Webhooks extends ClientSDK { - /** - * Get webhook support status for provider - * - * @remarks - * Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value - */ - async retrieve(providerOrIntegrationId: string, options?: RequestOptions): Promise { - return unwrapAsync(integrationsWebhooksRetrieve(this, providerOrIntegrationId, options)); - } + /** + * Get webhook support status for provider + * + * @remarks + * Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value + */ + async retrieve( + providerOrIntegrationId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsWebhooksRetrieve( + this, + providerOrIntegrationId, + options, + )); + } } diff --git a/src/sdk/workflowgroups.ts b/src/sdk/workflowgroups.ts index 8b0086b0..74c45305 100644 --- a/src/sdk/workflowgroups.ts +++ b/src/sdk/workflowgroups.ts @@ -12,68 +12,89 @@ import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class WorkflowGroups extends ClientSDK { - /** - * Create workflow group - * - * @remarks - * workflow group was previously named notification group - */ - async create( - request: components.CreateNotificationGroupRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync(workflowGroupsCreate(this, request, options)); - } + /** + * Create workflow group + * + * @remarks + * workflow group was previously named notification group + */ + async create( + request: components.CreateNotificationGroupRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(workflowGroupsCreate( + this, + request, + options, + )); + } - /** - * Delete workflow group - * - * @remarks - * workflow group was previously named notification group - */ - async delete( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(workflowGroupsDelete(this, id, options)); - } + /** + * Delete workflow group + * + * @remarks + * workflow group was previously named notification group + */ + async delete( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(workflowGroupsDelete( + this, + id, + options, + )); + } - /** - * Get workflow groups - * - * @remarks - * workflow group was previously named notification group - */ - async list(options?: RequestOptions): Promise> { - return unwrapAsync(workflowGroupsList(this, options)); - } + /** + * Get workflow groups + * + * @remarks + * workflow group was previously named notification group + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(workflowGroupsList( + this, + options, + )); + } - /** - * Get workflow group - * - * @remarks - * workflow group was previously named notification group - */ - async retrieve( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(workflowGroupsRetrieve(this, id, options)); - } + /** + * Get workflow group + * + * @remarks + * workflow group was previously named notification group + */ + async retrieve( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(workflowGroupsRetrieve( + this, + id, + options, + )); + } - /** - * Update workflow group - * - * @remarks - * workflow group was previously named notification group - */ - async update( - id: string, - createNotificationGroupRequestDto: components.CreateNotificationGroupRequestDto, - options?: RequestOptions - ): Promise { - return unwrapAsync( - workflowGroupsUpdate(this, id, createNotificationGroupRequestDto, options) - ); - } + /** + * Update workflow group + * + * @remarks + * workflow group was previously named notification group + */ + async update( + id: string, + createNotificationGroupRequestDto: + components.CreateNotificationGroupRequestDto, + options?: RequestOptions, + ): Promise { + return unwrapAsync(workflowGroupsUpdate( + this, + id, + createNotificationGroupRequestDto, + options, + )); + } } diff --git a/src/sdk/workflows.ts b/src/sdk/workflows.ts index 62e18638..fd9fc629 100644 --- a/src/sdk/workflows.ts +++ b/src/sdk/workflows.ts @@ -15,76 +15,100 @@ 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 _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$)); - } + 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)); - } + /** + * 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)); - } + /** + * 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 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)); - } + /** + * 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)); - } + /** + * 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, + )); + } } diff --git a/src/types/index.ts b/src/types/index.ts index dbaa5e6e..e124e817 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -2,10 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate.js"; export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { Paginator, PageIterator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; export { catchUnrecognizedEnum } from "./enums.js"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/src/types/streams.ts b/src/types/streams.ts new file mode 100644 index 00000000..a0163e7a --- /dev/null +++ b/src/types/streams.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isReadableStream( + val: unknown, +): val is ReadableStream { + if (typeof val !== "object" || val === null) { + return false; + } + + // Check for the presence of methods specific to ReadableStream + const stream = val as ReadableStream; + + // ReadableStream has methods like getReader, cancel, and tee + return ( + typeof stream.getReader === "function" && + typeof stream.cancel === "function" && + typeof stream.tee === "function" + ); +}