skedyul 0.2.18 → 0.2.20

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