@n8n/api-types 1.23.1 → 1.24.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 (67) hide show
  1. package/dist/agent-builder-interactive.d.ts +3 -3
  2. package/dist/agent-builder-interactive.js +5 -5
  3. package/dist/agent-builder-interactive.js.map +1 -1
  4. package/dist/agents/agent-files.constants.d.ts +4 -0
  5. package/dist/agents/agent-files.constants.js +8 -0
  6. package/dist/agents/agent-files.constants.js.map +1 -0
  7. package/dist/agents/agent-integration.schema.d.ts +1 -95
  8. package/dist/agents/agent-integration.schema.js +2 -23
  9. package/dist/agents/agent-integration.schema.js.map +1 -1
  10. package/dist/agents/agent-json-config.schema.d.ts +1567 -273
  11. package/dist/agents/agent-json-config.schema.js +111 -6
  12. package/dist/agents/agent-json-config.schema.js.map +1 -1
  13. package/dist/agents/agent-task.schema.d.ts +24 -0
  14. package/dist/agents/agent-task.schema.js +14 -0
  15. package/dist/agents/agent-task.schema.js.map +1 -0
  16. package/dist/agents/dto.d.ts +26 -4
  17. package/dist/agents/dto.js +20 -5
  18. package/dist/agents/dto.js.map +1 -1
  19. package/dist/agents/index.d.ts +3 -0
  20. package/dist/agents/index.js +3 -0
  21. package/dist/agents/index.js.map +1 -1
  22. package/dist/agents/provider-capabilities.d.ts +39 -0
  23. package/dist/agents/provider-capabilities.js +63 -0
  24. package/dist/agents/provider-capabilities.js.map +1 -0
  25. package/dist/agents/types.d.ts +19 -6
  26. package/dist/agents/types.js +1 -2
  27. package/dist/agents/types.js.map +1 -1
  28. package/dist/api-keys.d.ts +5 -0
  29. package/dist/build.tsbuildinfo +1 -1
  30. package/dist/chat-hub.d.ts +12 -12
  31. package/dist/dto/ai/ai-build-request.dto.d.ts +3 -3
  32. package/dist/dto/ai/ai-session-retrieval-request.dto.d.ts +2 -0
  33. package/dist/dto/ai/ai-session-retrieval-request.dto.js +1 -0
  34. package/dist/dto/ai/ai-session-retrieval-request.dto.js.map +1 -1
  35. package/dist/dto/credentials/credential-connection-status.d.ts +1 -0
  36. package/dist/dto/index.d.ts +2 -1
  37. package/dist/dto/index.js +6 -2
  38. package/dist/dto/index.js.map +1 -1
  39. package/dist/dto/instance-ai/instance-ai-rename-thread-request.dto.d.ts +1 -1
  40. package/dist/dto/oidc/config.dto.d.ts +1 -1
  41. package/dist/dto/packages/import-package-request.dto.d.ts +12 -0
  42. package/dist/dto/packages/import-package-request.dto.js +22 -0
  43. package/dist/dto/packages/import-package-request.dto.js.map +1 -0
  44. package/dist/dto/project/update-project.dto.d.ts +40 -0
  45. package/dist/dto/project/update-project.dto.js +11 -0
  46. package/dist/dto/project/update-project.dto.js.map +1 -1
  47. package/dist/dto/source-control/pull-work-folder-request.dto.d.ts +1 -1
  48. package/dist/dto/workflows/base-workflow.dto.d.ts +2 -2
  49. package/dist/dto/workflows/base-workflow.dto.js +22 -3
  50. package/dist/dto/workflows/base-workflow.dto.js.map +1 -1
  51. package/dist/dto/workflows/create-workflow.dto.d.ts +2 -2
  52. package/dist/dto/workflows/import-workflow-from-url.dto.d.ts +1 -1
  53. package/dist/dto/workflows/update-workflow.dto.d.ts +2 -2
  54. package/dist/index.d.ts +2 -1
  55. package/dist/index.js +9 -4
  56. package/dist/index.js.map +1 -1
  57. package/dist/schemas/breaking-changes.schema.d.ts +44 -44
  58. package/dist/schemas/credential-resolver.schema.d.ts +1 -0
  59. package/dist/schemas/credential-resolver.schema.js +2 -1
  60. package/dist/schemas/credential-resolver.schema.js.map +1 -1
  61. package/dist/schemas/instance-ai.schema.d.ts +54 -56
  62. package/dist/schemas/instance-ai.schema.js +1 -4
  63. package/dist/schemas/instance-ai.schema.js.map +1 -1
  64. package/dist/schemas/mcp.schema.d.ts +3 -0
  65. package/dist/schemas/mcp.schema.js +7 -0
  66. package/dist/schemas/mcp.schema.js.map +1 -0
  67. package/package.json +5 -5
