@rudderhq/shared 0.3.4-canary.9 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +27 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/organization-skill-reference.test.js +3 -3
- package/dist/organization-skill-reference.test.js.map +1 -1
- package/dist/project-mentions.d.ts +2 -1
- package/dist/project-mentions.d.ts.map +1 -1
- package/dist/project-mentions.js +26 -129
- package/dist/project-mentions.js.map +1 -1
- package/dist/project-mentions.test.js +54 -40
- package/dist/project-mentions.test.js.map +1 -1
- package/dist/types/agent.d.ts +1 -1
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/heartbeat.d.ts +1 -1
- package/dist/types/index.d.ts +30 -30
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/instance.d.ts +17 -0
- package/dist/types/instance.d.ts.map +1 -1
- package/dist/types/issue.d.ts +1 -41
- package/dist/types/issue.d.ts.map +1 -1
- package/dist/types/messenger.d.ts +4 -4
- package/dist/types/messenger.d.ts.map +1 -1
- package/dist/types/organization.d.ts +1 -2
- package/dist/types/organization.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/project.d.ts +1 -1
- package/dist/types/project.d.ts.map +1 -1
- package/dist/validators/adapter-skills.d.ts +20 -20
- package/dist/validators/agent.d.ts +28 -28
- package/dist/validators/agent.js +2 -2
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/automation.d.ts +86 -4
- package/dist/validators/automation.d.ts.map +1 -1
- package/dist/validators/automation.js +16 -7
- package/dist/validators/automation.js.map +1 -1
- package/dist/validators/automation.test.js +20 -0
- package/dist/validators/automation.test.js.map +1 -1
- package/dist/validators/calendar.d.ts +32 -32
- package/dist/validators/chat.d.ts +40 -2
- package/dist/validators/chat.d.ts.map +1 -1
- package/dist/validators/chat.js +5 -1
- package/dist/validators/chat.js.map +1 -1
- package/dist/validators/chat.test.js +18 -3
- package/dist/validators/chat.test.js.map +1 -1
- package/dist/validators/finance.d.ts +4 -4
- package/dist/validators/goal.d.ts +4 -4
- package/dist/validators/index.d.ts +25 -25
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +25 -25
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/instance.d.ts +281 -0
- package/dist/validators/instance.d.ts.map +1 -1
- package/dist/validators/instance.js +38 -0
- package/dist/validators/instance.js.map +1 -1
- package/dist/validators/instance.test.js +41 -1
- package/dist/validators/instance.test.js.map +1 -1
- package/dist/validators/issue.d.ts +0 -22
- package/dist/validators/issue.d.ts.map +1 -1
- package/dist/validators/issue.js +0 -13
- package/dist/validators/issue.js.map +1 -1
- package/dist/validators/organization-intelligence-profile.js +1 -1
- package/dist/validators/organization-intelligence-profile.js.map +1 -1
- package/dist/validators/organization-portability.d.ts +89 -89
- package/dist/validators/organization-skill.d.ts +150 -150
- package/dist/validators/organization.d.ts +12 -12
- package/dist/validators/plugin.d.ts +17 -17
- package/dist/validators/plugin.js +1 -1
- package/dist/validators/plugin.js.map +1 -1
- package/dist/validators/project.d.ts +26 -26
- package/dist/validators/project.test.js +2 -2
- package/dist/validators/project.test.js.map +1 -1
- package/dist/validators/resource.d.ts +20 -20
- package/dist/validators/secret.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
2
|
+
export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
3
3
|
projectId: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
4
4
|
goalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5
5
|
parentIssueId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
6
|
title: z.ZodString;
|
|
7
|
+
instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
8
|
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
9
|
assigneeAgentId: z.ZodString;
|
|
9
10
|
priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>>;
|
|
@@ -26,6 +27,7 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
26
27
|
notifyOnIssueCreated: boolean;
|
|
27
28
|
description?: string | null | undefined;
|
|
28
29
|
goalId?: string | null | undefined;
|
|
30
|
+
instructions?: string | null | undefined;
|
|
29
31
|
parentIssueId?: string | null | undefined;
|
|
30
32
|
}, {
|
|
31
33
|
title: string;
|
|
@@ -35,6 +37,7 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
35
37
|
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
36
38
|
projectId?: string | null | undefined;
|
|
37
39
|
goalId?: string | null | undefined;
|
|
40
|
+
instructions?: string | null | undefined;
|
|
38
41
|
parentIssueId?: string | null | undefined;
|
|
39
42
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
40
43
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -54,6 +57,7 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
54
57
|
notifyOnIssueCreated: boolean;
|
|
55
58
|
description?: string | null | undefined;
|
|
56
59
|
goalId?: string | null | undefined;
|
|
60
|
+
instructions?: string | null | undefined;
|
|
57
61
|
parentIssueId?: string | null | undefined;
|
|
58
62
|
}, {
|
|
59
63
|
title: string;
|
|
@@ -63,13 +67,46 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
63
67
|
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
64
68
|
projectId?: string | null | undefined;
|
|
65
69
|
goalId?: string | null | undefined;
|
|
70
|
+
instructions?: string | null | undefined;
|
|
66
71
|
parentIssueId?: string | null | undefined;
|
|
67
72
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
68
73
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
69
74
|
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
70
75
|
chatConversationId?: string | null | undefined;
|
|
71
76
|
notifyOnIssueCreated?: boolean | undefined;
|
|
72
|
-
}>, {
|
|
77
|
+
}>, Omit<{
|
|
78
|
+
status: "active" | "paused";
|
|
79
|
+
title: string;
|
|
80
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
81
|
+
assigneeAgentId: string;
|
|
82
|
+
projectId: string | null;
|
|
83
|
+
concurrencyPolicy: "coalesce_if_active" | "always_enqueue" | "skip_if_active";
|
|
84
|
+
catchUpPolicy: "skip_missed" | "enqueue_missed_with_cap";
|
|
85
|
+
outputMode: "track_issue" | "chat_output";
|
|
86
|
+
chatConversationId: string | null;
|
|
87
|
+
notifyOnIssueCreated: boolean;
|
|
88
|
+
description?: string | null | undefined;
|
|
89
|
+
goalId?: string | null | undefined;
|
|
90
|
+
instructions?: string | null | undefined;
|
|
91
|
+
parentIssueId?: string | null | undefined;
|
|
92
|
+
}, "instructions"> & {
|
|
93
|
+
description: string | null | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
title: string;
|
|
96
|
+
assigneeAgentId: string;
|
|
97
|
+
status?: "active" | "paused" | undefined;
|
|
98
|
+
description?: string | null | undefined;
|
|
99
|
+
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
100
|
+
projectId?: string | null | undefined;
|
|
101
|
+
goalId?: string | null | undefined;
|
|
102
|
+
instructions?: string | null | undefined;
|
|
103
|
+
parentIssueId?: string | null | undefined;
|
|
104
|
+
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
105
|
+
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
106
|
+
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
107
|
+
chatConversationId?: string | null | undefined;
|
|
108
|
+
notifyOnIssueCreated?: boolean | undefined;
|
|
109
|
+
}>, Omit<{
|
|
73
110
|
status: "active" | "paused";
|
|
74
111
|
title: string;
|
|
75
112
|
priority: "critical" | "high" | "medium" | "low";
|
|
@@ -82,7 +119,10 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
82
119
|
notifyOnIssueCreated: boolean;
|
|
83
120
|
description?: string | null | undefined;
|
|
84
121
|
goalId?: string | null | undefined;
|
|
122
|
+
instructions?: string | null | undefined;
|
|
85
123
|
parentIssueId?: string | null | undefined;
|
|
124
|
+
}, "instructions"> & {
|
|
125
|
+
description: string | null | undefined;
|
|
86
126
|
}, {
|
|
87
127
|
title: string;
|
|
88
128
|
assigneeAgentId: string;
|
|
@@ -91,6 +131,7 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
91
131
|
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
92
132
|
projectId?: string | null | undefined;
|
|
93
133
|
goalId?: string | null | undefined;
|
|
134
|
+
instructions?: string | null | undefined;
|
|
94
135
|
parentIssueId?: string | null | undefined;
|
|
95
136
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
96
137
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -99,11 +140,12 @@ export declare const createAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
99
140
|
notifyOnIssueCreated?: boolean | undefined;
|
|
100
141
|
}>;
|
|
101
142
|
export type CreateAutomation = z.infer<typeof createAutomationSchema>;
|
|
102
|
-
export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
143
|
+
export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
103
144
|
projectId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>>;
|
|
104
145
|
goalId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
105
146
|
parentIssueId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
106
147
|
title: z.ZodOptional<z.ZodString>;
|
|
148
|
+
instructions: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
107
149
|
description: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
108
150
|
assigneeAgentId: z.ZodOptional<z.ZodString>;
|
|
109
151
|
priority: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>>>;
|
|
@@ -121,6 +163,7 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
121
163
|
assigneeAgentId?: string | undefined;
|
|
122
164
|
projectId?: string | null | undefined;
|
|
123
165
|
goalId?: string | null | undefined;
|
|
166
|
+
instructions?: string | null | undefined;
|
|
124
167
|
parentIssueId?: string | null | undefined;
|
|
125
168
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
126
169
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -135,6 +178,7 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
135
178
|
assigneeAgentId?: string | undefined;
|
|
136
179
|
projectId?: string | null | undefined;
|
|
137
180
|
goalId?: string | null | undefined;
|
|
181
|
+
instructions?: string | null | undefined;
|
|
138
182
|
parentIssueId?: string | null | undefined;
|
|
139
183
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
140
184
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -149,6 +193,7 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
149
193
|
assigneeAgentId?: string | undefined;
|
|
150
194
|
projectId?: string | null | undefined;
|
|
151
195
|
goalId?: string | null | undefined;
|
|
196
|
+
instructions?: string | null | undefined;
|
|
152
197
|
parentIssueId?: string | null | undefined;
|
|
153
198
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
154
199
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -163,13 +208,46 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
163
208
|
assigneeAgentId?: string | undefined;
|
|
164
209
|
projectId?: string | null | undefined;
|
|
165
210
|
goalId?: string | null | undefined;
|
|
211
|
+
instructions?: string | null | undefined;
|
|
166
212
|
parentIssueId?: string | null | undefined;
|
|
167
213
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
168
214
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
169
215
|
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
170
216
|
chatConversationId?: string | null | undefined;
|
|
171
217
|
notifyOnIssueCreated?: boolean | undefined;
|
|
172
|
-
}>, {
|
|
218
|
+
}>, Omit<{
|
|
219
|
+
status?: "active" | "paused" | undefined;
|
|
220
|
+
title?: string | undefined;
|
|
221
|
+
description?: string | null | undefined;
|
|
222
|
+
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
223
|
+
assigneeAgentId?: string | undefined;
|
|
224
|
+
projectId?: string | null | undefined;
|
|
225
|
+
goalId?: string | null | undefined;
|
|
226
|
+
instructions?: string | null | undefined;
|
|
227
|
+
parentIssueId?: string | null | undefined;
|
|
228
|
+
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
229
|
+
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
230
|
+
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
231
|
+
chatConversationId?: string | null | undefined;
|
|
232
|
+
notifyOnIssueCreated?: boolean | undefined;
|
|
233
|
+
}, "instructions"> & {
|
|
234
|
+
description: string | null | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
status?: "active" | "paused" | undefined;
|
|
237
|
+
title?: string | undefined;
|
|
238
|
+
description?: string | null | undefined;
|
|
239
|
+
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
240
|
+
assigneeAgentId?: string | undefined;
|
|
241
|
+
projectId?: string | null | undefined;
|
|
242
|
+
goalId?: string | null | undefined;
|
|
243
|
+
instructions?: string | null | undefined;
|
|
244
|
+
parentIssueId?: string | null | undefined;
|
|
245
|
+
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
246
|
+
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
247
|
+
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
248
|
+
chatConversationId?: string | null | undefined;
|
|
249
|
+
notifyOnIssueCreated?: boolean | undefined;
|
|
250
|
+
}>, Omit<{
|
|
173
251
|
status?: "active" | "paused" | undefined;
|
|
174
252
|
title?: string | undefined;
|
|
175
253
|
description?: string | null | undefined;
|
|
@@ -177,12 +255,15 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
177
255
|
assigneeAgentId?: string | undefined;
|
|
178
256
|
projectId?: string | null | undefined;
|
|
179
257
|
goalId?: string | null | undefined;
|
|
258
|
+
instructions?: string | null | undefined;
|
|
180
259
|
parentIssueId?: string | null | undefined;
|
|
181
260
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
182
261
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
183
262
|
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
184
263
|
chatConversationId?: string | null | undefined;
|
|
185
264
|
notifyOnIssueCreated?: boolean | undefined;
|
|
265
|
+
}, "instructions"> & {
|
|
266
|
+
description: string | null | undefined;
|
|
186
267
|
}, {
|
|
187
268
|
status?: "active" | "paused" | undefined;
|
|
188
269
|
title?: string | undefined;
|
|
@@ -191,6 +272,7 @@ export declare const updateAutomationSchema: z.ZodEffects<z.ZodEffects<z.ZodObje
|
|
|
191
272
|
assigneeAgentId?: string | undefined;
|
|
192
273
|
projectId?: string | null | undefined;
|
|
193
274
|
goalId?: string | null | undefined;
|
|
275
|
+
instructions?: string | null | undefined;
|
|
194
276
|
parentIssueId?: string | null | undefined;
|
|
195
277
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
196
278
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.d.ts","sourceRoot":"","sources":["../../src/validators/automation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"automation.d.ts","sourceRoot":"","sources":["../../src/validators/automation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQsD,CAAC;AAE1F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQsD,CAAC;AAC1F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAOtE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mCAAmC,gDAAe,CAAC;AAChE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { AUTOMATION_CATCH_UP_POLICIES, AUTOMATION_CONCURRENCY_POLICIES, AUTOMATION_OUTPUT_MODES, AUTOMATION_STATUSES, AUTOMATION_TRIGGER_SIGNING_MODES, ISSUE_PRIORITIES, } from "../constants.js";
|
|
3
|
+
const automationTextFieldSchema = z.string().optional().nullable();
|
|
4
|
+
const automationBodyFieldsSchema = z.object({
|
|
4
5
|
projectId: z.string().uuid().optional().nullable().default(null),
|
|
5
6
|
goalId: z.string().uuid().optional().nullable(),
|
|
6
7
|
parentIssueId: z.string().uuid().optional().nullable(),
|
|
7
8
|
title: z.string().trim().min(1).max(200),
|
|
8
|
-
|
|
9
|
+
instructions: automationTextFieldSchema,
|
|
10
|
+
description: automationTextFieldSchema,
|
|
9
11
|
assigneeAgentId: z.string().uuid(),
|
|
10
12
|
priority: z.enum(ISSUE_PRIORITIES).optional().default("medium"),
|
|
11
13
|
status: z.enum(AUTOMATION_STATUSES).optional().default("active"),
|
|
@@ -15,12 +17,19 @@ const automationBodySchema = z.object({
|
|
|
15
17
|
chatConversationId: z.string().uuid().optional().nullable().default(null),
|
|
16
18
|
notifyOnIssueCreated: z.boolean().optional().default(false),
|
|
17
19
|
});
|
|
20
|
+
function normalizeAutomationInstructions(value) {
|
|
21
|
+
const { instructions, ...rest } = value;
|
|
22
|
+
return {
|
|
23
|
+
...rest,
|
|
24
|
+
description: instructions === undefined ? value.description : instructions,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
18
27
|
function normalizeAutomationNotifications(value) {
|
|
19
28
|
if (value.outputMode !== "chat_output" || !value.notifyOnIssueCreated)
|
|
20
29
|
return value;
|
|
21
30
|
return { ...value, notifyOnIssueCreated: false };
|
|
22
31
|
}
|
|
23
|
-
export const createAutomationSchema =
|
|
32
|
+
export const createAutomationSchema = automationBodyFieldsSchema.superRefine((value, ctx) => {
|
|
24
33
|
if (value.chatConversationId) {
|
|
25
34
|
ctx.addIssue({
|
|
26
35
|
code: z.ZodIssueCode.custom,
|
|
@@ -28,8 +37,8 @@ export const createAutomationSchema = automationBodySchema.superRefine((value, c
|
|
|
28
37
|
message: "Chat output creates an automation-owned conversation; existing chats cannot be selected",
|
|
29
38
|
});
|
|
30
39
|
}
|
|
31
|
-
}).transform(normalizeAutomationNotifications);
|
|
32
|
-
export const updateAutomationSchema =
|
|
40
|
+
}).transform(normalizeAutomationInstructions).transform(normalizeAutomationNotifications);
|
|
41
|
+
export const updateAutomationSchema = automationBodyFieldsSchema.partial().superRefine((value, ctx) => {
|
|
33
42
|
if (value.chatConversationId) {
|
|
34
43
|
ctx.addIssue({
|
|
35
44
|
code: z.ZodIssueCode.custom,
|
|
@@ -37,7 +46,7 @@ export const updateAutomationSchema = automationBodySchema.partial().superRefine
|
|
|
37
46
|
message: "Chat output creates an automation-owned conversation; existing chats cannot be selected",
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
|
-
}).transform(normalizeAutomationNotifications);
|
|
49
|
+
}).transform(normalizeAutomationInstructions).transform(normalizeAutomationNotifications);
|
|
41
50
|
const baseTriggerSchema = z.object({
|
|
42
51
|
label: z.string().trim().max(120).optional().nullable(),
|
|
43
52
|
enabled: z.boolean().optional().default(true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../src/validators/automation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../src/validators/automation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,uBAAuB,EACvB,mBAAmB,EACnB,gCAAgC,EAChC,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;AAEnE,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAChE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,aA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M,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -29,6 +29,26 @@ describe("automation validators", () => {
|
|
|
29
29
|
expect(parsed.data.notifyOnIssueCreated).toBe(true);
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
+
it("accepts instructions as the canonical automation run text", () => {
|
|
33
|
+
const parsed = createAutomationSchema.safeParse({
|
|
34
|
+
title: "Daily inbox sweep",
|
|
35
|
+
instructions: "Review inbox items and create follow-up issues.",
|
|
36
|
+
assigneeAgentId: "11111111-1111-4111-8111-111111111111",
|
|
37
|
+
});
|
|
38
|
+
expect(parsed.success).toBe(true);
|
|
39
|
+
if (parsed.success) {
|
|
40
|
+
expect(parsed.data.description).toBe("Review inbox items and create follow-up issues.");
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
it("keeps description as a legacy alias for automation run text", () => {
|
|
44
|
+
const parsed = updateAutomationSchema.safeParse({
|
|
45
|
+
description: "Review inbox items and create follow-up issues.",
|
|
46
|
+
});
|
|
47
|
+
expect(parsed.success).toBe(true);
|
|
48
|
+
if (parsed.success) {
|
|
49
|
+
expect(parsed.data.description).toBe("Review inbox items and create follow-up issues.");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
32
52
|
it("normalizes notification opt-in off for chat-output automations", () => {
|
|
33
53
|
const parsed = createAutomationSchema.safeParse({
|
|
34
54
|
...baseAutomationInput,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.test.js","sourceRoot":"","sources":["../../src/validators/automation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,mBAAmB,GAAG;IAC1B,KAAK,EAAE,mBAAmB;IAC1B,eAAe,EAAE,sCAAsC;IACvD,UAAU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,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC;gBACzD,MAAM,CAAC,gBAAgB,CAAC;oBACtB,IAAI,EAAE,CAAC,oBAAoB,CAAC;oBAC5B,OAAO,EAAE,yFAAyF;iBACnG,CAAC;aACH,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC;YAC9C,UAAU,EAAE,aAAa;YACzB,kBAAkB,EAAE,sCAAsC;SAC3D,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -100,9 +100,9 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
100
100
|
externalEtag: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
101
101
|
externalUpdatedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
title: string;
|
|
104
103
|
timezone: string;
|
|
105
104
|
ownerType: "agent" | "system" | "user";
|
|
105
|
+
title: string;
|
|
106
106
|
visibility: "private" | "full" | "busy_only";
|
|
107
107
|
eventKind: "human_event" | "agent_work_block" | "external_event" | "system_event";
|
|
108
108
|
eventStatus: "in_progress" | "cancelled" | "planned" | "actual" | "external" | "projected";
|
|
@@ -110,13 +110,13 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
110
110
|
endAt: Date;
|
|
111
111
|
allDay: boolean;
|
|
112
112
|
sourceMode: "manual" | "derived" | "imported";
|
|
113
|
-
description?: string | null | undefined;
|
|
114
|
-
projectId?: string | null | undefined;
|
|
115
|
-
goalId?: string | null | undefined;
|
|
116
113
|
externalProvider?: string | null | undefined;
|
|
117
114
|
ownerUserId?: string | null | undefined;
|
|
118
115
|
ownerAgentId?: string | null | undefined;
|
|
119
116
|
externalCalendarId?: string | null | undefined;
|
|
117
|
+
description?: string | null | undefined;
|
|
118
|
+
projectId?: string | null | undefined;
|
|
119
|
+
goalId?: string | null | undefined;
|
|
120
120
|
issueId?: string | null | undefined;
|
|
121
121
|
approvalId?: string | null | undefined;
|
|
122
122
|
sourceId?: string | null | undefined;
|
|
@@ -126,19 +126,19 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
126
126
|
externalEtag?: string | null | undefined;
|
|
127
127
|
externalUpdatedAt?: Date | null | undefined;
|
|
128
128
|
}, {
|
|
129
|
-
title: string;
|
|
130
129
|
ownerType: "agent" | "system" | "user";
|
|
130
|
+
title: string;
|
|
131
131
|
eventKind: "human_event" | "agent_work_block" | "external_event" | "system_event";
|
|
132
132
|
startAt: Date;
|
|
133
133
|
endAt: Date;
|
|
134
|
-
description?: string | null | undefined;
|
|
135
|
-
projectId?: string | null | undefined;
|
|
136
|
-
goalId?: string | null | undefined;
|
|
137
134
|
timezone?: string | undefined;
|
|
138
135
|
externalProvider?: string | null | undefined;
|
|
139
136
|
ownerUserId?: string | null | undefined;
|
|
140
137
|
ownerAgentId?: string | null | undefined;
|
|
141
138
|
externalCalendarId?: string | null | undefined;
|
|
139
|
+
description?: string | null | undefined;
|
|
140
|
+
projectId?: string | null | undefined;
|
|
141
|
+
goalId?: string | null | undefined;
|
|
142
142
|
issueId?: string | null | undefined;
|
|
143
143
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
144
144
|
approvalId?: string | null | undefined;
|
|
@@ -152,9 +152,9 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
152
152
|
externalEtag?: string | null | undefined;
|
|
153
153
|
externalUpdatedAt?: Date | null | undefined;
|
|
154
154
|
}>, {
|
|
155
|
-
title: string;
|
|
156
155
|
timezone: string;
|
|
157
156
|
ownerType: "agent" | "system" | "user";
|
|
157
|
+
title: string;
|
|
158
158
|
visibility: "private" | "full" | "busy_only";
|
|
159
159
|
eventKind: "human_event" | "agent_work_block" | "external_event" | "system_event";
|
|
160
160
|
eventStatus: "in_progress" | "cancelled" | "planned" | "actual" | "external" | "projected";
|
|
@@ -162,13 +162,13 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
162
162
|
endAt: Date;
|
|
163
163
|
allDay: boolean;
|
|
164
164
|
sourceMode: "manual" | "derived" | "imported";
|
|
165
|
-
description?: string | null | undefined;
|
|
166
|
-
projectId?: string | null | undefined;
|
|
167
|
-
goalId?: string | null | undefined;
|
|
168
165
|
externalProvider?: string | null | undefined;
|
|
169
166
|
ownerUserId?: string | null | undefined;
|
|
170
167
|
ownerAgentId?: string | null | undefined;
|
|
171
168
|
externalCalendarId?: string | null | undefined;
|
|
169
|
+
description?: string | null | undefined;
|
|
170
|
+
projectId?: string | null | undefined;
|
|
171
|
+
goalId?: string | null | undefined;
|
|
172
172
|
issueId?: string | null | undefined;
|
|
173
173
|
approvalId?: string | null | undefined;
|
|
174
174
|
sourceId?: string | null | undefined;
|
|
@@ -178,19 +178,19 @@ export declare const createCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
178
178
|
externalEtag?: string | null | undefined;
|
|
179
179
|
externalUpdatedAt?: Date | null | undefined;
|
|
180
180
|
}, {
|
|
181
|
-
title: string;
|
|
182
181
|
ownerType: "agent" | "system" | "user";
|
|
182
|
+
title: string;
|
|
183
183
|
eventKind: "human_event" | "agent_work_block" | "external_event" | "system_event";
|
|
184
184
|
startAt: Date;
|
|
185
185
|
endAt: Date;
|
|
186
|
-
description?: string | null | undefined;
|
|
187
|
-
projectId?: string | null | undefined;
|
|
188
|
-
goalId?: string | null | undefined;
|
|
189
186
|
timezone?: string | undefined;
|
|
190
187
|
externalProvider?: string | null | undefined;
|
|
191
188
|
ownerUserId?: string | null | undefined;
|
|
192
189
|
ownerAgentId?: string | null | undefined;
|
|
193
190
|
externalCalendarId?: string | null | undefined;
|
|
191
|
+
description?: string | null | undefined;
|
|
192
|
+
projectId?: string | null | undefined;
|
|
193
|
+
goalId?: string | null | undefined;
|
|
194
194
|
issueId?: string | null | undefined;
|
|
195
195
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
196
196
|
approvalId?: string | null | undefined;
|
|
@@ -232,16 +232,16 @@ export declare const updateCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
232
232
|
externalEtag: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
233
233
|
externalUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodDate>>>;
|
|
234
234
|
}, "strip", z.ZodTypeAny, {
|
|
235
|
-
title?: string | undefined;
|
|
236
|
-
description?: string | null | undefined;
|
|
237
|
-
projectId?: string | null | undefined;
|
|
238
|
-
goalId?: string | null | undefined;
|
|
239
235
|
timezone?: string | undefined;
|
|
240
236
|
externalProvider?: string | null | undefined;
|
|
241
237
|
ownerType?: "agent" | "system" | "user" | undefined;
|
|
242
238
|
ownerUserId?: string | null | undefined;
|
|
243
239
|
ownerAgentId?: string | null | undefined;
|
|
244
240
|
externalCalendarId?: string | null | undefined;
|
|
241
|
+
title?: string | undefined;
|
|
242
|
+
description?: string | null | undefined;
|
|
243
|
+
projectId?: string | null | undefined;
|
|
244
|
+
goalId?: string | null | undefined;
|
|
245
245
|
issueId?: string | null | undefined;
|
|
246
246
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
247
247
|
approvalId?: string | null | undefined;
|
|
@@ -258,16 +258,16 @@ export declare const updateCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
258
258
|
externalEtag?: string | null | undefined;
|
|
259
259
|
externalUpdatedAt?: Date | null | undefined;
|
|
260
260
|
}, {
|
|
261
|
-
title?: string | undefined;
|
|
262
|
-
description?: string | null | undefined;
|
|
263
|
-
projectId?: string | null | undefined;
|
|
264
|
-
goalId?: string | null | undefined;
|
|
265
261
|
timezone?: string | undefined;
|
|
266
262
|
externalProvider?: string | null | undefined;
|
|
267
263
|
ownerType?: "agent" | "system" | "user" | undefined;
|
|
268
264
|
ownerUserId?: string | null | undefined;
|
|
269
265
|
ownerAgentId?: string | null | undefined;
|
|
270
266
|
externalCalendarId?: string | null | undefined;
|
|
267
|
+
title?: string | undefined;
|
|
268
|
+
description?: string | null | undefined;
|
|
269
|
+
projectId?: string | null | undefined;
|
|
270
|
+
goalId?: string | null | undefined;
|
|
271
271
|
issueId?: string | null | undefined;
|
|
272
272
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
273
273
|
approvalId?: string | null | undefined;
|
|
@@ -284,16 +284,16 @@ export declare const updateCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
284
284
|
externalEtag?: string | null | undefined;
|
|
285
285
|
externalUpdatedAt?: Date | null | undefined;
|
|
286
286
|
}>, {
|
|
287
|
-
title?: string | undefined;
|
|
288
|
-
description?: string | null | undefined;
|
|
289
|
-
projectId?: string | null | undefined;
|
|
290
|
-
goalId?: string | null | undefined;
|
|
291
287
|
timezone?: string | undefined;
|
|
292
288
|
externalProvider?: string | null | undefined;
|
|
293
289
|
ownerType?: "agent" | "system" | "user" | undefined;
|
|
294
290
|
ownerUserId?: string | null | undefined;
|
|
295
291
|
ownerAgentId?: string | null | undefined;
|
|
296
292
|
externalCalendarId?: string | null | undefined;
|
|
293
|
+
title?: string | undefined;
|
|
294
|
+
description?: string | null | undefined;
|
|
295
|
+
projectId?: string | null | undefined;
|
|
296
|
+
goalId?: string | null | undefined;
|
|
297
297
|
issueId?: string | null | undefined;
|
|
298
298
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
299
299
|
approvalId?: string | null | undefined;
|
|
@@ -310,16 +310,16 @@ export declare const updateCalendarEventSchema: z.ZodEffects<z.ZodObject<{
|
|
|
310
310
|
externalEtag?: string | null | undefined;
|
|
311
311
|
externalUpdatedAt?: Date | null | undefined;
|
|
312
312
|
}, {
|
|
313
|
-
title?: string | undefined;
|
|
314
|
-
description?: string | null | undefined;
|
|
315
|
-
projectId?: string | null | undefined;
|
|
316
|
-
goalId?: string | null | undefined;
|
|
317
313
|
timezone?: string | undefined;
|
|
318
314
|
externalProvider?: string | null | undefined;
|
|
319
315
|
ownerType?: "agent" | "system" | "user" | undefined;
|
|
320
316
|
ownerUserId?: string | null | undefined;
|
|
321
317
|
ownerAgentId?: string | null | undefined;
|
|
322
318
|
externalCalendarId?: string | null | undefined;
|
|
319
|
+
title?: string | undefined;
|
|
320
|
+
description?: string | null | undefined;
|
|
321
|
+
projectId?: string | null | undefined;
|
|
322
|
+
goalId?: string | null | undefined;
|
|
323
323
|
issueId?: string | null | undefined;
|
|
324
324
|
visibility?: "private" | "full" | "busy_only" | undefined;
|
|
325
325
|
approvalId?: string | null | undefined;
|
|
@@ -487,8 +487,9 @@ export declare function chatAskUserRequestFromStructuredPayload(payload: unknown
|
|
|
487
487
|
allowFreeform?: boolean | undefined;
|
|
488
488
|
}[];
|
|
489
489
|
} | null;
|
|
490
|
-
export declare const chatAutomationCreateSchema: z.ZodObject<{
|
|
490
|
+
export declare const chatAutomationCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
491
491
|
title: z.ZodString;
|
|
492
|
+
instructions: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
492
493
|
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
493
494
|
projectId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
494
495
|
goalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -530,6 +531,7 @@ export declare const chatAutomationCreateSchema: z.ZodObject<{
|
|
|
530
531
|
description?: string | null | undefined;
|
|
531
532
|
projectId?: string | null | undefined;
|
|
532
533
|
goalId?: string | null | undefined;
|
|
534
|
+
instructions?: string | null | undefined;
|
|
533
535
|
parentIssueId?: string | null | undefined;
|
|
534
536
|
}, {
|
|
535
537
|
schedule: {
|
|
@@ -544,12 +546,49 @@ export declare const chatAutomationCreateSchema: z.ZodObject<{
|
|
|
544
546
|
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
545
547
|
projectId?: string | null | undefined;
|
|
546
548
|
goalId?: string | null | undefined;
|
|
549
|
+
instructions?: string | null | undefined;
|
|
550
|
+
parentIssueId?: string | null | undefined;
|
|
551
|
+
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
552
|
+
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
553
|
+
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
554
|
+
}>, {
|
|
555
|
+
instructions: string | null | undefined;
|
|
556
|
+
schedule: {
|
|
557
|
+
enabled: boolean;
|
|
558
|
+
cronExpression: string;
|
|
559
|
+
timezone: string;
|
|
560
|
+
label?: string | null | undefined;
|
|
561
|
+
};
|
|
562
|
+
status: "active" | "paused";
|
|
563
|
+
title: string;
|
|
564
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
565
|
+
concurrencyPolicy: "coalesce_if_active" | "always_enqueue" | "skip_if_active";
|
|
566
|
+
catchUpPolicy: "skip_missed" | "enqueue_missed_with_cap";
|
|
567
|
+
outputMode: "track_issue" | "chat_output";
|
|
568
|
+
projectId?: string | null | undefined;
|
|
569
|
+
goalId?: string | null | undefined;
|
|
570
|
+
parentIssueId?: string | null | undefined;
|
|
571
|
+
}, {
|
|
572
|
+
schedule: {
|
|
573
|
+
cronExpression: string;
|
|
574
|
+
timezone: string;
|
|
575
|
+
enabled?: boolean | undefined;
|
|
576
|
+
label?: string | null | undefined;
|
|
577
|
+
};
|
|
578
|
+
title: string;
|
|
579
|
+
status?: "active" | "paused" | undefined;
|
|
580
|
+
description?: string | null | undefined;
|
|
581
|
+
priority?: "critical" | "high" | "medium" | "low" | undefined;
|
|
582
|
+
projectId?: string | null | undefined;
|
|
583
|
+
goalId?: string | null | undefined;
|
|
584
|
+
instructions?: string | null | undefined;
|
|
547
585
|
parentIssueId?: string | null | undefined;
|
|
548
586
|
concurrencyPolicy?: "coalesce_if_active" | "always_enqueue" | "skip_if_active" | undefined;
|
|
549
587
|
catchUpPolicy?: "skip_missed" | "enqueue_missed_with_cap" | undefined;
|
|
550
588
|
outputMode?: "track_issue" | "chat_output" | undefined;
|
|
551
589
|
}>;
|
|
552
590
|
export declare function chatAutomationCreateFromStructuredPayload(payload: unknown): {
|
|
591
|
+
instructions: string | null | undefined;
|
|
553
592
|
schedule: {
|
|
554
593
|
enabled: boolean;
|
|
555
594
|
cronExpression: string;
|
|
@@ -562,7 +601,6 @@ export declare function chatAutomationCreateFromStructuredPayload(payload: unkno
|
|
|
562
601
|
concurrencyPolicy: "coalesce_if_active" | "always_enqueue" | "skip_if_active";
|
|
563
602
|
catchUpPolicy: "skip_missed" | "enqueue_missed_with_cap";
|
|
564
603
|
outputMode: "track_issue" | "chat_output";
|
|
565
|
-
description?: string | null | undefined;
|
|
566
604
|
projectId?: string | null | undefined;
|
|
567
605
|
goalId?: string | null | undefined;
|
|
568
606
|
parentIssueId?: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/validators/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,4BAA4B,+CAAqC,CAAC;AAC/E,eAAO,MAAM,2BAA2B,+CAAoC,CAAC;AAC7E,eAAO,MAAM,qBAAqB,4CAA6B,CAAC;AAChE,eAAO,MAAM,qBAAqB,4FAA6B,CAAC;AAChE,eAAO,MAAM,uBAAuB,2EAAgC,CAAC;AACrE,eAAO,MAAM,2BAA2B,0CAAoC,CAAC;AAE7E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAItC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;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,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
package/dist/validators/chat.js
CHANGED
|
@@ -123,6 +123,7 @@ export function chatAskUserRequestFromStructuredPayload(payload) {
|
|
|
123
123
|
}
|
|
124
124
|
export const chatAutomationCreateSchema = z.object({
|
|
125
125
|
title: z.string().trim().min(1).max(200),
|
|
126
|
+
instructions: z.string().trim().max(20_000).optional().nullable(),
|
|
126
127
|
description: z.string().trim().max(20_000).optional().nullable(),
|
|
127
128
|
projectId: z.string().uuid().optional().nullable(),
|
|
128
129
|
goalId: z.string().uuid().optional().nullable(),
|
|
@@ -138,7 +139,10 @@ export const chatAutomationCreateSchema = z.object({
|
|
|
138
139
|
label: z.string().trim().max(120).optional().nullable(),
|
|
139
140
|
enabled: z.boolean().optional().default(true),
|
|
140
141
|
}),
|
|
141
|
-
})
|
|
142
|
+
}).transform(({ description, instructions, ...value }) => ({
|
|
143
|
+
...value,
|
|
144
|
+
instructions: instructions === undefined ? description : instructions,
|
|
145
|
+
}));
|
|
142
146
|
export function chatAutomationCreateFromStructuredPayload(payload) {
|
|
143
147
|
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
144
148
|
return null;
|