@novu/api 3.11.2 → 3.12.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.
Files changed (93) hide show
  1. package/README.md +20 -20
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/channelConnectionsCreate.d.ts +1 -1
  6. package/funcs/channelConnectionsCreate.js +1 -1
  7. package/funcs/channelConnectionsDelete.d.ts +1 -1
  8. package/funcs/channelConnectionsDelete.js +1 -1
  9. package/funcs/channelConnectionsList.d.ts +2 -2
  10. package/funcs/channelConnectionsList.js +2 -2
  11. package/funcs/channelConnectionsRetrieve.d.ts +1 -1
  12. package/funcs/channelConnectionsRetrieve.js +1 -1
  13. package/funcs/channelConnectionsUpdate.d.ts +1 -1
  14. package/funcs/channelConnectionsUpdate.js +1 -1
  15. package/funcs/channelEndpointsCreate.d.ts +1 -1
  16. package/funcs/channelEndpointsCreate.js +1 -1
  17. package/funcs/channelEndpointsDelete.d.ts +1 -1
  18. package/funcs/channelEndpointsDelete.js +1 -1
  19. package/funcs/channelEndpointsList.d.ts +2 -2
  20. package/funcs/channelEndpointsList.js +2 -2
  21. package/funcs/channelEndpointsRetrieve.d.ts +1 -1
  22. package/funcs/channelEndpointsRetrieve.js +1 -1
  23. package/funcs/channelEndpointsUpdate.d.ts +1 -1
  24. package/funcs/channelEndpointsUpdate.js +1 -1
  25. package/funcs/notificationsList.js +1 -0
  26. package/funcs/notificationsList.js.map +1 -1
  27. package/funcs/topicsSubscriptionsGetSubscription.d.ts +2 -2
  28. package/funcs/topicsSubscriptionsGetSubscription.d.ts.map +1 -1
  29. package/funcs/topicsSubscriptionsGetSubscription.js +10 -7
  30. package/funcs/topicsSubscriptionsGetSubscription.js.map +1 -1
  31. package/funcs/topicsSubscriptionsUpdate.d.ts +1 -1
  32. package/funcs/topicsSubscriptionsUpdate.js +6 -3
  33. package/funcs/topicsSubscriptionsUpdate.js.map +1 -1
  34. package/funcs/trigger.d.ts +1 -1
  35. package/funcs/trigger.js +1 -1
  36. package/jsr.json +1 -1
  37. package/lib/config.d.ts +3 -3
  38. package/lib/config.js +3 -3
  39. package/models/components/generatechatoauthurlrequestdto.d.ts +1 -1
  40. package/models/components/notificationfeeditemdto.d.ts +4 -0
  41. package/models/components/notificationfeeditemdto.d.ts.map +1 -1
  42. package/models/components/notificationfeeditemdto.js +1 -0
  43. package/models/components/notificationfeeditemdto.js.map +1 -1
  44. package/models/components/triggereventrequestdto.d.ts +2 -2
  45. package/models/operations/notificationscontrollerlistnotifications.d.ts +5 -0
  46. package/models/operations/notificationscontrollerlistnotifications.d.ts.map +1 -1
  47. package/models/operations/notificationscontrollerlistnotifications.js +1 -0
  48. package/models/operations/notificationscontrollerlistnotifications.js.map +1 -1
  49. package/models/operations/topicscontrollergettopicsubscription.d.ts +2 -2
  50. package/models/operations/topicscontrollergettopicsubscription.d.ts.map +1 -1
  51. package/models/operations/topicscontrollergettopicsubscription.js +1 -1
  52. package/models/operations/topicscontrollergettopicsubscription.js.map +1 -1
  53. package/models/operations/topicscontrollerupdatetopicsubscription.d.ts +2 -2
  54. package/models/operations/topicscontrollerupdatetopicsubscription.d.ts.map +1 -1
  55. package/models/operations/topicscontrollerupdatetopicsubscription.js +1 -1
  56. package/models/operations/topicscontrollerupdatetopicsubscription.js.map +1 -1
  57. package/package.json +1 -1
  58. package/sdk/channelconnections.d.ts +6 -6
  59. package/sdk/channelconnections.js +6 -6
  60. package/sdk/channelendpoints.d.ts +6 -6
  61. package/sdk/channelendpoints.js +6 -6
  62. package/sdk/sdk.d.ts +1 -1
  63. package/sdk/sdk.js +1 -1
  64. package/sdk/subscriptions.d.ts +3 -3
  65. package/sdk/subscriptions.d.ts.map +1 -1
  66. package/sdk/subscriptions.js +4 -4
  67. package/sdk/subscriptions.js.map +1 -1
  68. package/sources/json-development.json +105 -65
  69. package/src/funcs/channelConnectionsCreate.ts +1 -1
  70. package/src/funcs/channelConnectionsDelete.ts +1 -1
  71. package/src/funcs/channelConnectionsList.ts +2 -2
  72. package/src/funcs/channelConnectionsRetrieve.ts +1 -1
  73. package/src/funcs/channelConnectionsUpdate.ts +1 -1
  74. package/src/funcs/channelEndpointsCreate.ts +1 -1
  75. package/src/funcs/channelEndpointsDelete.ts +1 -1
  76. package/src/funcs/channelEndpointsList.ts +2 -2
  77. package/src/funcs/channelEndpointsRetrieve.ts +1 -1
  78. package/src/funcs/channelEndpointsUpdate.ts +1 -1
  79. package/src/funcs/notificationsList.ts +1 -0
  80. package/src/funcs/topicsSubscriptionsGetSubscription.ts +12 -13
  81. package/src/funcs/topicsSubscriptionsUpdate.ts +8 -9
  82. package/src/funcs/trigger.ts +1 -1
  83. package/src/lib/config.ts +3 -3
  84. package/src/models/components/generatechatoauthurlrequestdto.ts +1 -1
  85. package/src/models/components/notificationfeeditemdto.ts +5 -0
  86. package/src/models/components/triggereventrequestdto.ts +2 -2
  87. package/src/models/operations/notificationscontrollerlistnotifications.ts +6 -0
  88. package/src/models/operations/topicscontrollergettopicsubscription.ts +3 -3
  89. package/src/models/operations/topicscontrollerupdatetopicsubscription.ts +3 -3
  90. package/src/sdk/channelconnections.ts +6 -6
  91. package/src/sdk/channelendpoints.ts +6 -6
  92. package/src/sdk/sdk.ts +1 -1
  93. package/src/sdk/subscriptions.ts +4 -4
