skedyul 0.1.40 → 0.1.41

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
- 1768537680901
1
+ 1768542541896
package/dist/config.d.ts CHANGED
@@ -266,6 +266,36 @@ export interface RelationshipDefinition {
266
266
  /** Target side of the relationship */
267
267
  target: RelationshipLink;
268
268
  }
269
+ /** Page type: INSTANCE shows single record, LIST shows multiple records */
270
+ export type PageType = 'INSTANCE' | 'LIST';
271
+ /** Block types available for pages */
272
+ export type PageBlockType = 'form' | 'spreadsheet' | 'kanban' | 'calendar' | 'link';
273
+ /** Block definition within a page */
274
+ export interface PageBlockDefinition {
275
+ /** Block type determines the UI component */
276
+ type: PageBlockType;
277
+ /** Block title displayed in UI */
278
+ title?: string;
279
+ /** Field handles to include in this block */
280
+ fields?: string[];
281
+ /** Whether the block is read-only (no editing) */
282
+ readonly?: boolean;
283
+ }
284
+ /** Page definition for internal model display */
285
+ export interface PageDefinition {
286
+ /** Unique handle for the page */
287
+ handle: string;
288
+ /** Model handle this page displays */
289
+ model: string;
290
+ /** Page type: INSTANCE (single record) or LIST (multiple records) */
291
+ type: PageType;
292
+ /** Page title displayed in UI */
293
+ title: string;
294
+ /** Optional custom path for navigation */
295
+ path?: string;
296
+ /** Blocks that compose this page */
297
+ blocks: PageBlockDefinition[];
298
+ }
269
299
  export type ChannelIdentifierType = 'DEDICATED_PHONE' | 'TEXT' | 'EMAIL';
