skedyul 0.2.18 → 0.2.19
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 +59 -6
- package/dist/index.d.ts +1 -1
- package/dist/schemas.d.ts +167 -14
- package/dist/schemas.js +69 -6
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769313045562
|
package/dist/config.d.ts
CHANGED
|
@@ -456,14 +456,20 @@ export interface ListBlockDefinition {
|
|
|
456
456
|
export type PageBlockDefinition = CardBlockDefinition | LegacyFormBlockDefinition | ListBlockDefinition;
|
|
457
457
|
/** Mode for context data fetching */
|
|
458
458
|
export type PageContextMode = 'first' | 'many' | 'count';
|
|
459
|
+
/** Simple context filters with Liquid template support */
|
|
460
|
+
export type PageContextFilters = Record<string, string | StructuredFilter[keyof StructuredFilter]>;
|
|
459
461
|
/** Single context item definition */
|
|
460
462
|
export interface PageContextItemDefinition {
|
|
461
463
|
/** Model handle to fetch data from */
|
|
462
464
|
model: string;
|
|
463
465
|
/** Fetch mode: 'first' returns single object, 'many' returns array, 'count' returns number */
|
|
464
466
|
mode: PageContextMode;
|
|
465
|
-
/**
|
|
466
|
-
|
|
467
|
+
/**
|
|
468
|
+
* Optional filters. Supports:
|
|
469
|
+
* - Simple key-value with Liquid templates: { id: '{{ path_params.id }}' }
|
|
470
|
+
* - StructuredFilter format: { status: { eq: 'APPROVED' } }
|
|
471
|
+
*/
|
|
472
|
+
filters?: PageContextFilters;
|
|
467
473
|
/** Optional limit for 'many' mode */
|
|
468
474
|
limit?: number;
|
|
469
475
|
}
|
|
@@ -474,13 +480,58 @@ export interface PageInstanceFilter {
|
|
|
474
480
|
model: string;
|
|
475
481
|
where?: Record<string, unknown>;
|
|
476
482
|
}
|
|
483
|
+
/** Navigation item for sidebar */
|
|
484
|
+
export interface NavigationItem {
|
|
485
|
+
/** Display label (supports Liquid templates) */
|
|
486
|
+
label: string;
|
|
487
|
+
/** URL href (supports Liquid templates with path_params and context) */
|
|
488
|
+
href: string;
|
|
489
|
+
/** Optional icon name */
|
|
490
|
+
icon?: string;
|
|
491
|
+
}
|
|
492
|
+
/** Navigation section with title and items */
|
|
493
|
+
export interface NavigationSection {
|
|
494
|
+
/** Section title (supports Liquid templates) */
|
|
495
|
+
title?: string;
|
|
496
|
+
/** Navigation items in this section */
|
|
497
|
+
items: NavigationItem[];
|
|
498
|
+
}
|
|
499
|
+
/** Sidebar navigation configuration */
|
|
500
|
+
export interface NavigationSidebar {
|
|
501
|
+
/** Sections to display in the sidebar */
|
|
502
|
+
sections: NavigationSection[];
|
|
503
|
+
}
|
|
504
|
+
/** Breadcrumb item */
|
|
505
|
+
export interface BreadcrumbItem {
|
|
506
|
+
/** Display label (supports Liquid templates) */
|
|
507
|
+
label: string;
|
|
508
|
+
/** Optional href - if not provided, item is not clickable */
|
|
509
|
+
href?: string;
|
|
510
|
+
}
|
|
511
|
+
/** Breadcrumb navigation configuration */
|
|
512
|
+
export interface NavigationBreadcrumb {
|
|
513
|
+
/** Breadcrumb items from left to right */
|
|
514
|
+
items: BreadcrumbItem[];
|
|
515
|
+
}
|
|
516
|
+
/** Full navigation configuration */
|
|
517
|
+
export interface NavigationConfig {
|
|
518
|
+
/** Sidebar navigation */
|
|
519
|
+
sidebar?: NavigationSidebar;
|
|
520
|
+
/** Breadcrumb navigation */
|
|
521
|
+
breadcrumb?: NavigationBreadcrumb;
|
|
522
|
+
}
|
|
477
523
|
export interface PageDefinition {
|
|
478
|
-
handle: string;
|
|
479
524
|
type: PageType;
|
|
480
525
|
title: string;
|
|
481
|
-
path
|
|
482
|
-
|
|
483
|
-
|
|
526
|
+
/** URL path for this page (e.g., '/phone-numbers' or '/phone-numbers/[id]' for dynamic segments) */
|
|
527
|
+
path: string;
|
|
528
|
+
/**
|
|
529
|
+
* Navigation configuration:
|
|
530
|
+
* - true/false: show/hide in auto-generated navigation
|
|
531
|
+
* - string: Liquid template that evaluates to true/false
|
|
532
|
+
* - NavigationConfig: full navigation override for this page (replaces base navigation)
|
|
533
|
+
*/
|
|
534
|
+
navigation?: boolean | string | NavigationConfig;
|
|
484
535
|
blocks: PageBlockDefinition[];
|
|
485
536
|
actions?: PageActionDefinition[];
|
|
486
537
|
/** Context data to load for Liquid templates. appInstallationId filtering is automatic. */
|
|
@@ -544,6 +595,8 @@ export interface ProvisionConfig {
|
|
|
544
595
|
channels?: ChannelDefinition[];
|
|
545
596
|
/** Workflow definitions */
|
|
546
597
|
workflows?: WorkflowDefinition[];
|
|
598
|
+
/** Base navigation configuration for all pages (can be overridden per page) */
|
|
599
|
+
navigation?: NavigationConfig;
|
|
547
600
|
/** Page definitions for app UI */
|
|
548
601
|
pages?: PageDefinition[];
|
|
549
602
|
/** Webhook handler names to auto-register at provision level */
|
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, PageContextMode, PageContextItemDefinition, PageContextDefinition, 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, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, WebhookHttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ProvisionConfig, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, StructuredFilter, } from './config';
|
package/dist/schemas.d.ts
CHANGED
|
@@ -2063,6 +2063,11 @@ export declare const PageContextModeSchema: z.ZodEnum<{
|
|
|
2063
2063
|
many: "many";
|
|
2064
2064
|
count: "count";
|
|
2065
2065
|
}>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Page context filters schema.
|
|
2068
|
+
* Supports both structured filters and simple Liquid template strings.
|
|
2069
|
+
*/
|
|
2070
|
+
export declare const PageContextFiltersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>;
|
|
2066
2071
|
/** Single context item definition */
|
|
2067
2072
|
export declare const PageContextItemDefinitionSchema: z.ZodObject<{
|
|
2068
2073
|
model: z.ZodString;
|
|
@@ -2071,7 +2076,7 @@ export declare const PageContextItemDefinitionSchema: z.ZodObject<{
|
|
|
2071
2076
|
many: "many";
|
|
2072
2077
|
count: "count";
|
|
2073
2078
|
}>;
|
|
2074
|
-
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]>>]
|
|
2079
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>>;
|
|
2075
2080
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2076
2081
|
}, z.core.$strip>;
|
|
2077
2082
|
/** Context definition: variable name -> context item */
|
|
@@ -2082,7 +2087,7 @@ export declare const PageContextDefinitionSchema: z.ZodRecord<z.ZodString, z.Zod
|
|
|
2082
2087
|
many: "many";
|
|
2083
2088
|
count: "count";
|
|
2084
2089
|
}>;
|
|
2085
|
-
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]>>]
|
|
2090
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>>;
|
|
2086
2091
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2087
2092
|
}, z.core.$strip>>;
|
|
2088
2093
|
/** @deprecated Use PageContextDefinitionSchema instead */
|
|
@@ -2090,15 +2095,88 @@ export declare const PageInstanceFilterSchema: z.ZodObject<{
|
|
|
2090
2095
|
model: z.ZodString;
|
|
2091
2096
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2092
2097
|
}, z.core.$strip>;
|
|
2098
|
+
/** Navigation item for sidebar */
|
|
2099
|
+
export declare const NavigationItemSchema: z.ZodObject<{
|
|
2100
|
+
label: z.ZodString;
|
|
2101
|
+
href: z.ZodString;
|
|
2102
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2103
|
+
}, z.core.$strip>;
|
|
2104
|
+
/** Navigation section with title and items */
|
|
2105
|
+
export declare const NavigationSectionSchema: z.ZodObject<{
|
|
2106
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2108
|
+
label: z.ZodString;
|
|
2109
|
+
href: z.ZodString;
|
|
2110
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2111
|
+
}, z.core.$strip>>;
|
|
2112
|
+
}, z.core.$strip>;
|
|
2113
|
+
/** Sidebar navigation configuration */
|
|
2114
|
+
export declare const NavigationSidebarSchema: z.ZodObject<{
|
|
2115
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2116
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2117
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2118
|
+
label: z.ZodString;
|
|
2119
|
+
href: z.ZodString;
|
|
2120
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2121
|
+
}, z.core.$strip>>;
|
|
2122
|
+
}, z.core.$strip>>;
|
|
2123
|
+
}, z.core.$strip>;
|
|
2124
|
+
/** Breadcrumb item */
|
|
2125
|
+
export declare const BreadcrumbItemSchema: z.ZodObject<{
|
|
2126
|
+
label: z.ZodString;
|
|
2127
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2128
|
+
}, z.core.$strip>;
|
|
2129
|
+
/** Breadcrumb navigation configuration */
|
|
2130
|
+
export declare const NavigationBreadcrumbSchema: z.ZodObject<{
|
|
2131
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2132
|
+
label: z.ZodString;
|
|
2133
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2134
|
+
}, z.core.$strip>>;
|
|
2135
|
+
}, z.core.$strip>;
|
|
2136
|
+
/** Full navigation configuration */
|
|
2137
|
+
export declare const NavigationConfigSchema: z.ZodObject<{
|
|
2138
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
2139
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2140
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2141
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2142
|
+
label: z.ZodString;
|
|
2143
|
+
href: z.ZodString;
|
|
2144
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2145
|
+
}, z.core.$strip>>;
|
|
2146
|
+
}, z.core.$strip>>;
|
|
2147
|
+
}, z.core.$strip>>;
|
|
2148
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
2149
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2150
|
+
label: z.ZodString;
|
|
2151
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2152
|
+
}, z.core.$strip>>;
|
|
2153
|
+
}, z.core.$strip>>;
|
|
2154
|
+
}, z.core.$strip>;
|
|
2093
2155
|
export declare const PageDefinitionSchema: z.ZodObject<{
|
|
2094
|
-
handle: z.ZodString;
|
|
2095
2156
|
type: z.ZodEnum<{
|
|
2096
2157
|
INSTANCE: "INSTANCE";
|
|
2097
2158
|
LIST: "LIST";
|
|
2098
2159
|
}>;
|
|
2099
2160
|
title: z.ZodString;
|
|
2100
|
-
path: z.
|
|
2101
|
-
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString
|
|
2161
|
+
path: z.ZodString;
|
|
2162
|
+
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
|
|
2163
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
2164
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2165
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2166
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2167
|
+
label: z.ZodString;
|
|
2168
|
+
href: z.ZodString;
|
|
2169
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2170
|
+
}, z.core.$strip>>;
|
|
2171
|
+
}, z.core.$strip>>;
|
|
2172
|
+
}, z.core.$strip>>;
|
|
2173
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
2174
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2175
|
+
label: z.ZodString;
|
|
2176
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2177
|
+
}, z.core.$strip>>;
|
|
2178
|
+
}, z.core.$strip>>;
|
|
2179
|
+
}, z.core.$strip>]>>>;
|
|
2102
2180
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2103
2181
|
type: z.ZodLiteral<"card">;
|
|
2104
2182
|
restructurable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2467,7 +2545,7 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
2467
2545
|
many: "many";
|
|
2468
2546
|
count: "count";
|
|
2469
2547
|
}>;
|
|
2470
|
-
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]>>]
|
|
2548
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>>;
|
|
2471
2549
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2472
2550
|
}, z.core.$strip>>>;
|
|
2473
2551
|
filter: z.ZodOptional<z.ZodObject<{
|
|
@@ -2666,15 +2744,49 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2666
2744
|
}, z.core.$strip>>>;
|
|
2667
2745
|
}, z.core.$strip>>;
|
|
2668
2746
|
}, z.core.$strip>>>;
|
|
2747
|
+
navigation: z.ZodOptional<z.ZodObject<{
|
|
2748
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
2749
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2750
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2751
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2752
|
+
label: z.ZodString;
|
|
2753
|
+
href: z.ZodString;
|
|
2754
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2755
|
+
}, z.core.$strip>>;
|
|
2756
|
+
}, z.core.$strip>>;
|
|
2757
|
+
}, z.core.$strip>>;
|
|
2758
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
2759
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2760
|
+
label: z.ZodString;
|
|
2761
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2762
|
+
}, z.core.$strip>>;
|
|
2763
|
+
}, z.core.$strip>>;
|
|
2764
|
+
}, z.core.$strip>>;
|
|
2669
2765
|
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2670
|
-
handle: z.ZodString;
|
|
2671
2766
|
type: z.ZodEnum<{
|
|
2672
2767
|
INSTANCE: "INSTANCE";
|
|
2673
2768
|
LIST: "LIST";
|
|
2674
2769
|
}>;
|
|
2675
2770
|
title: z.ZodString;
|
|
2676
|
-
path: z.
|
|
2677
|
-
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString
|
|
2771
|
+
path: z.ZodString;
|
|
2772
|
+
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
|
|
2773
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
2774
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2775
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2776
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2777
|
+
label: z.ZodString;
|
|
2778
|
+
href: z.ZodString;
|
|
2779
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2780
|
+
}, z.core.$strip>>;
|
|
2781
|
+
}, z.core.$strip>>;
|
|
2782
|
+
}, z.core.$strip>>;
|
|
2783
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
2784
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2785
|
+
label: z.ZodString;
|
|
2786
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2787
|
+
}, z.core.$strip>>;
|
|
2788
|
+
}, z.core.$strip>>;
|
|
2789
|
+
}, z.core.$strip>]>>>;
|
|
2678
2790
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2679
2791
|
type: z.ZodLiteral<"card">;
|
|
2680
2792
|
restructurable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3043,7 +3155,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
3043
3155
|
many: "many";
|
|
3044
3156
|
count: "count";
|
|
3045
3157
|
}>;
|
|
3046
|
-
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]>>]
|
|
3158
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>>;
|
|
3047
3159
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
3048
3160
|
}, z.core.$strip>>>;
|
|
3049
3161
|
filter: z.ZodOptional<z.ZodObject<{
|
|
@@ -3225,15 +3337,49 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3225
3337
|
}, z.core.$strip>>>;
|
|
3226
3338
|
}, z.core.$strip>>;
|
|
3227
3339
|
}, z.core.$strip>>>;
|
|
3340
|
+
navigation: z.ZodOptional<z.ZodObject<{
|
|
3341
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
3342
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
3343
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3344
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3345
|
+
label: z.ZodString;
|
|
3346
|
+
href: z.ZodString;
|
|
3347
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3348
|
+
}, z.core.$strip>>;
|
|
3349
|
+
}, z.core.$strip>>;
|
|
3350
|
+
}, z.core.$strip>>;
|
|
3351
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
3352
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3353
|
+
label: z.ZodString;
|
|
3354
|
+
href: z.ZodOptional<z.ZodString>;
|
|
3355
|
+
}, z.core.$strip>>;
|
|
3356
|
+
}, z.core.$strip>>;
|
|
3357
|
+
}, z.core.$strip>>;
|
|
3228
3358
|
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3229
|
-
handle: z.ZodString;
|
|
3230
3359
|
type: z.ZodEnum<{
|
|
3231
3360
|
INSTANCE: "INSTANCE";
|
|
3232
3361
|
LIST: "LIST";
|
|
3233
3362
|
}>;
|
|
3234
3363
|
title: z.ZodString;
|
|
3235
|
-
path: z.
|
|
3236
|
-
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString
|
|
3364
|
+
path: z.ZodString;
|
|
3365
|
+
navigation: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
|
|
3366
|
+
sidebar: z.ZodOptional<z.ZodObject<{
|
|
3367
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
3368
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3369
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3370
|
+
label: z.ZodString;
|
|
3371
|
+
href: z.ZodString;
|
|
3372
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3373
|
+
}, z.core.$strip>>;
|
|
3374
|
+
}, z.core.$strip>>;
|
|
3375
|
+
}, z.core.$strip>>;
|
|
3376
|
+
breadcrumb: z.ZodOptional<z.ZodObject<{
|
|
3377
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3378
|
+
label: z.ZodString;
|
|
3379
|
+
href: z.ZodOptional<z.ZodString>;
|
|
3380
|
+
}, z.core.$strip>>;
|
|
3381
|
+
}, z.core.$strip>>;
|
|
3382
|
+
}, z.core.$strip>]>>>;
|
|
3237
3383
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
3238
3384
|
type: z.ZodLiteral<"card">;
|
|
3239
3385
|
restructurable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3602,7 +3748,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3602
3748
|
many: "many";
|
|
3603
3749
|
count: "count";
|
|
3604
3750
|
}>;
|
|
3605
|
-
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]>>]
|
|
3751
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [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]>>]>>]>>>;
|
|
3606
3752
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
3607
3753
|
}, z.core.$strip>>>;
|
|
3608
3754
|
filter: z.ZodOptional<z.ZodObject<{
|
|
@@ -3631,10 +3777,17 @@ export type PageFieldSource = z.infer<typeof PageFieldSourceSchema>;
|
|
|
3631
3777
|
export type PageActionDefinition = z.infer<typeof PageActionDefinitionSchema>;
|
|
3632
3778
|
export type PageBlockDefinition = z.infer<typeof PageBlockDefinitionSchema>;
|
|
3633
3779
|
export type PageContextMode = z.infer<typeof PageContextModeSchema>;
|
|
3780
|
+
export type PageContextFilters = z.infer<typeof PageContextFiltersSchema>;
|
|
3634
3781
|
export type PageContextItemDefinition = z.infer<typeof PageContextItemDefinitionSchema>;
|
|
3635
3782
|
export type PageContextDefinition = z.infer<typeof PageContextDefinitionSchema>;
|
|
3636
3783
|
/** @deprecated Use PageContextDefinition instead */
|
|
3637
3784
|
export type PageInstanceFilter = z.infer<typeof PageInstanceFilterSchema>;
|
|
3785
|
+
export type NavigationItem = z.infer<typeof NavigationItemSchema>;
|
|
3786
|
+
export type NavigationSection = z.infer<typeof NavigationSectionSchema>;
|
|
3787
|
+
export type NavigationSidebar = z.infer<typeof NavigationSidebarSchema>;
|
|
3788
|
+
export type BreadcrumbItem = z.infer<typeof BreadcrumbItemSchema>;
|
|
3789
|
+
export type NavigationBreadcrumb = z.infer<typeof NavigationBreadcrumbSchema>;
|
|
3790
|
+
export type NavigationConfig = z.infer<typeof NavigationConfigSchema>;
|
|
3638
3791
|
export type PageDefinition = z.infer<typeof PageDefinitionSchema>;
|
|
3639
3792
|
export type ModelDependency = z.infer<typeof ModelDependencySchema>;
|
|
3640
3793
|
export type ChannelDependency = z.infer<typeof ChannelDependencySchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmptyFormComponentDefinitionSchema = exports.ListComponentDefinitionSchema = exports.ListItemTemplateSchema = 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.PageContextDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = void 0;
|
|
4
|
+
exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.NavigationConfigSchema = exports.NavigationBreadcrumbSchema = exports.BreadcrumbItemSchema = exports.NavigationSidebarSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextFiltersSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = void 0;
|
|
5
5
|
exports.safeParseConfig = safeParseConfig;
|
|
6
6
|
exports.isModelDependency = isModelDependency;
|
|
7
7
|
exports.isChannelDependency = isChannelDependency;
|
|
@@ -492,14 +492,26 @@ exports.PageBlockDefinitionSchema = zod_1.z.union([
|
|
|
492
492
|
]);
|
|
493
493
|
/** Mode for context data fetching */
|
|
494
494
|
exports.PageContextModeSchema = zod_1.z.enum(['first', 'many', 'count']);
|
|
495
|
+
/**
|
|
496
|
+
* Page context filters schema.
|
|
497
|
+
* Supports both structured filters and simple Liquid template strings.
|
|
498
|
+
*/
|
|
499
|
+
exports.PageContextFiltersSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.union([
|
|
500
|
+
zod_1.z.string(), // Liquid template string, e.g., '{{ path_params.id }}'
|
|
501
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.union([PrimitiveSchema, zod_1.z.array(PrimitiveSchema)])), // StructuredFilter
|
|
502
|
+
]));
|
|
495
503
|
/** Single context item definition */
|
|
496
504
|
exports.PageContextItemDefinitionSchema = zod_1.z.object({
|
|
497
505
|
/** Model handle to fetch data from */
|
|
498
506
|
model: zod_1.z.string(),
|
|
499
507
|
/** Fetch mode: 'first' returns single object, 'many' returns array, 'count' returns number */
|
|
500
508
|
mode: exports.PageContextModeSchema,
|
|
501
|
-
/**
|
|
502
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Optional filters. Supports:
|
|
511
|
+
* - Simple key-value with Liquid templates: { id: '{{ path_params.id }}' }
|
|
512
|
+
* - StructuredFilter format: { status: { eq: 'APPROVED' } }
|
|
513
|
+
*/
|
|
514
|
+
filters: exports.PageContextFiltersSchema.optional(),
|
|
503
515
|
/** Optional limit for 'many' mode */
|
|
504
516
|
limit: zod_1.z.number().optional(),
|
|
505
517
|
});
|
|
@@ -510,12 +522,61 @@ exports.PageInstanceFilterSchema = zod_1.z.object({
|
|
|
510
522
|
model: zod_1.z.string(),
|
|
511
523
|
where: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
512
524
|
});
|
|
525
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
526
|
+
// Navigation Schemas
|
|
527
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
528
|
+
/** Navigation item for sidebar */
|
|
529
|
+
exports.NavigationItemSchema = zod_1.z.object({
|
|
530
|
+
/** Display label (supports Liquid templates) */
|
|
531
|
+
label: zod_1.z.string(),
|
|
532
|
+
/** URL href (supports Liquid templates with path_params and context) */
|
|
533
|
+
href: zod_1.z.string(),
|
|
534
|
+
/** Optional icon name */
|
|
535
|
+
icon: zod_1.z.string().optional(),
|
|
536
|
+
});
|
|
537
|
+
/** Navigation section with title and items */
|
|
538
|
+
exports.NavigationSectionSchema = zod_1.z.object({
|
|
539
|
+
/** Section title (supports Liquid templates) */
|
|
540
|
+
title: zod_1.z.string().optional(),
|
|
541
|
+
/** Navigation items in this section */
|
|
542
|
+
items: zod_1.z.array(exports.NavigationItemSchema),
|
|
543
|
+
});
|
|
544
|
+
/** Sidebar navigation configuration */
|
|
545
|
+
exports.NavigationSidebarSchema = zod_1.z.object({
|
|
546
|
+
/** Sections to display in the sidebar */
|
|
547
|
+
sections: zod_1.z.array(exports.NavigationSectionSchema),
|
|
548
|
+
});
|
|
549
|
+
/** Breadcrumb item */
|
|
550
|
+
exports.BreadcrumbItemSchema = zod_1.z.object({
|
|
551
|
+
/** Display label (supports Liquid templates) */
|
|
552
|
+
label: zod_1.z.string(),
|
|
553
|
+
/** Optional href - if not provided, item is not clickable */
|
|
554
|
+
href: zod_1.z.string().optional(),
|
|
555
|
+
});
|
|
556
|
+
/** Breadcrumb navigation configuration */
|
|
557
|
+
exports.NavigationBreadcrumbSchema = zod_1.z.object({
|
|
558
|
+
/** Breadcrumb items from left to right */
|
|
559
|
+
items: zod_1.z.array(exports.BreadcrumbItemSchema),
|
|
560
|
+
});
|
|
561
|
+
/** Full navigation configuration */
|
|
562
|
+
exports.NavigationConfigSchema = zod_1.z.object({
|
|
563
|
+
/** Sidebar navigation */
|
|
564
|
+
sidebar: exports.NavigationSidebarSchema.optional(),
|
|
565
|
+
/** Breadcrumb navigation */
|
|
566
|
+
breadcrumb: exports.NavigationBreadcrumbSchema.optional(),
|
|
567
|
+
});
|
|
513
568
|
exports.PageDefinitionSchema = zod_1.z.object({
|
|
514
|
-
handle: zod_1.z.string(),
|
|
515
569
|
type: exports.PageTypeSchema,
|
|
516
570
|
title: zod_1.z.string(),
|
|
517
|
-
path
|
|
518
|
-
|
|
571
|
+
/** URL path for this page (e.g., '/phone-numbers' or '/phone-numbers/[id]' for dynamic segments) */
|
|
572
|
+
path: zod_1.z.string(),
|
|
573
|
+
/**
|
|
574
|
+
* Navigation configuration:
|
|
575
|
+
* - true/false: show/hide in auto-generated navigation
|
|
576
|
+
* - string: Liquid template that evaluates to true/false
|
|
577
|
+
* - NavigationConfigSchema: full navigation override for this page (replaces base navigation)
|
|
578
|
+
*/
|
|
579
|
+
navigation: zod_1.z.union([zod_1.z.boolean(), zod_1.z.string(), exports.NavigationConfigSchema]).optional().default(true),
|
|
519
580
|
blocks: zod_1.z.array(exports.PageBlockDefinitionSchema),
|
|
520
581
|
actions: zod_1.z.array(exports.PageActionDefinitionSchema).optional(),
|
|
521
582
|
/** Context data to load for Liquid templates. appInstallationId filtering is automatic. */
|
|
@@ -542,6 +603,8 @@ exports.ProvisionConfigSchema = zod_1.z.object({
|
|
|
542
603
|
relationships: zod_1.z.array(exports.RelationshipDefinitionSchema).optional(),
|
|
543
604
|
channels: zod_1.z.array(exports.ChannelDefinitionSchema).optional(),
|
|
544
605
|
workflows: zod_1.z.array(exports.WorkflowDefinitionSchema).optional(),
|
|
606
|
+
/** Base navigation configuration for all pages (can be overridden per page) */
|
|
607
|
+
navigation: exports.NavigationConfigSchema.optional(),
|
|
545
608
|
pages: zod_1.z.array(exports.PageDefinitionSchema).optional(),
|
|
546
609
|
webhooks: zod_1.z.array(zod_1.z.string()).optional(),
|
|
547
610
|
});
|