@novu/api 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +124 -0
- package/REACT_QUERY.md +354 -0
- package/README.md +1032 -0
- package/docs/sdks/authentication/README.md +247 -0
- package/docs/sdks/credentials/README.md +372 -0
- package/docs/sdks/integrations/README.md +631 -0
- package/docs/sdks/messages/README.md +318 -0
- package/docs/sdks/notifications/README.md +226 -0
- package/docs/sdks/novu/README.md +598 -0
- package/docs/sdks/novumessages/README.md +329 -0
- package/docs/sdks/novunotifications/README.md +235 -0
- package/docs/sdks/novusubscribers/README.md +340 -0
- package/docs/sdks/preferences/README.md +221 -0
- package/docs/sdks/properties/README.md +111 -0
- package/docs/sdks/stats/README.md +226 -0
- package/docs/sdks/subscribers/README.md +763 -0
- package/docs/sdks/topics/README.md +541 -0
- package/docs/sdks/webhooks/README.md +117 -0
- package/docs/sdks/workflows/README.md +1123 -0
- package/funcs/cancel.d.ts.map +1 -1
- package/funcs/cancel.js +1 -0
- package/funcs/cancel.js.map +1 -1
- package/funcs/environmentsGenerateSession.d.ts +10 -0
- package/funcs/environmentsGenerateSession.d.ts.map +1 -0
- package/funcs/environmentsGenerateSession.js +131 -0
- package/funcs/environmentsGenerateSession.js.map +1 -0
- package/funcs/environmentsRetrieve.d.ts +10 -0
- package/funcs/environmentsRetrieve.d.ts.map +1 -0
- package/funcs/environmentsRetrieve.js +131 -0
- package/funcs/environmentsRetrieve.js.map +1 -0
- package/funcs/integrationsCreate.d.ts.map +1 -1
- package/funcs/integrationsCreate.js +1 -0
- package/funcs/integrationsCreate.js.map +1 -1
- package/funcs/integrationsDelete.d.ts.map +1 -1
- package/funcs/integrationsDelete.js +1 -0
- package/funcs/integrationsDelete.js.map +1 -1
- package/funcs/integrationsList.d.ts.map +1 -1
- package/funcs/integrationsList.js +1 -0
- package/funcs/integrationsList.js.map +1 -1
- package/funcs/integrationsListActive.d.ts.map +1 -1
- package/funcs/integrationsListActive.js +1 -0
- package/funcs/integrationsListActive.js.map +1 -1
- package/funcs/integrationsSetAsPrimary.d.ts.map +1 -1
- package/funcs/integrationsSetAsPrimary.js +1 -0
- package/funcs/integrationsSetAsPrimary.js.map +1 -1
- package/funcs/integrationsUpdate.d.ts.map +1 -1
- package/funcs/integrationsUpdate.js +1 -0
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/integrationsWebhooksRetrieve.d.ts.map +1 -1
- package/funcs/integrationsWebhooksRetrieve.js +1 -0
- package/funcs/integrationsWebhooksRetrieve.js.map +1 -1
- package/funcs/messagesDelete.d.ts.map +1 -1
- package/funcs/messagesDelete.js +1 -0
- package/funcs/messagesDelete.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +1 -0
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/messagesRetrieve.d.ts.map +1 -1
- package/funcs/messagesRetrieve.js +1 -0
- package/funcs/messagesRetrieve.js.map +1 -1
- package/funcs/notificationsList.d.ts.map +1 -1
- package/funcs/notificationsList.js +2 -0
- package/funcs/notificationsList.js.map +1 -1
- package/funcs/notificationsRetrieve.d.ts.map +1 -1
- package/funcs/notificationsRetrieve.js +1 -0
- package/funcs/notificationsRetrieve.js.map +1 -1
- package/funcs/notificationsStatsGraph.d.ts.map +1 -1
- package/funcs/notificationsStatsGraph.js +1 -0
- package/funcs/notificationsStatsGraph.js.map +1 -1
- package/funcs/notificationsStatsRetrieve.d.ts.map +1 -1
- package/funcs/notificationsStatsRetrieve.js +1 -0
- package/funcs/notificationsStatsRetrieve.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.d.ts.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.js +1 -0
- package/funcs/subscribersAuthenticationChatAccessOauth.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.d.ts.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js +1 -0
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js.map +1 -1
- package/funcs/subscribersCreate.d.ts.map +1 -1
- package/funcs/subscribersCreate.js +2 -1
- package/funcs/subscribersCreate.js.map +1 -1
- package/funcs/subscribersCreateBulk.d.ts.map +1 -1
- package/funcs/subscribersCreateBulk.js +1 -0
- package/funcs/subscribersCreateBulk.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +1 -0
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +1 -0
- package/funcs/subscribersCredentialsDelete.js.map +1 -1
- package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
- package/funcs/subscribersCredentialsUpdate.js +1 -0
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersDelete.d.ts.map +1 -1
- package/funcs/subscribersDelete.js +1 -0
- package/funcs/subscribersDelete.js.map +1 -1
- package/funcs/subscribersList.d.ts.map +1 -1
- package/funcs/subscribersList.js +1 -0
- package/funcs/subscribersList.js.map +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +1 -0
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +1 -0
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js +1 -0
- package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
- package/funcs/subscribersNotificationsFeed.d.ts.map +1 -1
- package/funcs/subscribersNotificationsFeed.js +1 -0
- package/funcs/subscribersNotificationsFeed.js.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.js +1 -0
- package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
- package/funcs/subscribersPatch.d.ts.map +1 -1
- package/funcs/subscribersPatch.js +1 -0
- package/funcs/subscribersPatch.js.map +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +1 -0
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesUpdate.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdate.js +1 -0
- package/funcs/subscribersPreferencesUpdate.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +1 -0
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.d.ts.map +1 -1
- package/funcs/subscribersRetrieve.js +1 -0
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersSearch.d.ts.map +1 -1
- package/funcs/subscribersSearch.js +1 -0
- package/funcs/subscribersSearch.js.map +1 -1
- package/funcs/topicsCreate.d.ts.map +1 -1
- package/funcs/topicsCreate.js +1 -0
- package/funcs/topicsCreate.js.map +1 -1
- package/funcs/topicsDelete.d.ts.map +1 -1
- package/funcs/topicsDelete.js +1 -0
- package/funcs/topicsDelete.js.map +1 -1
- package/funcs/topicsList.d.ts.map +1 -1
- package/funcs/topicsList.js +1 -0
- package/funcs/topicsList.js.map +1 -1
- package/funcs/topicsRename.d.ts.map +1 -1
- package/funcs/topicsRename.js +1 -0
- package/funcs/topicsRename.js.map +1 -1
- package/funcs/topicsRetrieve.d.ts.map +1 -1
- package/funcs/topicsRetrieve.js +1 -0
- package/funcs/topicsRetrieve.js.map +1 -1
- package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
- package/funcs/topicsSubscribersAssign.js +1 -0
- package/funcs/topicsSubscribersAssign.js.map +1 -1
- package/funcs/topicsSubscribersRemove.d.ts.map +1 -1
- package/funcs/topicsSubscribersRemove.js +1 -0
- package/funcs/topicsSubscribersRemove.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +1 -0
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/funcs/trigger.d.ts.map +1 -1
- package/funcs/trigger.js +1 -0
- package/funcs/trigger.js.map +1 -1
- package/funcs/triggerBroadcast.d.ts.map +1 -1
- package/funcs/triggerBroadcast.js +1 -0
- package/funcs/triggerBroadcast.js.map +1 -1
- package/funcs/triggerBulk.d.ts.map +1 -1
- package/funcs/triggerBulk.js +1 -0
- package/funcs/triggerBulk.js.map +1 -1
- package/funcs/workflowsCreate.d.ts.map +1 -1
- package/funcs/workflowsCreate.js +1 -0
- package/funcs/workflowsCreate.js.map +1 -1
- package/funcs/workflowsDelete.d.ts.map +1 -1
- package/funcs/workflowsDelete.js +1 -0
- package/funcs/workflowsDelete.js.map +1 -1
- package/funcs/workflowsGetStepData.d.ts.map +1 -1
- package/funcs/workflowsGetStepData.js +1 -0
- package/funcs/workflowsGetStepData.js.map +1 -1
- package/funcs/workflowsGetWorkflowTestData.d.ts.map +1 -1
- package/funcs/workflowsGetWorkflowTestData.js +1 -0
- package/funcs/workflowsGetWorkflowTestData.js.map +1 -1
- package/funcs/workflowsRetrieve.d.ts.map +1 -1
- package/funcs/workflowsRetrieve.js +1 -0
- package/funcs/workflowsRetrieve.js.map +1 -1
- package/funcs/workflowsUpdate.d.ts.map +1 -1
- package/funcs/workflowsUpdate.js +1 -0
- package/funcs/workflowsUpdate.js.map +1 -1
- package/funcs/workflowsWorkflowControllerGeneratePreview.d.ts.map +1 -1
- package/funcs/workflowsWorkflowControllerGeneratePreview.js +1 -0
- package/funcs/workflowsWorkflowControllerGeneratePreview.js.map +1 -1
- package/funcs/workflowsWorkflowControllerPatchWorkflow.d.ts.map +1 -1
- package/funcs/workflowsWorkflowControllerPatchWorkflow.js +1 -0
- package/funcs/workflowsWorkflowControllerPatchWorkflow.js.map +1 -1
- package/funcs/workflowsWorkflowControllerPatchWorkflowStepData.d.ts.map +1 -1
- package/funcs/workflowsWorkflowControllerPatchWorkflowStepData.js +1 -0
- package/funcs/workflowsWorkflowControllerPatchWorkflowStepData.js.map +1 -1
- package/funcs/workflowsWorkflowControllerSearchWorkflows.d.ts.map +1 -1
- package/funcs/workflowsWorkflowControllerSearchWorkflows.js +1 -0
- package/funcs/workflowsWorkflowControllerSearchWorkflows.js.map +1 -1
- package/funcs/workflowsWorkflowControllerSync.d.ts.map +1 -1
- package/funcs/workflowsWorkflowControllerSync.js +1 -0
- package/funcs/workflowsWorkflowControllerSync.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/activitynotificationtemplateresponsedto.d.ts +6 -0
- package/models/components/activitynotificationtemplateresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationtemplateresponsedto.js +3 -0
- package/models/components/activitynotificationtemplateresponsedto.js.map +1 -1
- package/models/components/createsubscriberrequestdto.d.ts +28 -50
- package/models/components/createsubscriberrequestdto.d.ts.map +1 -1
- package/models/components/createsubscriberrequestdto.js +17 -41
- package/models/components/createsubscriberrequestdto.js.map +1 -1
- package/models/components/getenvironmenttagsdto.d.ts +29 -0
- package/models/components/getenvironmenttagsdto.d.ts.map +1 -0
- package/models/components/getenvironmenttagsdto.js +59 -0
- package/models/components/getenvironmenttagsdto.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/patchsubscriberrequestdto.d.ts +0 -5
- package/models/components/patchsubscriberrequestdto.d.ts.map +1 -1
- package/models/components/patchsubscriberrequestdto.js +0 -2
- package/models/components/patchsubscriberrequestdto.js.map +1 -1
- package/models/components/sessiongeneratedresponsedto.d.ts +32 -0
- package/models/components/sessiongeneratedresponsedto.d.ts.map +1 -0
- package/models/components/sessiongeneratedresponsedto.js +59 -0
- package/models/components/sessiongeneratedresponsedto.js.map +1 -0
- package/models/components/subscriberpayloaddto.d.ts +5 -0
- package/models/components/subscriberpayloaddto.d.ts.map +1 -1
- package/models/components/subscriberpayloaddto.js +2 -0
- package/models/components/subscriberpayloaddto.js.map +1 -1
- package/models/components/triggereventresponsedto.d.ts +3 -0
- package/models/components/triggereventresponsedto.d.ts.map +1 -1
- package/models/components/triggereventresponsedto.js +1 -0
- package/models/components/triggereventresponsedto.js.map +1 -1
- package/models/components/workfloworiginenum.d.ts +37 -0
- package/models/components/workfloworiginenum.d.ts.map +1 -0
- package/models/components/workfloworiginenum.js +54 -0
- package/models/components/workfloworiginenum.js.map +1 -0
- package/models/operations/environmentscontrollergeneratesession.d.ts +66 -0
- package/models/operations/environmentscontrollergeneratesession.d.ts.map +1 -0
- package/models/operations/environmentscontrollergeneratesession.js +110 -0
- package/models/operations/environmentscontrollergeneratesession.js.map +1 -0
- package/models/operations/environmentscontrollergetenvironmenttags.d.ts +66 -0
- package/models/operations/environmentscontrollergetenvironmenttags.d.ts.map +1 -0
- package/models/operations/environmentscontrollergetenvironmenttags.js +110 -0
- package/models/operations/environmentscontrollergetenvironmenttags.js.map +1 -0
- package/models/operations/notificationscontrollerlistnotifications.d.ts +5 -0
- package/models/operations/notificationscontrollerlistnotifications.d.ts.map +1 -1
- package/models/operations/notificationscontrollerlistnotifications.js +2 -0
- package/models/operations/notificationscontrollerlistnotifications.js.map +1 -1
- package/package.json +1 -1
- package/react-query/environmentsGenerateSession.d.ts +18 -0
- package/react-query/environmentsGenerateSession.d.ts.map +1 -0
- package/react-query/environmentsGenerateSession.js +41 -0
- package/react-query/environmentsGenerateSession.js.map +1 -0
- package/react-query/environmentsRetrieve.d.ts +30 -0
- package/react-query/environmentsRetrieve.d.ts.map +1 -0
- package/react-query/environmentsRetrieve.js +70 -0
- package/react-query/environmentsRetrieve.js.map +1 -0
- package/react-query/notificationsList.d.ts +3 -0
- package/react-query/notificationsList.d.ts.map +1 -1
- package/react-query/notificationsList.js +1 -0
- package/react-query/notificationsList.js.map +1 -1
- package/sdk/environments.d.ts +13 -0
- package/sdk/environments.d.ts.map +1 -0
- package/sdk/environments.js +26 -0
- package/sdk/environments.js.map +1 -0
- package/sources/json-development.json +32352 -0
- package/src/funcs/cancel.ts +1 -0
- package/src/funcs/integrationsCreate.ts +1 -0
- package/src/funcs/integrationsDelete.ts +1 -0
- package/src/funcs/integrationsList.ts +1 -0
- package/src/funcs/integrationsListActive.ts +1 -0
- package/src/funcs/integrationsSetAsPrimary.ts +1 -0
- package/src/funcs/integrationsUpdate.ts +1 -0
- package/src/funcs/integrationsWebhooksRetrieve.ts +1 -0
- package/src/funcs/messagesDelete.ts +1 -0
- package/src/funcs/messagesDeleteByTransactionId.ts +1 -0
- package/src/funcs/messagesRetrieve.ts +1 -0
- package/src/funcs/notificationsList.ts +2 -0
- package/src/funcs/notificationsRetrieve.ts +1 -0
- package/src/funcs/notificationsStatsGraph.ts +1 -0
- package/src/funcs/notificationsStatsRetrieve.ts +1 -0
- package/src/funcs/subscribersAuthenticationChatAccessOauth.ts +1 -0
- package/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +1 -0
- package/src/funcs/subscribersCreate.ts +2 -1
- package/src/funcs/subscribersCreateBulk.ts +1 -0
- package/src/funcs/subscribersCredentialsAppend.ts +1 -0
- package/src/funcs/subscribersCredentialsDelete.ts +1 -0
- package/src/funcs/subscribersCredentialsUpdate.ts +1 -0
- package/src/funcs/subscribersDelete.ts +1 -0
- package/src/funcs/subscribersList.ts +1 -0
- package/src/funcs/subscribersMessagesMarkAll.ts +1 -0
- package/src/funcs/subscribersMessagesMarkAllAs.ts +1 -0
- package/src/funcs/subscribersMessagesUpdateAsSeen.ts +1 -0
- package/src/funcs/subscribersNotificationsFeed.ts +1 -0
- package/src/funcs/subscribersNotificationsUnseenCount.ts +1 -0
- package/src/funcs/subscribersPatch.ts +1 -0
- package/src/funcs/subscribersPreferencesList.ts +1 -0
- package/src/funcs/subscribersPreferencesUpdate.ts +1 -0
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +1 -0
- package/src/funcs/subscribersRetrieve.ts +1 -0
- package/src/funcs/subscribersSearch.ts +1 -0
- package/src/funcs/topicsCreate.ts +1 -0
- package/src/funcs/topicsDelete.ts +1 -0
- package/src/funcs/topicsList.ts +1 -0
- package/src/funcs/topicsRename.ts +1 -0
- package/src/funcs/topicsRetrieve.ts +1 -0
- package/src/funcs/topicsSubscribersAssign.ts +1 -0
- package/src/funcs/topicsSubscribersRemove.ts +1 -0
- package/src/funcs/topicsSubscribersRetrieve.ts +1 -0
- package/src/funcs/trigger.ts +1 -0
- package/src/funcs/triggerBroadcast.ts +1 -0
- package/src/funcs/triggerBulk.ts +1 -0
- package/src/funcs/workflowsCreate.ts +1 -0
- package/src/funcs/workflowsDelete.ts +1 -0
- package/src/funcs/workflowsGetStepData.ts +1 -0
- package/src/funcs/workflowsGetWorkflowTestData.ts +1 -0
- package/src/funcs/workflowsRetrieve.ts +1 -0
- package/src/funcs/workflowsUpdate.ts +1 -0
- package/src/funcs/workflowsWorkflowControllerGeneratePreview.ts +1 -0
- package/src/funcs/workflowsWorkflowControllerPatchWorkflow.ts +1 -0
- package/src/funcs/workflowsWorkflowControllerPatchWorkflowStepData.ts +1 -0
- package/src/funcs/workflowsWorkflowControllerSearchWorkflows.ts +1 -0
- package/src/funcs/workflowsWorkflowControllerSync.ts +1 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/lib/security.ts +0 -1
- package/src/models/components/activitynotificationtemplateresponsedto.ts +12 -0
- package/src/models/components/createsubscriberrequestdto.ts +41 -111
- package/src/models/components/index.ts +1 -0
- package/src/models/components/patchsubscriberrequestdto.ts +0 -7
- package/src/models/components/subscriberpayloaddto.ts +7 -0
- package/src/models/components/triggereventresponsedto.ts +1 -0
- package/src/models/components/workfloworiginenum.ts +40 -0
- package/src/models/operations/notificationscontrollerlistnotifications.ts +7 -0
- package/src/react-query/notificationsList.ts +4 -0
|
@@ -0,0 +1,1123 @@
|
|
|
1
|
+
# Workflows
|
|
2
|
+
(*workflows*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.
|
|
7
|
+
<https://docs.novu.co/workflows>
|
|
8
|
+
|
|
9
|
+
### Available Operations
|
|
10
|
+
|
|
11
|
+
* [create](#create)
|
|
12
|
+
* [workflowControllerSearchWorkflows](#workflowcontrollersearchworkflows)
|
|
13
|
+
* [workflowControllerSync](#workflowcontrollersync)
|
|
14
|
+
* [update](#update)
|
|
15
|
+
* [retrieve](#retrieve)
|
|
16
|
+
* [delete](#delete)
|
|
17
|
+
* [workflowControllerPatchWorkflow](#workflowcontrollerpatchworkflow)
|
|
18
|
+
* [workflowControllerGeneratePreview](#workflowcontrollergeneratepreview)
|
|
19
|
+
* [getStepData](#getstepdata)
|
|
20
|
+
* [workflowControllerPatchWorkflowStepData](#workflowcontrollerpatchworkflowstepdata)
|
|
21
|
+
* [getWorkflowTestData](#getworkflowtestdata)
|
|
22
|
+
|
|
23
|
+
## create
|
|
24
|
+
|
|
25
|
+
### Example Usage
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { Novu } from "@novu/api";
|
|
29
|
+
|
|
30
|
+
const novu = new Novu({
|
|
31
|
+
security: {
|
|
32
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
async function run() {
|
|
37
|
+
const result = await novu.workflows.create();
|
|
38
|
+
|
|
39
|
+
// Handle the result
|
|
40
|
+
console.log(result);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
run();
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Standalone function
|
|
47
|
+
|
|
48
|
+
The standalone function version of this method:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
52
|
+
import { workflowsCreate } from "@novu/api/funcs/workflowsCreate.js";
|
|
53
|
+
|
|
54
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
55
|
+
// You can create one instance of it to use across an application.
|
|
56
|
+
const novu = new NovuCore({
|
|
57
|
+
security: {
|
|
58
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
async function run() {
|
|
63
|
+
const res = await workflowsCreate(novu);
|
|
64
|
+
|
|
65
|
+
if (!res.ok) {
|
|
66
|
+
throw res.error;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const { value: result } = res;
|
|
70
|
+
|
|
71
|
+
// Handle the result
|
|
72
|
+
console.log(result);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
run();
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### React hooks and utilities
|
|
79
|
+
|
|
80
|
+
This method can be used in React components through the following hooks and
|
|
81
|
+
associated utilities.
|
|
82
|
+
|
|
83
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
84
|
+
> below and how to get started using React hooks.
|
|
85
|
+
|
|
86
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import {
|
|
90
|
+
// Mutation hook for triggering the API call.
|
|
91
|
+
useWorkflowsCreateMutation
|
|
92
|
+
} from "@novu/api/react-query/workflowsCreate.js";
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
| Parameter | Type | Required | Description |
|
|
98
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
99
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
100
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
101
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
102
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
103
|
+
|
|
104
|
+
### Response
|
|
105
|
+
|
|
106
|
+
**Promise\<[operations.WorkflowControllerCreateResponse](../../models/operations/workflowcontrollercreateresponse.md)\>**
|
|
107
|
+
|
|
108
|
+
### Errors
|
|
109
|
+
|
|
110
|
+
| Error Type | Status Code | Content Type |
|
|
111
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
112
|
+
| errors.ErrorDto | 414 | application/json |
|
|
113
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
114
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
115
|
+
| errors.ErrorDto | 500 | application/json |
|
|
116
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
117
|
+
|
|
118
|
+
## workflowControllerSearchWorkflows
|
|
119
|
+
|
|
120
|
+
### Example Usage
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import { Novu } from "@novu/api";
|
|
124
|
+
|
|
125
|
+
const novu = new Novu({
|
|
126
|
+
security: {
|
|
127
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
async function run() {
|
|
132
|
+
const result = await novu.workflows.workflowControllerSearchWorkflows();
|
|
133
|
+
|
|
134
|
+
// Handle the result
|
|
135
|
+
console.log(result);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
run();
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Standalone function
|
|
142
|
+
|
|
143
|
+
The standalone function version of this method:
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
147
|
+
import { workflowsWorkflowControllerSearchWorkflows } from "@novu/api/funcs/workflowsWorkflowControllerSearchWorkflows.js";
|
|
148
|
+
|
|
149
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
150
|
+
// You can create one instance of it to use across an application.
|
|
151
|
+
const novu = new NovuCore({
|
|
152
|
+
security: {
|
|
153
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
async function run() {
|
|
158
|
+
const res = await workflowsWorkflowControllerSearchWorkflows(novu);
|
|
159
|
+
|
|
160
|
+
if (!res.ok) {
|
|
161
|
+
throw res.error;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const { value: result } = res;
|
|
165
|
+
|
|
166
|
+
// Handle the result
|
|
167
|
+
console.log(result);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
run();
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### React hooks and utilities
|
|
174
|
+
|
|
175
|
+
This method can be used in React components through the following hooks and
|
|
176
|
+
associated utilities.
|
|
177
|
+
|
|
178
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
179
|
+
> below and how to get started using React hooks.
|
|
180
|
+
|
|
181
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
182
|
+
|
|
183
|
+
```tsx
|
|
184
|
+
import {
|
|
185
|
+
// Query hooks for fetching data.
|
|
186
|
+
useWorkflowsWorkflowControllerSearchWorkflows,
|
|
187
|
+
useWorkflowsWorkflowControllerSearchWorkflowsSuspense,
|
|
188
|
+
|
|
189
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
190
|
+
// Server Components that will be immediately available to client components
|
|
191
|
+
// using the hooks.
|
|
192
|
+
prefetchWorkflowsWorkflowControllerSearchWorkflows,
|
|
193
|
+
|
|
194
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
195
|
+
// mutations and other user actions.
|
|
196
|
+
invalidateWorkflowsWorkflowControllerSearchWorkflows,
|
|
197
|
+
invalidateAllWorkflowsWorkflowControllerSearchWorkflows,
|
|
198
|
+
} from "@novu/api/react-query/workflowsWorkflowControllerSearchWorkflows.js";
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
| Parameter | Type | Required | Description |
|
|
204
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
205
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
206
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
207
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
208
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
209
|
+
|
|
210
|
+
### Response
|
|
211
|
+
|
|
212
|
+
**Promise\<[operations.WorkflowControllerSearchWorkflowsResponse](../../models/operations/workflowcontrollersearchworkflowsresponse.md)\>**
|
|
213
|
+
|
|
214
|
+
### Errors
|
|
215
|
+
|
|
216
|
+
| Error Type | Status Code | Content Type |
|
|
217
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
218
|
+
| errors.ErrorDto | 414 | application/json |
|
|
219
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
220
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
221
|
+
| errors.ErrorDto | 500 | application/json |
|
|
222
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
223
|
+
|
|
224
|
+
## workflowControllerSync
|
|
225
|
+
|
|
226
|
+
### Example Usage
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
import { Novu } from "@novu/api";
|
|
230
|
+
|
|
231
|
+
const novu = new Novu({
|
|
232
|
+
security: {
|
|
233
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
async function run() {
|
|
238
|
+
const result = await novu.workflows.workflowControllerSync("<id>");
|
|
239
|
+
|
|
240
|
+
// Handle the result
|
|
241
|
+
console.log(result);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
run();
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Standalone function
|
|
248
|
+
|
|
249
|
+
The standalone function version of this method:
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
253
|
+
import { workflowsWorkflowControllerSync } from "@novu/api/funcs/workflowsWorkflowControllerSync.js";
|
|
254
|
+
|
|
255
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
256
|
+
// You can create one instance of it to use across an application.
|
|
257
|
+
const novu = new NovuCore({
|
|
258
|
+
security: {
|
|
259
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
async function run() {
|
|
264
|
+
const res = await workflowsWorkflowControllerSync(novu, "<id>");
|
|
265
|
+
|
|
266
|
+
if (!res.ok) {
|
|
267
|
+
throw res.error;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const { value: result } = res;
|
|
271
|
+
|
|
272
|
+
// Handle the result
|
|
273
|
+
console.log(result);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
run();
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### React hooks and utilities
|
|
280
|
+
|
|
281
|
+
This method can be used in React components through the following hooks and
|
|
282
|
+
associated utilities.
|
|
283
|
+
|
|
284
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
285
|
+
> below and how to get started using React hooks.
|
|
286
|
+
|
|
287
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
import {
|
|
291
|
+
// Mutation hook for triggering the API call.
|
|
292
|
+
useWorkflowsWorkflowControllerSyncMutation
|
|
293
|
+
} from "@novu/api/react-query/workflowsWorkflowControllerSync.js";
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Parameters
|
|
297
|
+
|
|
298
|
+
| Parameter | Type | Required | Description |
|
|
299
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
300
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
301
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
302
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
303
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
304
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
305
|
+
|
|
306
|
+
### Response
|
|
307
|
+
|
|
308
|
+
**Promise\<[operations.WorkflowControllerSyncResponse](../../models/operations/workflowcontrollersyncresponse.md)\>**
|
|
309
|
+
|
|
310
|
+
### Errors
|
|
311
|
+
|
|
312
|
+
| Error Type | Status Code | Content Type |
|
|
313
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
314
|
+
| errors.ErrorDto | 414 | application/json |
|
|
315
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
316
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
317
|
+
| errors.ErrorDto | 500 | application/json |
|
|
318
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
319
|
+
|
|
320
|
+
## update
|
|
321
|
+
|
|
322
|
+
### Example Usage
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
import { Novu } from "@novu/api";
|
|
326
|
+
|
|
327
|
+
const novu = new Novu({
|
|
328
|
+
security: {
|
|
329
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
330
|
+
},
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
async function run() {
|
|
334
|
+
const result = await novu.workflows.update("<id>");
|
|
335
|
+
|
|
336
|
+
// Handle the result
|
|
337
|
+
console.log(result);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
run();
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Standalone function
|
|
344
|
+
|
|
345
|
+
The standalone function version of this method:
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
349
|
+
import { workflowsUpdate } from "@novu/api/funcs/workflowsUpdate.js";
|
|
350
|
+
|
|
351
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
352
|
+
// You can create one instance of it to use across an application.
|
|
353
|
+
const novu = new NovuCore({
|
|
354
|
+
security: {
|
|
355
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
async function run() {
|
|
360
|
+
const res = await workflowsUpdate(novu, "<id>");
|
|
361
|
+
|
|
362
|
+
if (!res.ok) {
|
|
363
|
+
throw res.error;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const { value: result } = res;
|
|
367
|
+
|
|
368
|
+
// Handle the result
|
|
369
|
+
console.log(result);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
run();
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### React hooks and utilities
|
|
376
|
+
|
|
377
|
+
This method can be used in React components through the following hooks and
|
|
378
|
+
associated utilities.
|
|
379
|
+
|
|
380
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
381
|
+
> below and how to get started using React hooks.
|
|
382
|
+
|
|
383
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
384
|
+
|
|
385
|
+
```tsx
|
|
386
|
+
import {
|
|
387
|
+
// Mutation hook for triggering the API call.
|
|
388
|
+
useWorkflowsUpdateMutation
|
|
389
|
+
} from "@novu/api/react-query/workflowsUpdate.js";
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Parameters
|
|
393
|
+
|
|
394
|
+
| Parameter | Type | Required | Description |
|
|
395
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
396
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
397
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
398
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
399
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
400
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
401
|
+
|
|
402
|
+
### Response
|
|
403
|
+
|
|
404
|
+
**Promise\<[operations.WorkflowControllerUpdateResponse](../../models/operations/workflowcontrollerupdateresponse.md)\>**
|
|
405
|
+
|
|
406
|
+
### Errors
|
|
407
|
+
|
|
408
|
+
| Error Type | Status Code | Content Type |
|
|
409
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
410
|
+
| errors.ErrorDto | 414 | application/json |
|
|
411
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
412
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
413
|
+
| errors.ErrorDto | 500 | application/json |
|
|
414
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
415
|
+
|
|
416
|
+
## retrieve
|
|
417
|
+
|
|
418
|
+
### Example Usage
|
|
419
|
+
|
|
420
|
+
```typescript
|
|
421
|
+
import { Novu } from "@novu/api";
|
|
422
|
+
|
|
423
|
+
const novu = new Novu({
|
|
424
|
+
security: {
|
|
425
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
426
|
+
},
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
async function run() {
|
|
430
|
+
const result = await novu.workflows.retrieve("<id>", "<id>");
|
|
431
|
+
|
|
432
|
+
// Handle the result
|
|
433
|
+
console.log(result);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
run();
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Standalone function
|
|
440
|
+
|
|
441
|
+
The standalone function version of this method:
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
445
|
+
import { workflowsRetrieve } from "@novu/api/funcs/workflowsRetrieve.js";
|
|
446
|
+
|
|
447
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
448
|
+
// You can create one instance of it to use across an application.
|
|
449
|
+
const novu = new NovuCore({
|
|
450
|
+
security: {
|
|
451
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
async function run() {
|
|
456
|
+
const res = await workflowsRetrieve(novu, "<id>", "<id>");
|
|
457
|
+
|
|
458
|
+
if (!res.ok) {
|
|
459
|
+
throw res.error;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
const { value: result } = res;
|
|
463
|
+
|
|
464
|
+
// Handle the result
|
|
465
|
+
console.log(result);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
run();
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### React hooks and utilities
|
|
472
|
+
|
|
473
|
+
This method can be used in React components through the following hooks and
|
|
474
|
+
associated utilities.
|
|
475
|
+
|
|
476
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
477
|
+
> below and how to get started using React hooks.
|
|
478
|
+
|
|
479
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
480
|
+
|
|
481
|
+
```tsx
|
|
482
|
+
import {
|
|
483
|
+
// Query hooks for fetching data.
|
|
484
|
+
useWorkflowsRetrieve,
|
|
485
|
+
useWorkflowsRetrieveSuspense,
|
|
486
|
+
|
|
487
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
488
|
+
// Server Components that will be immediately available to client components
|
|
489
|
+
// using the hooks.
|
|
490
|
+
prefetchWorkflowsRetrieve,
|
|
491
|
+
|
|
492
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
493
|
+
// mutations and other user actions.
|
|
494
|
+
invalidateWorkflowsRetrieve,
|
|
495
|
+
invalidateAllWorkflowsRetrieve,
|
|
496
|
+
} from "@novu/api/react-query/workflowsRetrieve.js";
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Parameters
|
|
500
|
+
|
|
501
|
+
| Parameter | Type | Required | Description |
|
|
502
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
503
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
504
|
+
| `environmentId` | *string* | :heavy_check_mark: | N/A |
|
|
505
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
506
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
507
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
508
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
509
|
+
|
|
510
|
+
### Response
|
|
511
|
+
|
|
512
|
+
**Promise\<[operations.WorkflowControllerGetWorkflowResponse](../../models/operations/workflowcontrollergetworkflowresponse.md)\>**
|
|
513
|
+
|
|
514
|
+
### Errors
|
|
515
|
+
|
|
516
|
+
| Error Type | Status Code | Content Type |
|
|
517
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
518
|
+
| errors.ErrorDto | 414 | application/json |
|
|
519
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
520
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
521
|
+
| errors.ErrorDto | 500 | application/json |
|
|
522
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
523
|
+
|
|
524
|
+
## delete
|
|
525
|
+
|
|
526
|
+
### Example Usage
|
|
527
|
+
|
|
528
|
+
```typescript
|
|
529
|
+
import { Novu } from "@novu/api";
|
|
530
|
+
|
|
531
|
+
const novu = new Novu({
|
|
532
|
+
security: {
|
|
533
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
534
|
+
},
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
async function run() {
|
|
538
|
+
const result = await novu.workflows.delete("<id>");
|
|
539
|
+
|
|
540
|
+
// Handle the result
|
|
541
|
+
console.log(result);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
run();
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### Standalone function
|
|
548
|
+
|
|
549
|
+
The standalone function version of this method:
|
|
550
|
+
|
|
551
|
+
```typescript
|
|
552
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
553
|
+
import { workflowsDelete } from "@novu/api/funcs/workflowsDelete.js";
|
|
554
|
+
|
|
555
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
556
|
+
// You can create one instance of it to use across an application.
|
|
557
|
+
const novu = new NovuCore({
|
|
558
|
+
security: {
|
|
559
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
560
|
+
},
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
async function run() {
|
|
564
|
+
const res = await workflowsDelete(novu, "<id>");
|
|
565
|
+
|
|
566
|
+
if (!res.ok) {
|
|
567
|
+
throw res.error;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
const { value: result } = res;
|
|
571
|
+
|
|
572
|
+
// Handle the result
|
|
573
|
+
console.log(result);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
run();
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### React hooks and utilities
|
|
580
|
+
|
|
581
|
+
This method can be used in React components through the following hooks and
|
|
582
|
+
associated utilities.
|
|
583
|
+
|
|
584
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
585
|
+
> below and how to get started using React hooks.
|
|
586
|
+
|
|
587
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
588
|
+
|
|
589
|
+
```tsx
|
|
590
|
+
import {
|
|
591
|
+
// Mutation hook for triggering the API call.
|
|
592
|
+
useWorkflowsDeleteMutation
|
|
593
|
+
} from "@novu/api/react-query/workflowsDelete.js";
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Parameters
|
|
597
|
+
|
|
598
|
+
| Parameter | Type | Required | Description |
|
|
599
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
600
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
601
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
602
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
603
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
604
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
605
|
+
|
|
606
|
+
### Response
|
|
607
|
+
|
|
608
|
+
**Promise\<[operations.WorkflowControllerRemoveWorkflowResponse](../../models/operations/workflowcontrollerremoveworkflowresponse.md)\>**
|
|
609
|
+
|
|
610
|
+
### Errors
|
|
611
|
+
|
|
612
|
+
| Error Type | Status Code | Content Type |
|
|
613
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
614
|
+
| errors.ErrorDto | 414 | application/json |
|
|
615
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
616
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
617
|
+
| errors.ErrorDto | 500 | application/json |
|
|
618
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
619
|
+
|
|
620
|
+
## workflowControllerPatchWorkflow
|
|
621
|
+
|
|
622
|
+
### Example Usage
|
|
623
|
+
|
|
624
|
+
```typescript
|
|
625
|
+
import { Novu } from "@novu/api";
|
|
626
|
+
|
|
627
|
+
const novu = new Novu({
|
|
628
|
+
security: {
|
|
629
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
async function run() {
|
|
634
|
+
const result = await novu.workflows.workflowControllerPatchWorkflow("<id>");
|
|
635
|
+
|
|
636
|
+
// Handle the result
|
|
637
|
+
console.log(result);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
run();
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Standalone function
|
|
644
|
+
|
|
645
|
+
The standalone function version of this method:
|
|
646
|
+
|
|
647
|
+
```typescript
|
|
648
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
649
|
+
import { workflowsWorkflowControllerPatchWorkflow } from "@novu/api/funcs/workflowsWorkflowControllerPatchWorkflow.js";
|
|
650
|
+
|
|
651
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
652
|
+
// You can create one instance of it to use across an application.
|
|
653
|
+
const novu = new NovuCore({
|
|
654
|
+
security: {
|
|
655
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
656
|
+
},
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
async function run() {
|
|
660
|
+
const res = await workflowsWorkflowControllerPatchWorkflow(novu, "<id>");
|
|
661
|
+
|
|
662
|
+
if (!res.ok) {
|
|
663
|
+
throw res.error;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
const { value: result } = res;
|
|
667
|
+
|
|
668
|
+
// Handle the result
|
|
669
|
+
console.log(result);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
run();
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### React hooks and utilities
|
|
676
|
+
|
|
677
|
+
This method can be used in React components through the following hooks and
|
|
678
|
+
associated utilities.
|
|
679
|
+
|
|
680
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
681
|
+
> below and how to get started using React hooks.
|
|
682
|
+
|
|
683
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
684
|
+
|
|
685
|
+
```tsx
|
|
686
|
+
import {
|
|
687
|
+
// Mutation hook for triggering the API call.
|
|
688
|
+
useWorkflowsWorkflowControllerPatchWorkflowMutation
|
|
689
|
+
} from "@novu/api/react-query/workflowsWorkflowControllerPatchWorkflow.js";
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
### Parameters
|
|
693
|
+
|
|
694
|
+
| Parameter | Type | Required | Description |
|
|
695
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
696
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
697
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
698
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
699
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
700
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
701
|
+
|
|
702
|
+
### Response
|
|
703
|
+
|
|
704
|
+
**Promise\<[operations.WorkflowControllerPatchWorkflowResponse](../../models/operations/workflowcontrollerpatchworkflowresponse.md)\>**
|
|
705
|
+
|
|
706
|
+
### Errors
|
|
707
|
+
|
|
708
|
+
| Error Type | Status Code | Content Type |
|
|
709
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
710
|
+
| errors.ErrorDto | 414 | application/json |
|
|
711
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
712
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
713
|
+
| errors.ErrorDto | 500 | application/json |
|
|
714
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
715
|
+
|
|
716
|
+
## workflowControllerGeneratePreview
|
|
717
|
+
|
|
718
|
+
### Example Usage
|
|
719
|
+
|
|
720
|
+
```typescript
|
|
721
|
+
import { Novu } from "@novu/api";
|
|
722
|
+
|
|
723
|
+
const novu = new Novu({
|
|
724
|
+
security: {
|
|
725
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
726
|
+
},
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
async function run() {
|
|
730
|
+
const result = await novu.workflows.workflowControllerGeneratePreview("<id>", "<id>");
|
|
731
|
+
|
|
732
|
+
// Handle the result
|
|
733
|
+
console.log(result);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
run();
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
### Standalone function
|
|
740
|
+
|
|
741
|
+
The standalone function version of this method:
|
|
742
|
+
|
|
743
|
+
```typescript
|
|
744
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
745
|
+
import { workflowsWorkflowControllerGeneratePreview } from "@novu/api/funcs/workflowsWorkflowControllerGeneratePreview.js";
|
|
746
|
+
|
|
747
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
748
|
+
// You can create one instance of it to use across an application.
|
|
749
|
+
const novu = new NovuCore({
|
|
750
|
+
security: {
|
|
751
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
752
|
+
},
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
async function run() {
|
|
756
|
+
const res = await workflowsWorkflowControllerGeneratePreview(novu, "<id>", "<id>");
|
|
757
|
+
|
|
758
|
+
if (!res.ok) {
|
|
759
|
+
throw res.error;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
const { value: result } = res;
|
|
763
|
+
|
|
764
|
+
// Handle the result
|
|
765
|
+
console.log(result);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
run();
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
### React hooks and utilities
|
|
772
|
+
|
|
773
|
+
This method can be used in React components through the following hooks and
|
|
774
|
+
associated utilities.
|
|
775
|
+
|
|
776
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
777
|
+
> below and how to get started using React hooks.
|
|
778
|
+
|
|
779
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
780
|
+
|
|
781
|
+
```tsx
|
|
782
|
+
import {
|
|
783
|
+
// Mutation hook for triggering the API call.
|
|
784
|
+
useWorkflowsWorkflowControllerGeneratePreviewMutation
|
|
785
|
+
} from "@novu/api/react-query/workflowsWorkflowControllerGeneratePreview.js";
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
### Parameters
|
|
789
|
+
|
|
790
|
+
| Parameter | Type | Required | Description |
|
|
791
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
792
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
793
|
+
| `stepId` | *string* | :heavy_check_mark: | N/A |
|
|
794
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
795
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
796
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
797
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
798
|
+
|
|
799
|
+
### Response
|
|
800
|
+
|
|
801
|
+
**Promise\<[operations.WorkflowControllerGeneratePreviewResponse](../../models/operations/workflowcontrollergeneratepreviewresponse.md)\>**
|
|
802
|
+
|
|
803
|
+
### Errors
|
|
804
|
+
|
|
805
|
+
| Error Type | Status Code | Content Type |
|
|
806
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
807
|
+
| errors.ErrorDto | 414 | application/json |
|
|
808
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
809
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
810
|
+
| errors.ErrorDto | 500 | application/json |
|
|
811
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
812
|
+
|
|
813
|
+
## getStepData
|
|
814
|
+
|
|
815
|
+
### Example Usage
|
|
816
|
+
|
|
817
|
+
```typescript
|
|
818
|
+
import { Novu } from "@novu/api";
|
|
819
|
+
|
|
820
|
+
const novu = new Novu({
|
|
821
|
+
security: {
|
|
822
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
823
|
+
},
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
async function run() {
|
|
827
|
+
const result = await novu.workflows.getStepData("<id>", "<id>");
|
|
828
|
+
|
|
829
|
+
// Handle the result
|
|
830
|
+
console.log(result);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
run();
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
### Standalone function
|
|
837
|
+
|
|
838
|
+
The standalone function version of this method:
|
|
839
|
+
|
|
840
|
+
```typescript
|
|
841
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
842
|
+
import { workflowsGetStepData } from "@novu/api/funcs/workflowsGetStepData.js";
|
|
843
|
+
|
|
844
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
845
|
+
// You can create one instance of it to use across an application.
|
|
846
|
+
const novu = new NovuCore({
|
|
847
|
+
security: {
|
|
848
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
849
|
+
},
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
async function run() {
|
|
853
|
+
const res = await workflowsGetStepData(novu, "<id>", "<id>");
|
|
854
|
+
|
|
855
|
+
if (!res.ok) {
|
|
856
|
+
throw res.error;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
const { value: result } = res;
|
|
860
|
+
|
|
861
|
+
// Handle the result
|
|
862
|
+
console.log(result);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
run();
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### React hooks and utilities
|
|
869
|
+
|
|
870
|
+
This method can be used in React components through the following hooks and
|
|
871
|
+
associated utilities.
|
|
872
|
+
|
|
873
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
874
|
+
> below and how to get started using React hooks.
|
|
875
|
+
|
|
876
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
877
|
+
|
|
878
|
+
```tsx
|
|
879
|
+
import {
|
|
880
|
+
// Query hooks for fetching data.
|
|
881
|
+
useWorkflowsGetStepData,
|
|
882
|
+
useWorkflowsGetStepDataSuspense,
|
|
883
|
+
|
|
884
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
885
|
+
// Server Components that will be immediately available to client components
|
|
886
|
+
// using the hooks.
|
|
887
|
+
prefetchWorkflowsGetStepData,
|
|
888
|
+
|
|
889
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
890
|
+
// mutations and other user actions.
|
|
891
|
+
invalidateWorkflowsGetStepData,
|
|
892
|
+
invalidateAllWorkflowsGetStepData,
|
|
893
|
+
} from "@novu/api/react-query/workflowsGetStepData.js";
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### Parameters
|
|
897
|
+
|
|
898
|
+
| Parameter | Type | Required | Description |
|
|
899
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
900
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
901
|
+
| `stepId` | *string* | :heavy_check_mark: | N/A |
|
|
902
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
903
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
904
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
905
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
906
|
+
|
|
907
|
+
### Response
|
|
908
|
+
|
|
909
|
+
**Promise\<[operations.WorkflowControllerGetWorkflowStepDataResponse](../../models/operations/workflowcontrollergetworkflowstepdataresponse.md)\>**
|
|
910
|
+
|
|
911
|
+
### Errors
|
|
912
|
+
|
|
913
|
+
| Error Type | Status Code | Content Type |
|
|
914
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
915
|
+
| errors.ErrorDto | 414 | application/json |
|
|
916
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
917
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
918
|
+
| errors.ErrorDto | 500 | application/json |
|
|
919
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
920
|
+
|
|
921
|
+
## workflowControllerPatchWorkflowStepData
|
|
922
|
+
|
|
923
|
+
### Example Usage
|
|
924
|
+
|
|
925
|
+
```typescript
|
|
926
|
+
import { Novu } from "@novu/api";
|
|
927
|
+
|
|
928
|
+
const novu = new Novu({
|
|
929
|
+
security: {
|
|
930
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
931
|
+
},
|
|
932
|
+
});
|
|
933
|
+
|
|
934
|
+
async function run() {
|
|
935
|
+
const result = await novu.workflows.workflowControllerPatchWorkflowStepData("<id>", "<id>");
|
|
936
|
+
|
|
937
|
+
// Handle the result
|
|
938
|
+
console.log(result);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
run();
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
### Standalone function
|
|
945
|
+
|
|
946
|
+
The standalone function version of this method:
|
|
947
|
+
|
|
948
|
+
```typescript
|
|
949
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
950
|
+
import { workflowsWorkflowControllerPatchWorkflowStepData } from "@novu/api/funcs/workflowsWorkflowControllerPatchWorkflowStepData.js";
|
|
951
|
+
|
|
952
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
953
|
+
// You can create one instance of it to use across an application.
|
|
954
|
+
const novu = new NovuCore({
|
|
955
|
+
security: {
|
|
956
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
957
|
+
},
|
|
958
|
+
});
|
|
959
|
+
|
|
960
|
+
async function run() {
|
|
961
|
+
const res = await workflowsWorkflowControllerPatchWorkflowStepData(novu, "<id>", "<id>");
|
|
962
|
+
|
|
963
|
+
if (!res.ok) {
|
|
964
|
+
throw res.error;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
const { value: result } = res;
|
|
968
|
+
|
|
969
|
+
// Handle the result
|
|
970
|
+
console.log(result);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
run();
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
### React hooks and utilities
|
|
977
|
+
|
|
978
|
+
This method can be used in React components through the following hooks and
|
|
979
|
+
associated utilities.
|
|
980
|
+
|
|
981
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
982
|
+
> below and how to get started using React hooks.
|
|
983
|
+
|
|
984
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
985
|
+
|
|
986
|
+
```tsx
|
|
987
|
+
import {
|
|
988
|
+
// Mutation hook for triggering the API call.
|
|
989
|
+
useWorkflowsWorkflowControllerPatchWorkflowStepDataMutation
|
|
990
|
+
} from "@novu/api/react-query/workflowsWorkflowControllerPatchWorkflowStepData.js";
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
### Parameters
|
|
994
|
+
|
|
995
|
+
| Parameter | Type | Required | Description |
|
|
996
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
997
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
998
|
+
| `stepId` | *string* | :heavy_check_mark: | N/A |
|
|
999
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
1000
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1001
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1002
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1003
|
+
|
|
1004
|
+
### Response
|
|
1005
|
+
|
|
1006
|
+
**Promise\<[operations.WorkflowControllerPatchWorkflowStepDataResponse](../../models/operations/workflowcontrollerpatchworkflowstepdataresponse.md)\>**
|
|
1007
|
+
|
|
1008
|
+
### Errors
|
|
1009
|
+
|
|
1010
|
+
| Error Type | Status Code | Content Type |
|
|
1011
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
1012
|
+
| errors.ErrorDto | 414 | application/json |
|
|
1013
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
1014
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
1015
|
+
| errors.ErrorDto | 500 | application/json |
|
|
1016
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1017
|
+
|
|
1018
|
+
## getWorkflowTestData
|
|
1019
|
+
|
|
1020
|
+
### Example Usage
|
|
1021
|
+
|
|
1022
|
+
```typescript
|
|
1023
|
+
import { Novu } from "@novu/api";
|
|
1024
|
+
|
|
1025
|
+
const novu = new Novu({
|
|
1026
|
+
security: {
|
|
1027
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
1028
|
+
},
|
|
1029
|
+
});
|
|
1030
|
+
|
|
1031
|
+
async function run() {
|
|
1032
|
+
const result = await novu.workflows.getWorkflowTestData("<id>");
|
|
1033
|
+
|
|
1034
|
+
// Handle the result
|
|
1035
|
+
console.log(result);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
run();
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
### Standalone function
|
|
1042
|
+
|
|
1043
|
+
The standalone function version of this method:
|
|
1044
|
+
|
|
1045
|
+
```typescript
|
|
1046
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
1047
|
+
import { workflowsGetWorkflowTestData } from "@novu/api/funcs/workflowsGetWorkflowTestData.js";
|
|
1048
|
+
|
|
1049
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
1050
|
+
// You can create one instance of it to use across an application.
|
|
1051
|
+
const novu = new NovuCore({
|
|
1052
|
+
security: {
|
|
1053
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
1054
|
+
},
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
async function run() {
|
|
1058
|
+
const res = await workflowsGetWorkflowTestData(novu, "<id>");
|
|
1059
|
+
|
|
1060
|
+
if (!res.ok) {
|
|
1061
|
+
throw res.error;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
const { value: result } = res;
|
|
1065
|
+
|
|
1066
|
+
// Handle the result
|
|
1067
|
+
console.log(result);
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
run();
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
### React hooks and utilities
|
|
1074
|
+
|
|
1075
|
+
This method can be used in React components through the following hooks and
|
|
1076
|
+
associated utilities.
|
|
1077
|
+
|
|
1078
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
1079
|
+
> below and how to get started using React hooks.
|
|
1080
|
+
|
|
1081
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
1082
|
+
|
|
1083
|
+
```tsx
|
|
1084
|
+
import {
|
|
1085
|
+
// Query hooks for fetching data.
|
|
1086
|
+
useWorkflowsGetWorkflowTestData,
|
|
1087
|
+
useWorkflowsGetWorkflowTestDataSuspense,
|
|
1088
|
+
|
|
1089
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
1090
|
+
// Server Components that will be immediately available to client components
|
|
1091
|
+
// using the hooks.
|
|
1092
|
+
prefetchWorkflowsGetWorkflowTestData,
|
|
1093
|
+
|
|
1094
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
1095
|
+
// mutations and other user actions.
|
|
1096
|
+
invalidateWorkflowsGetWorkflowTestData,
|
|
1097
|
+
invalidateAllWorkflowsGetWorkflowTestData,
|
|
1098
|
+
} from "@novu/api/react-query/workflowsGetWorkflowTestData.js";
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
### Parameters
|
|
1102
|
+
|
|
1103
|
+
| Parameter | Type | Required | Description |
|
|
1104
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1105
|
+
| `workflowId` | *string* | :heavy_check_mark: | N/A |
|
|
1106
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
1107
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1108
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1109
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1110
|
+
|
|
1111
|
+
### Response
|
|
1112
|
+
|
|
1113
|
+
**Promise\<[operations.WorkflowControllerGetWorkflowTestDataResponse](../../models/operations/workflowcontrollergetworkflowtestdataresponse.md)\>**
|
|
1114
|
+
|
|
1115
|
+
### Errors
|
|
1116
|
+
|
|
1117
|
+
| Error Type | Status Code | Content Type |
|
|
1118
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
1119
|
+
| errors.ErrorDto | 414 | application/json |
|
|
1120
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
1121
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
1122
|
+
| errors.ErrorDto | 500 | application/json |
|
|
1123
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|