skedyul 1.0.19 → 1.0.22
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/.build-stamp +1 -1
- package/dist/config/types/base.d.ts +3 -2
- package/dist/core/client.d.ts +48 -2
- package/dist/core/client.js +41 -0
- package/dist/index.d.ts +1 -1
- package/dist/schemas.d.ts +219 -11
- package/dist/schemas.js +23 -3
- package/dist/server/index.js +15 -5
- package/dist/server/serverless.js +14 -5
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1773977763410
|
|
@@ -81,10 +81,11 @@ export type Visibility = 'visible' | 'encrypted';
|
|
|
81
81
|
export type ComputeLayer = 'serverless' | 'dedicated';
|
|
82
82
|
/**
|
|
83
83
|
* Standard filter type used for querying data.
|
|
84
|
+
* Re-exported from schemas for backwards compatibility.
|
|
84
85
|
* Format: { fieldHandle: { operator: value } }
|
|
85
|
-
* Operators: eq,
|
|
86
|
+
* Operators: eq, neq, gt, gte, lt, lte, in, contains, etc.
|
|
86
87
|
*/
|
|
87
|
-
export type StructuredFilter
|
|
88
|
+
export type { StructuredFilter, FilterOperator, FilterCondition } from '../../schemas';
|
|
88
89
|
/**
|
|
89
90
|
* Option for select/dropdown fields.
|
|
90
91
|
*/
|
package/dist/core/client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
import type { CommunicationChannel, Workplace } from './types';
|
|
3
|
+
import type { StructuredFilter } from '../schemas';
|
|
3
4
|
/**
|
|
4
5
|
* Error object in normalized API responses.
|
|
5
6
|
*/
|
|
@@ -268,8 +269,8 @@ export interface InstanceListResult {
|
|
|
268
269
|
export interface InstanceListArgs {
|
|
269
270
|
page?: number;
|
|
270
271
|
limit?: number;
|
|
271
|
-
/** Filter conditions
|
|
272
|
-
filter?:
|
|
272
|
+
/** Filter conditions using StructuredFilter format: { field: { operator: value } } */
|
|
273
|
+
filter?: StructuredFilter;
|
|
273
274
|
}
|
|
274
275
|
export declare const instance: {
|
|
275
276
|
/**
|
|
@@ -347,6 +348,51 @@ export declare const instance: {
|
|
|
347
348
|
delete(modelHandle: string, id: string): Promise<{
|
|
348
349
|
deleted: boolean;
|
|
349
350
|
}>;
|
|
351
|
+
/**
|
|
352
|
+
* Delete multiple instances of an internal model in a single batch operation.
|
|
353
|
+
*
|
|
354
|
+
* This is more efficient than calling delete() multiple times as it reduces
|
|
355
|
+
* API overhead and executes all deletes in a single transaction.
|
|
356
|
+
*
|
|
357
|
+
* Supports two modes:
|
|
358
|
+
* - **By IDs**: Delete specific instances by their IDs
|
|
359
|
+
* - **By Filter**: Delete instances matching a StructuredFilter
|
|
360
|
+
*
|
|
361
|
+
* The API token determines the context (app installation is embedded in sk_wkp_ tokens).
|
|
362
|
+
*
|
|
363
|
+
* @param modelHandle - The model handle from provision config
|
|
364
|
+
* @param options - Either { ids: string[] } or { filter: StructuredFilter }
|
|
365
|
+
* @returns Object containing deleted instance IDs and any errors that occurred
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```ts
|
|
369
|
+
* // Delete by IDs
|
|
370
|
+
* const { deleted, errors } = await instance.deleteMany('panel_result', {
|
|
371
|
+
* ids: ['ins_abc123', 'ins_def456'],
|
|
372
|
+
* })
|
|
373
|
+
*
|
|
374
|
+
* // Delete by filter
|
|
375
|
+
* const { deleted, errors } = await instance.deleteMany('panel_result', {
|
|
376
|
+
* filter: { status: { eq: 'pending' } },
|
|
377
|
+
* })
|
|
378
|
+
*
|
|
379
|
+
* if (errors.length > 0) {
|
|
380
|
+
* console.log('Some items failed:', errors)
|
|
381
|
+
* }
|
|
382
|
+
* console.log('Deleted:', deleted.length, 'instances')
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
deleteMany(modelHandle: string, options: {
|
|
386
|
+
ids: string[];
|
|
387
|
+
} | {
|
|
388
|
+
filter: StructuredFilter;
|
|
389
|
+
}): Promise<{
|
|
390
|
+
deleted: string[];
|
|
391
|
+
errors: Array<{
|
|
392
|
+
index: number;
|
|
393
|
+
error: string;
|
|
394
|
+
}>;
|
|
395
|
+
}>;
|
|
350
396
|
/**
|
|
351
397
|
* Create multiple instances of an internal model in a single batch operation.
|
|
352
398
|
*
|
package/dist/core/client.js
CHANGED
|
@@ -374,6 +374,47 @@ exports.instance = {
|
|
|
374
374
|
});
|
|
375
375
|
return data;
|
|
376
376
|
},
|
|
377
|
+
/**
|
|
378
|
+
* Delete multiple instances of an internal model in a single batch operation.
|
|
379
|
+
*
|
|
380
|
+
* This is more efficient than calling delete() multiple times as it reduces
|
|
381
|
+
* API overhead and executes all deletes in a single transaction.
|
|
382
|
+
*
|
|
383
|
+
* Supports two modes:
|
|
384
|
+
* - **By IDs**: Delete specific instances by their IDs
|
|
385
|
+
* - **By Filter**: Delete instances matching a StructuredFilter
|
|
386
|
+
*
|
|
387
|
+
* The API token determines the context (app installation is embedded in sk_wkp_ tokens).
|
|
388
|
+
*
|
|
389
|
+
* @param modelHandle - The model handle from provision config
|
|
390
|
+
* @param options - Either { ids: string[] } or { filter: StructuredFilter }
|
|
391
|
+
* @returns Object containing deleted instance IDs and any errors that occurred
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```ts
|
|
395
|
+
* // Delete by IDs
|
|
396
|
+
* const { deleted, errors } = await instance.deleteMany('panel_result', {
|
|
397
|
+
* ids: ['ins_abc123', 'ins_def456'],
|
|
398
|
+
* })
|
|
399
|
+
*
|
|
400
|
+
* // Delete by filter
|
|
401
|
+
* const { deleted, errors } = await instance.deleteMany('panel_result', {
|
|
402
|
+
* filter: { status: { eq: 'pending' } },
|
|
403
|
+
* })
|
|
404
|
+
*
|
|
405
|
+
* if (errors.length > 0) {
|
|
406
|
+
* console.log('Some items failed:', errors)
|
|
407
|
+
* }
|
|
408
|
+
* console.log('Deleted:', deleted.length, 'instances')
|
|
409
|
+
* ```
|
|
410
|
+
*/
|
|
411
|
+
async deleteMany(modelHandle, options) {
|
|
412
|
+
const { data } = await callCore('instance.deleteMany', {
|
|
413
|
+
modelHandle,
|
|
414
|
+
...options,
|
|
415
|
+
});
|
|
416
|
+
return data;
|
|
417
|
+
},
|
|
377
418
|
/**
|
|
378
419
|
* Create multiple instances of an internal model in a single batch operation.
|
|
379
420
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ declare const _default: {
|
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
18
18
|
export { defineConfig, defineModel, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, loadConfig, validateConfig, CONFIG_FILE_NAMES, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
|
|
19
|
-
export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, ActionDefinition, ModalFormDefinition, InputComponent, TextareaComponent, SelectComponent, ComboboxComponent, CheckboxComponent, DatePickerComponent, TimePickerComponent, StatusIndicator, FieldSettingComponent, ImageSettingComponent, FileSettingComponent, ListItemTemplate, ListComponent, EmptyFormComponent, AlertComponent, FormComponent, FormLayoutColumn, FormLayoutRow, FormLayoutConfig, FormProps, CardHeader, CardBlock, ListBlock, ModelMapperBlock, BlockDefinition, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
|
|
19
|
+
export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FilterOperator, FilterCondition, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, ActionDefinition, ModalFormDefinition, InputComponent, TextareaComponent, SelectComponent, ComboboxComponent, CheckboxComponent, DatePickerComponent, TimePickerComponent, StatusIndicator, FieldSettingComponent, ImageSettingComponent, FileSettingComponent, ListItemTemplate, ListComponent, EmptyFormComponent, AlertComponent, FormComponent, FormLayoutColumn, FormLayoutRow, FormLayoutConfig, FormProps, CardHeader, CardBlock, ListBlock, ModelMapperBlock, BlockDefinition, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
|
package/dist/schemas.d.ts
CHANGED
|
@@ -33,11 +33,84 @@ export declare const FieldOwnerSchema: z.ZodEnum<{
|
|
|
33
33
|
APP: "APP";
|
|
34
34
|
SHARED: "SHARED";
|
|
35
35
|
}>;
|
|
36
|
-
export declare const
|
|
36
|
+
export declare const FilterOperatorSchema: z.ZodEnum<{
|
|
37
|
+
eq: "eq";
|
|
38
|
+
neq: "neq";
|
|
39
|
+
gt: "gt";
|
|
40
|
+
gte: "gte";
|
|
41
|
+
lt: "lt";
|
|
42
|
+
lte: "lte";
|
|
43
|
+
in: "in";
|
|
44
|
+
contains: "contains";
|
|
45
|
+
notContains: "notContains";
|
|
46
|
+
not_contains: "not_contains";
|
|
47
|
+
startsWith: "startsWith";
|
|
48
|
+
starts_with: "starts_with";
|
|
49
|
+
endsWith: "endsWith";
|
|
50
|
+
ends_with: "ends_with";
|
|
51
|
+
isEmpty: "isEmpty";
|
|
52
|
+
isNotEmpty: "isNotEmpty";
|
|
53
|
+
}>;
|
|
54
|
+
export type FilterOperator = z.infer<typeof FilterOperatorSchema>;
|
|
55
|
+
export declare const FilterConditionSchema: z.ZodRecord<z.ZodEnum<{
|
|
56
|
+
eq: "eq";
|
|
57
|
+
neq: "neq";
|
|
58
|
+
gt: "gt";
|
|
59
|
+
gte: "gte";
|
|
60
|
+
lt: "lt";
|
|
61
|
+
lte: "lte";
|
|
62
|
+
in: "in";
|
|
63
|
+
contains: "contains";
|
|
64
|
+
notContains: "notContains";
|
|
65
|
+
not_contains: "not_contains";
|
|
66
|
+
startsWith: "startsWith";
|
|
67
|
+
starts_with: "starts_with";
|
|
68
|
+
endsWith: "endsWith";
|
|
69
|
+
ends_with: "ends_with";
|
|
70
|
+
isEmpty: "isEmpty";
|
|
71
|
+
isNotEmpty: "isNotEmpty";
|
|
72
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>;
|
|
73
|
+
export type FilterCondition = z.infer<typeof FilterConditionSchema>;
|
|
74
|
+
export declare const StructuredFilterSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
75
|
+
eq: "eq";
|
|
76
|
+
neq: "neq";
|
|
77
|
+
gt: "gt";
|
|
78
|
+
gte: "gte";
|
|
79
|
+
lt: "lt";
|
|
80
|
+
lte: "lte";
|
|
81
|
+
in: "in";
|
|
82
|
+
contains: "contains";
|
|
83
|
+
notContains: "notContains";
|
|
84
|
+
not_contains: "not_contains";
|
|
85
|
+
startsWith: "startsWith";
|
|
86
|
+
starts_with: "starts_with";
|
|
87
|
+
endsWith: "endsWith";
|
|
88
|
+
ends_with: "ends_with";
|
|
89
|
+
isEmpty: "isEmpty";
|
|
90
|
+
isNotEmpty: "isNotEmpty";
|
|
91
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
92
|
+
export type StructuredFilter = z.infer<typeof StructuredFilterSchema>;
|
|
37
93
|
export declare const ModelDependencySchema: z.ZodObject<{
|
|
38
94
|
model: z.ZodString;
|
|
39
95
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
96
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
97
|
+
eq: "eq";
|
|
98
|
+
neq: "neq";
|
|
99
|
+
gt: "gt";
|
|
100
|
+
gte: "gte";
|
|
101
|
+
lt: "lt";
|
|
102
|
+
lte: "lte";
|
|
103
|
+
in: "in";
|
|
104
|
+
contains: "contains";
|
|
105
|
+
notContains: "notContains";
|
|
106
|
+
not_contains: "not_contains";
|
|
107
|
+
startsWith: "startsWith";
|
|
108
|
+
starts_with: "starts_with";
|
|
109
|
+
endsWith: "endsWith";
|
|
110
|
+
ends_with: "ends_with";
|
|
111
|
+
isEmpty: "isEmpty";
|
|
112
|
+
isNotEmpty: "isNotEmpty";
|
|
113
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
41
114
|
}, z.core.$strip>;
|
|
42
115
|
export declare const ChannelDependencySchema: z.ZodObject<{
|
|
43
116
|
channel: z.ZodString;
|
|
@@ -48,7 +121,24 @@ export declare const WorkflowDependencySchema: z.ZodObject<{
|
|
|
48
121
|
export declare const ResourceDependencySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
49
122
|
model: z.ZodString;
|
|
50
123
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
124
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
125
|
+
eq: "eq";
|
|
126
|
+
neq: "neq";
|
|
127
|
+
gt: "gt";
|
|
128
|
+
gte: "gte";
|
|
129
|
+
lt: "lt";
|
|
130
|
+
lte: "lte";
|
|
131
|
+
in: "in";
|
|
132
|
+
contains: "contains";
|
|
133
|
+
notContains: "notContains";
|
|
134
|
+
not_contains: "not_contains";
|
|
135
|
+
startsWith: "startsWith";
|
|
136
|
+
starts_with: "starts_with";
|
|
137
|
+
endsWith: "endsWith";
|
|
138
|
+
ends_with: "ends_with";
|
|
139
|
+
isEmpty: "isEmpty";
|
|
140
|
+
isNotEmpty: "isNotEmpty";
|
|
141
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
52
142
|
}, z.core.$strip>, z.ZodObject<{
|
|
53
143
|
channel: z.ZodString;
|
|
54
144
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -196,7 +286,24 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
|
|
|
196
286
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
197
287
|
model: z.ZodString;
|
|
198
288
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
199
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
289
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
290
|
+
eq: "eq";
|
|
291
|
+
neq: "neq";
|
|
292
|
+
gt: "gt";
|
|
293
|
+
gte: "gte";
|
|
294
|
+
lt: "lt";
|
|
295
|
+
lte: "lte";
|
|
296
|
+
in: "in";
|
|
297
|
+
contains: "contains";
|
|
298
|
+
notContains: "notContains";
|
|
299
|
+
not_contains: "not_contains";
|
|
300
|
+
startsWith: "startsWith";
|
|
301
|
+
starts_with: "starts_with";
|
|
302
|
+
endsWith: "endsWith";
|
|
303
|
+
ends_with: "ends_with";
|
|
304
|
+
isEmpty: "isEmpty";
|
|
305
|
+
isNotEmpty: "isNotEmpty";
|
|
306
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
200
307
|
}, z.core.$strip>, z.ZodObject<{
|
|
201
308
|
channel: z.ZodString;
|
|
202
309
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -378,7 +485,24 @@ export declare const WorkflowDefinitionSchema: z.ZodObject<{
|
|
|
378
485
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
379
486
|
model: z.ZodString;
|
|
380
487
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
381
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
488
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
489
|
+
eq: "eq";
|
|
490
|
+
neq: "neq";
|
|
491
|
+
gt: "gt";
|
|
492
|
+
gte: "gte";
|
|
493
|
+
lt: "lt";
|
|
494
|
+
lte: "lte";
|
|
495
|
+
in: "in";
|
|
496
|
+
contains: "contains";
|
|
497
|
+
notContains: "notContains";
|
|
498
|
+
not_contains: "not_contains";
|
|
499
|
+
startsWith: "startsWith";
|
|
500
|
+
starts_with: "starts_with";
|
|
501
|
+
endsWith: "endsWith";
|
|
502
|
+
ends_with: "ends_with";
|
|
503
|
+
isEmpty: "isEmpty";
|
|
504
|
+
isNotEmpty: "isNotEmpty";
|
|
505
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
382
506
|
}, z.core.$strip>, z.ZodObject<{
|
|
383
507
|
channel: z.ZodString;
|
|
384
508
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2870,7 +2994,24 @@ export declare const InstallConfigSchema: z.ZodObject<{
|
|
|
2870
2994
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2871
2995
|
model: z.ZodString;
|
|
2872
2996
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2873
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
2997
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
2998
|
+
eq: "eq";
|
|
2999
|
+
neq: "neq";
|
|
3000
|
+
gt: "gt";
|
|
3001
|
+
gte: "gte";
|
|
3002
|
+
lt: "lt";
|
|
3003
|
+
lte: "lte";
|
|
3004
|
+
in: "in";
|
|
3005
|
+
contains: "contains";
|
|
3006
|
+
notContains: "notContains";
|
|
3007
|
+
not_contains: "not_contains";
|
|
3008
|
+
startsWith: "startsWith";
|
|
3009
|
+
starts_with: "starts_with";
|
|
3010
|
+
endsWith: "endsWith";
|
|
3011
|
+
ends_with: "ends_with";
|
|
3012
|
+
isEmpty: "isEmpty";
|
|
3013
|
+
isNotEmpty: "isNotEmpty";
|
|
3014
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
2874
3015
|
}, z.core.$strip>, z.ZodObject<{
|
|
2875
3016
|
channel: z.ZodString;
|
|
2876
3017
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2970,7 +3111,24 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2970
3111
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2971
3112
|
model: z.ZodString;
|
|
2972
3113
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2973
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
3114
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
3115
|
+
eq: "eq";
|
|
3116
|
+
neq: "neq";
|
|
3117
|
+
gt: "gt";
|
|
3118
|
+
gte: "gte";
|
|
3119
|
+
lt: "lt";
|
|
3120
|
+
lte: "lte";
|
|
3121
|
+
in: "in";
|
|
3122
|
+
contains: "contains";
|
|
3123
|
+
notContains: "notContains";
|
|
3124
|
+
not_contains: "not_contains";
|
|
3125
|
+
startsWith: "startsWith";
|
|
3126
|
+
starts_with: "starts_with";
|
|
3127
|
+
endsWith: "endsWith";
|
|
3128
|
+
ends_with: "ends_with";
|
|
3129
|
+
isEmpty: "isEmpty";
|
|
3130
|
+
isNotEmpty: "isNotEmpty";
|
|
3131
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
2974
3132
|
}, z.core.$strip>, z.ZodObject<{
|
|
2975
3133
|
channel: z.ZodString;
|
|
2976
3134
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3064,7 +3222,24 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
3064
3222
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
3065
3223
|
model: z.ZodString;
|
|
3066
3224
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3067
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
3225
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
3226
|
+
eq: "eq";
|
|
3227
|
+
neq: "neq";
|
|
3228
|
+
gt: "gt";
|
|
3229
|
+
gte: "gte";
|
|
3230
|
+
lt: "lt";
|
|
3231
|
+
lte: "lte";
|
|
3232
|
+
in: "in";
|
|
3233
|
+
contains: "contains";
|
|
3234
|
+
notContains: "notContains";
|
|
3235
|
+
not_contains: "not_contains";
|
|
3236
|
+
startsWith: "startsWith";
|
|
3237
|
+
starts_with: "starts_with";
|
|
3238
|
+
endsWith: "endsWith";
|
|
3239
|
+
ends_with: "ends_with";
|
|
3240
|
+
isEmpty: "isEmpty";
|
|
3241
|
+
isNotEmpty: "isNotEmpty";
|
|
3242
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
3068
3243
|
}, z.core.$strip>, z.ZodObject<{
|
|
3069
3244
|
channel: z.ZodString;
|
|
3070
3245
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3616,7 +3791,24 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3616
3791
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
3617
3792
|
model: z.ZodString;
|
|
3618
3793
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3619
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
3794
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
3795
|
+
eq: "eq";
|
|
3796
|
+
neq: "neq";
|
|
3797
|
+
gt: "gt";
|
|
3798
|
+
gte: "gte";
|
|
3799
|
+
lt: "lt";
|
|
3800
|
+
lte: "lte";
|
|
3801
|
+
in: "in";
|
|
3802
|
+
contains: "contains";
|
|
3803
|
+
notContains: "notContains";
|
|
3804
|
+
not_contains: "not_contains";
|
|
3805
|
+
startsWith: "startsWith";
|
|
3806
|
+
starts_with: "starts_with";
|
|
3807
|
+
endsWith: "endsWith";
|
|
3808
|
+
ends_with: "ends_with";
|
|
3809
|
+
isEmpty: "isEmpty";
|
|
3810
|
+
isNotEmpty: "isNotEmpty";
|
|
3811
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
3620
3812
|
}, z.core.$strip>, z.ZodObject<{
|
|
3621
3813
|
channel: z.ZodString;
|
|
3622
3814
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3710,7 +3902,24 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3710
3902
|
requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
3711
3903
|
model: z.ZodString;
|
|
3712
3904
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3713
|
-
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.
|
|
3905
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
3906
|
+
eq: "eq";
|
|
3907
|
+
neq: "neq";
|
|
3908
|
+
gt: "gt";
|
|
3909
|
+
gte: "gte";
|
|
3910
|
+
lt: "lt";
|
|
3911
|
+
lte: "lte";
|
|
3912
|
+
in: "in";
|
|
3913
|
+
contains: "contains";
|
|
3914
|
+
notContains: "notContains";
|
|
3915
|
+
not_contains: "not_contains";
|
|
3916
|
+
startsWith: "startsWith";
|
|
3917
|
+
starts_with: "starts_with";
|
|
3918
|
+
endsWith: "endsWith";
|
|
3919
|
+
ends_with: "ends_with";
|
|
3920
|
+
isEmpty: "isEmpty";
|
|
3921
|
+
isNotEmpty: "isNotEmpty";
|
|
3922
|
+
}>, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
3714
3923
|
}, z.core.$strip>, z.ZodObject<{
|
|
3715
3924
|
channel: z.ZodString;
|
|
3716
3925
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -4196,7 +4405,6 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
4196
4405
|
export type ParsedSkedyulConfig = z.infer<typeof SkedyulConfigSchema>;
|
|
4197
4406
|
export declare function safeParseConfig(data: unknown): ParsedSkedyulConfig | null;
|
|
4198
4407
|
export type FieldOwner = z.infer<typeof FieldOwnerSchema>;
|
|
4199
|
-
export type StructuredFilter = z.infer<typeof StructuredFilterSchema>;
|
|
4200
4408
|
export type FieldOption = z.infer<typeof FieldOptionSchema>;
|
|
4201
4409
|
export type InlineFieldDefinition = z.infer<typeof InlineFieldDefinitionSchema>;
|
|
4202
4410
|
export type RelationshipCardinality = z.infer<typeof RelationshipCardinalitySchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.MessageSendOutputSchema = exports.MessageSendInputSchema = exports.MessageSendMessageSchema = exports.MessageSendContactSchema = exports.MessageSendSubscriptionSchema = exports.MessageSendChannelSchema = exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.InstallConfigSchema = exports.AgentDefinitionSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookTypeSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.NavigationConfigSchema = exports.NavigationBreadcrumbSchema = exports.BreadcrumbItemSchema = exports.NavigationSidebarSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextToolItemDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextFiltersSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ModelMapperBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = exports.EmptyFormComponentDefinitionSchema = void 0;
|
|
3
|
+
exports.FileSettingComponentDefinitionSchema = exports.ImageSettingComponentDefinitionSchema = exports.TimePickerComponentDefinitionSchema = exports.DatePickerComponentDefinitionSchema = exports.CheckboxComponentDefinitionSchema = exports.ComboboxComponentDefinitionSchema = exports.SelectComponentDefinitionSchema = exports.TextareaComponentDefinitionSchema = exports.InputComponentDefinitionSchema = exports.FormLayoutConfigDefinitionSchema = exports.FormLayoutRowDefinitionSchema = exports.FormLayoutColumnDefinitionSchema = exports.RelationshipExtensionSchema = exports.FieldSettingButtonPropsSchema = exports.FormV2StylePropsSchema = exports.PageActionDefinitionSchema = exports.PageFormHeaderSchema = exports.PageFieldSourceSchema = exports.PageFieldTypeSchema = exports.PageBlockTypeSchema = exports.PageTypeSchema = exports.WorkflowDefinitionSchema = exports.WorkflowActionSchema = exports.WorkflowActionInputSchema = exports.ChannelDefinitionSchema = exports.ChannelFieldDefinitionSchema = exports.ChannelCapabilitySchema = exports.ChannelCapabilityTypeSchema = exports.RelationshipDefinitionSchema = exports.RelationshipLinkSchema = exports.OnDeleteBehaviorSchema = exports.RelationshipCardinalitySchema = exports.ModelDefinitionSchema = exports.ModelFieldDefinitionSchema = exports.AppFieldVisibilitySchema = exports.InlineFieldDefinitionSchema = exports.FieldOptionSchema = exports.FieldDataTypeSchema = exports.ResourceDependencySchema = exports.WorkflowDependencySchema = exports.ChannelDependencySchema = exports.ModelDependencySchema = exports.StructuredFilterSchema = exports.FilterConditionSchema = exports.FilterOperatorSchema = exports.FieldOwnerSchema = exports.ComputeLayerTypeSchema = exports.EnvSchemaSchema = exports.EnvVariableDefinitionSchema = exports.EnvVisibilitySchema = void 0;
|
|
4
|
+
exports.MessageSendOutputSchema = exports.MessageSendInputSchema = exports.MessageSendMessageSchema = exports.MessageSendContactSchema = exports.MessageSendSubscriptionSchema = exports.MessageSendChannelSchema = exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.InstallConfigSchema = exports.AgentDefinitionSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookTypeSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.NavigationConfigSchema = exports.NavigationBreadcrumbSchema = exports.BreadcrumbItemSchema = exports.NavigationSidebarSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextToolItemDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextFiltersSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ModelMapperBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = exports.EmptyFormComponentDefinitionSchema = exports.ListComponentDefinitionSchema = exports.ListItemTemplateSchema = void 0;
|
|
5
5
|
exports.safeParseConfig = safeParseConfig;
|
|
6
6
|
exports.isModelDependency = isModelDependency;
|
|
7
7
|
exports.isChannelDependency = isChannelDependency;
|
|
@@ -29,7 +29,27 @@ exports.ComputeLayerTypeSchema = v4_1.z.enum(['serverless', 'dedicated']);
|
|
|
29
29
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
30
30
|
exports.FieldOwnerSchema = v4_1.z.enum(['APP', 'SHARED']);
|
|
31
31
|
const PrimitiveSchema = v4_1.z.union([v4_1.z.string(), v4_1.z.number(), v4_1.z.boolean()]);
|
|
32
|
-
|
|
32
|
+
const PrimitiveOrArraySchema = v4_1.z.union([PrimitiveSchema, v4_1.z.array(PrimitiveSchema)]);
|
|
33
|
+
exports.FilterOperatorSchema = v4_1.z.enum([
|
|
34
|
+
'eq',
|
|
35
|
+
'neq',
|
|
36
|
+
'gt',
|
|
37
|
+
'gte',
|
|
38
|
+
'lt',
|
|
39
|
+
'lte',
|
|
40
|
+
'in',
|
|
41
|
+
'contains',
|
|
42
|
+
'notContains',
|
|
43
|
+
'not_contains',
|
|
44
|
+
'startsWith',
|
|
45
|
+
'starts_with',
|
|
46
|
+
'endsWith',
|
|
47
|
+
'ends_with',
|
|
48
|
+
'isEmpty',
|
|
49
|
+
'isNotEmpty',
|
|
50
|
+
]);
|
|
51
|
+
exports.FilterConditionSchema = v4_1.z.record(exports.FilterOperatorSchema, PrimitiveOrArraySchema);
|
|
52
|
+
exports.StructuredFilterSchema = v4_1.z.record(v4_1.z.string(), exports.FilterConditionSchema);
|
|
33
53
|
exports.ModelDependencySchema = v4_1.z.object({
|
|
34
54
|
model: v4_1.z.string(),
|
|
35
55
|
fields: v4_1.z.array(v4_1.z.string()).optional(),
|
package/dist/server/index.js
CHANGED
|
@@ -204,11 +204,21 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
204
204
|
// Note: effect is embedded in structuredContent because the MCP SDK
|
|
205
205
|
// transport strips custom top-level fields in dedicated mode
|
|
206
206
|
const outputData = result.output;
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
const hasOutputSchema = Boolean(outputZodSchema);
|
|
208
|
+
// MCP SDK requires structuredContent when outputSchema is defined
|
|
209
|
+
// Always provide it (even as empty object) to satisfy validation
|
|
210
|
+
let structuredContent;
|
|
211
|
+
if (outputData) {
|
|
212
|
+
structuredContent = { ...outputData, __effect: result.effect };
|
|
213
|
+
}
|
|
214
|
+
else if (result.effect) {
|
|
215
|
+
structuredContent = { __effect: result.effect };
|
|
216
|
+
}
|
|
217
|
+
else if (hasOutputSchema) {
|
|
218
|
+
// Tool has outputSchema but returned null/undefined output
|
|
219
|
+
// Provide empty object to satisfy MCP SDK validation
|
|
220
|
+
structuredContent = {};
|
|
221
|
+
}
|
|
212
222
|
return {
|
|
213
223
|
content: [{ type: 'text', text: JSON.stringify(result.output) }],
|
|
214
224
|
structuredContent,
|
|
@@ -640,11 +640,20 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
640
640
|
}
|
|
641
641
|
else {
|
|
642
642
|
const outputData = toolResult.output;
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
643
|
+
// MCP SDK requires structuredContent when outputSchema is defined
|
|
644
|
+
// Always provide it (even as empty object) to satisfy validation
|
|
645
|
+
let structuredContent;
|
|
646
|
+
if (outputData) {
|
|
647
|
+
structuredContent = { ...outputData, __effect: toolResult.effect };
|
|
648
|
+
}
|
|
649
|
+
else if (toolResult.effect) {
|
|
650
|
+
structuredContent = { __effect: toolResult.effect };
|
|
651
|
+
}
|
|
652
|
+
else if (hasOutputSchema) {
|
|
653
|
+
// Tool has outputSchema but returned null/undefined output
|
|
654
|
+
// Provide empty object to satisfy MCP SDK validation
|
|
655
|
+
structuredContent = {};
|
|
656
|
+
}
|
|
648
657
|
result = {
|
|
649
658
|
content: [{ type: 'text', text: JSON.stringify(toolResult.output) }],
|
|
650
659
|
structuredContent,
|