@novu/api 3.15.1-rc.1 → 3.17.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 (97) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/funcs/environmentVariablesUpdate.d.ts +1 -1
  3. package/funcs/environmentVariablesUpdate.js +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/config.js.map +1 -1
  8. package/models/components/activitynotificationjobresponsedto.d.ts +4 -4
  9. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  10. package/models/components/activitynotificationjobresponsedto.js +6 -7
  11. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  12. package/models/components/chatorpushproviderenum.d.ts +1 -0
  13. package/models/components/chatorpushproviderenum.d.ts.map +1 -1
  14. package/models/components/chatorpushproviderenum.js +1 -0
  15. package/models/components/chatorpushproviderenum.js.map +1 -1
  16. package/models/components/createintegrationrequestdto.d.ts +25 -7
  17. package/models/components/createintegrationrequestdto.d.ts.map +1 -1
  18. package/models/components/createintegrationrequestdto.js +14 -4
  19. package/models/components/createintegrationrequestdto.js.map +1 -1
  20. package/models/components/createtelegramchatendpointdto.d.ts +75 -0
  21. package/models/components/createtelegramchatendpointdto.d.ts.map +1 -0
  22. package/models/components/createtelegramchatendpointdto.js +77 -0
  23. package/models/components/createtelegramchatendpointdto.js.map +1 -0
  24. package/models/components/credentialsdto.d.ts +24 -0
  25. package/models/components/credentialsdto.d.ts.map +1 -1
  26. package/models/components/credentialsdto.js +12 -0
  27. package/models/components/credentialsdto.js.map +1 -1
  28. package/models/components/getchannelconnectionresponsedto.d.ts +4 -0
  29. package/models/components/getchannelconnectionresponsedto.d.ts.map +1 -1
  30. package/models/components/getchannelconnectionresponsedto.js +4 -0
  31. package/models/components/getchannelconnectionresponsedto.js.map +1 -1
  32. package/models/components/getchannelendpointresponsedto.d.ts +10 -2
  33. package/models/components/getchannelendpointresponsedto.d.ts.map +1 -1
  34. package/models/components/getchannelendpointresponsedto.js +14 -0
  35. package/models/components/getchannelendpointresponsedto.js.map +1 -1
  36. package/models/components/index.d.ts +2 -0
  37. package/models/components/index.d.ts.map +1 -1
  38. package/models/components/index.js +2 -0
  39. package/models/components/index.js.map +1 -1
  40. package/models/components/integrationresponsedto.d.ts +23 -6
  41. package/models/components/integrationresponsedto.d.ts.map +1 -1
  42. package/models/components/integrationresponsedto.js +14 -4
  43. package/models/components/integrationresponsedto.js.map +1 -1
  44. package/models/components/msteamschannelendpointdto.d.ts +5 -0
  45. package/models/components/msteamschannelendpointdto.d.ts.map +1 -1
  46. package/models/components/msteamschannelendpointdto.js +11 -1
  47. package/models/components/msteamschannelendpointdto.js.map +1 -1
  48. package/models/components/msteamsuserendpointdto.d.ts +5 -0
  49. package/models/components/msteamsuserendpointdto.d.ts.map +1 -1
  50. package/models/components/msteamsuserendpointdto.js +10 -1
  51. package/models/components/msteamsuserendpointdto.js.map +1 -1
  52. package/models/components/providersidenum.d.ts +4 -0
  53. package/models/components/providersidenum.d.ts.map +1 -1
  54. package/models/components/providersidenum.js +4 -0
  55. package/models/components/providersidenum.js.map +1 -1
  56. package/models/components/subscriberchanneldto.d.ts +1 -0
  57. package/models/components/subscriberchanneldto.d.ts.map +1 -1
  58. package/models/components/subscriberchanneldto.js +1 -0
  59. package/models/components/subscriberchanneldto.js.map +1 -1
  60. package/models/components/telegramchatendpointdto.d.ts +20 -0
  61. package/models/components/telegramchatendpointdto.d.ts.map +1 -0
  62. package/models/components/telegramchatendpointdto.js +58 -0
  63. package/models/components/telegramchatendpointdto.js.map +1 -0
  64. package/models/components/testdomainrouteresponsedto.d.ts +3 -8
  65. package/models/components/testdomainrouteresponsedto.d.ts.map +1 -1
  66. package/models/components/testdomainrouteresponsedto.js +2 -8
  67. package/models/components/testdomainrouteresponsedto.js.map +1 -1
  68. package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts +4 -4
  69. package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts.map +1 -1
  70. package/models/operations/channelendpointscontrollercreatechannelendpoint.js +2 -0
  71. package/models/operations/channelendpointscontrollercreatechannelendpoint.js.map +1 -1
  72. package/package.json +1 -1
  73. package/sdk/environmentvariables.d.ts +1 -1
  74. package/sdk/environmentvariables.js +1 -1
  75. package/src/funcs/environmentVariablesUpdate.ts +1 -1
  76. package/src/lib/config.ts +3 -3
  77. package/src/models/components/activitynotificationjobresponsedto.ts +9 -19
  78. package/src/models/components/chatorpushproviderenum.ts +1 -0
  79. package/src/models/components/createintegrationrequestdto.ts +34 -9
  80. package/src/models/components/createtelegramchatendpointdto.ts +149 -0
  81. package/src/models/components/credentialsdto.ts +36 -0
  82. package/src/models/components/getchannelconnectionresponsedto.ts +4 -0
  83. package/src/models/components/getchannelendpointresponsedto.ts +31 -2
  84. package/src/models/components/index.ts +2 -0
  85. package/src/models/components/integrationresponsedto.ts +30 -8
  86. package/src/models/components/msteamschannelendpointdto.ts +21 -0
  87. package/src/models/components/msteamsuserendpointdto.ts +20 -0
  88. package/src/models/components/providersidenum.ts +4 -0
  89. package/src/models/components/subscriberchanneldto.ts +1 -0
  90. package/src/models/components/telegramchatendpointdto.ts +54 -0
  91. package/src/models/components/testdomainrouteresponsedto.ts +2 -21
  92. package/src/models/operations/channelendpointscontrollercreatechannelendpoint.ts +10 -4
  93. package/src/sdk/environmentvariables.ts +1 -1
  94. package/src/types/async.ts +8 -7
  95. package/types/async.d.ts.map +1 -1
  96. package/types/async.js +8 -7
  97. package/types/async.js.map +1 -1
