Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/spec/src/data/object.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ const ObjectSchemaBase = z.object({
* Taxonomy & Organization
*/
tags: z.array(z.string()).optional().describe('Categorization tags (e.g. "sales", "system", "reference")'),
active: z.boolean().default(true).describe('Is the object active and usable'),
isSystem: z.boolean().default(false).describe('Is system object (protected from deletion)'),
abstract: z.boolean().default(false).describe('Is abstract base object (cannot be instantiated)'),
active: z.boolean().optional().default(true).describe('Is the object active and usable'),
isSystem: z.boolean().optional().default(false).describe('Is system object (protected from deletion)'),
abstract: z.boolean().optional().default(false).describe('Is abstract base object (cannot be instantiated)'),

/**
* Storage & Virtualization
*/
datasource: z.string().default('default').describe('Target Datasource ID. "default" is the primary DB.'),
datasource: z.string().optional().default('default').describe('Target Datasource ID. "default" is the primary DB.'),
tableName: z.string().optional().describe('Physical table/collection name in the target datasource'),

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/spec/src/stack.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ export type ObjectStack = ObjectStackDefinition;

/**
* Type-safe helper to define a project configuration.
* Uses input type to allow optional fields with defaults.
*/
export const defineStack = (config: ObjectStackDefinition) => config;
export const defineStack = (config: z.input<typeof ObjectStackDefinitionSchema>) => config;


/**
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/src/ui/app.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ export const AppSchema = z.object({
branding: AppBrandingSchema.optional().describe('App-specific branding'),

/** Application status */
active: z.boolean().default(true).describe('Whether the app is enabled'),
active: z.boolean().optional().default(true).describe('Whether the app is enabled'),

/** Is this the default app for new users? */
isDefault: z.boolean().default(false).describe('Is default app'),
isDefault: z.boolean().optional().default(false).describe('Is default app'),

/**
* Navigation Tree Structure.
Expand Down