skedyul 1.2.41 → 1.2.43
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/cli/commands/agents.d.ts +1 -0
- package/dist/cli/commands/chat.d.ts +1 -0
- package/dist/cli/commands/crm.d.ts +1 -0
- package/dist/cli/commands/skills.d.ts +1 -0
- package/dist/cli/index.js +17627 -6229
- package/dist/cli/utils/auth.js +495 -0
- package/dist/cli/utils/mock-context.d.ts +22 -0
- package/dist/cli/utils/sse.d.ts +100 -0
- package/dist/compiler/compiler.d.ts +12 -0
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/types.d.ts +173 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/schema-loader.d.ts +156 -0
- package/dist/config/types/model.d.ts +28 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/resolver.d.ts +51 -0
- package/dist/context/types.d.ts +217 -0
- package/dist/dedicated/server.js +10 -6
- package/dist/esm/index.mjs +9616 -444
- package/dist/events/index.d.ts +1 -0
- package/dist/events/types.d.ts +528 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +9709 -455
- package/dist/memory/index.d.ts +4 -0
- package/dist/memory/service.d.ts +78 -0
- package/dist/memory/types.d.ts +169 -0
- package/dist/schemas/agent-schema-v3.d.ts +437 -0
- package/dist/schemas/agent-schema-v3.js +539 -0
- package/dist/schemas/agent-schema-v3.mjs +497 -0
- package/dist/schemas/agent-schema.d.ts +1504 -0
- package/dist/schemas/agent-schema.js +7896 -0
- package/dist/schemas/agent-schema.mjs +7867 -0
- package/dist/schemas/crm-schema.d.ts +448 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas.d.ts +69 -36
- package/dist/server.js +10 -6
- package/dist/serverless/server.mjs +10 -6
- package/dist/skills/index.d.ts +1 -0
- package/dist/skills/types.d.ts +355 -0
- package/dist/skills/types.js +281 -0
- package/dist/skills/types.mjs +234 -0
- package/dist/triggers/index.d.ts +2 -0
- package/dist/triggers/resolver.d.ts +31 -0
- package/dist/triggers/types.d.ts +313 -0
- package/dist/types/data-blocks.d.ts +105 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/tool-response.d.ts +16 -0
- package/dist/types/tool.d.ts +30 -8
- package/dist/workflows/index.d.ts +1 -0
- package/dist/workflows/types.d.ts +295 -0
- package/package.json +19 -1
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Field data types for CRM schema (lowercase for JSON serialization).
|
|
4
|
+
*/
|
|
5
|
+
export declare const CRMFieldTypeSchema: z.ZodEnum<{
|
|
6
|
+
string: "string";
|
|
7
|
+
number: "number";
|
|
8
|
+
boolean: "boolean";
|
|
9
|
+
object: "object";
|
|
10
|
+
long_string: "long_string";
|
|
11
|
+
date: "date";
|
|
12
|
+
datetime: "datetime";
|
|
13
|
+
time: "time";
|
|
14
|
+
file: "file";
|
|
15
|
+
image: "image";
|
|
16
|
+
}>;
|
|
17
|
+
export type CRMFieldType = z.infer<typeof CRMFieldTypeSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* Field requirement types for CRM schema.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CRMFieldRequirementSchema: z.ZodEnum<{
|
|
22
|
+
optional: "optional";
|
|
23
|
+
on_create: "on_create";
|
|
24
|
+
required: "required";
|
|
25
|
+
}>;
|
|
26
|
+
export type CRMFieldRequirement = z.infer<typeof CRMFieldRequirementSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* Field option for select/dropdown fields.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CRMFieldOptionSchema: z.ZodObject<{
|
|
31
|
+
label: z.ZodString;
|
|
32
|
+
value: z.ZodString;
|
|
33
|
+
color: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type CRMFieldOption = z.infer<typeof CRMFieldOptionSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* Field definition constraints and options (object form).
|
|
38
|
+
*/
|
|
39
|
+
export declare const CRMFieldDefinitionObjectSchema: z.ZodObject<{
|
|
40
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
label: z.ZodString;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
color: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
/**
|
|
53
|
+
* Field definition - can be a string (built-in like "email", "phone") or an object with constraints.
|
|
54
|
+
*/
|
|
55
|
+
export declare const CRMFieldDefinitionSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
56
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
value: z.ZodString;
|
|
59
|
+
color: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>>;
|
|
61
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>]>;
|
|
68
|
+
export type CRMFieldDefinition = z.infer<typeof CRMFieldDefinitionSchema>;
|
|
69
|
+
/**
|
|
70
|
+
* Field schema for CRM models.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CRMFieldSchemaZ: z.ZodObject<{
|
|
73
|
+
handle: z.ZodString;
|
|
74
|
+
label: z.ZodString;
|
|
75
|
+
type: z.ZodEnum<{
|
|
76
|
+
string: "string";
|
|
77
|
+
number: "number";
|
|
78
|
+
boolean: "boolean";
|
|
79
|
+
object: "object";
|
|
80
|
+
long_string: "long_string";
|
|
81
|
+
date: "date";
|
|
82
|
+
datetime: "datetime";
|
|
83
|
+
time: "time";
|
|
84
|
+
file: "file";
|
|
85
|
+
image: "image";
|
|
86
|
+
}>;
|
|
87
|
+
description: z.ZodOptional<z.ZodString>;
|
|
88
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
optional: "optional";
|
|
90
|
+
on_create: "on_create";
|
|
91
|
+
required: "required";
|
|
92
|
+
}>>;
|
|
93
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
96
|
+
definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
97
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
label: z.ZodString;
|
|
99
|
+
value: z.ZodString;
|
|
100
|
+
color: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>>;
|
|
102
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>]>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type CRMFieldSchema = z.infer<typeof CRMFieldSchemaZ>;
|
|
111
|
+
/**
|
|
112
|
+
* Model schema for CRM.
|
|
113
|
+
*/
|
|
114
|
+
export declare const CRMModelSchemaZ: z.ZodObject<{
|
|
115
|
+
handle: z.ZodString;
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
namePlural: z.ZodOptional<z.ZodString>;
|
|
118
|
+
labelTemplate: z.ZodOptional<z.ZodString>;
|
|
119
|
+
description: z.ZodOptional<z.ZodString>;
|
|
120
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
121
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
122
|
+
handle: z.ZodString;
|
|
123
|
+
label: z.ZodString;
|
|
124
|
+
type: z.ZodEnum<{
|
|
125
|
+
string: "string";
|
|
126
|
+
number: "number";
|
|
127
|
+
boolean: "boolean";
|
|
128
|
+
object: "object";
|
|
129
|
+
long_string: "long_string";
|
|
130
|
+
date: "date";
|
|
131
|
+
datetime: "datetime";
|
|
132
|
+
time: "time";
|
|
133
|
+
file: "file";
|
|
134
|
+
image: "image";
|
|
135
|
+
}>;
|
|
136
|
+
description: z.ZodOptional<z.ZodString>;
|
|
137
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
optional: "optional";
|
|
139
|
+
on_create: "on_create";
|
|
140
|
+
required: "required";
|
|
141
|
+
}>>;
|
|
142
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
145
|
+
definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
146
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
147
|
+
label: z.ZodString;
|
|
148
|
+
value: z.ZodString;
|
|
149
|
+
color: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>>>;
|
|
151
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>]>>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type CRMModelSchema = z.infer<typeof CRMModelSchemaZ>;
|
|
161
|
+
/**
|
|
162
|
+
* Relationship cardinality.
|
|
163
|
+
*/
|
|
164
|
+
export declare const CRMCardinalitySchema: z.ZodEnum<{
|
|
165
|
+
one_to_one: "one_to_one";
|
|
166
|
+
one_to_many: "one_to_many";
|
|
167
|
+
}>;
|
|
168
|
+
export type CRMCardinality = z.infer<typeof CRMCardinalitySchema>;
|
|
169
|
+
/**
|
|
170
|
+
* On delete behavior for relationships.
|
|
171
|
+
*/
|
|
172
|
+
export declare const CRMOnDeleteSchema: z.ZodEnum<{
|
|
173
|
+
none: "none";
|
|
174
|
+
cascade: "cascade";
|
|
175
|
+
restrict: "restrict";
|
|
176
|
+
}>;
|
|
177
|
+
export type CRMOnDelete = z.infer<typeof CRMOnDeleteSchema>;
|
|
178
|
+
/**
|
|
179
|
+
* Relationship link (one side of a relationship).
|
|
180
|
+
*/
|
|
181
|
+
export declare const CRMRelationshipLinkSchema: z.ZodObject<{
|
|
182
|
+
model: z.ZodString;
|
|
183
|
+
field: z.ZodString;
|
|
184
|
+
label: z.ZodString;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export type CRMRelationshipLink = z.infer<typeof CRMRelationshipLinkSchema>;
|
|
187
|
+
/**
|
|
188
|
+
* Relationship schema between two models.
|
|
189
|
+
*/
|
|
190
|
+
export declare const CRMRelationshipSchemaZ: z.ZodObject<{
|
|
191
|
+
source: z.ZodObject<{
|
|
192
|
+
model: z.ZodString;
|
|
193
|
+
field: z.ZodString;
|
|
194
|
+
label: z.ZodString;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
target: z.ZodObject<{
|
|
197
|
+
model: z.ZodString;
|
|
198
|
+
field: z.ZodString;
|
|
199
|
+
label: z.ZodString;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
cardinality: z.ZodEnum<{
|
|
202
|
+
one_to_one: "one_to_one";
|
|
203
|
+
one_to_many: "one_to_many";
|
|
204
|
+
}>;
|
|
205
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
none: "none";
|
|
207
|
+
cascade: "cascade";
|
|
208
|
+
restrict: "restrict";
|
|
209
|
+
}>>;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
export type CRMRelationshipSchema = z.infer<typeof CRMRelationshipSchemaZ>;
|
|
212
|
+
/**
|
|
213
|
+
* Block type for pages.
|
|
214
|
+
*/
|
|
215
|
+
export declare const CRMBlockTypeSchema: z.ZodEnum<{
|
|
216
|
+
spreadsheet: "spreadsheet";
|
|
217
|
+
form: "form";
|
|
218
|
+
card: "card";
|
|
219
|
+
metric: "metric";
|
|
220
|
+
kanban: "kanban";
|
|
221
|
+
}>;
|
|
222
|
+
export type CRMBlockType = z.infer<typeof CRMBlockTypeSchema>;
|
|
223
|
+
/**
|
|
224
|
+
* Block schema for pages.
|
|
225
|
+
*/
|
|
226
|
+
export declare const CRMBlockSchemaZ: z.ZodObject<{
|
|
227
|
+
type: z.ZodEnum<{
|
|
228
|
+
spreadsheet: "spreadsheet";
|
|
229
|
+
form: "form";
|
|
230
|
+
card: "card";
|
|
231
|
+
metric: "metric";
|
|
232
|
+
kanban: "kanban";
|
|
233
|
+
}>;
|
|
234
|
+
title: z.ZodOptional<z.ZodString>;
|
|
235
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
236
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
export type CRMBlockSchema = z.infer<typeof CRMBlockSchemaZ>;
|
|
239
|
+
/**
|
|
240
|
+
* Page type.
|
|
241
|
+
*/
|
|
242
|
+
export declare const CRMPageTypeSchema: z.ZodEnum<{
|
|
243
|
+
list: "list";
|
|
244
|
+
instance: "instance";
|
|
245
|
+
}>;
|
|
246
|
+
export type CRMPageType = z.infer<typeof CRMPageTypeSchema>;
|
|
247
|
+
/**
|
|
248
|
+
* Page schema for CRM.
|
|
249
|
+
*/
|
|
250
|
+
export declare const CRMPageSchemaZ: z.ZodObject<{
|
|
251
|
+
path: z.ZodString;
|
|
252
|
+
type: z.ZodEnum<{
|
|
253
|
+
list: "list";
|
|
254
|
+
instance: "instance";
|
|
255
|
+
}>;
|
|
256
|
+
title: z.ZodString;
|
|
257
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
258
|
+
modelHandle: z.ZodString;
|
|
259
|
+
parentPath: z.ZodOptional<z.ZodString>;
|
|
260
|
+
baseQuery: z.ZodOptional<z.ZodUnknown>;
|
|
261
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
|
+
type: z.ZodEnum<{
|
|
263
|
+
spreadsheet: "spreadsheet";
|
|
264
|
+
form: "form";
|
|
265
|
+
card: "card";
|
|
266
|
+
metric: "metric";
|
|
267
|
+
kanban: "kanban";
|
|
268
|
+
}>;
|
|
269
|
+
title: z.ZodOptional<z.ZodString>;
|
|
270
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
271
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
}, z.core.$strip>>>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
export type CRMPageSchema = z.infer<typeof CRMPageSchemaZ>;
|
|
275
|
+
/**
|
|
276
|
+
* Navigation item schema.
|
|
277
|
+
*/
|
|
278
|
+
export declare const CRMNavigationItemSchemaZ: z.ZodObject<{
|
|
279
|
+
label: z.ZodString;
|
|
280
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
281
|
+
path: z.ZodString;
|
|
282
|
+
sortIndex: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export type CRMNavigationItemSchema = z.infer<typeof CRMNavigationItemSchemaZ>;
|
|
285
|
+
/**
|
|
286
|
+
* Navigation schema.
|
|
287
|
+
*/
|
|
288
|
+
export declare const CRMNavigationSchemaZ: z.ZodObject<{
|
|
289
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
290
|
+
label: z.ZodString;
|
|
291
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
292
|
+
path: z.ZodString;
|
|
293
|
+
sortIndex: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
}, z.core.$strip>>>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
export type CRMNavigationSchema = z.infer<typeof CRMNavigationSchemaZ>;
|
|
297
|
+
/**
|
|
298
|
+
* Main CRM Schema - the serializable format for workplace-level migrations.
|
|
299
|
+
*/
|
|
300
|
+
export declare const CRMSchemaZ: z.ZodObject<{
|
|
301
|
+
$schema: z.ZodOptional<z.ZodLiteral<"https://skedyul.com/schemas/crm/v1">>;
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
description: z.ZodOptional<z.ZodString>;
|
|
304
|
+
version: z.ZodOptional<z.ZodString>;
|
|
305
|
+
models: z.ZodArray<z.ZodObject<{
|
|
306
|
+
handle: z.ZodString;
|
|
307
|
+
name: z.ZodString;
|
|
308
|
+
namePlural: z.ZodOptional<z.ZodString>;
|
|
309
|
+
labelTemplate: z.ZodOptional<z.ZodString>;
|
|
310
|
+
description: z.ZodOptional<z.ZodString>;
|
|
311
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
312
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
313
|
+
handle: z.ZodString;
|
|
314
|
+
label: z.ZodString;
|
|
315
|
+
type: z.ZodEnum<{
|
|
316
|
+
string: "string";
|
|
317
|
+
number: "number";
|
|
318
|
+
boolean: "boolean";
|
|
319
|
+
object: "object";
|
|
320
|
+
long_string: "long_string";
|
|
321
|
+
date: "date";
|
|
322
|
+
datetime: "datetime";
|
|
323
|
+
time: "time";
|
|
324
|
+
file: "file";
|
|
325
|
+
image: "image";
|
|
326
|
+
}>;
|
|
327
|
+
description: z.ZodOptional<z.ZodString>;
|
|
328
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
optional: "optional";
|
|
330
|
+
on_create: "on_create";
|
|
331
|
+
required: "required";
|
|
332
|
+
}>>;
|
|
333
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
335
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
336
|
+
definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
337
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
338
|
+
label: z.ZodString;
|
|
339
|
+
value: z.ZodString;
|
|
340
|
+
color: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, z.core.$strip>>>;
|
|
342
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>]>>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
source: z.ZodObject<{
|
|
353
|
+
model: z.ZodString;
|
|
354
|
+
field: z.ZodString;
|
|
355
|
+
label: z.ZodString;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
target: z.ZodObject<{
|
|
358
|
+
model: z.ZodString;
|
|
359
|
+
field: z.ZodString;
|
|
360
|
+
label: z.ZodString;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
cardinality: z.ZodEnum<{
|
|
363
|
+
one_to_one: "one_to_one";
|
|
364
|
+
one_to_many: "one_to_many";
|
|
365
|
+
}>;
|
|
366
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
367
|
+
none: "none";
|
|
368
|
+
cascade: "cascade";
|
|
369
|
+
restrict: "restrict";
|
|
370
|
+
}>>;
|
|
371
|
+
}, z.core.$strip>>>;
|
|
372
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
|
+
path: z.ZodString;
|
|
374
|
+
type: z.ZodEnum<{
|
|
375
|
+
list: "list";
|
|
376
|
+
instance: "instance";
|
|
377
|
+
}>;
|
|
378
|
+
title: z.ZodString;
|
|
379
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
380
|
+
modelHandle: z.ZodString;
|
|
381
|
+
parentPath: z.ZodOptional<z.ZodString>;
|
|
382
|
+
baseQuery: z.ZodOptional<z.ZodUnknown>;
|
|
383
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
384
|
+
type: z.ZodEnum<{
|
|
385
|
+
spreadsheet: "spreadsheet";
|
|
386
|
+
form: "form";
|
|
387
|
+
card: "card";
|
|
388
|
+
metric: "metric";
|
|
389
|
+
kanban: "kanban";
|
|
390
|
+
}>;
|
|
391
|
+
title: z.ZodOptional<z.ZodString>;
|
|
392
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
393
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
394
|
+
}, z.core.$strip>>>;
|
|
395
|
+
}, z.core.$strip>>>;
|
|
396
|
+
navigation: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
398
|
+
label: z.ZodString;
|
|
399
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
400
|
+
path: z.ZodString;
|
|
401
|
+
sortIndex: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
}, z.core.$strip>>>;
|
|
403
|
+
}, z.core.$strip>>;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
export type CRMSchema = z.infer<typeof CRMSchemaZ>;
|
|
406
|
+
/**
|
|
407
|
+
* Define a CRM schema with full type safety.
|
|
408
|
+
* Use this in .schema.ts files for type checking and autocomplete.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```typescript
|
|
412
|
+
* import { defineSchema } from 'skedyul'
|
|
413
|
+
*
|
|
414
|
+
* export default defineSchema({
|
|
415
|
+
* name: 'Gym CRM',
|
|
416
|
+
* models: [
|
|
417
|
+
* {
|
|
418
|
+
* handle: 'lead',
|
|
419
|
+
* name: 'Lead',
|
|
420
|
+
* fields: [
|
|
421
|
+
* { handle: 'first_name', label: 'First Name', type: 'string' },
|
|
422
|
+
* ],
|
|
423
|
+
* },
|
|
424
|
+
* ],
|
|
425
|
+
* })
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
export declare function defineSchema(schema: CRMSchema): CRMSchema;
|
|
429
|
+
export interface CRMSchemaValidationResult {
|
|
430
|
+
success: boolean;
|
|
431
|
+
data?: CRMSchema;
|
|
432
|
+
errors?: Array<{
|
|
433
|
+
path: string;
|
|
434
|
+
message: string;
|
|
435
|
+
}>;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Validate a CRM schema and return detailed errors if invalid.
|
|
439
|
+
*/
|
|
440
|
+
export declare function validateCRMSchema(data: unknown): CRMSchemaValidationResult;
|
|
441
|
+
/**
|
|
442
|
+
* Parse a CRM schema, throwing an error if invalid.
|
|
443
|
+
*/
|
|
444
|
+
export declare function parseCRMSchema(data: unknown): CRMSchema;
|
|
445
|
+
/**
|
|
446
|
+
* Safely parse a CRM schema, returning null if invalid.
|
|
447
|
+
*/
|
|
448
|
+
export declare function safeParseCRMSchema(data: unknown): CRMSchema | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { CRMFieldTypeSchema, CRMFieldRequirementSchema, CRMFieldOptionSchema, CRMFieldDefinitionSchema, CRMFieldSchemaZ, CRMModelSchemaZ, CRMCardinalitySchema, CRMOnDeleteSchema, CRMRelationshipLinkSchema, CRMRelationshipSchemaZ, CRMSchemaZ, type CRMFieldType, type CRMFieldRequirement, type CRMFieldOption, type CRMFieldDefinition, type CRMFieldSchema, type CRMModelSchema, type CRMCardinality, type CRMOnDelete, type CRMRelationshipLink, type CRMRelationshipSchema, type CRMSchema, type CRMSchemaValidationResult, defineSchema, validateCRMSchema, parseCRMSchema, safeParseCRMSchema, } from './crm-schema';
|
|
2
|
+
export { AGENT_SCHEMA_VERSION_V3, PersonaVoiceFormatV3Schema, PersonaVoiceV3Schema, PersonaV3Schema, ToolApprovalConfigSchema, ToolRefV3Schema, WorkingMemoryConfigSchema, ExternalMemoryConfigSchema, SemanticMemoryConfigSchema, MemoryConfigV3Schema, ResponsePolicySchema, PoliciesConfigV3Schema, RuntimeConfigV3Schema, AgentConfigV3Schema, AgentYAMLV3Schema, type PersonaVoiceFormatV3, type PersonaVoiceV3, type PersonaV3, type ToolApprovalConfig, type ToolRefV3, type WorkingMemoryConfig, type ExternalMemoryConfig, type SemanticMemoryConfig, type MemoryConfigV3, type ResponsePolicy, type PoliciesConfigV3, type RuntimeConfigV3, type AgentConfigV3, type AgentYAMLV3, defineAgentV3, validateAgentYAMLV3, } from './agent-schema-v3';
|