@agentuity/core 2.0.1 → 2.0.2

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 (52) hide show
  1. package/AGENTS.md +15 -0
  2. package/dist/deprecation.d.ts +1 -1
  3. package/dist/deprecation.d.ts.map +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/services/auth/index.d.ts +1 -1
  9. package/dist/services/auth/index.d.ts.map +1 -1
  10. package/dist/services/index.d.ts +1 -0
  11. package/dist/services/index.d.ts.map +1 -1
  12. package/dist/services/index.js +1 -0
  13. package/dist/services/index.js.map +1 -1
  14. package/dist/services/queue/destinations.d.ts +10 -0
  15. package/dist/services/queue/destinations.d.ts.map +1 -1
  16. package/dist/services/queue/destinations.js.map +1 -1
  17. package/dist/services/queue/types.d.ts +24 -33
  18. package/dist/services/queue/types.d.ts.map +1 -1
  19. package/dist/services/queue/types.js +11 -5
  20. package/dist/services/queue/types.js.map +1 -1
  21. package/dist/services/webhook/types.d.ts +1 -0
  22. package/dist/services/webhook/types.d.ts.map +1 -1
  23. package/dist/services/webhook/types.js +1 -0
  24. package/dist/services/webhook/types.js.map +1 -1
  25. package/dist/services/workflow/api-reference.d.ts +4 -0
  26. package/dist/services/workflow/api-reference.d.ts.map +1 -0
  27. package/dist/services/workflow/api-reference.js +335 -0
  28. package/dist/services/workflow/api-reference.js.map +1 -0
  29. package/dist/services/workflow/index.d.ts +3 -0
  30. package/dist/services/workflow/index.d.ts.map +1 -0
  31. package/dist/services/workflow/index.js +3 -0
  32. package/dist/services/workflow/index.js.map +1 -0
  33. package/dist/services/workflow/service.d.ts +235 -0
  34. package/dist/services/workflow/service.d.ts.map +1 -0
  35. package/dist/services/workflow/service.js +553 -0
  36. package/dist/services/workflow/service.js.map +1 -0
  37. package/dist/services/workflow/types.d.ts +270 -0
  38. package/dist/services/workflow/types.d.ts.map +1 -0
  39. package/dist/services/workflow/types.js +174 -0
  40. package/dist/services/workflow/types.js.map +1 -0
  41. package/package.json +2 -2
  42. package/src/deprecation.ts +1 -1
  43. package/src/index.ts +1 -1
  44. package/src/services/auth/index.ts +1 -1
  45. package/src/services/index.ts +1 -0
  46. package/src/services/queue/destinations.ts +1 -1
  47. package/src/services/queue/types.ts +11 -5
  48. package/src/services/webhook/types.ts +1 -0
  49. package/src/services/workflow/api-reference.ts +350 -0
  50. package/src/services/workflow/index.ts +2 -0
  51. package/src/services/workflow/service.ts +633 -0
  52. package/src/services/workflow/types.ts +233 -0