@@ -29,7 +29,7 @@ export type GenerateChatOauthUrlRequestDto = {
29
29
  */
30
30
  integrationIdentifier: string;
31
31
  /**
32
- * Identifier of the channel connection that will be created
32
+ * Identifier of the channel connection that will be created. It is generated automatically if not provided.
33
33
  */
34
34
  connectionIdentifier?: string | undefined;
35
35
  context?:
@@ -122,6 +122,10 @@ export type NotificationFeedItemDto = {
122
122
  * Indicates whether the notification has been seen by the subscriber.
123
123
  */
124
124
  seen: boolean;
125
+ /**
126
+ * Indicates whether the notification has been archived by the subscriber.
127
+ */
128
+ archived: boolean;
125
129
  /**
126
130
  * Device tokens for push notifications, if applicable.
127
131
  */
@@ -188,6 +192,7 @@ export const NotificationFeedItemDto$inboundSchema: z.ZodType<
188
192
  channel: ChannelTypeEnum$inboundSchema,
189
193
  read: z.boolean(),
190
194
  seen: z.boolean(),
195
+ archived: z.boolean(),
191
196
  deviceTokens: z.nullable(z.array(z.string())).optional(),
192
197
  cta: MessageCTA$inboundSchema,
193
198
  status: NotificationFeedItemDtoStatus$inboundSchema,
@@ -99,7 +99,7 @@ export type Overrides = {
99
99
  export type To1 = TopicPayloadDto | SubscriberPayloadDto | string;
100
100
 
101
101
  /**
102
- * The recipients list of people who will receive the notification.
102
+ * The recipients list of people who will receive the notification. Maximum number of recipients can be 100.
103
103
  */
104
104
  export type To =
105
105
  | TopicPayloadDto
@@ -156,7 +156,7 @@ export type TriggerEventRequestDto = {
156
156
  */
157
157
  overrides?: Overrides | undefined;
158
158
  /**
159
- * The recipients list of people who will receive the notification.
159
+ * The recipients list of people who will receive the notification. Maximum number of recipients can be 100.
160
160
  */
161
161
  to:
162
162
  | TopicPayloadDto
@@ -52,6 +52,10 @@ export type NotificationsControllerListNotificationsRequest = {
52
52
  * Topic Key for filtering notifications by topic
53
53
  */
54
54
  topicKey?: string | undefined;
55
+ /**
56
+ * Subscription ID for filtering notifications by subscription
57
+ */
58
+ subscriptionId?: string | undefined;
55
59
  /**
56
60
  * Filter by exact context keys, order insensitive (format: "type:id")
57
61
  */
@@ -87,6 +91,7 @@ export type NotificationsControllerListNotificationsRequest$Outbound = {
87
91
  limit: number;
88
92
  transactionId?: string | undefined;
89
93
  topicKey?: string | undefined;
94
+ subscriptionId?: string | undefined;
90
95
  contextKeys?: Array<string> | undefined;
91
96
  after?: string | undefined;
92
97
  before?: string | undefined;
@@ -110,6 +115,7 @@ export const NotificationsControllerListNotificationsRequest$outboundSchema:
110
115
  limit: z.number().default(10),
111
116
  transactionId: z.string().optional(),
112
117
  topicKey: z.string().optional(),
118
+ subscriptionId: z.string().optional(),
113
119
  contextKeys: z.array(z.string()).optional(),
114
120
  after: z.string().optional(),
115
121
  before: z.string().optional(),
@@ -17,7 +17,7 @@ export type TopicsControllerGetTopicSubscriptionRequest = {
17
17
  /**
18
18
  * The unique identifier of the subscription
19
19
  */
20
- subscriptionIdOrIdentifier: string;
20
+ identifier: string;
21
21
  /**
22
22
  * A header for idempotency purposes
23
23
  */
@@ -32,7 +32,7 @@ export type TopicsControllerGetTopicSubscriptionResponse = {
32
32
  /** @internal */
33
33
  export type TopicsControllerGetTopicSubscriptionRequest$Outbound = {
34
34
  topicKey: string;
35
- subscriptionIdOrIdentifier: string;
35
+ identifier: string;
36
36
  "idempotency-key"?: string | undefined;
37
37
  };
38
38
 
@@ -44,7 +44,7 @@ export const TopicsControllerGetTopicSubscriptionRequest$outboundSchema:
44
44
  TopicsControllerGetTopicSubscriptionRequest
45
45
  > = z.object({
46
46
  topicKey: z.string(),
47
- subscriptionIdOrIdentifier: z.string(),
47
+ identifier: z.string(),
48
48
  idempotencyKey: z.string().optional(),
49
49
  }).transform((v) => {
50
50
  return remap$(v, {
@@ -17,7 +17,7 @@ export type TopicsControllerUpdateTopicSubscriptionRequest = {
17
17
  /**
18
18
  * The unique identifier of the subscription
19
19
  */
20
- subscriptionIdOrIdentifier: string;
20
+ identifier: string;
21
21
  /**
22
22
  * A header for idempotency purposes
23
23
  */
@@ -34,7 +34,7 @@ export type TopicsControllerUpdateTopicSubscriptionResponse = {
34
34
  /** @internal */
35
35
  export type TopicsControllerUpdateTopicSubscriptionRequest$Outbound = {
36
36
  topicKey: string;
37
- subscriptionIdOrIdentifier: string;
37
+ identifier: string;
38
38
  "idempotency-key"?: string | undefined;
39
39
  UpdateTopicSubscriptionRequestDto:
40
40
  components.UpdateTopicSubscriptionRequestDto$Outbound;
@@ -48,7 +48,7 @@ export const TopicsControllerUpdateTopicSubscriptionRequest$outboundSchema:
48
48
  TopicsControllerUpdateTopicSubscriptionRequest
49
49
  > = z.object({
50
50
  topicKey: z.string(),
51
- subscriptionIdOrIdentifier: z.string(),
51
+ identifier: z.string(),
52
52
  idempotencyKey: z.string().optional(),
53
53
  updateTopicSubscriptionRequestDto:
54
54
  components.UpdateTopicSubscriptionRequestDto$outboundSchema,
@@ -14,10 +14,10 @@ import { unwrapAsync } from "../types/fp.js";
14
14
 
15
15
  export class ChannelConnections extends ClientSDK {
16
16
  /**
17
- * List channel connections
17
+ * List all channel connections
18
18
  *
19
19
  * @remarks
20
- * Retrieve all channel connections for a resource.
20
+ * List all channel connections for a resource.
21
21
  */
22
22
  async list(
23
23
  request:
@@ -34,7 +34,7 @@ export class ChannelConnections extends ClientSDK {
34
34
  }
35
35
 
36
36
  /**
37
- * Create channel connection for a resource and integration
37
+ * Create a channel connection
38
38
  *
39
39
  * @remarks
40
40
  * Create a new channel connection for a resource for given integration. Only one channel connection is allowed per resource and integration.
@@ -56,7 +56,7 @@ export class ChannelConnections extends ClientSDK {
56
56
  }
57
57
 
58
58
  /**
59
- * Retrieve channel connection by identifier
59
+ * Retrieve a channel connection
60
60
  *
61
61
  * @remarks
62
62
  * Retrieve a specific channel connection by its unique identifier.
@@ -77,7 +77,7 @@ export class ChannelConnections extends ClientSDK {
77
77
  }
78
78
 
79
79
  /**
80
- * Update channel connection
80
+ * Update a channel connection
81
81
  *
82
82
  * @remarks
83
83
  * Update an existing channel connection by its unique identifier.
@@ -101,7 +101,7 @@ export class ChannelConnections extends ClientSDK {
101
101
  }
102
102
 
103
103
  /**
104
- * Delete channel connection
104
+ * Delete a channel connection
105
105
  *
106
106
  * @remarks
107
107
  * Delete a specific channel connection by its unique identifier.
@@ -14,10 +14,10 @@ import { unwrapAsync } from "../types/fp.js";
14
14
 
15
15
  export class ChannelEndpoints extends ClientSDK {
16
16
  /**
17
- * List channel endpoints
17
+ * List all channel endpoints
18
18
  *
19
19
  * @remarks
20
- * Retrieve all channel endpoints for a resource based on query filters.
20
+ * List all channel endpoints for a resource based on query filters.
21
21
  */
22
22
  async list(
23
23
  request: operations.ChannelEndpointsControllerListChannelEndpointsRequest,
@@ -33,7 +33,7 @@ export class ChannelEndpoints extends ClientSDK {
33
33
  }
34
34
 
35
35
  /**
36
- * Create channel endpoint for a resource
36
+ * Create a channel endpoint
37
37
  *
38
38
  * @remarks
39
39
  * Create a new channel endpoint for a resource.
@@ -55,7 +55,7 @@ export class ChannelEndpoints extends ClientSDK {
55
55
  }
56
56
 
57
57
  /**
58
- * Retrieve channel endpoint by identifier
58
+ * Retrieve a channel endpoint
59
59
  *
60
60
  * @remarks
61
61
  * Retrieve a specific channel endpoint by its unique identifier.
@@ -74,7 +74,7 @@ export class ChannelEndpoints extends ClientSDK {
74
74
  }
75
75
 
76
76
  /**
77
- * Update channel endpoint
77
+ * Update a channel endpoint
78
78
  *
79
79
  * @remarks
80
80
  * Update an existing channel endpoint by its unique identifier.
@@ -97,7 +97,7 @@ export class ChannelEndpoints extends ClientSDK {
97
97
  }
98
98
 
99
99
  /**
100
- * Delete channel endpoint by identifier
100
+ * Delete a channel endpoint
101
101
  *
102
102
  * @remarks
103
103
  * Delete a specific channel endpoint by its unique identifier.
package/src/sdk/sdk.ts CHANGED
@@ -95,7 +95,7 @@ export class Novu extends ClientSDK {
95
95
  *
96
96
  * @remarks
97
97
  *
98
- * Trigger event is the main (and only) way to send notifications to subscribers. The trigger identifier is used to match the particular workflow associated with it. Additional information can be passed according the body interface below.
98
+ * Trigger event is the main (and only) way to send notifications to subscribers. The trigger identifier is used to match the particular workflow associated with it. Maximum number of recipients can be 100. Additional information can be passed according the body interface below.
99
99
  * To prevent duplicate triggers, you can optionally pass a **transactionId** in the request body. If the same **transactionId** is used again, the trigger will be ignored. The retention period depends on your billing tier.
100
100
  */
101
101
  async trigger(
@@ -80,18 +80,18 @@ export class Subscriptions extends ClientSDK {
80
80
  * Get a topic subscription
81
81
  *
82
82
  * @remarks
83
- * Get a subscription by its unique identifier **subscriptionIdOrIdentifier** for a topic.
83
+ * Get a subscription by its unique identifier for a topic.
84
84
  */
85
85
  async getSubscription(
86
86
  topicKey: string,
87
- subscriptionIdOrIdentifier: string,
87
+ identifier: string,
88
88
  idempotencyKey?: string | undefined,
89
89
  options?: RequestOptions,
90
90
  ): Promise<operations.TopicsControllerGetTopicSubscriptionResponse> {
91
91
  return unwrapAsync(topicsSubscriptionsGetSubscription(
92
92
  this,
93
93
  topicKey,
94
- subscriptionIdOrIdentifier,
94
+ identifier,
95
95
  idempotencyKey,
96
96
  options,
97
97
  ));
@@ -101,7 +101,7 @@ export class Subscriptions extends ClientSDK {
101
101
  * Update a topic subscription
102
102
  *
103
103
  * @remarks
104
- * Update a subscription by its unique identifier **subscriptionIdOrIdentifier** for a topic. You can update the preferences and name associated with the subscription.
104
+ * Update a subscription by its unique identifier for a topic. You can update the preferences and name associated with the subscription.
105
105
  */
106
106
  async update(
107
107
  request: operations.TopicsControllerUpdateTopicSubscriptionRequest,