270
300
  export interface ChannelIdentifierValue {
271
301
  /** Type of identifier */
@@ -502,6 +532,36 @@ export interface SkedyulConfig {
502
532
  * ```
503
533
  */
504
534
  relationships?: RelationshipDefinition[];
535
+ /**
536
+ * Pages for internal models.
537
+ * Defines how internal models are displayed in the post-install UI.
538
+ * Each page references a model by handle and can have multiple pages per model.
539
+ *
540
+ * @example
541
+ * ```typescript
542
+ * pages: [
543
+ * {
544
+ * handle: 'compliance_submission',
545
+ * model: 'compliance_record',
546
+ * type: 'INSTANCE',
547
+ * title: 'Submit Compliance Record',
548
+ * blocks: [
549
+ * { type: 'form', title: 'Business Registration', fields: ['file'] },
550
+ * ],
551
+ * },
552
+ * {
553
+ * handle: 'phone_numbers_list',
554
+ * model: 'phone_number',
555
+ * type: 'LIST',
556
+ * title: 'Phone Numbers',
557
+ * blocks: [
558
+ * { type: 'spreadsheet', fields: ['phone', 'forwarding_phone_number'] },
559
+ * ],
560
+ * },
561
+ * ]
562
+ * ```
563
+ */
564
+ pages?: PageDefinition[];
505
565
  /**
506
566
  * Communication channels this app provides (new syntax).
507
567
  * Uses typed `requires` for dependencies.
@@ -556,6 +616,8 @@ export interface SerializableSkedyulConfig {
556
616
  postInstall?: PostInstallConfig;
557
617
  /** Unified model definitions (INTERNAL + SHARED) */
558
618
  models?: ModelDefinition[];
619
+ /** Pages for internal model display */
620
+ pages?: PageDefinition[];
559
621
  /** Communication channels (new syntax) */
560
622
  channels?: ChannelDefinition[];
561
623
  /** Communication channels (legacy) @deprecated */
package/dist/schemas.d.ts CHANGED
@@ -436,6 +436,68 @@ export declare const RelationshipDefinitionSchema: z.ZodObject<{
436
436
  }>>;
437
437
  }, z.core.$strip>;
438
438
  }, z.core.$strip>;
439
+ /**
440
+ * Schema for page type.
441
+ * INSTANCE: Shows a single record (form-like)
442
+ * LIST: Shows multiple records (spreadsheet/table)
443
+ */
444
+ export declare const PageTypeSchema: z.ZodEnum<{
445
+ INSTANCE: "INSTANCE";
446
+ LIST: "LIST";
447
+ }>;
448
+ /**
449
+ * Schema for block type in a page.
450
+ * Matches existing block types in the system.
451
+ */
452
+ export declare const PageBlockTypeSchema: z.ZodEnum<{
453
+ form: "form";
454
+ spreadsheet: "spreadsheet";
455
+ kanban: "kanban";
456
+ calendar: "calendar";
457
+ link: "link";
458
+ }>;
459
+ /**
460
+ * Schema for a block definition within a page.
461
+ * Blocks define the UI components that render model data.
462
+ */
463
+ export declare const PageBlockDefinitionSchema: z.ZodObject<{
464
+ type: z.ZodEnum<{
465
+ form: "form";
466
+ spreadsheet: "spreadsheet";
467
+ kanban: "kanban";
468
+ calendar: "calendar";
469
+ link: "link";
470
+ }>;
471
+ title: z.ZodOptional<z.ZodString>;
472
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
473
+ readonly: z.ZodOptional<z.ZodBoolean>;
474
+ }, z.core.$strip>;
475
+ /**
476
+ * Schema for a page definition.
477
+ * Pages define how internal models are displayed in the post-install UI.
478
+ */
479
+ export declare const PageDefinitionSchema: z.ZodObject<{
480
+ handle: z.ZodString;
481
+ model: z.ZodString;
482
+ type: z.ZodEnum<{
483
+ INSTANCE: "INSTANCE";
484
+ LIST: "LIST";
485
+ }>;
486
+ title: z.ZodString;
487
+ path: z.ZodOptional<z.ZodString>;
488
+ blocks: z.ZodArray<z.ZodObject<{
489
+ type: z.ZodEnum<{
490
+ form: "form";
491
+ spreadsheet: "spreadsheet";
492
+ kanban: "kanban";
493
+ calendar: "calendar";
494
+ link: "link";
495
+ }>;
496
+ title: z.ZodOptional<z.ZodString>;
497
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
498
+ readonly: z.ZodOptional<z.ZodBoolean>;
499
+ }, z.core.$strip>>;
500
+ }, z.core.$strip>;
439
501
  /**
440
502
  * Schema for inline field definition (constraints, options, etc.)
441
503
  * This allows defining field behavior without referencing a metafield definition.
@@ -837,6 +899,28 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
837
899
  }>>;
838
900
  }, z.core.$strip>;
839
901
  }, z.core.$strip>>>;
902
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
903
+ handle: z.ZodString;
904
+ model: z.ZodString;
905
+ type: z.ZodEnum<{
906
+ INSTANCE: "INSTANCE";
907
+ LIST: "LIST";
908
+ }>;
909
+ title: z.ZodString;
910
+ path: z.ZodOptional<z.ZodString>;
911
+ blocks: z.ZodArray<z.ZodObject<{
912
+ type: z.ZodEnum<{
913
+ form: "form";
914
+ spreadsheet: "spreadsheet";
915
+ kanban: "kanban";
916
+ calendar: "calendar";
917
+ link: "link";
918
+ }>;
919
+ title: z.ZodOptional<z.ZodString>;
920
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
921
+ readonly: z.ZodOptional<z.ZodBoolean>;
922
+ }, z.core.$strip>>;
923
+ }, z.core.$strip>>>;
840
924
  channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
841
925
  handle: z.ZodString;
842
926
  name: z.ZodString;
@@ -1013,6 +1097,14 @@ export type OnDeleteBehavior = z.infer<typeof OnDeleteBehaviorSchema>;
1013
1097
  export type RelationshipLink = z.infer<typeof RelationshipLinkSchema>;
1014
1098
  /** Relationship definition */
1015
1099
  export type RelationshipDefinition = z.infer<typeof RelationshipDefinitionSchema>;
1100
+ /** Page type */
1101
+ export type PageType = z.infer<typeof PageTypeSchema>;
1102
+ /** Page block type */
1103
+ export type PageBlockType = z.infer<typeof PageBlockTypeSchema>;
1104
+ /** Page block definition */
1105
+ export type PageBlockDefinition = z.infer<typeof PageBlockDefinitionSchema>;
1106
+ /** Page definition */
1107
+ export type PageDefinition = z.infer<typeof PageDefinitionSchema>;
1016
1108
  /** Model dependency reference */
1017
1109
  export type ModelDependency = z.infer<typeof ModelDependencySchema>;
1018
1110
  /** Channel dependency reference */
package/dist/schemas.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SkedyulConfigSchema = exports.InternalModelDefinitionSchema = exports.InternalFieldDefinitionSchema = exports.InternalFieldDataTypeSchema = exports.ModelDefinitionSchema = exports.ModelFieldDefinitionSchema = exports.InlineFieldDefinitionSchema = exports.RelationshipDefinitionSchema = exports.RelationshipLinkSchema = exports.OnDeleteBehaviorSchema = exports.RelationshipCardinalitySchema = exports.FieldOptionSchema = exports.FieldDataTypeSchema = exports.ComputeLayerTypeSchema = exports.WorkflowDefinitionSchema = exports.WorkflowActionSchema = exports.WorkflowActionInputSchema = exports.ChannelDefinitionSchema = exports.CommunicationChannelDefinitionSchema = exports.ResourceDependencySchema = exports.WorkflowDependencySchema = exports.ChannelDependencySchema = exports.ModelDependencySchema = exports.StructuredFilterSchema = exports.FieldOwnerSchema = exports.ResourceScopeSchema = exports.ChannelIdentifierValueSchema = exports.ChannelIdentifierTypeSchema = exports.ChannelToolBindingsSchema = exports.AppFieldDefinitionSchema = exports.AppFieldVisibilitySchema = exports.InstallConfigSchema = exports.AppModelDefinitionSchema = exports.EnvSchemaSchema = exports.EnvVariableDefinitionSchema = exports.EnvVisibilitySchema = void 0;
3
+ exports.SkedyulConfigSchema = exports.InternalModelDefinitionSchema = exports.InternalFieldDefinitionSchema = exports.InternalFieldDataTypeSchema = exports.ModelDefinitionSchema = exports.ModelFieldDefinitionSchema = exports.InlineFieldDefinitionSchema = exports.PageDefinitionSchema = exports.PageBlockDefinitionSchema = exports.PageBlockTypeSchema = exports.PageTypeSchema = exports.RelationshipDefinitionSchema = exports.RelationshipLinkSchema = exports.OnDeleteBehaviorSchema = exports.RelationshipCardinalitySchema = exports.FieldOptionSchema = exports.FieldDataTypeSchema = exports.ComputeLayerTypeSchema = exports.WorkflowDefinitionSchema = exports.WorkflowActionSchema = exports.WorkflowActionInputSchema = exports.ChannelDefinitionSchema = exports.CommunicationChannelDefinitionSchema = exports.ResourceDependencySchema = exports.WorkflowDependencySchema = exports.ChannelDependencySchema = exports.ModelDependencySchema = exports.StructuredFilterSchema = exports.FieldOwnerSchema = exports.ResourceScopeSchema = exports.ChannelIdentifierValueSchema = exports.ChannelIdentifierTypeSchema = exports.ChannelToolBindingsSchema = exports.AppFieldDefinitionSchema = exports.AppFieldVisibilitySchema = exports.InstallConfigSchema = exports.AppModelDefinitionSchema = exports.EnvSchemaSchema = exports.EnvVariableDefinitionSchema = exports.EnvVisibilitySchema = void 0;
4
4
  exports.safeParseConfig = safeParseConfig;
5
5
  exports.isModelDependency = isModelDependency;
6
6
  exports.isChannelDependency = isChannelDependency;
@@ -288,6 +288,58 @@ exports.RelationshipDefinitionSchema = zod_1.z.object({
288
288
  /** Target side of the relationship */
289
289
  target: exports.RelationshipLinkSchema,
290
290
  });
291
+ // ─────────────────────────────────────────────────────────────────────────────
292
+ // Page and Block Schemas
293
+ // ─────────────────────────────────────────────────────────────────────────────
294
+ /**
295
+ * Schema for page type.
296
+ * INSTANCE: Shows a single record (form-like)
297
+ * LIST: Shows multiple records (spreadsheet/table)
298
+ */
299
+ exports.PageTypeSchema = zod_1.z.enum(['INSTANCE', 'LIST']);
300
+ /**
301
+ * Schema for block type in a page.
302
+ * Matches existing block types in the system.
303
+ */
304
+ exports.PageBlockTypeSchema = zod_1.z.enum([
305
+ 'form',
306
+ 'spreadsheet',
307
+ 'kanban',
308
+ 'calendar',
309
+ 'link',
310
+ ]);
311
+ /**
312
+ * Schema for a block definition within a page.
313
+ * Blocks define the UI components that render model data.
314
+ */
315
+ exports.PageBlockDefinitionSchema = zod_1.z.object({
316
+ /** Block type determines the UI component */
317
+ type: exports.PageBlockTypeSchema,
318
+ /** Block title displayed in UI */
319
+ title: zod_1.z.string().optional(),
320
+ /** Field handles to include in this block */
321
+ fields: zod_1.z.array(zod_1.z.string()).optional(),
322
+ /** Whether the block is read-only (no editing) */
323
+ readonly: zod_1.z.boolean().optional(),
324
+ });
325
+ /**
326
+ * Schema for a page definition.
327
+ * Pages define how internal models are displayed in the post-install UI.
328
+ */
329
+ exports.PageDefinitionSchema = zod_1.z.object({
330
+ /** Unique handle for the page */
331
+ handle: zod_1.z.string(),
332
+ /** Model handle this page displays */
333
+ model: zod_1.z.string(),
334
+ /** Page type: INSTANCE (single record) or LIST (multiple records) */
335
+ type: exports.PageTypeSchema,
336
+ /** Page title displayed in UI */
337
+ title: zod_1.z.string(),
338
+ /** Optional custom path for navigation */
339
+ path: zod_1.z.string().optional(),
340
+ /** Blocks that compose this page */
341
+ blocks: zod_1.z.array(exports.PageBlockDefinitionSchema),
342
+ });
291
343
  /**
292
344
  * Schema for inline field definition (constraints, options, etc.)
293
345
  * This allows defining field behavior without referencing a metafield definition.
@@ -428,6 +480,8 @@ exports.SkedyulConfigSchema = zod_1.z.object({
428
480
  models: zod_1.z.array(exports.ModelDefinitionSchema).optional(),
429
481
  // Relationships between models
430
482
  relationships: zod_1.z.array(exports.RelationshipDefinitionSchema).optional(),
483
+ // Pages for internal models (displayed in post-install UI)
484
+ pages: zod_1.z.array(exports.PageDefinitionSchema).optional(),
431
485
  // New channel syntax (alias for communicationChannels)
432
486
  channels: zod_1.z.array(exports.ChannelDefinitionSchema).optional(),
433
487
  // Legacy: communication channels (deprecated - use channels)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",