@@ -33,17 +33,17 @@ export declare const askCredentialInputSchema: z.ZodObject<{
33
33
  purpose: z.ZodString;
34
34
  nodeType: z.ZodOptional<z.ZodString>;
35
35
  credentialType: z.ZodString;
36
- slot: z.ZodOptional<z.ZodString>;
36
+ credentialSlot: z.ZodOptional<z.ZodString>;
37
37
  }, "strip", z.ZodTypeAny, {
38
38
  purpose: string;
39
39
  credentialType: string;
40
40
  nodeType?: string | undefined;
41
- slot?: string | undefined;
41
+ credentialSlot?: string | undefined;
42
42
  }, {
43
43
  purpose: string;
44
44
  credentialType: string;
45
45
  nodeType?: string | undefined;
46
- slot?: string | undefined;
46
+ credentialSlot?: string | undefined;
47
47
  }>;
48
48
  export declare const askCredentialResumeSchema: z.ZodUnion<[z.ZodObject<{
49
49
  credentialId: z.ZodString;
@@ -28,10 +28,11 @@ exports.askCredentialInputSchema = zod_1.z.object({
28
28
  .string()
29
29
  .optional()
30
30
  .describe('The n8n node type requiring this credential, e.g. "n8n-nodes-base.slack"'),
31
- credentialType: zod_1.z
31
+ credentialType: zod_1.z.string().describe('The credential type name to request, e.g. "slackApi"'),
32
+ credentialSlot: zod_1.z
32
33
  .string()
33
- .describe('The credential type name to request for this slot, e.g. "slackApi". When the slot accepts multiple credential types, pick the single best match (typically the OAuth or first listed type).'),
34
- slot: zod_1.z.string().optional().describe('Credential slot name on the node, e.g. "slackApi"'),
34
+ .optional()
35
+ .describe('Credential key on node.credentials, e.g. "slackApi"'),
35
36
  });
36
37
  exports.askCredentialResumeSchema = zod_1.z.union([
37
38
  zod_1.z.object({ credentialId: zod_1.z.string(), credentialName: zod_1.z.string() }),
@@ -46,8 +47,7 @@ exports.askQuestionInputSchema = zod_1.z.object({
46
47
  question: zod_1.z.string().describe('The question to display to the user'),
47
48
  options: zod_1.z
48
49
  .array(exports.askQuestionOptionSchema)
49
- .min(1)
50
- .describe('Choices to present. With a single option the tool auto-resolves to that option without rendering a card.'),
50
+ .describe('Choices to present. Pass an empty array for an open-ended question (the card shows only a freeform input). With a single option the tool auto-resolves to that option without rendering a card.'),
51
51
  allowMultiple: zod_1.z
52
52
  .boolean()
53
53
  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CAAC,KAAK,CAAC;IAClD,0BAAkB;IAClB,iCAAyB;IACzB,+BAAuB;CACvB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const MAX_AGENT_FILE_SIZE_MB = 50;
2
+ export declare const MAX_AGENT_FILE_SIZE_BYTES: number;
3
+ export declare const MAX_AGENT_FILES_PER_UPLOAD = 10;
4
+ export declare const ALLOWED_AGENT_FILE_EXTENSIONS: readonly [".csv", ".md", ".markdown", ".pdf", ".txt"];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALLOWED_AGENT_FILE_EXTENSIONS = exports.MAX_AGENT_FILES_PER_UPLOAD = exports.MAX_AGENT_FILE_SIZE_BYTES = exports.MAX_AGENT_FILE_SIZE_MB = void 0;
4
+ exports.MAX_AGENT_FILE_SIZE_MB = 50;
5
+ exports.MAX_AGENT_FILE_SIZE_BYTES = exports.MAX_AGENT_FILE_SIZE_MB * 1024 * 1024;
6
+ exports.MAX_AGENT_FILES_PER_UPLOAD = 10;
7
+ exports.ALLOWED_AGENT_FILE_EXTENSIONS = ['.csv', '.md', '.markdown', '.pdf', '.txt'];
8
+ //# sourceMappingURL=agent-files.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-files.constants.js","sourceRoot":"","sources":["../../src/agents/agent-files.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAC5B,QAAA,yBAAyB,GAAG,8BAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AACjE,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAChC,QAAA,6BAA6B,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC"}
@@ -34,24 +34,7 @@ export declare const AgentIntegrationSettingsSchema: z.ZodUnion<[z.ZodEffects<z.
34
34
  allowedUsers?: string[] | undefined;
35
35
  }>, z.ZodUndefined]>;
36
36
  export type AgentIntegrationSettings = z.infer<typeof AgentIntegrationSettingsSchema>;
37
- export declare const AGENT_SCHEDULE_TRIGGER_TYPE = "schedule";
38
- export declare const AgentScheduleIntegrationSchema: z.ZodObject<{
39
- type: z.ZodLiteral<"schedule">;
40
- active: z.ZodBoolean;
41
- cronExpression: z.ZodString;
42
- wakeUpPrompt: z.ZodString;
43
- }, "strict", z.ZodTypeAny, {
44
- type: "schedule";
45
- active: boolean;
46
- cronExpression: string;
47
- wakeUpPrompt: string;
48
- }, {
49
- type: "schedule";
50
- active: boolean;
51
- cronExpression: string;
52
- wakeUpPrompt: string;
53
- }>;
54
- export declare const AgentCredentialIntegrationSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
37
+ export declare const AgentIntegrationSchema: z.ZodDiscriminatedUnion<"type", readonly [z.ZodObject<{
55
38
  type: z.ZodLiteral<"telegram">;
56
39
  credentialId: z.ZodString;
57
40
  } & {
@@ -104,81 +87,4 @@ export declare const AgentCredentialIntegrationSchema: z.ZodDiscriminatedUnion<"
104
87
  type: "linear";
105
88
  credentialId: string;
106
89
  }>]>;
107
- export declare const AgentIntegrationSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
108
- type: z.ZodLiteral<"telegram">;
109
- credentialId: z.ZodString;
110
- } & {
111
- settings: z.ZodOptional<z.ZodEffects<z.ZodObject<{
112
- accessMode: z.ZodEnum<["private", "public"]>;
113
- allowedUsers: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodString, "many">>, string[], string[] | undefined>;
114
- }, "strict", z.ZodTypeAny, {
115
- accessMode: "private" | "public";
116
- allowedUsers: string[];
117
- }, {
118
- accessMode: "private" | "public";
119
- allowedUsers?: string[] | undefined;
120
- }>, {
121
- accessMode: "private" | "public";
122
- allowedUsers: string[];
123
- }, {
124
- accessMode: "private" | "public";
125
- allowedUsers?: string[] | undefined;
126
- }>>;
127
- }, "strip", z.ZodTypeAny, {
128
- type: "telegram";
129
- credentialId: string;
130
- settings?: {
131
- accessMode: "private" | "public";
132
- allowedUsers: string[];
133
- } | undefined;
134
- }, {
135
- type: "telegram";
136
- credentialId: string;
137
- settings?: {
138
- accessMode: "private" | "public";
139
- allowedUsers?: string[] | undefined;
140
- } | undefined;
141
- }>, z.ZodObject<{
142
- type: z.ZodLiteral<"slack">;
143
- credentialId: z.ZodString;
144
- }, "strip", z.ZodTypeAny, {
145
- type: "slack";
146
- credentialId: string;
147
- }, {
148
- type: "slack";
149
- credentialId: string;
150
- }>, z.ZodObject<{
151
- type: z.ZodLiteral<"linear">;
152
- credentialId: z.ZodString;
153
- }, "strip", z.ZodTypeAny, {
154
- type: "linear";
155
- credentialId: string;
156
- }, {
157
- type: "linear";
158
- credentialId: string;
159
- }>, z.ZodObject<{
160
- type: z.ZodLiteral<"schedule">;
161
- active: z.ZodBoolean;
162
- cronExpression: z.ZodString;
163
- wakeUpPrompt: z.ZodString;
164
- }, "strict", z.ZodTypeAny, {
165
- type: "schedule";
166
- active: boolean;
167
- cronExpression: string;
168
- wakeUpPrompt: string;
169
- }, {
170
- type: "schedule";
171
- active: boolean;
172
- cronExpression: string;
173
- wakeUpPrompt: string;
174
- }>]>;
175
90
  export type AgentIntegrationConfig = z.infer<typeof AgentIntegrationSchema>;
176
- export type AgentScheduleIntegrationConfig = z.infer<typeof AgentScheduleIntegrationSchema>;
177
- export type AgentCredentialIntegrationConfig = Exclude<AgentIntegrationConfig, {
178
- type: typeof AGENT_SCHEDULE_TRIGGER_TYPE;
179
- }>;
180
- export type AgentScheduleIntegration = AgentScheduleIntegrationConfig;
181
- export type AgentCredentialIntegrationDto = AgentCredentialIntegrationConfig;
182
- export type AgentIntegration = AgentIntegrationConfig;
183
- export declare function isAgentScheduleIntegration(integration: AgentIntegrationConfig | null | undefined): integration is AgentScheduleIntegrationConfig;
184
- export declare function isAgentCredentialIntegration(integration: AgentIntegrationConfig | null | undefined): integration is AgentCredentialIntegrationConfig;
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgentIntegrationSchema = exports.AgentCredentialIntegrationSchema = exports.AgentScheduleIntegrationSchema = exports.AGENT_SCHEDULE_TRIGGER_TYPE = exports.AgentIntegrationSettingsSchema = exports.AgentTelegramSettingsSchema = exports.AGENT_TELEGRAM_ACCESS_MODES = void 0;
4
- exports.isAgentScheduleIntegration = isAgentScheduleIntegration;
5
- exports.isAgentCredentialIntegration = isAgentCredentialIntegration;
3
+ exports.AgentIntegrationSchema = exports.AgentIntegrationSettingsSchema = exports.AgentTelegramSettingsSchema = exports.AGENT_TELEGRAM_ACCESS_MODES = void 0;
6
4
  const zod_1 = require("zod");
7
5
  const createCredIntegrationSchema = (typeName, settingsSchema) => zod_1.z.object({
8
6
  type: zod_1.z.literal(typeName),
@@ -36,15 +34,6 @@ exports.AgentTelegramSettingsSchema = zod_1.z
36
34
  }
37
35
  });
38
36
  exports.AgentIntegrationSettingsSchema = zod_1.z.union([exports.AgentTelegramSettingsSchema, zod_1.z.undefined()]);
39
- exports.AGENT_SCHEDULE_TRIGGER_TYPE = 'schedule';
40
- exports.AgentScheduleIntegrationSchema = zod_1.z
41
- .object({
42
- type: zod_1.z.literal(exports.AGENT_SCHEDULE_TRIGGER_TYPE),
43
- active: zod_1.z.boolean(),
44
- cronExpression: zod_1.z.string().min(1, 'cronExpression is required'),
45
- wakeUpPrompt: zod_1.z.string().min(1, 'wakeUpPrompt is required'),
46
- })
47
- .strict();
48
37
  const credentialIntegrations = [
49
38
  createCredIntegrationSchema('telegram', exports.AgentTelegramSettingsSchema).extend({
50
39
  settings: exports.AgentTelegramSettingsSchema.optional(),
@@ -52,15 +41,5 @@ const credentialIntegrations = [
52
41
  createSimpleIntegrationSchema('slack'),
53
42
  createSimpleIntegrationSchema('linear'),
54
43
  ];
55
- exports.AgentCredentialIntegrationSchema = zod_1.z.discriminatedUnion('type', credentialIntegrations);
56
- exports.AgentIntegrationSchema = zod_1.z.discriminatedUnion('type', [
57
- ...credentialIntegrations,
58
- exports.AgentScheduleIntegrationSchema,
59
- ]);
60
- function isAgentScheduleIntegration(integration) {
61
- return integration?.type === exports.AGENT_SCHEDULE_TRIGGER_TYPE;
62
- }
63
- function isAgentCredentialIntegration(integration) {
64
- return (integration !== null && integration !== undefined && !isAgentScheduleIntegration(integration));
65
- }
44
+ exports.AgentIntegrationSchema = zod_1.z.discriminatedUnion('type', credentialIntegrations);
66
45
  //# sourceMappingURL=agent-integration.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-integration.schema.js","sourceRoot":"","sources":["../../src/agents/agent-integration.schema.ts"],"names":[],"mappings":";;;AAgGA,gEAIC;AAED,oEAMC;AA5GD,6BAAwB;AAExB,MAAM,2BAA2B,GAAG,CAInC,QAAe,EACf,cAAwB,EACvB,EAAE,CACH,OAAC,CAAC,MAAM,CAAC;IACR,IAAI,EAAE,OAAC,CAAC,OAAO,CAAQ,QAAQ,CAAC;IAChC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,QAAQ,EAAE,cAAc;CACxB,CAAC,CAAC;AAEJ,MAAM,6BAA6B,GAAG,CAAuB,QAAe,EAAE,EAAE,CAC/E,OAAC,CAAC,MAAM,CAAC;IACR,IAAI,EAAE,OAAC,CAAC,OAAO,CAAQ,QAAQ,CAAC;IAChC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC;AAES,QAAA,2BAA2B,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAE7D,QAAA,2BAA2B,GAAG,OAAC;KAC1C,MAAM,CAAC;IACP,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,mCAA2B,CAAC;IAC/C,YAAY,EAAE,OAAC;SACb,KAAK,CACL,OAAC;SACC,MAAM,EAAE;SACR,IAAI,EAAE;SACN,KAAK,CACL,mBAAmB,EACnB,2FAA2F,CAC3F,CACF;S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