@novu/api 1.2.0 → 1.3.0
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 +5 -22
- package/README.md +48 -74
- package/bin/mcp-server.js +289 -23
- package/bin/mcp-server.js.map +59 -57
- package/docs/sdks/credentials/README.md +15 -27
- package/docs/sdks/integrations/README.md +30 -54
- package/docs/sdks/messages/README.md +15 -27
- package/docs/sdks/notifications/README.md +10 -18
- package/docs/sdks/novu/README.md +44 -57
- package/docs/sdks/novumessages/README.md +15 -27
- package/docs/sdks/novunotifications/README.md +10 -18
- package/docs/sdks/novusubscribers/README.md +5 -9
- package/docs/sdks/novutopics/README.md +5 -9
- package/docs/sdks/preferences/README.md +10 -18
- package/docs/sdks/properties/README.md +5 -9
- package/docs/sdks/subscribers/README.md +34 -57
- package/docs/sdks/subscriptions/README.md +16 -28
- package/docs/sdks/topics/README.md +25 -45
- package/funcs/cancel.d.ts +1 -1
- package/funcs/cancel.d.ts.map +1 -1
- package/funcs/cancel.js +2 -0
- package/funcs/cancel.js.map +1 -1
- package/funcs/integrationsCreate.d.ts +1 -1
- package/funcs/integrationsCreate.d.ts.map +1 -1
- package/funcs/integrationsCreate.js +2 -0
- package/funcs/integrationsCreate.js.map +1 -1
- package/funcs/integrationsDelete.d.ts +1 -1
- package/funcs/integrationsDelete.d.ts.map +1 -1
- package/funcs/integrationsDelete.js +2 -0
- package/funcs/integrationsDelete.js.map +1 -1
- package/funcs/integrationsList.d.ts +1 -1
- package/funcs/integrationsList.d.ts.map +1 -1
- package/funcs/integrationsList.js +2 -0
- package/funcs/integrationsList.js.map +1 -1
- package/funcs/integrationsListActive.d.ts +1 -1
- package/funcs/integrationsListActive.d.ts.map +1 -1
- package/funcs/integrationsListActive.js +2 -0
- package/funcs/integrationsListActive.js.map +1 -1
- package/funcs/integrationsSetAsPrimary.d.ts +1 -1
- package/funcs/integrationsSetAsPrimary.d.ts.map +1 -1
- package/funcs/integrationsSetAsPrimary.js +2 -0
- package/funcs/integrationsSetAsPrimary.js.map +1 -1
- package/funcs/integrationsUpdate.d.ts +1 -1
- package/funcs/integrationsUpdate.d.ts.map +1 -1
- package/funcs/integrationsUpdate.js +2 -0
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/messagesDelete.d.ts +1 -1
- package/funcs/messagesDelete.d.ts.map +1 -1
- package/funcs/messagesDelete.js +2 -0
- package/funcs/messagesDelete.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +2 -0
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/messagesRetrieve.d.ts +1 -1
- package/funcs/messagesRetrieve.d.ts.map +1 -1
- package/funcs/messagesRetrieve.js +2 -0
- package/funcs/messagesRetrieve.js.map +1 -1
- package/funcs/notificationsList.d.ts +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 +1 -1
- package/funcs/notificationsRetrieve.d.ts.map +1 -1
- package/funcs/notificationsRetrieve.js +2 -0
- package/funcs/notificationsRetrieve.js.map +1 -1
- package/funcs/subscribersCreate.d.ts +1 -1
- package/funcs/subscribersCreate.d.ts.map +1 -1
- package/funcs/subscribersCreate.js +2 -0
- package/funcs/subscribersCreate.js.map +1 -1
- package/funcs/subscribersCreateBulk.d.ts +1 -1
- package/funcs/subscribersCreateBulk.d.ts.map +1 -1
- package/funcs/subscribersCreateBulk.js +2 -0
- package/funcs/subscribersCreateBulk.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +2 -0
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +2 -0
- package/funcs/subscribersCredentialsDelete.js.map +1 -1
- package/funcs/subscribersCredentialsUpdate.d.ts +1 -1
- package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
- package/funcs/subscribersCredentialsUpdate.js +2 -0
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersDelete.d.ts +4 -3
- package/funcs/subscribersDelete.d.ts.map +1 -1
- package/funcs/subscribersDelete.js +5 -2
- package/funcs/subscribersDelete.js.map +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +2 -0
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +2 -0
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js +2 -0
- package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
- package/funcs/subscribersNotificationsFeed.d.ts +1 -1
- package/funcs/subscribersNotificationsFeed.d.ts.map +1 -1
- package/funcs/subscribersNotificationsFeed.js +2 -0
- package/funcs/subscribersNotificationsFeed.js.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts +1 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.js +2 -0
- package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
- package/funcs/subscribersPatch.d.ts +1 -1
- package/funcs/subscribersPatch.d.ts.map +1 -1
- package/funcs/subscribersPatch.js +2 -0
- package/funcs/subscribersPatch.js.map +1 -1
- package/funcs/subscribersPreferencesList.d.ts +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +2 -0
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesUpdate.d.ts +1 -1
- package/funcs/subscribersPreferencesUpdate.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdate.js +2 -0
- package/funcs/subscribersPreferencesUpdate.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +2 -0
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.d.ts +2 -2
- package/funcs/subscribersRetrieve.d.ts.map +1 -1
- package/funcs/subscribersRetrieve.js +3 -1
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersSearch.d.ts +1 -1
- package/funcs/subscribersSearch.d.ts.map +1 -1
- package/funcs/subscribersSearch.js +2 -0
- package/funcs/subscribersSearch.js.map +1 -1
- package/funcs/subscribersTopicsList.d.ts +1 -1
- package/funcs/subscribersTopicsList.d.ts.map +1 -1
- package/funcs/subscribersTopicsList.js +2 -0
- package/funcs/subscribersTopicsList.js.map +1 -1
- package/funcs/topicsCreate.d.ts +1 -1
- package/funcs/topicsCreate.d.ts.map +1 -1
- package/funcs/topicsCreate.js +2 -0
- package/funcs/topicsCreate.js.map +1 -1
- package/funcs/topicsDelete.d.ts +1 -1
- package/funcs/topicsDelete.d.ts.map +1 -1
- package/funcs/topicsDelete.js +2 -0
- package/funcs/topicsDelete.js.map +1 -1
- package/funcs/topicsGet.d.ts +1 -1
- package/funcs/topicsGet.d.ts.map +1 -1
- package/funcs/topicsGet.js +2 -0
- package/funcs/topicsGet.js.map +1 -1
- package/funcs/topicsList.d.ts +1 -1
- package/funcs/topicsList.d.ts.map +1 -1
- package/funcs/topicsList.js +2 -0
- package/funcs/topicsList.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +2 -0
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/funcs/topicsSubscriptionsCreate.d.ts +1 -1
- package/funcs/topicsSubscriptionsCreate.d.ts.map +1 -1
- package/funcs/topicsSubscriptionsCreate.js +2 -0
- package/funcs/topicsSubscriptionsCreate.js.map +1 -1
- package/funcs/topicsSubscriptionsDelete.d.ts +1 -1
- package/funcs/topicsSubscriptionsDelete.d.ts.map +1 -1
- package/funcs/topicsSubscriptionsDelete.js +2 -0
- package/funcs/topicsSubscriptionsDelete.js.map +1 -1
- package/funcs/topicsSubscriptionsList.d.ts +2 -2
- package/funcs/topicsSubscriptionsList.d.ts.map +1 -1
- package/funcs/topicsSubscriptionsList.js +3 -1
- package/funcs/topicsSubscriptionsList.js.map +1 -1
- package/funcs/topicsUpdate.d.ts +1 -1
- package/funcs/topicsUpdate.d.ts.map +1 -1
- package/funcs/topicsUpdate.js +2 -0
- package/funcs/topicsUpdate.js.map +1 -1
- package/funcs/trigger.d.ts +1 -1
- package/funcs/trigger.d.ts.map +1 -1
- package/funcs/trigger.js +5 -1
- package/funcs/trigger.js.map +1 -1
- package/funcs/triggerBroadcast.d.ts +1 -1
- package/funcs/triggerBroadcast.d.ts.map +1 -1
- package/funcs/triggerBroadcast.js +5 -1
- package/funcs/triggerBroadcast.js.map +1 -1
- package/funcs/triggerBulk.d.ts +1 -1
- package/funcs/triggerBulk.d.ts.map +1 -1
- package/funcs/triggerBulk.js +5 -1
- package/funcs/triggerBulk.js.map +1 -1
- package/hooks/types.d.ts +2 -0
- package/hooks/types.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts +1 -0
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +3 -3
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/tools/subscribersDelete.d.ts.map +1 -1
- package/mcp-server/tools/subscribersDelete.js +3 -2
- package/mcp-server/tools/subscribersDelete.js.map +1 -1
- package/mcp-server/tools/subscribersRetrieve.js +1 -1
- package/mcp-server/tools/topicsSubscriptionsList.js +1 -1
- 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/notificationfeeditemdto.d.ts +2 -2
- package/models/components/notificationfeeditemdto.d.ts.map +1 -1
- package/models/components/notificationfeeditemdto.js +2 -2
- package/models/components/notificationfeeditemdto.js.map +1 -1
- package/models/components/payloadvalidationerrordto.d.ts +125 -0
- package/models/components/payloadvalidationerrordto.d.ts.map +1 -0
- package/models/components/payloadvalidationerrordto.js +160 -0
- package/models/components/payloadvalidationerrordto.js.map +1 -0
- package/models/components/updateintegrationrequestdto.d.ts +0 -5
- package/models/components/updateintegrationrequestdto.d.ts.map +1 -1
- package/models/components/updateintegrationrequestdto.js +0 -2
- package/models/components/updateintegrationrequestdto.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/payloadvalidationexceptiondto.d.ts +222 -0
- package/models/errors/payloadvalidationexceptiondto.d.ts.map +1 -0
- package/models/errors/payloadvalidationexceptiondto.js +212 -0
- package/models/errors/payloadvalidationexceptiondto.js.map +1 -0
- package/models/errors/sdkerror.d.ts +14 -2
- package/models/errors/sdkerror.d.ts.map +1 -1
- package/models/errors/sdkerror.js +1 -1
- package/models/errors/sdkerror.js.map +1 -1
- package/package.json +1 -1
- package/sdk/subscribers.d.ts +4 -3
- package/sdk/subscribers.d.ts.map +1 -1
- package/sdk/subscribers.js +4 -3
- package/sdk/subscribers.js.map +1 -1
- package/sdk/subscriptions.d.ts +1 -1
- package/sdk/subscriptions.js +1 -1
- package/sources/json-development.json +227 -46
- package/src/funcs/cancel.ts +2 -6
- package/src/funcs/integrationsCreate.ts +2 -6
- package/src/funcs/integrationsDelete.ts +2 -6
- package/src/funcs/integrationsList.ts +2 -6
- package/src/funcs/integrationsListActive.ts +2 -6
- package/src/funcs/integrationsSetAsPrimary.ts +2 -6
- package/src/funcs/integrationsUpdate.ts +2 -6
- package/src/funcs/messagesDelete.ts +2 -6
- package/src/funcs/messagesDeleteByTransactionId.ts +2 -6
- package/src/funcs/messagesRetrieve.ts +2 -6
- package/src/funcs/notificationsList.ts +2 -6
- package/src/funcs/notificationsRetrieve.ts +2 -6
- package/src/funcs/subscribersCreate.ts +2 -6
- package/src/funcs/subscribersCreateBulk.ts +2 -6
- package/src/funcs/subscribersCredentialsAppend.ts +2 -6
- package/src/funcs/subscribersCredentialsDelete.ts +2 -6
- package/src/funcs/subscribersCredentialsUpdate.ts +2 -6
- package/src/funcs/subscribersDelete.ts +5 -8
- package/src/funcs/subscribersMessagesMarkAll.ts +2 -6
- package/src/funcs/subscribersMessagesMarkAllAs.ts +2 -6
- package/src/funcs/subscribersMessagesUpdateAsSeen.ts +2 -6
- package/src/funcs/subscribersNotificationsFeed.ts +2 -6
- package/src/funcs/subscribersNotificationsUnseenCount.ts +2 -6
- package/src/funcs/subscribersPatch.ts +2 -6
- package/src/funcs/subscribersPreferencesList.ts +2 -6
- package/src/funcs/subscribersPreferencesUpdate.ts +2 -6
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +2 -6
- package/src/funcs/subscribersRetrieve.ts +3 -7
- package/src/funcs/subscribersSearch.ts +2 -6
- package/src/funcs/subscribersTopicsList.ts +2 -6
- package/src/funcs/topicsCreate.ts +2 -6
- package/src/funcs/topicsDelete.ts +2 -6
- package/src/funcs/topicsGet.ts +2 -6
- package/src/funcs/topicsList.ts +2 -6
- package/src/funcs/topicsSubscribersRetrieve.ts +2 -6
- package/src/funcs/topicsSubscriptionsCreate.ts +2 -6
- package/src/funcs/topicsSubscriptionsDelete.ts +2 -6
- package/src/funcs/topicsSubscriptionsList.ts +3 -7
- package/src/funcs/topicsUpdate.ts +2 -6
- package/src/funcs/trigger.ts +9 -7
- package/src/funcs/triggerBroadcast.ts +9 -7
- package/src/funcs/triggerBulk.ts +9 -7
- package/src/hooks/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/sdks.ts +10 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/subscribersDelete.ts +3 -2
- package/src/mcp-server/tools/subscribersRetrieve.ts +1 -1
- package/src/mcp-server/tools/topicsSubscriptionsList.ts +1 -1
- package/src/models/components/index.ts +1 -0
- package/src/models/components/notificationfeeditemdto.ts +4 -4
- package/src/models/components/payloadvalidationerrordto.ts +299 -0
- package/src/models/components/updateintegrationrequestdto.ts +0 -7
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/payloadvalidationexceptiondto.ts +466 -0
- package/src/models/errors/sdkerror.ts +18 -3
- package/src/sdk/subscribers.ts +4 -3
- package/src/sdk/subscriptions.ts +1 -1
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* List topic subscriptions
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* List all
|
|
31
|
+
* List all subscriptions of subscribers for a topic.
|
|
32
32
|
* Checkout all available filters in the query section.
|
|
33
33
|
*/
|
|
34
34
|
export function topicsSubscriptionsList(
|
|
@@ -39,9 +39,7 @@ export function topicsSubscriptionsList(
|
|
|
39
39
|
Result<
|
|
40
40
|
operations.TopicsControllerListTopicSubscriptionsResponse,
|
|
41
41
|
| errors.ErrorDto
|
|
42
|
-
| errors.ErrorDto
|
|
43
42
|
| errors.ValidationErrorDto
|
|
44
|
-
| errors.ErrorDto
|
|
45
43
|
| SDKError
|
|
46
44
|
| SDKValidationError
|
|
47
45
|
| UnexpectedClientError
|
|
@@ -67,9 +65,7 @@ async function $do(
|
|
|
67
65
|
Result<
|
|
68
66
|
operations.TopicsControllerListTopicSubscriptionsResponse,
|
|
69
67
|
| errors.ErrorDto
|
|
70
|
-
| errors.ErrorDto
|
|
71
68
|
| errors.ValidationErrorDto
|
|
72
|
-
| errors.ErrorDto
|
|
73
69
|
| SDKError
|
|
74
70
|
| SDKValidationError
|
|
75
71
|
| UnexpectedClientError
|
|
@@ -127,6 +123,7 @@ async function $do(
|
|
|
127
123
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
128
124
|
|
|
129
125
|
const context = {
|
|
126
|
+
options: client._options,
|
|
130
127
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
131
128
|
operationID: "TopicsController_listTopicSubscriptions",
|
|
132
129
|
oAuth2Scopes: [],
|
|
@@ -158,6 +155,7 @@ async function $do(
|
|
|
158
155
|
headers: headers,
|
|
159
156
|
query: query,
|
|
160
157
|
body: body,
|
|
158
|
+
userAgent: client._options.userAgent,
|
|
161
159
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
162
160
|
}, options);
|
|
163
161
|
if (!requestRes.ok) {
|
|
@@ -199,9 +197,7 @@ async function $do(
|
|
|
199
197
|
const [result] = await M.match<
|
|
200
198
|
operations.TopicsControllerListTopicSubscriptionsResponse,
|
|
201
199
|
| errors.ErrorDto
|
|
202
|
-
| errors.ErrorDto
|
|
203
200
|
| errors.ValidationErrorDto
|
|
204
|
-
| errors.ErrorDto
|
|
205
201
|
| SDKError
|
|
206
202
|
| SDKValidationError
|
|
207
203
|
| UnexpectedClientError
|
|
@@ -41,9 +41,7 @@ export function topicsUpdate(
|
|
|
41
41
|
Result<
|
|
42
42
|
operations.TopicsControllerUpdateTopicResponse,
|
|
43
43
|
| errors.ErrorDto
|
|
44
|
-
| errors.ErrorDto
|
|
45
44
|
| errors.ValidationErrorDto
|
|
46
|
-
| errors.ErrorDto
|
|
47
45
|
| SDKError
|
|
48
46
|
| SDKValidationError
|
|
49
47
|
| UnexpectedClientError
|
|
@@ -73,9 +71,7 @@ async function $do(
|
|
|
73
71
|
Result<
|
|
74
72
|
operations.TopicsControllerUpdateTopicResponse,
|
|
75
73
|
| errors.ErrorDto
|
|
76
|
-
| errors.ErrorDto
|
|
77
74
|
| errors.ValidationErrorDto
|
|
78
|
-
| errors.ErrorDto
|
|
79
75
|
| SDKError
|
|
80
76
|
| SDKValidationError
|
|
81
77
|
| UnexpectedClientError
|
|
@@ -131,6 +127,7 @@ async function $do(
|
|
|
131
127
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
132
128
|
|
|
133
129
|
const context = {
|
|
130
|
+
options: client._options,
|
|
134
131
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
135
132
|
operationID: "TopicsController_updateTopic",
|
|
136
133
|
oAuth2Scopes: [],
|
|
@@ -161,6 +158,7 @@ async function $do(
|
|
|
161
158
|
path: path,
|
|
162
159
|
headers: headers,
|
|
163
160
|
body: body,
|
|
161
|
+
userAgent: client._options.userAgent,
|
|
164
162
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
165
163
|
}, options);
|
|
166
164
|
if (!requestRes.ok) {
|
|
@@ -202,9 +200,7 @@ async function $do(
|
|
|
202
200
|
const [result] = await M.match<
|
|
203
201
|
operations.TopicsControllerUpdateTopicResponse,
|
|
204
202
|
| errors.ErrorDto
|
|
205
|
-
| errors.ErrorDto
|
|
206
203
|
| errors.ValidationErrorDto
|
|
207
|
-
| errors.ErrorDto
|
|
208
204
|
| SDKError
|
|
209
205
|
| SDKValidationError
|
|
210
206
|
| UnexpectedClientError
|
package/src/funcs/trigger.ts
CHANGED
|
@@ -42,10 +42,9 @@ export function trigger(
|
|
|
42
42
|
): APIPromise<
|
|
43
43
|
Result<
|
|
44
44
|
operations.EventsControllerTriggerResponse,
|
|
45
|
-
| errors.
|
|
45
|
+
| errors.PayloadValidationExceptionDto
|
|
46
46
|
| errors.ErrorDto
|
|
47
47
|
| errors.ValidationErrorDto
|
|
48
|
-
| errors.ErrorDto
|
|
49
48
|
| SDKError
|
|
50
49
|
| SDKValidationError
|
|
51
50
|
| UnexpectedClientError
|
|
@@ -72,10 +71,9 @@ async function $do(
|
|
|
72
71
|
[
|
|
73
72
|
Result<
|
|
74
73
|
operations.EventsControllerTriggerResponse,
|
|
75
|
-
| errors.
|
|
74
|
+
| errors.PayloadValidationExceptionDto
|
|
76
75
|
| errors.ErrorDto
|
|
77
76
|
| errors.ValidationErrorDto
|
|
78
|
-
| errors.ErrorDto
|
|
79
77
|
| SDKError
|
|
80
78
|
| SDKValidationError
|
|
81
79
|
| UnexpectedClientError
|
|
@@ -123,6 +121,7 @@ async function $do(
|
|
|
123
121
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
124
122
|
|
|
125
123
|
const context = {
|
|
124
|
+
options: client._options,
|
|
126
125
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
127
126
|
operationID: "EventsController_trigger",
|
|
128
127
|
oAuth2Scopes: [],
|
|
@@ -153,6 +152,7 @@ async function $do(
|
|
|
153
152
|
path: path,
|
|
154
153
|
headers: headers,
|
|
155
154
|
body: body,
|
|
155
|
+
userAgent: client._options.userAgent,
|
|
156
156
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
157
157
|
}, options);
|
|
158
158
|
if (!requestRes.ok) {
|
|
@@ -193,10 +193,9 @@ async function $do(
|
|
|
193
193
|
|
|
194
194
|
const [result] = await M.match<
|
|
195
195
|
operations.EventsControllerTriggerResponse,
|
|
196
|
-
| errors.
|
|
196
|
+
| errors.PayloadValidationExceptionDto
|
|
197
197
|
| errors.ErrorDto
|
|
198
198
|
| errors.ValidationErrorDto
|
|
199
|
-
| errors.ErrorDto
|
|
200
199
|
| SDKError
|
|
201
200
|
| SDKValidationError
|
|
202
201
|
| UnexpectedClientError
|
|
@@ -209,9 +208,12 @@ async function $do(
|
|
|
209
208
|
hdrs: true,
|
|
210
209
|
key: "Result",
|
|
211
210
|
}),
|
|
211
|
+
M.jsonErr(400, errors.PayloadValidationExceptionDto$inboundSchema, {
|
|
212
|
+
hdrs: true,
|
|
213
|
+
}),
|
|
212
214
|
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
213
215
|
M.jsonErr(
|
|
214
|
-
[
|
|
216
|
+
[401, 403, 404, 405, 409, 413, 415],
|
|
215
217
|
errors.ErrorDto$inboundSchema,
|
|
216
218
|
{ hdrs: true },
|
|
217
219
|
),
|
|
@@ -40,10 +40,9 @@ export function triggerBroadcast(
|
|
|
40
40
|
): APIPromise<
|
|
41
41
|
Result<
|
|
42
42
|
operations.EventsControllerBroadcastEventToAllResponse,
|
|
43
|
-
| errors.
|
|
43
|
+
| errors.PayloadValidationExceptionDto
|
|
44
44
|
| errors.ErrorDto
|
|
45
45
|
| errors.ValidationErrorDto
|
|
46
|
-
| errors.ErrorDto
|
|
47
46
|
| SDKError
|
|
48
47
|
| SDKValidationError
|
|
49
48
|
| UnexpectedClientError
|
|
@@ -70,10 +69,9 @@ async function $do(
|
|
|
70
69
|
[
|
|
71
70
|
Result<
|
|
72
71
|
operations.EventsControllerBroadcastEventToAllResponse,
|
|
73
|
-
| errors.
|
|
72
|
+
| errors.PayloadValidationExceptionDto
|
|
74
73
|
| errors.ErrorDto
|
|
75
74
|
| errors.ValidationErrorDto
|
|
76
|
-
| errors.ErrorDto
|
|
77
75
|
| SDKError
|
|
78
76
|
| SDKValidationError
|
|
79
77
|
| UnexpectedClientError
|
|
@@ -122,6 +120,7 @@ async function $do(
|
|
|
122
120
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
123
121
|
|
|
124
122
|
const context = {
|
|
123
|
+
options: client._options,
|
|
125
124
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
126
125
|
operationID: "EventsController_broadcastEventToAll",
|
|
127
126
|
oAuth2Scopes: [],
|
|
@@ -152,6 +151,7 @@ async function $do(
|
|
|
152
151
|
path: path,
|
|
153
152
|
headers: headers,
|
|
154
153
|
body: body,
|
|
154
|
+
userAgent: client._options.userAgent,
|
|
155
155
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
156
156
|
}, options);
|
|
157
157
|
if (!requestRes.ok) {
|
|
@@ -192,10 +192,9 @@ async function $do(
|
|
|
192
192
|
|
|
193
193
|
const [result] = await M.match<
|
|
194
194
|
operations.EventsControllerBroadcastEventToAllResponse,
|
|
195
|
-
| errors.
|
|
195
|
+
| errors.PayloadValidationExceptionDto
|
|
196
196
|
| errors.ErrorDto
|
|
197
197
|
| errors.ValidationErrorDto
|
|
198
|
-
| errors.ErrorDto
|
|
199
198
|
| SDKError
|
|
200
199
|
| SDKValidationError
|
|
201
200
|
| UnexpectedClientError
|
|
@@ -209,9 +208,12 @@ async function $do(
|
|
|
209
208
|
operations.EventsControllerBroadcastEventToAllResponse$inboundSchema,
|
|
210
209
|
{ hdrs: true, key: "Result" },
|
|
211
210
|
),
|
|
211
|
+
M.jsonErr(400, errors.PayloadValidationExceptionDto$inboundSchema, {
|
|
212
|
+
hdrs: true,
|
|
213
|
+
}),
|
|
212
214
|
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
213
215
|
M.jsonErr(
|
|
214
|
-
[
|
|
216
|
+
[401, 403, 404, 405, 409, 413, 415],
|
|
215
217
|
errors.ErrorDto$inboundSchema,
|
|
216
218
|
{ hdrs: true },
|
|
217
219
|
),
|
package/src/funcs/triggerBulk.ts
CHANGED
|
@@ -41,10 +41,9 @@ export function triggerBulk(
|
|
|
41
41
|
): APIPromise<
|
|
42
42
|
Result<
|
|
43
43
|
operations.EventsControllerTriggerBulkResponse,
|
|
44
|
-
| errors.
|
|
44
|
+
| errors.PayloadValidationExceptionDto
|
|
45
45
|
| errors.ErrorDto
|
|
46
46
|
| errors.ValidationErrorDto
|
|
47
|
-
| errors.ErrorDto
|
|
48
47
|
| SDKError
|
|
49
48
|
| SDKValidationError
|
|
50
49
|
| UnexpectedClientError
|
|
@@ -71,10 +70,9 @@ async function $do(
|
|
|
71
70
|
[
|
|
72
71
|
Result<
|
|
73
72
|
operations.EventsControllerTriggerBulkResponse,
|
|
74
|
-
| errors.
|
|
73
|
+
| errors.PayloadValidationExceptionDto
|
|
75
74
|
| errors.ErrorDto
|
|
76
75
|
| errors.ValidationErrorDto
|
|
77
|
-
| errors.ErrorDto
|
|
78
76
|
| SDKError
|
|
79
77
|
| SDKValidationError
|
|
80
78
|
| UnexpectedClientError
|
|
@@ -122,6 +120,7 @@ async function $do(
|
|
|
122
120
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
123
121
|
|
|
124
122
|
const context = {
|
|
123
|
+
options: client._options,
|
|
125
124
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
126
125
|
operationID: "EventsController_triggerBulk",
|
|
127
126
|
oAuth2Scopes: [],
|
|
@@ -152,6 +151,7 @@ async function $do(
|
|
|
152
151
|
path: path,
|
|
153
152
|
headers: headers,
|
|
154
153
|
body: body,
|
|
154
|
+
userAgent: client._options.userAgent,
|
|
155
155
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
156
156
|
}, options);
|
|
157
157
|
if (!requestRes.ok) {
|
|
@@ -192,10 +192,9 @@ async function $do(
|
|
|
192
192
|
|
|
193
193
|
const [result] = await M.match<
|
|
194
194
|
operations.EventsControllerTriggerBulkResponse,
|
|
195
|
-
| errors.
|
|
195
|
+
| errors.PayloadValidationExceptionDto
|
|
196
196
|
| errors.ErrorDto
|
|
197
197
|
| errors.ValidationErrorDto
|
|
198
|
-
| errors.ErrorDto
|
|
199
198
|
| SDKError
|
|
200
199
|
| SDKValidationError
|
|
201
200
|
| UnexpectedClientError
|
|
@@ -208,9 +207,12 @@ async function $do(
|
|
|
208
207
|
hdrs: true,
|
|
209
208
|
key: "Result",
|
|
210
209
|
}),
|
|
210
|
+
M.jsonErr(400, errors.PayloadValidationExceptionDto$inboundSchema, {
|
|
211
|
+
hdrs: true,
|
|
212
|
+
}),
|
|
211
213
|
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
212
214
|
M.jsonErr(
|
|
213
|
-
[
|
|
215
|
+
[401, 403, 404, 405, 409, 413, 415],
|
|
214
216
|
errors.ErrorDto$inboundSchema,
|
|
215
217
|
{ hdrs: true },
|
|
216
218
|
),
|
package/src/hooks/types.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { SDKOptions } from "../lib/config.js";
|
|
5
6
|
import { HTTPClient, RequestInput } from "../lib/http.js";
|
|
6
7
|
import { RetryConfig } from "../lib/retries.js";
|
|
7
8
|
import { SecurityState } from "../lib/security.js";
|
|
@@ -13,6 +14,7 @@ export type HookContext = {
|
|
|
13
14
|
securitySource?: any | (() => Promise<any>);
|
|
14
15
|
retryConfig: RetryConfig;
|
|
15
16
|
resolvedSecurity: SecurityState | null;
|
|
17
|
+
options: SDKOptions;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
export type Awaitable<T> = T | Promise<T>;
|
package/src/index.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -27,6 +27,10 @@ export type SDKOptions = {
|
|
|
27
27
|
* Allows overriding the default server URL used by the SDK
|
|
28
28
|
*/
|
|
29
29
|
serverURL?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Allows overriding the default user agent used by the SDK
|
|
32
|
+
*/
|
|
33
|
+
userAgent?: string | undefined;
|
|
30
34
|
/**
|
|
31
35
|
* Allows overriding the default retry config used by the SDK
|
|
32
36
|
*/
|
|
@@ -55,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
59
|
export const SDK_METADATA = {
|
|
56
60
|
language: "typescript",
|
|
57
61
|
openapiDocVersion: "2.2.0",
|
|
58
|
-
sdkVersion: "1.
|
|
59
|
-
genVersion: "2.
|
|
60
|
-
userAgent: "speakeasy-sdk/typescript 1.
|
|
62
|
+
sdkVersion: "1.3.0",
|
|
63
|
+
genVersion: "2.620.2",
|
|
64
|
+
userAgent: "speakeasy-sdk/typescript 1.3.0 2.620.2 2.2.0 @novu/api",
|
|
61
65
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -64,6 +64,7 @@ type RequestConfig = {
|
|
|
64
64
|
headers?: HeadersInit;
|
|
65
65
|
security?: SecurityState | null;
|
|
66
66
|
uaHeader?: string;
|
|
67
|
+
userAgent?: string | undefined;
|
|
67
68
|
timeoutMs?: number;
|
|
68
69
|
};
|
|
69
70
|
|
|
@@ -95,19 +96,21 @@ export class ClientSDK {
|
|
|
95
96
|
} else {
|
|
96
97
|
this.#hooks = new SDKHooks();
|
|
97
98
|
}
|
|
98
|
-
this._options = { ...options, hooks: this.#hooks };
|
|
99
|
-
|
|
100
99
|
const url = serverURLFromOptions(options);
|
|
101
100
|
if (url) {
|
|
102
101
|
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
|
103
102
|
}
|
|
103
|
+
|
|
104
104
|
const { baseURL, client } = this.#hooks.sdkInit({
|
|
105
105
|
baseURL: url,
|
|
106
106
|
client: options.httpClient || new HTTPClient(),
|
|
107
107
|
});
|
|
108
108
|
this._baseURL = baseURL;
|
|
109
109
|
this.#httpClient = client;
|
|
110
|
-
|
|
110
|
+
|
|
111
|
+
this._options = { ...options, hooks: this.#hooks };
|
|
112
|
+
|
|
113
|
+
this.#logger = this._options.debugLogger;
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
public _createRequest(
|
|
@@ -180,7 +183,10 @@ export class ClientSDK {
|
|
|
180
183
|
// Only set user agent header in non-browser-like environments since CORS
|
|
181
184
|
// policy disallows setting it in browsers e.g. Chrome throws an error.
|
|
182
185
|
if (!isBrowserLike) {
|
|
183
|
-
headers.set(
|
|
186
|
+
headers.set(
|
|
187
|
+
conf.uaHeader ?? "user-agent",
|
|
188
|
+
conf.userAgent ?? SDK_METADATA.userAgent,
|
|
189
|
+
);
|
|
184
190
|
}
|
|
185
191
|
|
|
186
192
|
const fetchOptions: Omit<RequestInit, "method" | "body"> = {
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -13,9 +13,10 @@ const args = {
|
|
|
13
13
|
|
|
14
14
|
export const tool$subscribersDelete: ToolDefinition<typeof args> = {
|
|
15
15
|
name: "subscribers-delete",
|
|
16
|
-
description: `Delete subscriber
|
|
16
|
+
description: `Delete a subscriber
|
|
17
17
|
|
|
18
|
-
Deletes a subscriber entity from the Novu platform along with associated messages, preferences, and topic subscriptions
|
|
18
|
+
Deletes a subscriber entity from the Novu platform along with associated messages, preferences, and topic subscriptions.
|
|
19
|
+
**subscriberId** is a required field.`,
|
|
19
20
|
args,
|
|
20
21
|
tool: async (client, args, ctx) => {
|
|
21
22
|
const [result, apiCall] = await subscribersDelete(
|
|
@@ -15,7 +15,7 @@ export const tool$subscribersRetrieve: ToolDefinition<typeof args> = {
|
|
|
15
15
|
name: "subscribers-retrieve",
|
|
16
16
|
description: `Retrieve a subscriber
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Retrieve a subscriber by its unique key identifier **subscriberId**.
|
|
19
19
|
**subscriberId** field is required.`,
|
|
20
20
|
args,
|
|
21
21
|
tool: async (client, args, ctx) => {
|
|
@@ -15,7 +15,7 @@ export const tool$topicsSubscriptionsList: ToolDefinition<typeof args> = {
|
|
|
15
15
|
name: "topics-subscriptions-list",
|
|
16
16
|
description: `List topic subscriptions
|
|
17
17
|
|
|
18
|
-
List all
|
|
18
|
+
List all subscriptions of subscribers for a topic.
|
|
19
19
|
Checkout all available filters in the query section.`,
|
|
20
20
|
args,
|
|
21
21
|
tool: async (client, args, ctx) => {
|
|
@@ -84,6 +84,7 @@ export * from "./ordinalvalueenum.js";
|
|
|
84
84
|
export * from "./patchpreferencechannelsdto.js";
|
|
85
85
|
export * from "./patchsubscriberpreferencesdto.js";
|
|
86
86
|
export * from "./patchsubscriberrequestdto.js";
|
|
87
|
+
export * from "./payloadvalidationerrordto.js";
|
|
87
88
|
export * from "./preferenceoverridesourceenum.js";
|
|
88
89
|
export * from "./providersidenum.js";
|
|
89
90
|
export * from "./removesubscriberresponsedto.js";
|
|
@@ -63,7 +63,7 @@ export type NotificationFeedItemDto = {
|
|
|
63
63
|
/**
|
|
64
64
|
* Identifier for the message template used.
|
|
65
65
|
*/
|
|
66
|
-
messageTemplateId
|
|
66
|
+
messageTemplateId?: string | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Identifier for the organization sending the notification.
|
|
69
69
|
*/
|
|
@@ -184,7 +184,7 @@ export const NotificationFeedItemDto$inboundSchema: z.ZodType<
|
|
|
184
184
|
_id: z.string(),
|
|
185
185
|
_templateId: z.string(),
|
|
186
186
|
_environmentId: z.string(),
|
|
187
|
-
_messageTemplateId: z.string(),
|
|
187
|
+
_messageTemplateId: z.string().optional(),
|
|
188
188
|
_organizationId: z.string(),
|
|
189
189
|
_notificationId: z.string(),
|
|
190
190
|
_subscriberId: z.string(),
|
|
@@ -230,7 +230,7 @@ export type NotificationFeedItemDto$Outbound = {
|
|
|
230
230
|
_id: string;
|
|
231
231
|
_templateId: string;
|
|
232
232
|
_environmentId: string;
|
|
233
|
-
_messageTemplateId
|
|
233
|
+
_messageTemplateId?: string | undefined;
|
|
234
234
|
_organizationId: string;
|
|
235
235
|
_notificationId: string;
|
|
236
236
|
_subscriberId: string;
|
|
@@ -264,7 +264,7 @@ export const NotificationFeedItemDto$outboundSchema: z.ZodType<
|
|
|
264
264
|
id: z.string(),
|
|
265
265
|
templateId: z.string(),
|
|
266
266
|
environmentId: z.string(),
|
|
267
|
-
messageTemplateId: z.string(),
|
|
267
|
+
messageTemplateId: z.string().optional(),
|
|
268
268
|
organizationId: z.string(),
|
|
269
269
|
notificationId: z.string(),
|
|
270
270
|
subscriberId: z.string(),
|