@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,247 @@
|
|
|
1
|
+
# Authentication
|
|
2
|
+
(*subscribers.authentication*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [chatAccessOauthCallBack](#chataccessoauthcallback) - Handle providers oauth redirect
|
|
9
|
+
* [chatAccessOauth](#chataccessoauth) - Handle chat oauth
|
|
10
|
+
|
|
11
|
+
## chatAccessOauthCallBack
|
|
12
|
+
|
|
13
|
+
Handle providers oauth redirect
|
|
14
|
+
|
|
15
|
+
### Example Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { Novu } from "@novu/api";
|
|
19
|
+
|
|
20
|
+
const novu = new Novu({
|
|
21
|
+
security: {
|
|
22
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
async function run() {
|
|
27
|
+
const result = await novu.subscribers.authentication.chatAccessOauthCallBack({
|
|
28
|
+
subscriberId: "<id>",
|
|
29
|
+
providerId: "<id>",
|
|
30
|
+
hmacHash: "<value>",
|
|
31
|
+
environmentId: "<id>",
|
|
32
|
+
code: "<value>",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Handle the result
|
|
36
|
+
console.log(result);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
run();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Standalone function
|
|
43
|
+
|
|
44
|
+
The standalone function version of this method:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
48
|
+
import { subscribersAuthenticationChatAccessOauthCallBack } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauthCallBack.js";
|
|
49
|
+
|
|
50
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
51
|
+
// You can create one instance of it to use across an application.
|
|
52
|
+
const novu = new NovuCore({
|
|
53
|
+
security: {
|
|
54
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
async function run() {
|
|
59
|
+
const res = await subscribersAuthenticationChatAccessOauthCallBack(novu, {
|
|
60
|
+
subscriberId: "<id>",
|
|
61
|
+
providerId: "<id>",
|
|
62
|
+
hmacHash: "<value>",
|
|
63
|
+
environmentId: "<id>",
|
|
64
|
+
code: "<value>",
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
if (!res.ok) {
|
|
68
|
+
throw res.error;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const { value: result } = res;
|
|
72
|
+
|
|
73
|
+
// Handle the result
|
|
74
|
+
console.log(result);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
run();
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### React hooks and utilities
|
|
81
|
+
|
|
82
|
+
This method can be used in React components through the following hooks and
|
|
83
|
+
associated utilities.
|
|
84
|
+
|
|
85
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
86
|
+
> below and how to get started using React hooks.
|
|
87
|
+
|
|
88
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import {
|
|
92
|
+
// Query hooks for fetching data.
|
|
93
|
+
useSubscribersAuthenticationChatAccessOauthCallBack,
|
|
94
|
+
useSubscribersAuthenticationChatAccessOauthCallBackSuspense,
|
|
95
|
+
|
|
96
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
97
|
+
// Server Components that will be immediately available to client components
|
|
98
|
+
// using the hooks.
|
|
99
|
+
prefetchSubscribersAuthenticationChatAccessOauthCallBack,
|
|
100
|
+
|
|
101
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
102
|
+
// mutations and other user actions.
|
|
103
|
+
invalidateSubscribersAuthenticationChatAccessOauthCallBack,
|
|
104
|
+
invalidateAllSubscribersAuthenticationChatAccessOauthCallBack,
|
|
105
|
+
} from "@novu/api/react-query/subscribersAuthenticationChatAccessOauthCallBack.js";
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Parameters
|
|
109
|
+
|
|
110
|
+
| Parameter | Type | Required | Description |
|
|
111
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
112
|
+
| `request` | [operations.SubscribersV1ControllerChatOauthCallbackRequest](../../models/operations/subscribersv1controllerchatoauthcallbackrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
113
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
114
|
+
| `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. |
|
|
115
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
116
|
+
|
|
117
|
+
### Response
|
|
118
|
+
|
|
119
|
+
**Promise\<[operations.SubscribersV1ControllerChatOauthCallbackResponse](../../models/operations/subscribersv1controllerchatoauthcallbackresponse.md)\>**
|
|
120
|
+
|
|
121
|
+
### Errors
|
|
122
|
+
|
|
123
|
+
| Error Type | Status Code | Content Type |
|
|
124
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
125
|
+
| errors.ErrorDto | 414 | application/json |
|
|
126
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
127
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
128
|
+
| errors.ErrorDto | 500 | application/json |
|
|
129
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
130
|
+
|
|
131
|
+
## chatAccessOauth
|
|
132
|
+
|
|
133
|
+
Handle chat oauth
|
|
134
|
+
|
|
135
|
+
### Example Usage
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import { Novu } from "@novu/api";
|
|
139
|
+
|
|
140
|
+
const novu = new Novu({
|
|
141
|
+
security: {
|
|
142
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
async function run() {
|
|
147
|
+
const result = await novu.subscribers.authentication.chatAccessOauth({
|
|
148
|
+
subscriberId: "<id>",
|
|
149
|
+
providerId: "<id>",
|
|
150
|
+
hmacHash: "<value>",
|
|
151
|
+
environmentId: "<id>",
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// Handle the result
|
|
155
|
+
console.log(result);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
run();
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Standalone function
|
|
162
|
+
|
|
163
|
+
The standalone function version of this method:
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
167
|
+
import { subscribersAuthenticationChatAccessOauth } from "@novu/api/funcs/subscribersAuthenticationChatAccessOauth.js";
|
|
168
|
+
|
|
169
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
170
|
+
// You can create one instance of it to use across an application.
|
|
171
|
+
const novu = new NovuCore({
|
|
172
|
+
security: {
|
|
173
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
async function run() {
|
|
178
|
+
const res = await subscribersAuthenticationChatAccessOauth(novu, {
|
|
179
|
+
subscriberId: "<id>",
|
|
180
|
+
providerId: "<id>",
|
|
181
|
+
hmacHash: "<value>",
|
|
182
|
+
environmentId: "<id>",
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
if (!res.ok) {
|
|
186
|
+
throw res.error;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const { value: result } = res;
|
|
190
|
+
|
|
191
|
+
// Handle the result
|
|
192
|
+
console.log(result);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
run();
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### React hooks and utilities
|
|
199
|
+
|
|
200
|
+
This method can be used in React components through the following hooks and
|
|
201
|
+
associated utilities.
|
|
202
|
+
|
|
203
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
204
|
+
> below and how to get started using React hooks.
|
|
205
|
+
|
|
206
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
import {
|
|
210
|
+
// Query hooks for fetching data.
|
|
211
|
+
useSubscribersAuthenticationChatAccessOauth,
|
|
212
|
+
useSubscribersAuthenticationChatAccessOauthSuspense,
|
|
213
|
+
|
|
214
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
215
|
+
// Server Components that will be immediately available to client components
|
|
216
|
+
// using the hooks.
|
|
217
|
+
prefetchSubscribersAuthenticationChatAccessOauth,
|
|
218
|
+
|
|
219
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
220
|
+
// mutations and other user actions.
|
|
221
|
+
invalidateSubscribersAuthenticationChatAccessOauth,
|
|
222
|
+
invalidateAllSubscribersAuthenticationChatAccessOauth,
|
|
223
|
+
} from "@novu/api/react-query/subscribersAuthenticationChatAccessOauth.js";
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Parameters
|
|
227
|
+
|
|
228
|
+
| Parameter | Type | Required | Description |
|
|
229
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
230
|
+
| `request` | [operations.SubscribersV1ControllerChatAccessOauthRequest](../../models/operations/subscribersv1controllerchataccessoauthrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
231
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
232
|
+
| `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. |
|
|
233
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
234
|
+
|
|
235
|
+
### Response
|
|
236
|
+
|
|
237
|
+
**Promise\<[operations.SubscribersV1ControllerChatAccessOauthResponse](../../models/operations/subscribersv1controllerchataccessoauthresponse.md)\>**
|
|
238
|
+
|
|
239
|
+
### Errors
|
|
240
|
+
|
|
241
|
+
| Error Type | Status Code | Content Type |
|
|
242
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
243
|
+
| errors.ErrorDto | 414 | application/json |
|
|
244
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
245
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
246
|
+
| errors.ErrorDto | 500 | application/json |
|
|
247
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
# Credentials
|
|
2
|
+
(*subscribers.credentials*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [update](#update) - Update subscriber credentials
|
|
9
|
+
* [append](#append) - Modify subscriber credentials
|
|
10
|
+
* [delete](#delete) - Delete subscriber credentials by providerId
|
|
11
|
+
|
|
12
|
+
## update
|
|
13
|
+
|
|
14
|
+
Subscriber credentials associated to the delivery methods such as slack and push tokens.
|
|
15
|
+
|
|
16
|
+
### Example Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { Novu } from "@novu/api";
|
|
20
|
+
|
|
21
|
+
const novu = new Novu({
|
|
22
|
+
security: {
|
|
23
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
async function run() {
|
|
28
|
+
const result = await novu.subscribers.credentials.update({
|
|
29
|
+
providerId: "pushpad",
|
|
30
|
+
credentials: {
|
|
31
|
+
webhookUrl: "https://example.com/webhook",
|
|
32
|
+
channel: "general",
|
|
33
|
+
deviceTokens: [
|
|
34
|
+
"token1",
|
|
35
|
+
"token2",
|
|
36
|
+
"token3",
|
|
37
|
+
],
|
|
38
|
+
alertUid: "12345-abcde",
|
|
39
|
+
title: "Critical Alert",
|
|
40
|
+
imageUrl: "https://example.com/image.png",
|
|
41
|
+
state: "resolved",
|
|
42
|
+
externalUrl: "https://example.com/details",
|
|
43
|
+
},
|
|
44
|
+
}, "<id>");
|
|
45
|
+
|
|
46
|
+
// Handle the result
|
|
47
|
+
console.log(result);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
run();
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Standalone function
|
|
54
|
+
|
|
55
|
+
The standalone function version of this method:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
59
|
+
import { subscribersCredentialsUpdate } from "@novu/api/funcs/subscribersCredentialsUpdate.js";
|
|
60
|
+
|
|
61
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
62
|
+
// You can create one instance of it to use across an application.
|
|
63
|
+
const novu = new NovuCore({
|
|
64
|
+
security: {
|
|
65
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
async function run() {
|
|
70
|
+
const res = await subscribersCredentialsUpdate(novu, {
|
|
71
|
+
providerId: "pushpad",
|
|
72
|
+
credentials: {
|
|
73
|
+
webhookUrl: "https://example.com/webhook",
|
|
74
|
+
channel: "general",
|
|
75
|
+
deviceTokens: [
|
|
76
|
+
"token1",
|
|
77
|
+
"token2",
|
|
78
|
+
"token3",
|
|
79
|
+
],
|
|
80
|
+
alertUid: "12345-abcde",
|
|
81
|
+
title: "Critical Alert",
|
|
82
|
+
imageUrl: "https://example.com/image.png",
|
|
83
|
+
state: "resolved",
|
|
84
|
+
externalUrl: "https://example.com/details",
|
|
85
|
+
},
|
|
86
|
+
}, "<id>");
|
|
87
|
+
|
|
88
|
+
if (!res.ok) {
|
|
89
|
+
throw res.error;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const { value: result } = res;
|
|
93
|
+
|
|
94
|
+
// Handle the result
|
|
95
|
+
console.log(result);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
run();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### React hooks and utilities
|
|
102
|
+
|
|
103
|
+
This method can be used in React components through the following hooks and
|
|
104
|
+
associated utilities.
|
|
105
|
+
|
|
106
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
107
|
+
> below and how to get started using React hooks.
|
|
108
|
+
|
|
109
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import {
|
|
113
|
+
// Mutation hook for triggering the API call.
|
|
114
|
+
useSubscribersCredentialsUpdateMutation
|
|
115
|
+
} from "@novu/api/react-query/subscribersCredentialsUpdate.js";
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Parameters
|
|
119
|
+
|
|
120
|
+
| Parameter | Type | Required | Description |
|
|
121
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
122
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
123
|
+
| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A |
|
|
124
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
125
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
126
|
+
| `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. |
|
|
127
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
128
|
+
|
|
129
|
+
### Response
|
|
130
|
+
|
|
131
|
+
**Promise\<[operations.SubscribersV1ControllerUpdateSubscriberChannelResponse](../../models/operations/subscribersv1controllerupdatesubscriberchannelresponse.md)\>**
|
|
132
|
+
|
|
133
|
+
### Errors
|
|
134
|
+
|
|
135
|
+
| Error Type | Status Code | Content Type |
|
|
136
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
137
|
+
| errors.ErrorDto | 414 | application/json |
|
|
138
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
139
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
140
|
+
| errors.ErrorDto | 500 | application/json |
|
|
141
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
142
|
+
|
|
143
|
+
## append
|
|
144
|
+
|
|
145
|
+
Subscriber credentials associated to the delivery methods such as slack and push tokens.
|
|
146
|
+
This endpoint appends provided credentials and deviceTokens to the existing ones.
|
|
147
|
+
|
|
148
|
+
### Example Usage
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { Novu } from "@novu/api";
|
|
152
|
+
|
|
153
|
+
const novu = new Novu({
|
|
154
|
+
security: {
|
|
155
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
async function run() {
|
|
160
|
+
const result = await novu.subscribers.credentials.append({
|
|
161
|
+
providerId: "zulip",
|
|
162
|
+
credentials: {
|
|
163
|
+
webhookUrl: "https://example.com/webhook",
|
|
164
|
+
channel: "general",
|
|
165
|
+
deviceTokens: [
|
|
166
|
+
"token1",
|
|
167
|
+
"token2",
|
|
168
|
+
"token3",
|
|
169
|
+
],
|
|
170
|
+
alertUid: "12345-abcde",
|
|
171
|
+
title: "Critical Alert",
|
|
172
|
+
imageUrl: "https://example.com/image.png",
|
|
173
|
+
state: "resolved",
|
|
174
|
+
externalUrl: "https://example.com/details",
|
|
175
|
+
},
|
|
176
|
+
}, "<id>");
|
|
177
|
+
|
|
178
|
+
// Handle the result
|
|
179
|
+
console.log(result);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
run();
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Standalone function
|
|
186
|
+
|
|
187
|
+
The standalone function version of this method:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
191
|
+
import { subscribersCredentialsAppend } from "@novu/api/funcs/subscribersCredentialsAppend.js";
|
|
192
|
+
|
|
193
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
194
|
+
// You can create one instance of it to use across an application.
|
|
195
|
+
const novu = new NovuCore({
|
|
196
|
+
security: {
|
|
197
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
async function run() {
|
|
202
|
+
const res = await subscribersCredentialsAppend(novu, {
|
|
203
|
+
providerId: "zulip",
|
|
204
|
+
credentials: {
|
|
205
|
+
webhookUrl: "https://example.com/webhook",
|
|
206
|
+
channel: "general",
|
|
207
|
+
deviceTokens: [
|
|
208
|
+
"token1",
|
|
209
|
+
"token2",
|
|
210
|
+
"token3",
|
|
211
|
+
],
|
|
212
|
+
alertUid: "12345-abcde",
|
|
213
|
+
title: "Critical Alert",
|
|
214
|
+
imageUrl: "https://example.com/image.png",
|
|
215
|
+
state: "resolved",
|
|
216
|
+
externalUrl: "https://example.com/details",
|
|
217
|
+
},
|
|
218
|
+
}, "<id>");
|
|
219
|
+
|
|
220
|
+
if (!res.ok) {
|
|
221
|
+
throw res.error;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const { value: result } = res;
|
|
225
|
+
|
|
226
|
+
// Handle the result
|
|
227
|
+
console.log(result);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
run();
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### React hooks and utilities
|
|
234
|
+
|
|
235
|
+
This method can be used in React components through the following hooks and
|
|
236
|
+
associated utilities.
|
|
237
|
+
|
|
238
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
239
|
+
> below and how to get started using React hooks.
|
|
240
|
+
|
|
241
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
242
|
+
|
|
243
|
+
```tsx
|
|
244
|
+
import {
|
|
245
|
+
// Mutation hook for triggering the API call.
|
|
246
|
+
useSubscribersCredentialsAppendMutation
|
|
247
|
+
} from "@novu/api/react-query/subscribersCredentialsAppend.js";
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Parameters
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Required | Description |
|
|
253
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
254
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
255
|
+
| `updateSubscriberChannelRequestDto` | [components.UpdateSubscriberChannelRequestDto](../../models/components/updatesubscriberchannelrequestdto.md) | :heavy_check_mark: | N/A |
|
|
256
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
257
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
258
|
+
| `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. |
|
|
259
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
260
|
+
|
|
261
|
+
### Response
|
|
262
|
+
|
|
263
|
+
**Promise\<[operations.SubscribersV1ControllerModifySubscriberChannelResponse](../../models/operations/subscribersv1controllermodifysubscriberchannelresponse.md)\>**
|
|
264
|
+
|
|
265
|
+
### Errors
|
|
266
|
+
|
|
267
|
+
| Error Type | Status Code | Content Type |
|
|
268
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
269
|
+
| errors.ErrorDto | 414 | application/json |
|
|
270
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
271
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
272
|
+
| errors.ErrorDto | 500 | application/json |
|
|
273
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
274
|
+
|
|
275
|
+
## delete
|
|
276
|
+
|
|
277
|
+
Delete subscriber credentials such as slack and expo tokens.
|
|
278
|
+
|
|
279
|
+
### Example Usage
|
|
280
|
+
|
|
281
|
+
```typescript
|
|
282
|
+
import { Novu } from "@novu/api";
|
|
283
|
+
|
|
284
|
+
const novu = new Novu({
|
|
285
|
+
security: {
|
|
286
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
async function run() {
|
|
291
|
+
const result = await novu.subscribers.credentials.delete("<id>", "<id>");
|
|
292
|
+
|
|
293
|
+
// Handle the result
|
|
294
|
+
console.log(result);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
run();
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Standalone function
|
|
301
|
+
|
|
302
|
+
The standalone function version of this method:
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
import { NovuCore } from "@novu/api/core.js";
|
|
306
|
+
import { subscribersCredentialsDelete } from "@novu/api/funcs/subscribersCredentialsDelete.js";
|
|
307
|
+
|
|
308
|
+
// Use `NovuCore` for best tree-shaking performance.
|
|
309
|
+
// You can create one instance of it to use across an application.
|
|
310
|
+
const novu = new NovuCore({
|
|
311
|
+
security: {
|
|
312
|
+
secretKey: "YOUR_SECRET_KEY_HERE",
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
async function run() {
|
|
317
|
+
const res = await subscribersCredentialsDelete(novu, "<id>", "<id>");
|
|
318
|
+
|
|
319
|
+
if (!res.ok) {
|
|
320
|
+
throw res.error;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const { value: result } = res;
|
|
324
|
+
|
|
325
|
+
// Handle the result
|
|
326
|
+
console.log(result);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
run();
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### React hooks and utilities
|
|
333
|
+
|
|
334
|
+
This method can be used in React components through the following hooks and
|
|
335
|
+
associated utilities.
|
|
336
|
+
|
|
337
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
338
|
+
> below and how to get started using React hooks.
|
|
339
|
+
|
|
340
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
341
|
+
|
|
342
|
+
```tsx
|
|
343
|
+
import {
|
|
344
|
+
// Mutation hook for triggering the API call.
|
|
345
|
+
useSubscribersCredentialsDeleteMutation
|
|
346
|
+
} from "@novu/api/react-query/subscribersCredentialsDelete.js";
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Parameters
|
|
350
|
+
|
|
351
|
+
| Parameter | Type | Required | Description |
|
|
352
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
353
|
+
| `subscriberId` | *string* | :heavy_check_mark: | N/A |
|
|
354
|
+
| `providerId` | *string* | :heavy_check_mark: | N/A |
|
|
355
|
+
| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes |
|
|
356
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
357
|
+
| `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. |
|
|
358
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
359
|
+
|
|
360
|
+
### Response
|
|
361
|
+
|
|
362
|
+
**Promise\<[operations.SubscribersV1ControllerDeleteSubscriberCredentialsResponse](../../models/operations/subscribersv1controllerdeletesubscribercredentialsresponse.md)\>**
|
|
363
|
+
|
|
364
|
+
### Errors
|
|
365
|
+
|
|
366
|
+
| Error Type | Status Code | Content Type |
|
|
367
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
368
|
+
| errors.ErrorDto | 414 | application/json |
|
|
369
|
+
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
|
|
370
|
+
| errors.ValidationErrorDto | 422 | application/json |
|
|
371
|
+
| errors.ErrorDto | 500 | application/json |
|
|
372
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|