@@ -0,0 +1,270 @@
1
+ import { z } from 'zod';
2
+ export declare const WorkflowSourceTypeSchema: z.ZodEnum<{
3
+ queue: "queue";
4
+ email: "email";
5
+ schedule: "schedule";
6
+ webhook: "webhook";
7
+ }>;
8
+ export type WorkflowSourceType = z.infer<typeof WorkflowSourceTypeSchema>;
9
+ export declare const WorkflowStatusSchema: z.ZodEnum<{
10
+ enabled: "enabled";
11
+ disabled: "disabled";
12
+ }>;
13
+ export type WorkflowStatus = z.infer<typeof WorkflowStatusSchema>;
14
+ export declare const WorkflowSchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ created_at: z.ZodString;
17
+ updated_at: z.ZodString;
18
+ created_by: z.ZodString;
19
+ org_id: z.ZodString;
20
+ name: z.ZodString;
21
+ description: z.ZodNullable<z.ZodString>;
22
+ source_type: z.ZodEnum<{
23
+ queue: "queue";
24
+ email: "email";
25
+ schedule: "schedule";
26
+ webhook: "webhook";
27
+ }>;
28
+ source_ref_id: z.ZodString;
29
+ source_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
+ status: z.ZodEnum<{
31
+ enabled: "enabled";
32
+ disabled: "disabled";
33
+ }>;
34
+ graph_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ execution_count: z.ZodOptional<z.ZodNumber>;
36
+ link: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ export type Workflow = z.infer<typeof WorkflowSchema>;
39
+ export declare const WorkflowExecutionSchema: z.ZodObject<{
40
+ id: z.ZodString;
41
+ workflow_id: z.ZodString;
42
+ status: z.ZodEnum<{
43
+ pending: "pending";
44
+ failed: "failed";
45
+ completed: "completed";
46
+ running: "running";
47
+ }>;
48
+ started_at: z.ZodNullable<z.ZodString>;
49
+ completed_at: z.ZodNullable<z.ZodString>;
50
+ error: z.ZodNullable<z.ZodString>;
51
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ node_id: z.ZodString;
53
+ node_type: z.ZodString;
54
+ status: z.ZodString;
55
+ started_at: z.ZodNullable<z.ZodString>;
56
+ completed_at: z.ZodNullable<z.ZodString>;
57
+ error: z.ZodNullable<z.ZodString>;
58
+ }, z.core.$strip>>>;
59
+ }, z.core.$strip>;
60
+ export type WorkflowExecution = z.infer<typeof WorkflowExecutionSchema>;
61
+ export declare const WorkflowDeliverySchema: z.ZodObject<{
62
+ id: z.ZodString;
63
+ workflow_id: z.ZodString;
64
+ execution_id: z.ZodString;
65
+ destination_type: z.ZodString;
66
+ destination_id: z.ZodString;
67
+ status: z.ZodEnum<{
68
+ success: "success";
69
+ pending: "pending";
70
+ failed: "failed";
71
+ }>;
72
+ sent_at: z.ZodNullable<z.ZodString>;
73
+ response: z.ZodNullable<z.ZodUnknown>;
74
+ error: z.ZodNullable<z.ZodString>;
75
+ }, z.core.$strip>;
76
+ export type WorkflowDelivery = z.infer<typeof WorkflowDeliverySchema>;
77
+ export declare const WorkflowActivitySchema: z.ZodObject<{
78
+ total_workflows: z.ZodNumber;
79
+ enabled_workflows: z.ZodNumber;
80
+ disabled_workflows: z.ZodNumber;
81
+ total_executions: z.ZodNumber;
82
+ succeeded_executions: z.ZodNumber;
83
+ failed_executions: z.ZodNumber;
84
+ last_activity_at: z.ZodNullable<z.ZodString>;
85
+ }, z.core.$strip>;
86
+ export type WorkflowActivity = z.infer<typeof WorkflowActivitySchema>;
87
+ export declare const CreateWorkflowRequestSchema: z.ZodObject<{
88
+ name: z.ZodString;
89
+ description: z.ZodOptional<z.ZodString>;
90
+ source_type: z.ZodEnum<{
91
+ queue: "queue";
92
+ email: "email";
93
+ schedule: "schedule";
94
+ webhook: "webhook";
95
+ }>;
96
+ source_ref_id: z.ZodString;
97
+ source_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
98
+ }, z.core.$strip>;
99
+ export type CreateWorkflowRequest = z.infer<typeof CreateWorkflowRequestSchema>;
100
+ export declare const UpdateWorkflowRequestSchema: z.ZodObject<{
101
+ name: z.ZodOptional<z.ZodString>;
102
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ status: z.ZodOptional<z.ZodEnum<{
104
+ enabled: "enabled";
105
+ disabled: "disabled";
106
+ }>>;
107
+ }, z.core.$strip>;
108
+ export type UpdateWorkflowRequest = z.infer<typeof UpdateWorkflowRequestSchema>;
109
+ export declare const UpdateWorkflowGraphRequestSchema: z.ZodObject<{
110
+ nodes: z.ZodArray<z.ZodObject<{
111
+ id: z.ZodString;
112
+ type: z.ZodOptional<z.ZodString>;
113
+ position: z.ZodOptional<z.ZodObject<{
114
+ x: z.ZodNumber;
115
+ y: z.ZodNumber;
116
+ }, z.core.$strip>>;
117
+ data: z.ZodOptional<z.ZodUnknown>;
118
+ }, z.core.$strip>>;
119
+ edges: z.ZodArray<z.ZodObject<{
120
+ id: z.ZodString;
121
+ source: z.ZodString;
122
+ target: z.ZodString;
123
+ sourceHandle: z.ZodOptional<z.ZodString>;
124
+ targetHandle: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>>;
126
+ }, z.core.$strip>;
127
+ export type UpdateWorkflowGraphRequest = z.infer<typeof UpdateWorkflowGraphRequestSchema>;
128
+ export declare const TestWorkflowRequestSchema: z.ZodObject<{
129
+ payload: z.ZodUnknown;
130
+ }, z.core.$strip>;
131
+ export type TestWorkflowRequest = z.infer<typeof TestWorkflowRequestSchema>;
132
+ export declare const TestWorkflowResultSchema: z.ZodObject<{
133
+ execution_id: z.ZodString;
134
+ status: z.ZodString;
135
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ node_id: z.ZodString;
137
+ node_type: z.ZodString;
138
+ status: z.ZodString;
139
+ output: z.ZodOptional<z.ZodUnknown>;
140
+ error: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strip>>>;
142
+ error: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strip>;
144
+ export type TestWorkflowResult = z.infer<typeof TestWorkflowResultSchema>;
145
+ export declare const ListWorkflowsRequestSchema: z.ZodObject<{
146
+ limit: z.ZodOptional<z.ZodNumber>;
147
+ offset: z.ZodOptional<z.ZodNumber>;
148
+ status: z.ZodOptional<z.ZodEnum<{
149
+ enabled: "enabled";
150
+ disabled: "disabled";
151
+ }>>;
152
+ source_type: z.ZodOptional<z.ZodEnum<{
153
+ queue: "queue";
154
+ email: "email";
155
+ schedule: "schedule";
156
+ webhook: "webhook";
157
+ }>>;
158
+ filter: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strip>;
160
+ export type ListWorkflowsRequest = z.infer<typeof ListWorkflowsRequestSchema>;
161
+ export declare const WorkflowListResultSchema: z.ZodObject<{
162
+ workflows: z.ZodArray<z.ZodObject<{
163
+ id: z.ZodString;
164
+ created_at: z.ZodString;
165
+ updated_at: z.ZodString;
166
+ created_by: z.ZodString;
167
+ org_id: z.ZodString;
168
+ name: z.ZodString;
169
+ description: z.ZodNullable<z.ZodString>;
170
+ source_type: z.ZodEnum<{
171
+ queue: "queue";
172
+ email: "email";
173
+ schedule: "schedule";
174
+ webhook: "webhook";
175
+ }>;
176
+ source_ref_id: z.ZodString;
177
+ source_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
178
+ status: z.ZodEnum<{
179
+ enabled: "enabled";
180
+ disabled: "disabled";
181
+ }>;
182
+ graph_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
183
+ execution_count: z.ZodOptional<z.ZodNumber>;
184
+ link: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strip>>;
186
+ total: z.ZodNumber;
187
+ }, z.core.$strip>;
188
+ export type WorkflowListResult = z.infer<typeof WorkflowListResultSchema>;
189
+ export declare const WorkflowGetResultSchema: z.ZodObject<{
190
+ workflow: z.ZodObject<{
191
+ id: z.ZodString;
192
+ created_at: z.ZodString;
193
+ updated_at: z.ZodString;
194
+ created_by: z.ZodString;
195
+ org_id: z.ZodString;
196
+ name: z.ZodString;
197
+ description: z.ZodNullable<z.ZodString>;
198
+ source_type: z.ZodEnum<{
199
+ queue: "queue";
200
+ email: "email";
201
+ schedule: "schedule";
202
+ webhook: "webhook";
203
+ }>;
204
+ source_ref_id: z.ZodString;
205
+ source_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
206
+ status: z.ZodEnum<{
207
+ enabled: "enabled";
208
+ disabled: "disabled";
209
+ }>;
210
+ graph_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
+ execution_count: z.ZodOptional<z.ZodNumber>;
212
+ link: z.ZodOptional<z.ZodString>;
213
+ }, z.core.$strip>;
214
+ }, z.core.$strip>;
215
+ export type WorkflowGetResult = z.infer<typeof WorkflowGetResultSchema>;
216
+ export declare const WorkflowCreateResultSchema: z.ZodObject<{
217
+ workflow: z.ZodObject<{
218
+ id: z.ZodString;
219
+ created_at: z.ZodString;
220
+ updated_at: z.ZodString;
221
+ created_by: z.ZodString;
222
+ org_id: z.ZodString;
223
+ name: z.ZodString;
224
+ description: z.ZodNullable<z.ZodString>;
225
+ source_type: z.ZodEnum<{
226
+ queue: "queue";
227
+ email: "email";
228
+ schedule: "schedule";
229
+ webhook: "webhook";
230
+ }>;
231
+ source_ref_id: z.ZodString;
232
+ source_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
233
+ status: z.ZodEnum<{
234
+ enabled: "enabled";
235
+ disabled: "disabled";
236
+ }>;
237
+ graph_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
238
+ execution_count: z.ZodOptional<z.ZodNumber>;
239
+ link: z.ZodOptional<z.ZodString>;
240
+ }, z.core.$strip>;
241
+ }, z.core.$strip>;
242
+ export type WorkflowCreateResult = z.infer<typeof WorkflowCreateResultSchema>;
243
+ export declare const WorkflowUpdateResultSchema: z.ZodObject<{
244
+ workflow: z.ZodObject<{
245
+ id: z.ZodString;
246
+ created_at: z.ZodString;
247
+ updated_at: z.ZodString;
248
+ created_by: z.ZodString;
249
+ org_id: z.ZodString;
250
+ name: z.ZodString;
251
+ description: z.ZodNullable<z.ZodString>;
252
+ source_type: z.ZodEnum<{
253
+ queue: "queue";
254
+ email: "email";
255
+ schedule: "schedule";
256
+ webhook: "webhook";
257
+ }>;
258
+ source_ref_id: z.ZodString;
259
+ source_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
260
+ status: z.ZodEnum<{
261
+ enabled: "enabled";
262
+ disabled: "disabled";
263
+ }>;
264
+ graph_json: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
265
+ execution_count: z.ZodOptional<z.ZodNumber>;
266
+ link: z.ZodOptional<z.ZodString>;
267
+ }, z.core.$strip>;
268
+ }, z.core.$strip>;
269
+ export type WorkflowUpdateResult = z.infer<typeof WorkflowUpdateResultSchema>;
270
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/workflow/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;;EAEsB,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,oBAAoB;;;EAEO,CAAC;AAEzC,MAAM,MAAM,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M,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAQI,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKI,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;iBAIa,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;iBAII,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;iBAII,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,174 @@
1
+ import { z } from 'zod';
2
+ export const WorkflowSourceTypeSchema = z
3
+ .enum(['email', 'queue', 'webhook', 'schedule'])
4
+ .describe('The type of source that triggers the workflow');
5
+ export const WorkflowStatusSchema = z
6
+ .enum(['enabled', 'disabled'])
7
+ .describe('The status of the workflow');
8
+ export const WorkflowSchema = z
9
+ .object({
10
+ id: z.string().describe('Unique identifier for the workflow (prefixed with wf_)'),
11
+ created_at: z.string().describe('ISO 8601 timestamp when the workflow was created'),
12
+ updated_at: z.string().describe('ISO 8601 timestamp when the workflow was last updated'),
13
+ created_by: z.string().describe('ID of the user who created the workflow'),
14
+ org_id: z.string().describe('Organization ID that owns the workflow'),
15
+ name: z.string().describe('Human-readable name for the workflow'),
16
+ description: z.string().nullable().describe('Optional description of the workflow'),
17
+ source_type: WorkflowSourceTypeSchema.describe('The type of source that triggers this workflow'),
18
+ source_ref_id: z
19
+ .string()
20
+ .describe('The ID of the source (email address, queue, webhook, or schedule)'),
21
+ source_config: z
22
+ .record(z.string(), z.unknown())
23
+ .nullable()
24
+ .describe('Optional configuration for the source'),
25
+ status: WorkflowStatusSchema.describe('The current status of the workflow'),
26
+ graph_json: z
27
+ .record(z.string(), z.unknown())
28
+ .nullable()
29
+ .describe('The workflow graph definition (nodes and edges)'),
30
+ execution_count: z
31
+ .number()
32
+ .optional()
33
+ .describe('Number of times this workflow has been executed'),
34
+ link: z.string().optional().describe('Link to the workflow detail page'),
35
+ })
36
+ .describe('Workflow configuration');
37
+ export const WorkflowExecutionSchema = z
38
+ .object({
39
+ id: z.string().describe('Unique identifier for the execution'),
40
+ workflow_id: z.string().describe('ID of the workflow that was executed'),
41
+ status: z.enum(['pending', 'running', 'completed', 'failed']).describe('Execution status'),
42
+ started_at: z.string().nullable().describe('When the execution started'),
43
+ completed_at: z.string().nullable().describe('When the execution completed'),
44
+ error: z.string().nullable().describe('Error message if the execution failed'),
45
+ steps: z
46
+ .array(z.object({
47
+ node_id: z.string(),
48
+ node_type: z.string(),
49
+ status: z.string(),
50
+ started_at: z.string().nullable(),
51
+ completed_at: z.string().nullable(),
52
+ error: z.string().nullable(),
53
+ }))
54
+ .optional()
55
+ .describe('Individual step execution details'),
56
+ })
57
+ .describe('Workflow execution record');
58
+ export const WorkflowDeliverySchema = z
59
+ .object({
60
+ id: z.string().describe('Unique identifier for the delivery'),
61
+ workflow_id: z.string().describe('ID of the workflow'),
62
+ execution_id: z.string().describe('ID of the execution this delivery belongs to'),
63
+ destination_type: z.string().describe('Type of destination'),
64
+ destination_id: z.string().describe('ID of the destination'),
65
+ status: z.enum(['pending', 'success', 'failed']).describe('Delivery status'),
66
+ sent_at: z.string().nullable().describe('When the delivery was sent'),
67
+ response: z.unknown().nullable().describe('Response from the destination'),
68
+ error: z.string().nullable().describe('Error message if delivery failed'),
69
+ })
70
+ .describe('Workflow delivery record');
71
+ export const WorkflowActivitySchema = z
72
+ .object({
73
+ total_workflows: z.number().describe('Total number of workflows'),
74
+ enabled_workflows: z.number().describe('Number of enabled workflows'),
75
+ disabled_workflows: z.number().describe('Number of disabled workflows'),
76
+ total_executions: z.number().describe('Total number of executions'),
77
+ succeeded_executions: z.number().describe('Number of successful executions'),
78
+ failed_executions: z.number().describe('Number of failed executions'),
79
+ last_activity_at: z.string().nullable().describe('When the last activity occurred'),
80
+ })
81
+ .describe('Workflow activity statistics');
82
+ export const CreateWorkflowRequestSchema = z
83
+ .object({
84
+ name: z.string().min(1).describe('Human-readable name for the workflow'),
85
+ description: z.string().optional().describe('Optional description of the workflow'),
86
+ source_type: WorkflowSourceTypeSchema.describe('The type of source that triggers this workflow'),
87
+ source_ref_id: z.string().describe('The ID of the source'),
88
+ source_config: z
89
+ .record(z.string(), z.unknown())
90
+ .optional()
91
+ .describe('Optional source configuration'),
92
+ })
93
+ .describe('Request for creating a new workflow');
94
+ export const UpdateWorkflowRequestSchema = z
95
+ .object({
96
+ name: z.string().min(1).optional().describe('New name for the workflow'),
97
+ description: z.string().nullable().optional().describe('New description for the workflow'),
98
+ status: WorkflowStatusSchema.optional().describe('New status for the workflow'),
99
+ })
100
+ .describe('Request for updating an existing workflow');
101
+ export const UpdateWorkflowGraphRequestSchema = z
102
+ .object({
103
+ nodes: z
104
+ .array(z.object({
105
+ id: z.string(),
106
+ type: z.string().optional(),
107
+ position: z.object({ x: z.number(), y: z.number() }).optional(),
108
+ data: z.unknown().optional(),
109
+ }))
110
+ .describe('Array of workflow nodes'),
111
+ edges: z
112
+ .array(z.object({
113
+ id: z.string(),
114
+ source: z.string(),
115
+ target: z.string(),
116
+ sourceHandle: z.string().optional(),
117
+ targetHandle: z.string().optional(),
118
+ }))
119
+ .describe('Array of workflow edges'),
120
+ })
121
+ .describe('Request for updating the workflow graph');
122
+ export const TestWorkflowRequestSchema = z
123
+ .object({
124
+ payload: z.unknown().describe('Test payload to send through the workflow'),
125
+ })
126
+ .describe('Request for testing a workflow');
127
+ export const TestWorkflowResultSchema = z
128
+ .object({
129
+ execution_id: z.string().describe('ID of the test execution'),
130
+ status: z.string().describe('Status of the test execution'),
131
+ steps: z
132
+ .array(z.object({
133
+ node_id: z.string(),
134
+ node_type: z.string(),
135
+ status: z.string(),
136
+ output: z.unknown().optional(),
137
+ error: z.string().optional(),
138
+ }))
139
+ .optional()
140
+ .describe('Individual step results'),
141
+ error: z.string().optional().describe('Error message if test failed'),
142
+ })
143
+ .describe('Result of a workflow test');
144
+ export const ListWorkflowsRequestSchema = z
145
+ .object({
146
+ limit: z.number().optional().describe('Maximum number of workflows to return'),
147
+ offset: z.number().optional().describe('Number of workflows to skip'),
148
+ status: WorkflowStatusSchema.optional().describe('Filter by status'),
149
+ source_type: WorkflowSourceTypeSchema.optional().describe('Filter by source type'),
150
+ filter: z.string().optional().describe('Filter string for workflows'),
151
+ })
152
+ .describe('Request for listing workflows');
153
+ export const WorkflowListResultSchema = z
154
+ .object({
155
+ workflows: z.array(WorkflowSchema).describe('Array of workflows'),
156
+ total: z.number().describe('Total number of workflows'),
157
+ })
158
+ .describe('Result of listing workflows');
159
+ export const WorkflowGetResultSchema = z
160
+ .object({
161
+ workflow: WorkflowSchema.describe('The requested workflow'),
162
+ })
163
+ .describe('Result of getting a single workflow');
164
+ export const WorkflowCreateResultSchema = z
165
+ .object({
166
+ workflow: WorkflowSchema.describe('The newly created workflow'),
167
+ })
168
+ .describe('Result of creating a workflow');
169
+ export const WorkflowUpdateResultSchema = z
170
+ .object({
171
+ workflow: WorkflowSchema.describe('The updated workflow'),
172
+ })
173
+ .describe('Result of updating a workflow');
174
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src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C,QAAQ,CAAC,sBAAsB,CAAC;CACzD,CAAC;KACD,QAAQ,CAAC,+BAA+B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/core",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Agentuity employees and contributors",
6
6
  "type": "module",
@@ -89,7 +89,7 @@
89
89
  "zod": "^4.3.5"
90
90
  },
91
91
  "devDependencies": {
92
- "@agentuity/test-utils": "2.0.1",
92
+ "@agentuity/test-utils": "2.0.2",
93
93
  "@types/bun": "latest",
94
94
  "bun-types": "latest",
95
95
  "esbuild": "^0.25.0",
@@ -7,7 +7,7 @@
7
7
  * The warning is only shown once per process to avoid noise.
8
8
  */
9
9
 
10
- import type { Logger } from './logger';
10
+ import type { Logger } from './logger.ts';
11
11
 
12
12
  let deprecationWarningShown = false;
13
13
 
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ export type { EnvField, ResourceType } from './env-example.ts';
3
3
  export { detectResourceFromKey, parseEnvExample } from './env-example.ts';
4
4
 
5
5
  // deprecation.ts exports
6
- export { isV1Package, showDeprecationWarning } from './deprecation';
6
+ export { isV1Package, showDeprecationWarning } from './deprecation.ts';
7
7
 
8
8
  // error.ts exports
9
9
  export { isStructuredError, RichError, StructuredError } from './error.ts';
@@ -16,4 +16,4 @@ export type {
16
16
  AuthOrgHelpers,
17
17
  AuthApiKeyHelpers,
18
18
  AuthInterface,
19
- } from './types';
19
+ } from './types.ts';
@@ -31,5 +31,6 @@ export * from './stream/index.ts';
31
31
  export * from './thread/index.ts';
32
32
  export * from './user/index.ts';
33
33
  export * from './webhook/index.ts';
34
+ export * from './workflow/index.ts';
34
35
 
35
36
  export { buildUrl, fromResponse, toPayload, toServiceException } from './_util.ts';
@@ -78,7 +78,7 @@ export async function createDestination(
78
78
  undefined,
79
79
  buildQueueHeaders(options?.orgId)
80
80
  ),
81
- { queueName, destinationUrl: params.config?.url }
81
+ { queueName, destinationUrl: params.config?.url as string | undefined }
82
82
  );
83
83
 
84
84
  if (resp.success) {
@@ -319,9 +319,11 @@ export const MessageSchema = z
319
319
  export type Message = z.infer<typeof MessageSchema>;
320
320
 
321
321
  /**
322
- * Destination type schema. Currently only HTTP webhooks are supported.
322
+ * Destination type schema. Supports webhook, queue, sandbox, and email destinations.
323
323
  */
324
- export const DestinationTypeSchema = z.enum(['http']).describe('Destination type schema');
324
+ export const DestinationTypeSchema = z
325
+ .enum(['http', 'url', 'webhook', 'queue', 'sandbox', 'email'])
326
+ .describe('Destination type schema');
325
327
 
326
328
  /**
327
329
  * Destination type.
@@ -591,6 +593,7 @@ export const CreateQueueRequestSchema = z
591
593
  name: z.string().optional().describe('Optional queue name (auto-generated if not provided).'),
592
594
  description: z.string().optional().describe("Optional description of the queue's purpose."),
593
595
  queue_type: QueueTypeSchema.describe('Type of queue to create.'),
596
+ internal: z.boolean().optional().describe('Whether the queue is system-managed.'),
594
597
  settings: QueueSettingsSchemaBase.partial()
595
598
  .optional()
596
599
  .describe(
@@ -747,7 +750,9 @@ export const CreateDestinationRequestSchema = z
747
750
  name: z.string().describe('Human-readable name for the destination.'),
748
751
  description: z.string().optional().describe('Optional description of the destination.'),
749
752
  destination_type: DestinationTypeSchema.describe('Type of destination to create.'),
750
- config: HttpDestinationConfigSchema.describe('HTTP configuration for the destination.'),
753
+ config: z
754
+ .record(z.string(), z.unknown())
755
+ .describe('Configuration for the destination (type-specific).'),
751
756
  enabled: z
752
757
  .boolean()
753
758
  .default(true)
@@ -769,9 +774,10 @@ export const UpdateDestinationRequestSchema = z
769
774
  .nullable()
770
775
  .optional()
771
776
  .describe('Updated description of the destination.'),
772
- config: HttpDestinationConfigSchema.partial()
777
+ config: z
778
+ .record(z.string(), z.unknown())
773
779
  .optional()
774
- .describe('HTTP configuration updates (partial update supported).'),
780
+ .describe('Configuration updates (partial update supported).'),
775
781
  enabled: z.boolean().optional().describe('Enable or disable the destination.'),
776
782
  })
777
783
  .describe('Update destination request schema');
@@ -213,6 +213,7 @@ export const CreateWebhookRequestSchema = z
213
213
  .object({
214
214
  name: z.string().describe('Human-readable name for the webhook'),
215
215
  description: z.string().optional().describe("Optional description of the webhook's purpose"),
216
+ internal: z.boolean().optional().describe('Whether the webhook is system-managed.'),
216
217
  })
217
218
  .describe('Request for creating a new webhook');
218
219