@novu/api 3.12.0-rc.0 → 3.13.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 (242) hide show
  1. package/README.md +25 -23
  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/subscribersPreferencesList.d.ts +1 -1
  28. package/funcs/subscribersPreferencesList.d.ts.map +1 -1
  29. package/funcs/subscribersPreferencesList.js +5 -9
  30. package/funcs/subscribersPreferencesList.js.map +1 -1
  31. package/funcs/subscribersTopicsList.js +1 -0
  32. package/funcs/subscribersTopicsList.js.map +1 -1
  33. package/funcs/topicsSubscriptionsGetSubscription.d.ts +18 -0
  34. package/funcs/topicsSubscriptionsGetSubscription.d.ts.map +1 -0
  35. package/funcs/topicsSubscriptionsGetSubscription.js +160 -0
  36. package/funcs/topicsSubscriptionsGetSubscription.js.map +1 -0
  37. package/funcs/topicsSubscriptionsList.js +1 -0
  38. package/funcs/topicsSubscriptionsList.js.map +1 -1
  39. package/funcs/topicsSubscriptionsUpdate.d.ts +1 -1
  40. package/funcs/topicsSubscriptionsUpdate.js +6 -3
  41. package/funcs/topicsSubscriptionsUpdate.js.map +1 -1
  42. package/funcs/trigger.d.ts +1 -1
  43. package/funcs/trigger.js +1 -1
  44. package/jsr.json +1 -1
  45. package/lib/config.d.ts +4 -4
  46. package/lib/config.js +4 -4
  47. package/lib/config.js.map +1 -1
  48. package/lib/sdks.js +2 -2
  49. package/lib/sdks.js.map +1 -1
  50. package/models/components/activitynotificationjobresponsedto.d.ts +4 -4
  51. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  52. package/models/components/activitynotificationjobresponsedto.js +6 -7
  53. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  54. package/models/components/bulkupdatesubscriberpreferencesdto.d.ts +34 -0
  55. package/models/components/bulkupdatesubscriberpreferencesdto.d.ts.map +1 -1
  56. package/models/components/bulkupdatesubscriberpreferencesdto.js +17 -1
  57. package/models/components/bulkupdatesubscriberpreferencesdto.js.map +1 -1
  58. package/models/components/createchannelconnectionrequestdto.d.ts +10 -10
  59. package/models/components/createchannelconnectionrequestdto.d.ts.map +1 -1
  60. package/models/components/createchannelconnectionrequestdto.js +16 -12
  61. package/models/components/createchannelconnectionrequestdto.js.map +1 -1
  62. package/models/components/createslackchannelendpointdto.d.ts +8 -8
  63. package/models/components/createslackchannelendpointdto.d.ts.map +1 -1
  64. package/models/components/createslackchannelendpointdto.js +13 -7
  65. package/models/components/createslackchannelendpointdto.js.map +1 -1
  66. package/models/components/createtopicsubscriptionsrequestdto.d.ts +34 -0
  67. package/models/components/createtopicsubscriptionsrequestdto.d.ts.map +1 -1
  68. package/models/components/createtopicsubscriptionsrequestdto.js +23 -1
  69. package/models/components/createtopicsubscriptionsrequestdto.js.map +1 -1
  70. package/models/components/delaystepresponsedto.d.ts +1 -1
  71. package/models/components/delaystepresponsedto.d.ts.map +1 -1
  72. package/models/components/emailstepresponsedto.d.ts +3 -3
  73. package/models/components/emailstepresponsedto.d.ts.map +1 -1
  74. package/models/components/generatechatoauthurlrequestdto.d.ts +1 -1
  75. package/models/components/inappcontroldto.d.ts +1 -1
  76. package/models/components/inappstepresponsedto.d.ts +2 -2
  77. package/models/components/inappstepresponsedto.d.ts.map +1 -1
  78. package/models/components/index.d.ts +1 -0
  79. package/models/components/index.d.ts.map +1 -1
  80. package/models/components/index.js +1 -0
  81. package/models/components/index.js.map +1 -1
  82. package/models/components/messageactionresult.d.ts +3 -8
  83. package/models/components/messageactionresult.d.ts.map +1 -1
  84. package/models/components/messageactionresult.js +2 -8
  85. package/models/components/messageactionresult.js.map +1 -1
  86. package/models/components/messageresponsedto.d.ts +6 -16
  87. package/models/components/messageresponsedto.d.ts.map +1 -1
  88. package/models/components/messageresponsedto.js +3 -15
  89. package/models/components/messageresponsedto.js.map +1 -1
  90. package/models/components/notificationfeeditemdto.d.ts +4 -0
  91. package/models/components/notificationfeeditemdto.d.ts.map +1 -1
  92. package/models/components/notificationfeeditemdto.js +1 -0
  93. package/models/components/notificationfeeditemdto.js.map +1 -1
  94. package/models/components/patchsubscriberpreferencesdto.d.ts +34 -0
  95. package/models/components/patchsubscriberpreferencesdto.d.ts.map +1 -1
  96. package/models/components/patchsubscriberpreferencesdto.js +19 -1
  97. package/models/components/patchsubscriberpreferencesdto.js.map +1 -1
  98. package/models/components/redirectdto.d.ts +1 -1
  99. package/models/components/subscriberworkflowpreferencedto.d.ts +4 -0
  100. package/models/components/subscriberworkflowpreferencedto.d.ts.map +1 -1
  101. package/models/components/subscriberworkflowpreferencedto.js +1 -0
  102. package/models/components/subscriberworkflowpreferencedto.js.map +1 -1
  103. package/models/components/subscriptiondetailsresponsedto.d.ts +30 -0
  104. package/models/components/subscriptiondetailsresponsedto.d.ts.map +1 -0
  105. package/models/components/{createtopicsubscriptionsresponsedto.js → subscriptiondetailsresponsedto.js} +12 -12
  106. package/models/components/subscriptiondetailsresponsedto.js.map +1 -0
  107. package/models/components/subscriptiondto.d.ts +4 -0
  108. package/models/components/subscriptiondto.d.ts.map +1 -1
  109. package/models/components/subscriptiondto.js +1 -0
  110. package/models/components/subscriptiondto.js.map +1 -1
  111. package/models/components/subscriptionresponsedto.d.ts +4 -0
  112. package/models/components/subscriptionresponsedto.d.ts.map +1 -1
  113. package/models/components/subscriptionresponsedto.js +1 -0
  114. package/models/components/subscriptionresponsedto.js.map +1 -1
  115. package/models/components/throttlestepresponsedto.d.ts +2 -2
  116. package/models/components/throttlestepresponsedto.d.ts.map +1 -1
  117. package/models/components/topicsubscriptionresponsedto.d.ts +8 -0
  118. package/models/components/topicsubscriptionresponsedto.d.ts.map +1 -1
  119. package/models/components/topicsubscriptionresponsedto.js +2 -0
  120. package/models/components/topicsubscriptionresponsedto.js.map +1 -1
  121. package/models/components/triggereventrequestdto.d.ts +2 -2
  122. package/models/components/workflowresponsedto.d.ts +2 -2
  123. package/models/components/workflowresponsedto.d.ts.map +1 -1
  124. package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts +6 -2
  125. package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts.map +1 -1
  126. package/models/operations/inboundwebhookscontrollerhandlewebhook.js +1 -1
  127. package/models/operations/inboundwebhookscontrollerhandlewebhook.js.map +1 -1
  128. package/models/operations/index.d.ts +1 -0
  129. package/models/operations/index.d.ts.map +1 -1
  130. package/models/operations/index.js +1 -0
  131. package/models/operations/index.js.map +1 -1
  132. package/models/operations/notificationscontrollerlistnotifications.d.ts +5 -0
  133. package/models/operations/notificationscontrollerlistnotifications.d.ts.map +1 -1
  134. package/models/operations/notificationscontrollerlistnotifications.js +1 -0
  135. package/models/operations/notificationscontrollerlistnotifications.js.map +1 -1
  136. package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts +5 -0
  137. package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts.map +1 -1
  138. package/models/operations/subscriberscontrollergetsubscriberpreferences.js +1 -0
  139. package/models/operations/subscriberscontrollergetsubscriberpreferences.js.map +1 -1
  140. package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts +5 -0
  141. package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts.map +1 -1
  142. package/models/operations/subscriberscontrollerlistsubscribertopics.js +1 -0
  143. package/models/operations/subscriberscontrollerlistsubscribertopics.js.map +1 -1
  144. package/models/operations/topicscontrollergettopicsubscription.d.ts +37 -0
  145. package/models/operations/topicscontrollergettopicsubscription.d.ts.map +1 -0
  146. package/models/operations/topicscontrollergettopicsubscription.js +72 -0
  147. package/models/operations/topicscontrollergettopicsubscription.js.map +1 -0
  148. package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts +5 -0
  149. package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts.map +1 -1
  150. package/models/operations/topicscontrollerlisttopicsubscriptions.js +1 -0
  151. package/models/operations/topicscontrollerlisttopicsubscriptions.js.map +1 -1
  152. package/models/operations/topicscontrollerupdatetopicsubscription.d.ts +2 -2
  153. package/models/operations/topicscontrollerupdatetopicsubscription.d.ts.map +1 -1
  154. package/models/operations/topicscontrollerupdatetopicsubscription.js +1 -1
  155. package/models/operations/topicscontrollerupdatetopicsubscription.js.map +1 -1
  156. package/package.json +1 -1
  157. package/sdk/channelconnections.d.ts +6 -6
  158. package/sdk/channelconnections.js +6 -6
  159. package/sdk/channelendpoints.d.ts +6 -6
  160. package/sdk/channelendpoints.js +6 -6
  161. package/sdk/preferences.d.ts +1 -1
  162. package/sdk/preferences.d.ts.map +1 -1
  163. package/sdk/preferences.js +2 -2
  164. package/sdk/preferences.js.map +1 -1
  165. package/sdk/sdk.d.ts +1 -1
  166. package/sdk/sdk.js +1 -1
  167. package/sdk/subscriptions.d.ts +8 -1
  168. package/sdk/subscriptions.d.ts.map +1 -1
  169. package/sdk/subscriptions.js +11 -1
  170. package/sdk/subscriptions.js.map +1 -1
  171. package/sources/json-development.json +954 -183
  172. package/src/funcs/channelConnectionsCreate.ts +1 -1
  173. package/src/funcs/channelConnectionsDelete.ts +1 -1
  174. package/src/funcs/channelConnectionsList.ts +2 -2
  175. package/src/funcs/channelConnectionsRetrieve.ts +1 -1
  176. package/src/funcs/channelConnectionsUpdate.ts +1 -1
  177. package/src/funcs/channelEndpointsCreate.ts +1 -1
  178. package/src/funcs/channelEndpointsDelete.ts +1 -1
  179. package/src/funcs/channelEndpointsList.ts +2 -2
  180. package/src/funcs/channelEndpointsRetrieve.ts +1 -1
  181. package/src/funcs/channelEndpointsUpdate.ts +1 -1
  182. package/src/funcs/notificationsList.ts +1 -0
  183. package/src/funcs/subscribersPreferencesList.ts +5 -17
  184. package/src/funcs/subscribersTopicsList.ts +1 -0
  185. package/src/funcs/topicsSubscriptionsGetSubscription.ts +242 -0
  186. package/src/funcs/topicsSubscriptionsList.ts +1 -0
  187. package/src/funcs/topicsSubscriptionsUpdate.ts +8 -9
  188. package/src/funcs/trigger.ts +1 -1
  189. package/src/lib/config.ts +4 -4
  190. package/src/lib/sdks.ts +2 -2
  191. package/src/models/components/activitynotificationjobresponsedto.ts +9 -19
  192. package/src/models/components/bulkupdatesubscriberpreferencesdto.ts +62 -0
  193. package/src/models/components/createchannelconnectionrequestdto.ts +51 -18
  194. package/src/models/components/createslackchannelendpointdto.ts +31 -13
  195. package/src/models/components/createtopicsubscriptionsrequestdto.ts +82 -0
  196. package/src/models/components/delaystepresponsedto.ts +1 -1
  197. package/src/models/components/emailstepresponsedto.ts +3 -3
  198. package/src/models/components/generatechatoauthurlrequestdto.ts +1 -1
  199. package/src/models/components/inappcontroldto.ts +1 -1
  200. package/src/models/components/inappstepresponsedto.ts +2 -2
  201. package/src/models/components/index.ts +1 -0
  202. package/src/models/components/messageactionresult.ts +2 -21
  203. package/src/models/components/messageresponsedto.ts +4 -48
  204. package/src/models/components/notificationfeeditemdto.ts +5 -0
  205. package/src/models/components/patchsubscriberpreferencesdto.ts +48 -0
  206. package/src/models/components/redirectdto.ts +1 -1
  207. package/src/models/components/subscriberworkflowpreferencedto.ts +5 -0
  208. package/src/models/components/subscriptiondetailsresponsedto.ts +58 -0
  209. package/src/models/components/subscriptiondto.ts +5 -0
  210. package/src/models/components/subscriptionresponsedto.ts +5 -0
  211. package/src/models/components/throttlestepresponsedto.ts +2 -2
  212. package/src/models/components/topicsubscriptionresponsedto.ts +10 -0
  213. package/src/models/components/triggereventrequestdto.ts +2 -2
  214. package/src/models/components/workflowresponsedto.ts +2 -2
  215. package/src/models/operations/inboundwebhookscontrollerhandlewebhook.ts +3 -3
  216. package/src/models/operations/index.ts +1 -0
  217. package/src/models/operations/notificationscontrollerlistnotifications.ts +6 -0
  218. package/src/models/operations/subscriberscontrollergetsubscriberpreferences.ts +6 -0
  219. package/src/models/operations/subscriberscontrollerlistsubscribertopics.ts +6 -0
  220. package/src/models/operations/topicscontrollergettopicsubscription.ts +96 -0
  221. package/src/models/operations/topicscontrollerlisttopicsubscriptions.ts +6 -0
  222. package/src/models/operations/topicscontrollerupdatetopicsubscription.ts +3 -3
  223. package/src/sdk/channelconnections.ts +6 -6
  224. package/src/sdk/channelendpoints.ts +6 -6
  225. package/src/sdk/preferences.ts +2 -6
  226. package/src/sdk/sdk.ts +1 -1
  227. package/src/sdk/subscriptions.ts +23 -1
  228. package/models/components/createtopicsubscriptionsresponsedto.d.ts +0 -24
  229. package/models/components/createtopicsubscriptionsresponsedto.d.ts.map +0 -1
  230. package/models/components/createtopicsubscriptionsresponsedto.js.map +0 -1
  231. package/models/components/steptypeenum.d.ts +0 -26
  232. package/models/components/steptypeenum.d.ts.map +0 -1
  233. package/models/components/steptypeenum.js +0 -60
  234. package/models/components/steptypeenum.js.map +0 -1
  235. package/models/components/uploadtranslationsrequestdto.d.ts +0 -34
  236. package/models/components/uploadtranslationsrequestdto.d.ts.map +0 -1
  237. package/models/components/uploadtranslationsrequestdto.js +0 -60
  238. package/models/components/uploadtranslationsrequestdto.js.map +0 -1
  239. package/src/models/components/createtopicsubscriptionsresponsedto.ts +0 -54
  240. package/src/models/components/steptypeenum.ts +0 -33
  241. package/src/models/components/uploadtranslationsrequestdto.ts +0 -62
  242. package/temp/example.ts +0 -5