@@ -0,0 +1,149 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ TelegramChatEndpointDto,
8
+ TelegramChatEndpointDto$Outbound,
9
+ TelegramChatEndpointDto$outboundSchema,
10
+ } from "./telegramchatendpointdto.js";
11
+
12
+ /**
13
+ * Rich context object with id and optional data
14
+ */
15
+ export type CreateTelegramChatEndpointDtoContext2 = {
16
+ id: string;
17
+ /**
18
+ * Optional additional context data
19
+ */
20
+ data?: { [k: string]: any } | undefined;
21
+ };
22
+
23
+ export type CreateTelegramChatEndpointDtoContext =
24
+ | CreateTelegramChatEndpointDtoContext2
25
+ | string;
26
+
27
+ export type CreateTelegramChatEndpointDto = {
28
+ /**
29
+ * The unique identifier for the channel endpoint. If not provided, one will be generated automatically.
30
+ */
31
+ identifier?: string | undefined;
32
+ /**
33
+ * The subscriber ID to which the channel endpoint is linked
34
+ */
35
+ subscriberId: string;
36
+ context?:
37
+ | { [k: string]: CreateTelegramChatEndpointDtoContext2 | string }
38
+ | undefined;
39
+ /**
40
+ * The identifier of the integration to use for this channel endpoint.
41
+ */
42
+ integrationIdentifier: string;
43
+ /**
44
+ * The identifier of the channel connection to use for this channel endpoint.
45
+ */
46
+ connectionIdentifier?: string | undefined;
47
+ /**
48
+ * Type of channel endpoint
49
+ */
50
+ type: "telegram_chat";
51
+ /**
52
+ * Telegram chat endpoint data
53
+ */
54
+ endpoint: TelegramChatEndpointDto;
55
+ };
56
+
57
+ /** @internal */
58
+ export type CreateTelegramChatEndpointDtoContext2$Outbound = {
59
+ id: string;
60
+ data?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const CreateTelegramChatEndpointDtoContext2$outboundSchema: z.ZodType<
65
+ CreateTelegramChatEndpointDtoContext2$Outbound,
66
+ z.ZodTypeDef,
67
+ CreateTelegramChatEndpointDtoContext2
68
+ > = z.object({
69
+ id: z.string(),
70
+ data: z.record(z.any()).optional(),
71
+ });
72
+
73
+ export function createTelegramChatEndpointDtoContext2ToJSON(
74
+ createTelegramChatEndpointDtoContext2: CreateTelegramChatEndpointDtoContext2,
75
+ ): string {
76
+ return JSON.stringify(
77
+ CreateTelegramChatEndpointDtoContext2$outboundSchema.parse(
78
+ createTelegramChatEndpointDtoContext2,
79
+ ),
80
+ );
81
+ }
82
+
83
+ /** @internal */
84
+ export type CreateTelegramChatEndpointDtoContext$Outbound =
85
+ | CreateTelegramChatEndpointDtoContext2$Outbound
86
+ | string;
87
+
88
+ /** @internal */
89
+ export const CreateTelegramChatEndpointDtoContext$outboundSchema: z.ZodType<
90
+ CreateTelegramChatEndpointDtoContext$Outbound,
91
+ z.ZodTypeDef,
92
+ CreateTelegramChatEndpointDtoContext
93
+ > = z.union([
94
+ z.lazy(() => CreateTelegramChatEndpointDtoContext2$outboundSchema),
95
+ z.string(),
96
+ ]);
97
+
98
+ export function createTelegramChatEndpointDtoContextToJSON(
99
+ createTelegramChatEndpointDtoContext: CreateTelegramChatEndpointDtoContext,
100
+ ): string {
101
+ return JSON.stringify(
102
+ CreateTelegramChatEndpointDtoContext$outboundSchema.parse(
103
+ createTelegramChatEndpointDtoContext,
104
+ ),
105
+ );
106
+ }
107
+
108
+ /** @internal */
109
+ export type CreateTelegramChatEndpointDto$Outbound = {
110
+ identifier?: string | undefined;
111
+ subscriberId: string;
112
+ context?: {
113
+ [k: string]: CreateTelegramChatEndpointDtoContext2$Outbound | string;
114
+ } | undefined;
115
+ integrationIdentifier: string;
116
+ connectionIdentifier?: string | undefined;
117
+ type: "telegram_chat";
118
+ endpoint: TelegramChatEndpointDto$Outbound;
119
+ };
120
+
121
+ /** @internal */
122
+ export const CreateTelegramChatEndpointDto$outboundSchema: z.ZodType<
123
+ CreateTelegramChatEndpointDto$Outbound,
124
+ z.ZodTypeDef,
125
+ CreateTelegramChatEndpointDto
126
+ > = z.object({
127
+ identifier: z.string().optional(),
128
+ subscriberId: z.string(),
129
+ context: z.record(
130
+ z.union([
131
+ z.lazy(() => CreateTelegramChatEndpointDtoContext2$outboundSchema),
132
+ z.string(),
133
+ ]),
134
+ ).optional(),
135
+ integrationIdentifier: z.string(),
136
+ connectionIdentifier: z.string().optional(),
137
+ type: z.literal("telegram_chat"),
138
+ endpoint: TelegramChatEndpointDto$outboundSchema,
139
+ });
140
+
141
+ export function createTelegramChatEndpointDtoToJSON(
142
+ createTelegramChatEndpointDto: CreateTelegramChatEndpointDto,
143
+ ): string {
144
+ return JSON.stringify(
145
+ CreateTelegramChatEndpointDto$outboundSchema.parse(
146
+ createTelegramChatEndpointDto,
147
+ ),
148
+ );
149
+ }
@@ -59,6 +59,24 @@ export type CredentialsDto = {
59
59
  appIOBaseUrl?: string | undefined;
60
60
  signingSecret?: string | undefined;
61
61
  outboundIntegrationId?: string | undefined;
62
+ useFromAddressOverride?: boolean | undefined;
63
+ fromAddressOverride?: string | undefined;
64
+ /**
65
+ * Agent default shared inbox slug prefix used in `{emailSlugPrefix}-{agentId}@<shared-domain>`. Only meaningful on the NovuAgent email integration.
66
+ */
67
+ emailSlugPrefix?: string | undefined;
68
+ /**
69
+ * Claude Managed Agents: ID of the Anthropic environment tied to this integration. Hydrated by the API at integration provisioning time.
70
+ */
71
+ externalEnvironmentId?: string | undefined;
72
+ /**
73
+ * Claude Managed Agents: ID of the Anthropic vault (`vlt_…`) tied to this integration. Hydrated by the API at integration provisioning time and used to push OAuth-completed MCP credentials to the per-vault credentials API.
74
+ */
75
+ externalVaultId?: string | undefined;
76
+ /**
77
+ * Claude Managed Agents: id of the Anthropic workspace used in console deep links. Defaults to `'default'` (the Default Workspace). Set this when the API key is scoped to a custom workspace (e.g. `wrkspc_…`).
78
+ */
79
+ externalWorkspaceId?: string | undefined;
62
80
  };
63
81
 
64
82
  /** @internal */
@@ -144,6 +162,12 @@ export const CredentialsDto$inboundSchema: z.ZodType<
144
162
  AppIOBaseUrl: z.string().optional(),
145
163
  signingSecret: z.string().optional(),
146
164
  outboundIntegrationId: z.string().optional(),
165
+ useFromAddressOverride: z.boolean().optional(),
166
+ fromAddressOverride: z.string().optional(),
167
+ emailSlugPrefix: z.string().optional(),
168
+ externalEnvironmentId: z.string().optional(),
169
+ externalVaultId: z.string().optional(),
170
+ externalWorkspaceId: z.string().optional(),
147
171
  }).transform((v) => {
148
172
  return remap$(v, {
149
173
  "AppIOBaseUrl": "appIOBaseUrl",
@@ -199,6 +223,12 @@ export type CredentialsDto$Outbound = {
199
223
  AppIOBaseUrl?: string | undefined;
200
224
  signingSecret?: string | undefined;
201
225
  outboundIntegrationId?: string | undefined;
226
+ useFromAddressOverride?: boolean | undefined;
227
+ fromAddressOverride?: string | undefined;
228
+ emailSlugPrefix?: string | undefined;
229
+ externalEnvironmentId?: string | undefined;
230
+ externalVaultId?: string | undefined;
231
+ externalWorkspaceId?: string | undefined;
202
232
  };
203
233
 
204
234
  /** @internal */
@@ -255,6 +285,12 @@ export const CredentialsDto$outboundSchema: z.ZodType<
255
285
  appIOBaseUrl: z.string().optional(),
256
286
  signingSecret: z.string().optional(),
257
287
  outboundIntegrationId: z.string().optional(),
288
+ useFromAddressOverride: z.boolean().optional(),
289
+ fromAddressOverride: z.string().optional(),
290
+ emailSlugPrefix: z.string().optional(),
291
+ externalEnvironmentId: z.string().optional(),
292
+ externalVaultId: z.string().optional(),
293
+ externalWorkspaceId: z.string().optional(),
258
294
  }).transform((v) => {
259
295
  return remap$(v, {
260
296
  appIOBaseUrl: "AppIOBaseUrl",
@@ -109,6 +109,10 @@ export const ProviderId = {
109
109
  WhatsappBusiness: "whatsapp-business",
110
110
  ChatWebhook: "chat-webhook",
111
111
  NovuSlack: "novu-slack",
112
+ Telegram: "telegram",
113
+ Anthropic: "anthropic",
114
+ NovuAnthropic: "novu-anthropic",
115
+ AnthropicAws: "anthropic-aws",
112
116
  } as const;
113
117
  /**
114
118
  * The provider identifier (e.g., sendgrid, twilio, slack, etc.).
@@ -7,6 +7,14 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { ClosedEnum } from "../../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ MsTeamsChannelEndpointDto,
12
+ MsTeamsChannelEndpointDto$inboundSchema,
13
+ } from "./msteamschannelendpointdto.js";
14
+ import {
15
+ MsTeamsUserEndpointDto,
16
+ MsTeamsUserEndpointDto$inboundSchema,
17
+ } from "./msteamsuserendpointdto.js";
10
18
  import {
11
19
  PhoneEndpointDto,
12
20
  PhoneEndpointDto$inboundSchema,
@@ -19,6 +27,10 @@ import {
19
27
  SlackUserEndpointDto,
20
28
  SlackUserEndpointDto$inboundSchema,
21
29
  } from "./slackuserendpointdto.js";
30
+ import {
31
+ TelegramChatEndpointDto,
32
+ TelegramChatEndpointDto$inboundSchema,
33
+ } from "./telegramchatendpointdto.js";
22
34
  import {
23
35
  WebhookEndpointDto,
24
36
  WebhookEndpointDto$inboundSchema,
@@ -125,6 +137,10 @@ export const GetChannelEndpointResponseDtoProviderId = {
125
137
  WhatsappBusiness: "whatsapp-business",
126
138
  ChatWebhook: "chat-webhook",
127
139
  NovuSlack: "novu-slack",
140
+ Telegram: "telegram",
141
+ Anthropic: "anthropic",
142
+ NovuAnthropic: "novu-anthropic",
143
+ AnthropicAws: "anthropic-aws",
128
144
  } as const;
129
145
  /**
130
146
  * The provider identifier (e.g., sendgrid, twilio, slack, etc.).
@@ -143,6 +159,7 @@ export const GetChannelEndpointResponseDtoType = {
143
159
  Phone: "phone",
144
160
  MsTeamsChannel: "ms_teams_channel",
145
161
  MsTeamsUser: "ms_teams_user",
162
+ TelegramChat: "telegram_chat",
146
163
  } as const;
147
164
  /**
148
165
  * Type of channel endpoint
@@ -155,10 +172,13 @@ export type GetChannelEndpointResponseDtoType = ClosedEnum<
155
172
  * Endpoint data specific to the channel type
156
173
  */
157
174
  export type Endpoint =
175
+ | MsTeamsChannelEndpointDto
158
176
  | SlackChannelEndpointDto
159
177
  | SlackUserEndpointDto
160
178
  | WebhookEndpointDto
161
- | PhoneEndpointDto;
179
+ | PhoneEndpointDto
180
+ | MsTeamsUserEndpointDto
181
+ | TelegramChatEndpointDto;
162
182
 
163
183
  export type GetChannelEndpointResponseDto = {
164
184
  /**
@@ -197,10 +217,13 @@ export type GetChannelEndpointResponseDto = {
197
217
  * Endpoint data specific to the channel type
198
218
  */
199
219
  endpoint:
220
+ | MsTeamsChannelEndpointDto
200
221
  | SlackChannelEndpointDto
201
222
  | SlackUserEndpointDto
202
223
  | WebhookEndpointDto
203
- | PhoneEndpointDto;
224
+ | PhoneEndpointDto
225
+ | MsTeamsUserEndpointDto
226
+ | TelegramChatEndpointDto;
204
227
  /**
205
228
  * The timestamp indicating when the channel endpoint was created, in ISO 8601 format.
206
229
  */
@@ -233,10 +256,13 @@ export const Endpoint$inboundSchema: z.ZodType<
233
256
  z.ZodTypeDef,
234
257
  unknown
235
258
  > = z.union([
259
+ MsTeamsChannelEndpointDto$inboundSchema,
236
260
  SlackChannelEndpointDto$inboundSchema,
237
261
  SlackUserEndpointDto$inboundSchema,
238
262
  WebhookEndpointDto$inboundSchema,
239
263
  PhoneEndpointDto$inboundSchema,
264
+ MsTeamsUserEndpointDto$inboundSchema,
265
+ TelegramChatEndpointDto$inboundSchema,
240
266
  ]);
241
267
 
242
268
  export function endpointFromJSON(
@@ -264,10 +290,13 @@ export const GetChannelEndpointResponseDto$inboundSchema: z.ZodType<
264
290
  contextKeys: z.array(z.string()),
265
291
  type: GetChannelEndpointResponseDtoType$inboundSchema,
266
292
  endpoint: z.union([
293
+ MsTeamsChannelEndpointDto$inboundSchema,
267
294
  SlackChannelEndpointDto$inboundSchema,
268
295
  SlackUserEndpointDto$inboundSchema,
269
296
  WebhookEndpointDto$inboundSchema,
270
297
  PhoneEndpointDto$inboundSchema,
298
+ MsTeamsUserEndpointDto$inboundSchema,
299
+ TelegramChatEndpointDto$inboundSchema,
271
300
  ]),
272
301
  createdAt: z.string(),
273
302
  updatedAt: z.string(),
@@ -56,6 +56,7 @@ export * from "./createslackchannelendpointdto.js";
56
56
  export * from "./createslackuserendpointdto.js";
57
57
  export * from "./createsubscriberrequestdto.js";
58
58
  export * from "./createsubscriptionsresponsedto.js";
59
+ export * from "./createtelegramchatendpointdto.js";
59
60
  export * from "./createtopicsubscriptionsrequestdto.js";
60
61
  export * from "./createtranslationrequestdto.js";
61
62
  export * from "./createupdatetopicrequestdto.js";
@@ -284,6 +285,7 @@ export * from "./syncactionenum.js";
284
285
  export * from "./syncedworkflowdto.js";
285
286
  export * from "./syncresultdto.js";
286
287
  export * from "./syncworkflowdto.js";
288
+ export * from "./telegramchatendpointdto.js";
287
289
  export * from "./tenantpayloaddto.js";
288
290
  export * from "./testdomainrouteagentresultdto.js";
289
291
  export * from "./testdomainroutedto.js";
@@ -19,7 +19,7 @@ import {
19
19
  import { StepFilterDto, StepFilterDto$inboundSchema } from "./stepfilterdto.js";
20
20
 
21
21
  /**
22
- * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
22
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS). Not set for agent-kind integrations.
23
23
  */
24
24
  export const IntegrationResponseDtoChannel = {
25
25
  InApp: "in_app",
@@ -29,12 +29,24 @@ export const IntegrationResponseDtoChannel = {
29
29
  Push: "push",
30
30
  } as const;
31
31
  /**
32
- * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
32
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS). Not set for agent-kind integrations.
33
33
  */
34
34
  export type IntegrationResponseDtoChannel = ClosedEnum<
35
35
  typeof IntegrationResponseDtoChannel
36
36
  >;
37
37
 
38
+ /**
39
+ * Distinguishes delivery integrations from agent-runtime integrations. Defaults to "delivery". Agent integrations do not have a channel.
40
+ */
41
+ export const Kind = {
42
+ Delivery: "delivery",
43
+ Agent: "agent",
44
+ } as const;
45
+ /**
46
+ * Distinguishes delivery integrations from agent-runtime integrations. Defaults to "delivery". Agent integrations do not have a channel.
47
+ */
48
+ export type Kind = ClosedEnum<typeof Kind>;
49
+
38
50
  export type IntegrationResponseDto = {
39
51
  /**
40
52
  * The unique identifier of the integration record in the database. This is automatically generated.
@@ -61,13 +73,17 @@ export type IntegrationResponseDto = {
61
73
  */
62
74
  providerId: string;
63
75
  /**
64
- * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
76
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS). Not set for agent-kind integrations.
77
+ */
78
+ channel?: IntegrationResponseDtoChannel | undefined;
79
+ /**
80
+ * Distinguishes delivery integrations from agent-runtime integrations. Defaults to "delivery". Agent integrations do not have a channel.
65
81
  */
66
- channel: IntegrationResponseDtoChannel;
82
+ kind?: Kind | undefined;
67
83
  /**
68
- * The credentials required for the integration to function, including API keys and other sensitive information.
84
+ * The decrypted credentials required for the integration to function (e.g. provider API keys, signing secrets). Only returned to dashboard/session-token callers; API-key authenticated callers receive the integration metadata without this field to avoid amplifying API-key leaks into provider-credential leaks.
69
85
  */
70
- credentials: CredentialsDto;
86
+ credentials?: CredentialsDto | undefined;
71
87
  /**
72
88
  * The configurations required for enabling the additional configurations of the integration.
73
89
  */
@@ -103,6 +119,11 @@ export const IntegrationResponseDtoChannel$inboundSchema: z.ZodNativeEnum<
103
119
  typeof IntegrationResponseDtoChannel
104
120
  > = z.nativeEnum(IntegrationResponseDtoChannel);
105
121
 
122
+ /** @internal */
123
+ export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
124
+ Kind,
125
+ );
126
+
106
127
  /** @internal */
107
128
  export const IntegrationResponseDto$inboundSchema: z.ZodType<
108
129
  IntegrationResponseDto,
@@ -115,8 +136,9 @@ export const IntegrationResponseDto$inboundSchema: z.ZodType<
115
136
  name: z.string(),
116
137
  identifier: z.string(),
117
138
  providerId: z.string(),
118
- channel: IntegrationResponseDtoChannel$inboundSchema,
119
- credentials: CredentialsDto$inboundSchema,
139
+ channel: IntegrationResponseDtoChannel$inboundSchema.optional(),
140
+ kind: Kind$inboundSchema.optional(),
141
+ credentials: CredentialsDto$inboundSchema.optional(),
120
142
  configurations: ConfigurationsDto$inboundSchema.optional(),
121
143
  active: z.boolean(),
122
144
  deleted: z.boolean(),
@@ -3,6 +3,9 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
6
9
 
7
10
  export type MsTeamsChannelEndpointDto = {
8
11
  /**
@@ -15,6 +18,15 @@ export type MsTeamsChannelEndpointDto = {
15
18
  channelId: string;
16
19
  };
17
20
 
21
+ /** @internal */
22
+ export const MsTeamsChannelEndpointDto$inboundSchema: z.ZodType<
23
+ MsTeamsChannelEndpointDto,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ teamId: z.string(),
28
+ channelId: z.string(),
29
+ });
18
30
  /** @internal */
19
31
  export type MsTeamsChannelEndpointDto$Outbound = {
20
32
  teamId: string;
@@ -38,3 +50,12 @@ export function msTeamsChannelEndpointDtoToJSON(
38
50
  MsTeamsChannelEndpointDto$outboundSchema.parse(msTeamsChannelEndpointDto),
39
51
  );
40
52
  }
53
+ export function msTeamsChannelEndpointDtoFromJSON(
54
+ jsonString: string,
55
+ ): SafeParseResult<MsTeamsChannelEndpointDto, SDKValidationError> {
56
+ return safeParse(
57
+ jsonString,
58
+ (x) => MsTeamsChannelEndpointDto$inboundSchema.parse(JSON.parse(x)),
59
+ `Failed to parse 'MsTeamsChannelEndpointDto' from JSON`,
60
+ );
61
+ }
@@ -3,6 +3,9 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
6
9
 
7
10
  export type MsTeamsUserEndpointDto = {
8
11
  /**
@@ -11,6 +14,14 @@ export type MsTeamsUserEndpointDto = {
11
14
  userId: string;
12
15
  };
13
16
 
17
+ /** @internal */
18
+ export const MsTeamsUserEndpointDto$inboundSchema: z.ZodType<
19
+ MsTeamsUserEndpointDto,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ userId: z.string(),
24
+ });
14
25
  /** @internal */
15
26
  export type MsTeamsUserEndpointDto$Outbound = {
16
27
  userId: string;
@@ -32,3 +43,12 @@ export function msTeamsUserEndpointDtoToJSON(
32
43
  MsTeamsUserEndpointDto$outboundSchema.parse(msTeamsUserEndpointDto),
33
44
  );
34
45
  }
46
+ export function msTeamsUserEndpointDtoFromJSON(
47
+ jsonString: string,
48
+ ): SafeParseResult<MsTeamsUserEndpointDto, SDKValidationError> {
49
+ return safeParse(
50
+ jsonString,
51
+ (x) => MsTeamsUserEndpointDto$inboundSchema.parse(JSON.parse(x)),
52
+ `Failed to parse 'MsTeamsUserEndpointDto' from JSON`,
53
+ );
54
+ }
@@ -89,6 +89,10 @@ export const ProvidersIdEnum = {
89
89
  WhatsappBusiness: "whatsapp-business",
90
90
  ChatWebhook: "chat-webhook",
91
91
  NovuSlack: "novu-slack",
92
+ Telegram: "telegram",
93
+ Anthropic: "anthropic",
94
+ NovuAnthropic: "novu-anthropic",
95
+ AnthropicAws: "anthropic-aws",
92
96
  } as const;
93
97
  /**
94
98
  * Provider ID of the job
@@ -26,6 +26,7 @@ export const SubscriberChannelDtoProviderId = {
26
26
  WhatsappBusiness: "whatsapp-business",
27
27
  ChatWebhook: "chat-webhook",
28
28
  NovuSlack: "novu-slack",
29
+ Telegram: "telegram",
29
30
  Fcm: "fcm",
30
31
  Apns: "apns",
31
32
  Expo: "expo",
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type TelegramChatEndpointDto = {
11
+ /**
12
+ * Telegram chat ID
13
+ */
14
+ chatId: string;
15
+ };
16
+
17
+ /** @internal */
18
+ export const TelegramChatEndpointDto$inboundSchema: z.ZodType<
19
+ TelegramChatEndpointDto,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ chatId: z.string(),
24
+ });
25
+ /** @internal */
26
+ export type TelegramChatEndpointDto$Outbound = {
27
+ chatId: string;
28
+ };
29
+
30
+ /** @internal */
31
+ export const TelegramChatEndpointDto$outboundSchema: z.ZodType<
32
+ TelegramChatEndpointDto$Outbound,
33
+ z.ZodTypeDef,
34
+ TelegramChatEndpointDto
35
+ > = z.object({
36
+ chatId: z.string(),
37
+ });
38
+
39
+ export function telegramChatEndpointDtoToJSON(
40
+ telegramChatEndpointDto: TelegramChatEndpointDto,
41
+ ): string {
42
+ return JSON.stringify(
43
+ TelegramChatEndpointDto$outboundSchema.parse(telegramChatEndpointDto),
44
+ );
45
+ }
46
+ export function telegramChatEndpointDtoFromJSON(
47
+ jsonString: string,
48
+ ): SafeParseResult<TelegramChatEndpointDto, SDKValidationError> {
49
+ return safeParse(
50
+ jsonString,
51
+ (x) => TelegramChatEndpointDto$inboundSchema.parse(JSON.parse(x)),
52
+ `Failed to parse 'TelegramChatEndpointDto' from JSON`,
53
+ );
54
+ }
@@ -30,11 +30,6 @@ export type TestDomainRouteResponseDtoType = ClosedEnum<
30
30
  typeof TestDomainRouteResponseDtoType
31
31
  >;
32
32
 
33
- /**
34
- * The outbound payload (dry-run only).
35
- */
36
- export type Payload = {};
37
-
38
33
  export type TestDomainRouteResponseDto = {
39
34
  matched: boolean;
40
35
  dryRun: boolean;
@@ -48,7 +43,7 @@ export type TestDomainRouteResponseDto = {
48
43
  /**
49
44
  * The outbound payload (dry-run only).
50
45
  */
51
- payload?: Payload | undefined;
46
+ payload?: { [k: string]: any } | undefined;
52
47
  webhook?: TestDomainRouteWebhookResultDto | undefined;
53
48
  agent?: TestDomainRouteAgentResultDto | undefined;
54
49
  };
@@ -62,20 +57,6 @@ export const TestDomainRouteResponseDtoType$inboundSchema: z.ZodNativeEnum<
62
57
  typeof TestDomainRouteResponseDtoType
63
58
  > = z.nativeEnum(TestDomainRouteResponseDtoType);
64
59
 
65
- /** @internal */
66
- export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
67
- z.object({});
68
-
69
- export function payloadFromJSON(
70
- jsonString: string,
71
- ): SafeParseResult<Payload, SDKValidationError> {
72
- return safeParse(
73
- jsonString,
74
- (x) => Payload$inboundSchema.parse(JSON.parse(x)),
75
- `Failed to parse 'Payload' from JSON`,
76
- );
77
- }
78
-
79
60
  /** @internal */
80
61
  export const TestDomainRouteResponseDto$inboundSchema: z.ZodType<
81
62
  TestDomainRouteResponseDto,
@@ -88,7 +69,7 @@ export const TestDomainRouteResponseDto$inboundSchema: z.ZodType<
88
69
  mxRecordConfigured: z.boolean().optional(),
89
70
  type: TestDomainRouteResponseDtoType$inboundSchema.optional(),
90
71
  wouldDeliverTo: z.string().optional(),
91
- payload: z.lazy(() => Payload$inboundSchema).optional(),
72
+ payload: z.record(z.any()).optional(),
92
73
  webhook: TestDomainRouteWebhookResultDto$inboundSchema.optional(),
93
74
  agent: TestDomainRouteAgentResultDto$inboundSchema.optional(),
94
75
  });
@@ -18,7 +18,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequestBody =
18
18
  | components.CreateWebhookEndpointDto
19
19
  | components.CreatePhoneEndpointDto
20
20
  | components.CreateMsTeamsChannelEndpointDto
21
- | components.CreateMsTeamsUserEndpointDto;
21
+ | components.CreateMsTeamsUserEndpointDto
22
+ | components.CreateTelegramChatEndpointDto;
22
23
 
23
24
  export type ChannelEndpointsControllerCreateChannelEndpointRequest = {
24
25
  /**
@@ -34,7 +35,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequest = {
34
35
  | components.CreateWebhookEndpointDto
35
36
  | components.CreatePhoneEndpointDto
36
37
  | components.CreateMsTeamsChannelEndpointDto
37
- | components.CreateMsTeamsUserEndpointDto;
38
+ | components.CreateMsTeamsUserEndpointDto
39
+ | components.CreateTelegramChatEndpointDto;
38
40
  };
39
41
 
40
42
  export type ChannelEndpointsControllerCreateChannelEndpointResponse = {
@@ -49,7 +51,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequestBody$Outbound
49
51
  | components.CreateWebhookEndpointDto$Outbound
50
52
  | components.CreatePhoneEndpointDto$Outbound
51
53
  | components.CreateMsTeamsChannelEndpointDto$Outbound
52
- | components.CreateMsTeamsUserEndpointDto$Outbound;
54
+ | components.CreateMsTeamsUserEndpointDto$Outbound
55
+ | components.CreateTelegramChatEndpointDto$Outbound;
53
56
 
54
57
  /** @internal */
55
58
  export const ChannelEndpointsControllerCreateChannelEndpointRequestBody$outboundSchema:
@@ -64,6 +67,7 @@ export const ChannelEndpointsControllerCreateChannelEndpointRequestBody$outbound
64
67
  components.CreatePhoneEndpointDto$outboundSchema,
65
68
  components.CreateMsTeamsChannelEndpointDto$outboundSchema,
66
69
  components.CreateMsTeamsUserEndpointDto$outboundSchema,
70
+ components.CreateTelegramChatEndpointDto$outboundSchema,
67
71
  ]);
68
72
 
69
73
  export function channelEndpointsControllerCreateChannelEndpointRequestBodyToJSON(
@@ -85,7 +89,8 @@ export type ChannelEndpointsControllerCreateChannelEndpointRequest$Outbound = {
85
89
  | components.CreateWebhookEndpointDto$Outbound
86
90
  | components.CreatePhoneEndpointDto$Outbound
87
91
  | components.CreateMsTeamsChannelEndpointDto$Outbound
88
- | components.CreateMsTeamsUserEndpointDto$Outbound;
92
+ | components.CreateMsTeamsUserEndpointDto$Outbound
93
+ | components.CreateTelegramChatEndpointDto$Outbound;
89
94
  };
90
95
 
91
96
  /** @internal */
@@ -103,6 +108,7 @@ export const ChannelEndpointsControllerCreateChannelEndpointRequest$outboundSche
103
108
  components.CreatePhoneEndpointDto$outboundSchema,
104
109
  components.CreateMsTeamsChannelEndpointDto$outboundSchema,
105
110
  components.CreateMsTeamsUserEndpointDto$outboundSchema,
111
+ components.CreateTelegramChatEndpointDto$outboundSchema,
106
112
  ]),
107
113
  }).transform((v) => {
108
114
  return remap$(v, {