skedyul 0.1.106 → 0.2.1
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.d.ts +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/schemas.d.ts +72 -0
- package/dist/schemas.js +21 -1
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769291646838
|
package/dist/config.d.ts
CHANGED
|
@@ -178,6 +178,7 @@ export interface FieldSettingButtonProps {
|
|
|
178
178
|
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
179
179
|
isLoading?: boolean;
|
|
180
180
|
isDisabled?: boolean;
|
|
181
|
+
leftIcon?: string;
|
|
181
182
|
}
|
|
182
183
|
/** Relationship extension for dynamic data loading */
|
|
183
184
|
export interface RelationshipExtension {
|
|
@@ -419,6 +420,22 @@ export interface ListBlockDefinition {
|
|
|
419
420
|
}
|
|
420
421
|
/** Union of all block types */
|
|
421
422
|
export type PageBlockDefinition = CardBlockDefinition | LegacyFormBlockDefinition | ListBlockDefinition;
|
|
423
|
+
/** Mode for context data fetching */
|
|
424
|
+
export type PageContextMode = 'first' | 'many' | 'count';
|
|
425
|
+
/** Single context item definition */
|
|
426
|
+
export interface PageContextItemDefinition {
|
|
427
|
+
/** Model handle to fetch data from */
|
|
428
|
+
model: string;
|
|
429
|
+
/** Fetch mode: 'first' returns single object, 'many' returns array, 'count' returns number */
|
|
430
|
+
mode: PageContextMode;
|
|
431
|
+
/** Optional filters using StructuredFilter format */
|
|
432
|
+
filters?: StructuredFilter;
|
|
433
|
+
/** Optional limit for 'many' mode */
|
|
434
|
+
limit?: number;
|
|
435
|
+
}
|
|
436
|
+
/** Context definition: variable name -> context item */
|
|
437
|
+
export type PageContextDefinition = Record<string, PageContextItemDefinition>;
|
|
438
|
+
/** @deprecated Use PageContextDefinition instead */
|
|
422
439
|
export interface PageInstanceFilter {
|
|
423
440
|
model: string;
|
|
424
441
|
where?: Record<string, unknown>;
|
|
@@ -432,6 +449,9 @@ export interface PageDefinition {
|
|
|
432
449
|
navigation?: boolean | string;
|
|
433
450
|
blocks: PageBlockDefinition[];
|
|
434
451
|
actions?: PageActionDefinition[];
|
|
452
|
+
/** Context data to load for Liquid templates. appInstallationId filtering is automatic. */
|
|
453
|
+
context?: PageContextDefinition;
|
|
454
|
+
/** @deprecated Use context instead */
|
|
435
455
|
filter?: PageInstanceFilter;
|
|
436
456
|
}
|
|
437
457
|
export type WebhookHttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ declare const _default: {
|
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
12
12
|
export { defineConfig, loadConfig, validateConfig, CONFIG_FILE_NAMES, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
|
|
13
|
-
export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, ComputeLayerType, InstallHandlerContext, InstallHandlerResult, InstallHandler, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition, ChannelToolBindings, WorkflowDefinition, WorkflowAction, WorkflowActionInput, PageDefinition, PageBlockDefinition, PageFieldDefinition, PageActionDefinition, PageType, PageBlockType, PageFieldType, PageFieldSource, PageFormHeader, PageInstanceFilter, WebhookHttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ProvisionConfig, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, StructuredFilter, } from './config';
|
|
13
|
+
export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, ComputeLayerType, InstallHandlerContext, InstallHandlerResult, InstallHandler, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition, ChannelToolBindings, WorkflowDefinition, WorkflowAction, WorkflowActionInput, PageDefinition, PageBlockDefinition, PageFieldDefinition, PageActionDefinition, PageType, PageBlockType, PageFieldType, PageFieldSource, PageFormHeader, PageContextMode, PageContextItemDefinition, PageContextDefinition, PageInstanceFilter, WebhookHttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ProvisionConfig, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, StructuredFilter, } from './config';
|
package/dist/schemas.d.ts
CHANGED
|
@@ -421,6 +421,7 @@ export declare const FieldSettingButtonPropsSchema: z.ZodObject<{
|
|
|
421
421
|
}>>;
|
|
422
422
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
423
423
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
424
425
|
}, z.core.$strip>;
|
|
425
426
|
/** Relationship extension for dynamic data loading */
|
|
426
427
|
export declare const RelationshipExtensionSchema: z.ZodObject<{
|
|
@@ -700,6 +701,7 @@ export declare const FieldSettingComponentDefinitionSchema: z.ZodObject<{
|
|
|
700
701
|
}>>;
|
|
701
702
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
702
703
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
704
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
703
705
|
}, z.core.$strip>;
|
|
704
706
|
}, z.core.$strip>;
|
|
705
707
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -860,6 +862,7 @@ export declare const FormV2ComponentDefinitionSchema: z.ZodDiscriminatedUnion<[z
|
|
|
860
862
|
}>>;
|
|
861
863
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
862
864
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
865
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
863
866
|
}, z.core.$strip>;
|
|
864
867
|
}, z.core.$strip>;
|
|
865
868
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -1093,6 +1096,7 @@ export declare const FormV2PropsDefinitionSchema: z.ZodObject<{
|
|
|
1093
1096
|
}>>;
|
|
1094
1097
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
1095
1098
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1099
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
1096
1100
|
}, z.core.$strip>;
|
|
1097
1101
|
}, z.core.$strip>;
|
|
1098
1102
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -1352,6 +1356,7 @@ export declare const CardBlockDefinitionSchema: z.ZodObject<{
|
|
|
1352
1356
|
}>>;
|
|
1353
1357
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
1354
1358
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1359
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
1355
1360
|
}, z.core.$strip>;
|
|
1356
1361
|
}, z.core.$strip>;
|
|
1357
1362
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -1704,6 +1709,7 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
1704
1709
|
}>>;
|
|
1705
1710
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
1706
1711
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1712
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
1707
1713
|
}, z.core.$strip>;
|
|
1708
1714
|
}, z.core.$strip>;
|
|
1709
1715
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -1861,6 +1867,35 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
1861
1867
|
icon: z.ZodOptional<z.ZodString>;
|
|
1862
1868
|
emptyMessage: z.ZodOptional<z.ZodString>;
|
|
1863
1869
|
}, z.core.$strip>]>;
|
|
1870
|
+
/** Mode for context data fetching */
|
|
1871
|
+
export declare const PageContextModeSchema: z.ZodEnum<{
|
|
1872
|
+
first: "first";
|
|
1873
|
+
many: "many";
|
|
1874
|
+
count: "count";
|
|
1875
|
+
}>;
|
|
1876
|
+
/** Single context item definition */
|
|
1877
|
+
export declare const PageContextItemDefinitionSchema: z.ZodObject<{
|
|
1878
|
+
model: z.ZodString;
|
|
1879
|
+
mode: z.ZodEnum<{
|
|
1880
|
+
first: "first";
|
|
1881
|
+
many: "many";
|
|
1882
|
+
count: "count";
|
|
1883
|
+
}>;
|
|
1884
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
1885
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1886
|
+
}, z.core.$strip>;
|
|
1887
|
+
/** Context definition: variable name -> context item */
|
|
1888
|
+
export declare const PageContextDefinitionSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1889
|
+
model: z.ZodString;
|
|
1890
|
+
mode: z.ZodEnum<{
|
|
1891
|
+
first: "first";
|
|
1892
|
+
many: "many";
|
|
1893
|
+
count: "count";
|
|
1894
|
+
}>;
|
|
1895
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
1896
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1897
|
+
}, z.core.$strip>>;
|
|
1898
|
+
/** @deprecated Use PageContextDefinitionSchema instead */
|
|
1864
1899
|
export declare const PageInstanceFilterSchema: z.ZodObject<{
|
|
1865
1900
|
model: z.ZodString;
|
|
1866
1901
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -2028,6 +2063,7 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
2028
2063
|
}>>;
|
|
2029
2064
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
2030
2065
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
2066
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
2031
2067
|
}, z.core.$strip>;
|
|
2032
2068
|
}, z.core.$strip>;
|
|
2033
2069
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -2198,6 +2234,16 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
2198
2234
|
isDisabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
2199
2235
|
isHidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
2200
2236
|
}, z.core.$strip>>>;
|
|
2237
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2238
|
+
model: z.ZodString;
|
|
2239
|
+
mode: z.ZodEnum<{
|
|
2240
|
+
first: "first";
|
|
2241
|
+
many: "many";
|
|
2242
|
+
count: "count";
|
|
2243
|
+
}>;
|
|
2244
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
2245
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2246
|
+
}, z.core.$strip>>>;
|
|
2201
2247
|
filter: z.ZodOptional<z.ZodObject<{
|
|
2202
2248
|
model: z.ZodString;
|
|
2203
2249
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -2557,6 +2603,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2557
2603
|
}>>;
|
|
2558
2604
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
2559
2605
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
2606
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
2560
2607
|
}, z.core.$strip>;
|
|
2561
2608
|
}, z.core.$strip>;
|
|
2562
2609
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -2727,6 +2774,16 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2727
2774
|
isDisabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
2728
2775
|
isHidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
2729
2776
|
}, z.core.$strip>>>;
|
|
2777
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2778
|
+
model: z.ZodString;
|
|
2779
|
+
mode: z.ZodEnum<{
|
|
2780
|
+
first: "first";
|
|
2781
|
+
many: "many";
|
|
2782
|
+
count: "count";
|
|
2783
|
+
}>;
|
|
2784
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
2785
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2786
|
+
}, z.core.$strip>>>;
|
|
2730
2787
|
filter: z.ZodOptional<z.ZodObject<{
|
|
2731
2788
|
model: z.ZodString;
|
|
2732
2789
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -3069,6 +3126,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3069
3126
|
}>>;
|
|
3070
3127
|
isLoading: z.ZodOptional<z.ZodBoolean>;
|
|
3071
3128
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
3129
|
+
leftIcon: z.ZodOptional<z.ZodString>;
|
|
3072
3130
|
}, z.core.$strip>;
|
|
3073
3131
|
}, z.core.$strip>;
|
|
3074
3132
|
modalForm: z.ZodOptional<z.ZodType<{
|
|
@@ -3239,6 +3297,16 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3239
3297
|
isDisabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
3240
3298
|
isHidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
3241
3299
|
}, z.core.$strip>>>;
|
|
3300
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3301
|
+
model: z.ZodString;
|
|
3302
|
+
mode: z.ZodEnum<{
|
|
3303
|
+
first: "first";
|
|
3304
|
+
many: "many";
|
|
3305
|
+
count: "count";
|
|
3306
|
+
}>;
|
|
3307
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
3308
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
3309
|
+
}, z.core.$strip>>>;
|
|
3242
3310
|
filter: z.ZodOptional<z.ZodObject<{
|
|
3243
3311
|
model: z.ZodString;
|
|
3244
3312
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -3264,6 +3332,10 @@ export type PageFieldType = z.infer<typeof PageFieldTypeSchema>;
|
|
|
3264
3332
|
export type PageFieldSource = z.infer<typeof PageFieldSourceSchema>;
|
|
3265
3333
|
export type PageActionDefinition = z.infer<typeof PageActionDefinitionSchema>;
|
|
3266
3334
|
export type PageBlockDefinition = z.infer<typeof PageBlockDefinitionSchema>;
|
|
3335
|
+
export type PageContextMode = z.infer<typeof PageContextModeSchema>;
|
|
3336
|
+
export type PageContextItemDefinition = z.infer<typeof PageContextItemDefinitionSchema>;
|
|
3337
|
+
export type PageContextDefinition = z.infer<typeof PageContextDefinitionSchema>;
|
|
3338
|
+
/** @deprecated Use PageContextDefinition instead */
|
|
3267
3339
|
export type PageInstanceFilter = z.infer<typeof PageInstanceFilterSchema>;
|
|
3268
3340
|
export type PageDefinition = z.infer<typeof PageDefinitionSchema>;
|
|
3269
3341
|
export type ModelDependency = z.infer<typeof ModelDependencySchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModalFormDefinitionSchema = exports.EmptyFormComponentDefinitionSchema = exports.ListComponentDefinitionSchema = 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.ChannelToolBindingsSchema = 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.FieldOwnerSchema = exports.ResourceScopeSchema = exports.ComputeLayerTypeSchema = exports.EnvSchemaSchema = exports.EnvVariableDefinitionSchema = exports.EnvVisibilitySchema = void 0;
|
|
4
|
-
exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.PageInstanceFilterSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = void 0;
|
|
4
|
+
exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = void 0;
|
|
5
5
|
exports.safeParseConfig = safeParseConfig;
|
|
6
6
|
exports.isModelDependency = isModelDependency;
|
|
7
7
|
exports.isChannelDependency = isChannelDependency;
|
|
@@ -209,6 +209,7 @@ exports.FieldSettingButtonPropsSchema = zod_1.z.object({
|
|
|
209
209
|
size: zod_1.z.enum(['default', 'sm', 'lg', 'icon']).optional(),
|
|
210
210
|
isLoading: zod_1.z.boolean().optional(),
|
|
211
211
|
isDisabled: zod_1.z.boolean().optional(),
|
|
212
|
+
leftIcon: zod_1.z.string().optional(),
|
|
212
213
|
});
|
|
213
214
|
/** Relationship extension for dynamic data loading */
|
|
214
215
|
exports.RelationshipExtensionSchema = zod_1.z.object({
|
|
@@ -454,6 +455,22 @@ exports.PageBlockDefinitionSchema = zod_1.z.union([
|
|
|
454
455
|
exports.LegacyFormBlockDefinitionSchema,
|
|
455
456
|
exports.ListBlockDefinitionSchema,
|
|
456
457
|
]);
|
|
458
|
+
/** Mode for context data fetching */
|
|
459
|
+
exports.PageContextModeSchema = zod_1.z.enum(['first', 'many', 'count']);
|
|
460
|
+
/** Single context item definition */
|
|
461
|
+
exports.PageContextItemDefinitionSchema = zod_1.z.object({
|
|
462
|
+
/** Model handle to fetch data from */
|
|
463
|
+
model: zod_1.z.string(),
|
|
464
|
+
/** Fetch mode: 'first' returns single object, 'many' returns array, 'count' returns number */
|
|
465
|
+
mode: exports.PageContextModeSchema,
|
|
466
|
+
/** Optional filters using StructuredFilter format */
|
|
467
|
+
filters: exports.StructuredFilterSchema.optional(),
|
|
468
|
+
/** Optional limit for 'many' mode */
|
|
469
|
+
limit: zod_1.z.number().optional(),
|
|
470
|
+
});
|
|
471
|
+
/** Context definition: variable name -> context item */
|
|
472
|
+
exports.PageContextDefinitionSchema = zod_1.z.record(zod_1.z.string(), exports.PageContextItemDefinitionSchema);
|
|
473
|
+
/** @deprecated Use PageContextDefinitionSchema instead */
|
|
457
474
|
exports.PageInstanceFilterSchema = zod_1.z.object({
|
|
458
475
|
model: zod_1.z.string(),
|
|
459
476
|
where: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
@@ -466,6 +483,9 @@ exports.PageDefinitionSchema = zod_1.z.object({
|
|
|
466
483
|
navigation: zod_1.z.union([zod_1.z.boolean(), zod_1.z.string()]).optional().default(true),
|
|
467
484
|
blocks: zod_1.z.array(exports.PageBlockDefinitionSchema),
|
|
468
485
|
actions: zod_1.z.array(exports.PageActionDefinitionSchema).optional(),
|
|
486
|
+
/** Context data to load for Liquid templates. appInstallationId filtering is automatic. */
|
|
487
|
+
context: exports.PageContextDefinitionSchema.optional(),
|
|
488
|
+
/** @deprecated Use context instead */
|
|
469
489
|
filter: exports.PageInstanceFilterSchema.optional(),
|
|
470
490
|
});
|
|
471
491
|
// ─────────────────────────────────────────────────────────────────────────────
|