@@ -17,7 +17,7 @@ import {
17
17
  /**
18
18
  * Rich context object with id and optional data
19
19
  */
20
- export type Two = {
20
+ export type CreateChannelConnectionRequestDtoContext2 = {
21
21
  id: string;
22
22
  /**
23
23
  * Optional additional context data
@@ -25,7 +25,9 @@ export type Two = {
25
25
  data?: { [k: string]: any } | undefined;
26
26
  };
27
27
 
28
- export type Context = Two | string;
28
+ export type CreateChannelConnectionRequestDtoContext =
29
+ | CreateChannelConnectionRequestDtoContext2
30
+ | string;
29
31
 
30
32
  export type CreateChannelConnectionRequestDto = {
31
33
  /**
@@ -36,7 +38,9 @@ export type CreateChannelConnectionRequestDto = {
36
38
  * The subscriber ID to link the channel connection to
37
39
  */
38
40
  subscriberId?: string | undefined;
39
- context?: { [k: string]: Two | string } | undefined;
41
+ context?:
42
+ | { [k: string]: CreateChannelConnectionRequestDtoContext2 | string }
43
+ | undefined;
40
44
  /**
41
45
  * The identifier of the integration to use for this channel connection.
42
46
  */
@@ -46,41 +50,66 @@ export type CreateChannelConnectionRequestDto = {
46
50
  };
47
51
 
48
52
  /** @internal */
49
- export type Two$Outbound = {
53
+ export type CreateChannelConnectionRequestDtoContext2$Outbound = {
50
54
  id: string;
51
55
  data?: { [k: string]: any } | undefined;
52
56
  };
53
57
 
54
58
  /** @internal */
55
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
56
- .object({
59
+ export const CreateChannelConnectionRequestDtoContext2$outboundSchema:
60
+ z.ZodType<
61
+ CreateChannelConnectionRequestDtoContext2$Outbound,
62
+ z.ZodTypeDef,
63
+ CreateChannelConnectionRequestDtoContext2
64
+ > = z.object({
57
65
  id: z.string(),
58
66
  data: z.record(z.any()).optional(),
59
67
  });
60
68
 
61
- export function twoToJSON(two: Two): string {
62
- return JSON.stringify(Two$outboundSchema.parse(two));
69
+ export function createChannelConnectionRequestDtoContext2ToJSON(
70
+ createChannelConnectionRequestDtoContext2:
71
+ CreateChannelConnectionRequestDtoContext2,
72
+ ): string {
73
+ return JSON.stringify(
74
+ CreateChannelConnectionRequestDtoContext2$outboundSchema.parse(
75
+ createChannelConnectionRequestDtoContext2,
76
+ ),
77
+ );
63
78
  }
64
79
 
65
80
  /** @internal */
66
- export type Context$Outbound = Two$Outbound | string;
81
+ export type CreateChannelConnectionRequestDtoContext$Outbound =
82
+ | CreateChannelConnectionRequestDtoContext2$Outbound
83
+ | string;
67
84
 
68
85
  /** @internal */
69
- export const Context$outboundSchema: z.ZodType<
70
- Context$Outbound,
86
+ export const CreateChannelConnectionRequestDtoContext$outboundSchema: z.ZodType<
87
+ CreateChannelConnectionRequestDtoContext$Outbound,
71
88
  z.ZodTypeDef,
72
- Context
73
- > = z.union([z.lazy(() => Two$outboundSchema), z.string()]);
89
+ CreateChannelConnectionRequestDtoContext
90
+ > = z.union([
91
+ z.lazy(() => CreateChannelConnectionRequestDtoContext2$outboundSchema),
92
+ z.string(),
93
+ ]);
74
94
 
75
- export function contextToJSON(context: Context): string {
76
- return JSON.stringify(Context$outboundSchema.parse(context));
95
+ export function createChannelConnectionRequestDtoContextToJSON(
96
+ createChannelConnectionRequestDtoContext:
97
+ CreateChannelConnectionRequestDtoContext,
98
+ ): string {
99
+ return JSON.stringify(
100
+ CreateChannelConnectionRequestDtoContext$outboundSchema.parse(
101
+ createChannelConnectionRequestDtoContext,
102
+ ),
103
+ );
77
104
  }
78
105
 
79
106
  /** @internal */
80
107
  export type CreateChannelConnectionRequestDto$Outbound = {
81
108
  identifier?: string | undefined;
82
109
  subscriberId?: string | undefined;
83
- context?: { [k: string]: Two$Outbound | string } | undefined;
110
+ context?: {
111
+ [k: string]: CreateChannelConnectionRequestDtoContext2$Outbound | string;
112
+ } | undefined;
84
113
  integrationIdentifier: string;
85
114
  workspace: WorkspaceDto$Outbound;
86
115
  auth: AuthDto$Outbound;
@@ -94,8 +123,12 @@ export const CreateChannelConnectionRequestDto$outboundSchema: z.ZodType<
94
123
  > = z.object({
95
124
  identifier: z.string().optional(),
96
125
  subscriberId: z.string().optional(),
97
- context: z.record(z.union([z.lazy(() => Two$outboundSchema), z.string()]))
98
- .optional(),
126
+ context: z.record(
127
+ z.union([
128
+ z.lazy(() => CreateChannelConnectionRequestDtoContext2$outboundSchema),
129
+ z.string(),
130
+ ]),
131
+ ).optional(),
99
132
  integrationIdentifier: z.string(),
100
133
  workspace: WorkspaceDto$outboundSchema,
101
134
  auth: AuthDto$outboundSchema,
@@ -12,7 +12,7 @@ import {
12
12
  /**
13
13
  * Rich context object with id and optional data
14
14
  */
15
- export type Context2 = {
15
+ export type CreateSlackChannelEndpointDtoContext2 = {
16
16
  id: string;
17
17
  /**
18
18
  * Optional additional context data
@@ -20,7 +20,9 @@ export type Context2 = {
20
20
  data?: { [k: string]: any } | undefined;
21
21
  };
22
22
 
23
- export type CreateSlackChannelEndpointDtoContext = Context2 | string;
23
+ export type CreateSlackChannelEndpointDtoContext =
24
+ | CreateSlackChannelEndpointDtoContext2
25
+ | string;
24
26
 
25
27
  export type CreateSlackChannelEndpointDto = {
26
28
  /**
@@ -31,7 +33,9 @@ export type CreateSlackChannelEndpointDto = {
31
33
  * The subscriber ID to which the channel endpoint is linked
32
34
  */
33
35
  subscriberId: string;
34
- context?: { [k: string]: Context2 | string } | undefined;
36
+ context?:
37
+ | { [k: string]: CreateSlackChannelEndpointDtoContext2 | string }
38
+ | undefined;
35
39
  /**
36
40
  * The identifier of the integration to use for this channel endpoint.
37
41
  */
@@ -51,28 +55,34 @@ export type CreateSlackChannelEndpointDto = {
51
55
  };
52
56
 
53
57
  /** @internal */
54
- export type Context2$Outbound = {
58
+ export type CreateSlackChannelEndpointDtoContext2$Outbound = {
55
59
  id: string;
56
60
  data?: { [k: string]: any } | undefined;
57
61
  };
58
62
 
59
63
  /** @internal */
60
- export const Context2$outboundSchema: z.ZodType<
61
- Context2$Outbound,
64
+ export const CreateSlackChannelEndpointDtoContext2$outboundSchema: z.ZodType<
65
+ CreateSlackChannelEndpointDtoContext2$Outbound,
62
66
  z.ZodTypeDef,
63
- Context2
67
+ CreateSlackChannelEndpointDtoContext2
64
68
  > = z.object({
65
69
  id: z.string(),
66
70
  data: z.record(z.any()).optional(),
67
71
  });
68
72
 
69
- export function context2ToJSON(context2: Context2): string {
70
- return JSON.stringify(Context2$outboundSchema.parse(context2));
73
+ export function createSlackChannelEndpointDtoContext2ToJSON(
74
+ createSlackChannelEndpointDtoContext2: CreateSlackChannelEndpointDtoContext2,
75
+ ): string {
76
+ return JSON.stringify(
77
+ CreateSlackChannelEndpointDtoContext2$outboundSchema.parse(
78
+ createSlackChannelEndpointDtoContext2,
79
+ ),
80
+ );
71
81
  }
72
82
 
73
83
  /** @internal */
74
84
  export type CreateSlackChannelEndpointDtoContext$Outbound =
75
- | Context2$Outbound
85
+ | CreateSlackChannelEndpointDtoContext2$Outbound
76
86
  | string;
77
87
 
78
88
  /** @internal */
@@ -80,7 +90,10 @@ export const CreateSlackChannelEndpointDtoContext$outboundSchema: z.ZodType<
80
90
  CreateSlackChannelEndpointDtoContext$Outbound,
81
91
  z.ZodTypeDef,
82
92
  CreateSlackChannelEndpointDtoContext
83
- > = z.union([z.lazy(() => Context2$outboundSchema), z.string()]);
93
+ > = z.union([
94
+ z.lazy(() => CreateSlackChannelEndpointDtoContext2$outboundSchema),
95
+ z.string(),
96
+ ]);
84
97
 
85
98
  export function createSlackChannelEndpointDtoContextToJSON(
86
99
  createSlackChannelEndpointDtoContext: CreateSlackChannelEndpointDtoContext,
@@ -96,7 +109,9 @@ export function createSlackChannelEndpointDtoContextToJSON(
96
109
  export type CreateSlackChannelEndpointDto$Outbound = {
97
110
  identifier?: string | undefined;
98
111
  subscriberId: string;
99
- context?: { [k: string]: Context2$Outbound | string } | undefined;
112
+ context?: {
113
+ [k: string]: CreateSlackChannelEndpointDtoContext2$Outbound | string;
114
+ } | undefined;
100
115
  integrationIdentifier: string;
101
116
  connectionIdentifier?: string | undefined;
102
117
  type: "slack_channel";
@@ -112,7 +127,10 @@ export const CreateSlackChannelEndpointDto$outboundSchema: z.ZodType<
112
127
  identifier: z.string().optional(),
113
128
  subscriberId: z.string(),
114
129
  context: z.record(
115
- z.union([z.lazy(() => Context2$outboundSchema), z.string()]),
130
+ z.union([
131
+ z.lazy(() => CreateSlackChannelEndpointDtoContext2$outboundSchema),
132
+ z.string(),
133
+ ]),
116
134
  ).optional(),
117
135
  integrationIdentifier: z.string(),
118
136
  connectionIdentifier: z.string().optional(),
@@ -21,6 +21,21 @@ import {
21
21
 
22
22
  export type Subscriptions = TopicSubscriberIdentifierDto | string;
23
23
 
24
+ /**
25
+ * Rich context object with id and optional data
26
+ */
27
+ export type CreateTopicSubscriptionsRequestDtoContext2 = {
28
+ id: string;
29
+ /**
30
+ * Optional additional context data
31
+ */
32
+ data?: { [k: string]: any } | undefined;
33
+ };
34
+
35
+ export type CreateTopicSubscriptionsRequestDtoContext =
36
+ | CreateTopicSubscriptionsRequestDtoContext2
37
+ | string;
38
+
24
39
  export type Preferences =
25
40
  | WorkflowPreferenceRequestDto
26
41
  | GroupPreferenceFilterDto
@@ -41,6 +56,9 @@ export type CreateTopicSubscriptionsRequestDto = {
41
56
  * The name of the topic
42
57
  */
43
58
  name?: string | undefined;
59
+ context?:
60
+ | { [k: string]: CreateTopicSubscriptionsRequestDtoContext2 | string }
61
+ | undefined;
44
62
  /**
45
63
  * The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object
46
64
  */
@@ -65,6 +83,61 @@ export function subscriptionsToJSON(subscriptions: Subscriptions): string {
65
83
  return JSON.stringify(Subscriptions$outboundSchema.parse(subscriptions));
66
84
  }
67
85
 
86
+ /** @internal */
87
+ export type CreateTopicSubscriptionsRequestDtoContext2$Outbound = {
88
+ id: string;
89
+ data?: { [k: string]: any } | undefined;
90
+ };
91
+
92
+ /** @internal */
93
+ export const CreateTopicSubscriptionsRequestDtoContext2$outboundSchema:
94
+ z.ZodType<
95
+ CreateTopicSubscriptionsRequestDtoContext2$Outbound,
96
+ z.ZodTypeDef,
97
+ CreateTopicSubscriptionsRequestDtoContext2
98
+ > = z.object({
99
+ id: z.string(),
100
+ data: z.record(z.any()).optional(),
101
+ });
102
+
103
+ export function createTopicSubscriptionsRequestDtoContext2ToJSON(
104
+ createTopicSubscriptionsRequestDtoContext2:
105
+ CreateTopicSubscriptionsRequestDtoContext2,
106
+ ): string {
107
+ return JSON.stringify(
108
+ CreateTopicSubscriptionsRequestDtoContext2$outboundSchema.parse(
109
+ createTopicSubscriptionsRequestDtoContext2,
110
+ ),
111
+ );
112
+ }
113
+
114
+ /** @internal */
115
+ export type CreateTopicSubscriptionsRequestDtoContext$Outbound =
116
+ | CreateTopicSubscriptionsRequestDtoContext2$Outbound
117
+ | string;
118
+
119
+ /** @internal */
120
+ export const CreateTopicSubscriptionsRequestDtoContext$outboundSchema:
121
+ z.ZodType<
122
+ CreateTopicSubscriptionsRequestDtoContext$Outbound,
123
+ z.ZodTypeDef,
124
+ CreateTopicSubscriptionsRequestDtoContext
125
+ > = z.union([
126
+ z.lazy(() => CreateTopicSubscriptionsRequestDtoContext2$outboundSchema),
127
+ z.string(),
128
+ ]);
129
+
130
+ export function createTopicSubscriptionsRequestDtoContextToJSON(
131
+ createTopicSubscriptionsRequestDtoContext:
132
+ CreateTopicSubscriptionsRequestDtoContext,
133
+ ): string {
134
+ return JSON.stringify(
135
+ CreateTopicSubscriptionsRequestDtoContext$outboundSchema.parse(
136
+ createTopicSubscriptionsRequestDtoContext,
137
+ ),
138
+ );
139
+ }
140
+
68
141
  /** @internal */
69
142
  export type Preferences$Outbound =
70
143
  | WorkflowPreferenceRequestDto$Outbound
@@ -93,6 +166,9 @@ export type CreateTopicSubscriptionsRequestDto$Outbound = {
93
166
  | Array<TopicSubscriberIdentifierDto$Outbound | string>
94
167
  | undefined;
95
168
  name?: string | undefined;
169
+ context?: {
170
+ [k: string]: CreateTopicSubscriptionsRequestDtoContext2$Outbound | string;
171
+ } | undefined;
96
172
  preferences?:
97
173
  | Array<
98
174
  | WorkflowPreferenceRequestDto$Outbound
@@ -113,6 +189,12 @@ export const CreateTopicSubscriptionsRequestDto$outboundSchema: z.ZodType<
113
189
  z.union([TopicSubscriberIdentifierDto$outboundSchema, z.string()]),
114
190
  ).optional(),
115
191
  name: z.string().optional(),
192
+ context: z.record(
193
+ z.union([
194
+ z.lazy(() => CreateTopicSubscriptionsRequestDtoContext2$outboundSchema),
195
+ z.string(),
196
+ ]),
197
+ ).optional(),
116
198
  preferences: z.array(
117
199
  z.union([
118
200
  WorkflowPreferenceRequestDto$outboundSchema,
@@ -64,7 +64,7 @@ export type DelayStepResponseDtoControlValues = {
64
64
  /**
65
65
  * Type of the delay. Currently only 'regular' is supported by the schema.
66
66
  */
67
- type?: DelayStepResponseDtoType | undefined;
67
+ type: DelayStepResponseDtoType;
68
68
  /**
69
69
  * Amount of time to delay.
70
70
  */
@@ -50,15 +50,15 @@ export type EmailStepResponseDtoControlValues = {
50
50
  /**
51
51
  * Body content of the email, either a valid Maily JSON object, or html string.
52
52
  */
53
- body?: string | undefined;
53
+ body: string;
54
54
  /**
55
55
  * Type of editor to use for the body.
56
56
  */
57
- editorType?: EmailStepResponseDtoEditorType | undefined;
57
+ editorType: EmailStepResponseDtoEditorType;
58
58
  /**
59
59
  * Disable sanitization of the output.
60
60
  */
61
- disableOutputSanitization?: boolean | undefined;
61
+ disableOutputSanitization: boolean;
62
62
  /**
63
63
  * Layout ID to use for the email. Null means no layout, undefined means default layout.
64
64
  */
@@ -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?:
@@ -33,7 +33,7 @@ export type InAppControlDto = {
33
33
  */
34
34
  subject?: string | undefined;
35
35
  /**
36
- * URL for an avatar image. Must be a valid URL or start with / or {{"{{"}} variable }}.
36
+ * URL for an avatar image. Must be a valid URL or start with / or {{ variable }}.
37
37
  */
38
38
  avatar?: string | undefined;
39
39
  /**
@@ -39,7 +39,7 @@ export type InAppStepResponseDtoControlValues = {
39
39
  */
40
40
  subject?: string | undefined;
41
41
  /**
42
- * URL for an avatar image. Must be a valid URL or start with / or {{"{{"}} variable }}.
42
+ * URL for an avatar image. Must be a valid URL or start with / or {{ variable }}.
43
43
  */
44
44
  avatar?: string | undefined;
45
45
  /**
@@ -57,7 +57,7 @@ export type InAppStepResponseDtoControlValues = {
57
57
  /**
58
58
  * Disable sanitization of the output.
59
59
  */
60
- disableOutputSanitization?: boolean | undefined;
60
+ disableOutputSanitization: boolean;
61
61
  /**
62
62
  * Additional data payload for the step.
63
63
  */
@@ -214,6 +214,7 @@ export * from "./subscriberpreferencesworkflowinfodto.js";
214
214
  export * from "./subscriberresponsedto.js";
215
215
  export * from "./subscriberresponsedtooptional.js";
216
216
  export * from "./subscriberworkflowpreferencedto.js";
217
+ export * from "./subscriptiondetailsresponsedto.js";
217
218
  export * from "./subscriptiondto.js";
218
219
  export * from "./subscriptionerrordto.js";
219
220
  export * from "./subscriptionpreferencedto.js";
@@ -11,43 +11,24 @@ import {
11
11
  ButtonTypeEnum$inboundSchema,
12
12
  } from "./buttontypeenum.js";
13
13
 
14
- /**
15
- * Payload of the action result
16
- */
17
- export type Payload = {};
18
-
19
14
  export type MessageActionResult = {
20
15
  /**
21
16
  * Payload of the action result
22
17
  */
23
- payload?: Payload | undefined;
18
+ payload?: { [k: string]: any } | undefined;
24
19
  /**
25
20
  * Type of button for the action result
26
21
  */
27
22
  type?: ButtonTypeEnum | undefined;
28
23
  };
29
24
 
30
- /** @internal */
31
- export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
32
- z.object({});
33
-
34
- export function payloadFromJSON(
35
- jsonString: string,
36
- ): SafeParseResult<Payload, SDKValidationError> {
37
- return safeParse(
38
- jsonString,
39
- (x) => Payload$inboundSchema.parse(JSON.parse(x)),
40
- `Failed to parse 'Payload' from JSON`,
41
- );
42
- }
43
-
44
25
  /** @internal */
45
26
  export const MessageActionResult$inboundSchema: z.ZodType<
46
27
  MessageActionResult,
47
28
  z.ZodTypeDef,
48
29
  unknown
49
30
  > = z.object({
50
- payload: z.lazy(() => Payload$inboundSchema).optional(),
31
+ payload: z.record(z.any()).optional(),
51
32
  type: ButtonTypeEnum$inboundSchema.optional(),
52
33
  });
53
34
 
@@ -31,16 +31,6 @@ import {
31
31
  */
32
32
  export type Content = Array<EmailBlock> | string;
33
33
 
34
- /**
35
- * The payload that was used to send the notification trigger
36
- */
37
- export type MessageResponseDtoPayload = {};
38
-
39
- /**
40
- * Provider specific overrides used when triggering the notification
41
- */
42
- export type MessageResponseDtoOverrides = {};
43
-
44
34
  export type MessageResponseDto = {
45
35
  /**
46
36
  * Unique identifier for the message
@@ -173,11 +163,11 @@ export type MessageResponseDto = {
173
163
  /**
174
164
  * The payload that was used to send the notification trigger
175
165
  */
176
- payload?: MessageResponseDtoPayload | undefined;
166
+ payload?: { [k: string]: any } | undefined;
177
167
  /**
178
168
  * Provider specific overrides used when triggering the notification
179
169
  */
180
- overrides?: MessageResponseDtoOverrides | undefined;
170
+ overrides?: { [k: string]: any } | undefined;
181
171
  /**
182
172
  * Context (single or multi) in which the message was sent
183
173
  */
@@ -198,40 +188,6 @@ export function contentFromJSON(
198
188
  );
199
189
  }
200
190
 
201
- /** @internal */
202
- export const MessageResponseDtoPayload$inboundSchema: z.ZodType<
203
- MessageResponseDtoPayload,
204
- z.ZodTypeDef,
205
- unknown
206
- > = z.object({});
207
-
208
- export function messageResponseDtoPayloadFromJSON(
209
- jsonString: string,
210
- ): SafeParseResult<MessageResponseDtoPayload, SDKValidationError> {
211
- return safeParse(
212
- jsonString,
213
- (x) => MessageResponseDtoPayload$inboundSchema.parse(JSON.parse(x)),
214
- `Failed to parse 'MessageResponseDtoPayload' from JSON`,
215
- );
216
- }
217
-
218
- /** @internal */
219
- export const MessageResponseDtoOverrides$inboundSchema: z.ZodType<
220
- MessageResponseDtoOverrides,
221
- z.ZodTypeDef,
222
- unknown
223
- > = z.object({});
224
-
225
- export function messageResponseDtoOverridesFromJSON(
226
- jsonString: string,
227
- ): SafeParseResult<MessageResponseDtoOverrides, SDKValidationError> {
228
- return safeParse(
229
- jsonString,
230
- (x) => MessageResponseDtoOverrides$inboundSchema.parse(JSON.parse(x)),
231
- `Failed to parse 'MessageResponseDtoOverrides' from JSON`,
232
- );
233
- }
234
-
235
191
  /** @internal */
236
192
  export const MessageResponseDto$inboundSchema: z.ZodType<
237
193
  MessageResponseDto,
@@ -271,8 +227,8 @@ export const MessageResponseDto$inboundSchema: z.ZodType<
271
227
  status: MessageStatusEnum$inboundSchema,
272
228
  errorId: z.string().optional(),
273
229
  errorText: z.string().optional(),
274
- payload: z.lazy(() => MessageResponseDtoPayload$inboundSchema).optional(),
275
- overrides: z.lazy(() => MessageResponseDtoOverrides$inboundSchema).optional(),
230
+ payload: z.record(z.any()).optional(),
231
+ overrides: z.record(z.any()).optional(),
276
232
  contextKeys: z.array(z.string()).optional(),
277
233
  }).transform((v) => {
278
234
  return remap$(v, {
@@ -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,
@@ -14,6 +14,19 @@ import {
14
14
  ScheduleDto$outboundSchema,
15
15
  } from "./scheduledto.js";
16
16
 
17
+ /**
18
+ * Rich context object with id and optional data
19
+ */
20
+ export type Two = {
21
+ id: string;
22
+ /**
23
+ * Optional additional context data
24
+ */
25
+ data?: { [k: string]: any } | undefined;
26
+ };
27
+
28
+ export type Context = Two | string;
29
+
17
30
  export type PatchSubscriberPreferencesDto = {
18
31
  /**
19
32
  * Channel-specific preference settings
@@ -27,13 +40,46 @@ export type PatchSubscriberPreferencesDto = {
27
40
  * Subscriber schedule
28
41
  */
29
42
  schedule?: ScheduleDto | undefined;
43
+ context?: { [k: string]: Two | string } | undefined;
30
44
  };
31
45
 
46
+ /** @internal */
47
+ export type Two$Outbound = {
48
+ id: string;
49
+ data?: { [k: string]: any } | undefined;
50
+ };
51
+
52
+ /** @internal */
53
+ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
54
+ .object({
55
+ id: z.string(),
56
+ data: z.record(z.any()).optional(),
57
+ });
58
+
59
+ export function twoToJSON(two: Two): string {
60
+ return JSON.stringify(Two$outboundSchema.parse(two));
61
+ }
62
+
63
+ /** @internal */
64
+ export type Context$Outbound = Two$Outbound | string;
65
+
66
+ /** @internal */
67
+ export const Context$outboundSchema: z.ZodType<
68
+ Context$Outbound,
69
+ z.ZodTypeDef,
70
+ Context
71
+ > = z.union([z.lazy(() => Two$outboundSchema), z.string()]);
72
+
73
+ export function contextToJSON(context: Context): string {
74
+ return JSON.stringify(Context$outboundSchema.parse(context));
75
+ }
76
+
32
77
  /** @internal */
33
78
  export type PatchSubscriberPreferencesDto$Outbound = {
34
79
  channels?: PatchPreferenceChannelsDto$Outbound | undefined;
35
80
  workflowId?: string | undefined;
36
81
  schedule?: ScheduleDto$Outbound | undefined;
82
+ context?: { [k: string]: Two$Outbound | string } | undefined;
37
83
  };
38
84
 
39
85
  /** @internal */
@@ -45,6 +91,8 @@ export const PatchSubscriberPreferencesDto$outboundSchema: z.ZodType<
45
91
  channels: PatchPreferenceChannelsDto$outboundSchema.optional(),
46
92
  workflowId: z.string().optional(),
47
93
  schedule: ScheduleDto$outboundSchema.optional(),
94
+ context: z.record(z.union([z.lazy(() => Two$outboundSchema), z.string()]))
95
+ .optional(),
48
96
  });
49
97
 
50
98
  export function patchSubscriberPreferencesDtoToJSON(
@@ -25,7 +25,7 @@ export type Target = ClosedEnum<typeof Target>;
25
25
 
26
26
  export type RedirectDto = {
27
27
  /**
28
- * URL for redirection. Must be a valid URL or start with / or {{"{{"}} variable }}.
28
+ * URL for redirection. Must be a valid URL or start with / or {{ variable }}.
29
29
  */
30
30
  url?: string | undefined;
31
31
  /**
@@ -36,6 +36,10 @@ export type SubscriberWorkflowPreferenceDto = {
36
36
  * Workflow information
37
37
  */
38
38
  workflow: SubscriberPreferencesWorkflowInfoDto;
39
+ /**
40
+ * Timestamp when the subscriber last updated their preference. Only present if subscriber explicitly set preferences.
41
+ */
42
+ updatedAt?: string | undefined;
39
43
  };
40
44
 
41
45
  /** @internal */
@@ -48,6 +52,7 @@ export const SubscriberWorkflowPreferenceDto$inboundSchema: z.ZodType<
48
52
  channels: SubscriberPreferenceChannels$inboundSchema,
49
53
  overrides: z.array(SubscriberPreferenceOverrideDto$inboundSchema),
50
54
  workflow: SubscriberPreferencesWorkflowInfoDto$inboundSchema,
55
+ updatedAt: z.string().optional(),
51
56
  });
52
57
 
53
58
  export function subscriberWorkflowPreferenceDtoFromJSON(