@stndrds/schema 1.0.0-alpha.265 → 1.0.0-alpha.266

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.
Files changed (47) hide show
  1. package/dist/all--B2_3ksI.d.ts +465 -0
  2. package/dist/all-D5zeUllO.d.mts +465 -0
  3. package/dist/chunk-6ZDH3EJA.js +1261 -0
  4. package/dist/chunk-F6ATLCIR.mjs +1214 -0
  5. package/dist/{chunk-ZBQEMIAV.js → chunk-FDIAOFHS.js} +11 -8
  6. package/dist/{chunk-UXCJ3NI4.mjs → chunk-KDHDC7E6.mjs} +150 -9
  7. package/dist/{chunk-U36ZIBEM.mjs → chunk-O73ROMWQ.mjs} +15 -6
  8. package/dist/{chunk-QIWADKYA.mjs → chunk-POULKEJM.mjs} +11 -9
  9. package/dist/{chunk-EBGRZUIH.js → chunk-Q4SZAMJT.js} +5 -0
  10. package/dist/{chunk-NGGU6BSN.mjs → chunk-QMLO7V5E.mjs} +6 -6
  11. package/dist/{chunk-L4U5QEQL.js → chunk-QN2N3IJZ.js} +158 -8
  12. package/dist/{chunk-JUKLL5RJ.mjs → chunk-R5LAJCBU.mjs} +5 -2
  13. package/dist/{chunk-NI3HCSYH.js → chunk-V6Q7HCA7.js} +11 -11
  14. package/dist/{chunk-QAF3HNKQ.js → chunk-ZPFOKBIN.js} +16 -5
  15. package/dist/exceptions.d.mts +21 -8
  16. package/dist/exceptions.d.ts +21 -8
  17. package/dist/exceptions.js +42 -38
  18. package/dist/exceptions.mjs +1 -1
  19. package/dist/helpers-C1VVEAOO.d.mts +76 -0
  20. package/dist/helpers-vQ6kp8ET.d.ts +76 -0
  21. package/dist/index-Bq1KrQkR.d.ts +2413 -0
  22. package/dist/index-DtxtOBYT.d.mts +2413 -0
  23. package/dist/index.d.mts +1489 -2222
  24. package/dist/index.d.ts +1489 -2222
  25. package/dist/index.js +1274 -1038
  26. package/dist/index.mjs +894 -905
  27. package/dist/{helpers-eyrnPJEF.d.ts → objects-A1ED9af-.d.ts} +32 -77
  28. package/dist/{helpers-uKLet0kF.d.mts → objects-BCaBw2ef.d.mts} +32 -77
  29. package/dist/validation/all.d.mts +4 -2
  30. package/dist/validation/all.d.ts +4 -2
  31. package/dist/validation/all.js +88 -16
  32. package/dist/validation/all.mjs +9 -9
  33. package/dist/validation/complex/phone.js +2 -2
  34. package/dist/validation/complex/phone.mjs +1 -1
  35. package/dist/validation/config/index.d.mts +5 -18
  36. package/dist/validation/config/index.d.ts +5 -18
  37. package/dist/validation/config/index.js +34 -4
  38. package/dist/validation/config/index.mjs +7 -1
  39. package/dist/validation/object/index.d.mts +2 -2
  40. package/dist/validation/object/index.d.ts +2 -2
  41. package/dist/validation/object/index.js +19 -19
  42. package/dist/validation/object/index.mjs +7 -7
  43. package/dist/validation/primitives/text.js +2 -2
  44. package/dist/validation/primitives/text.mjs +1 -1
  45. package/package.json +2 -2
  46. package/dist/chunk-PGERPYDR.js +0 -2
  47. package/dist/chunk-SP3PNHYF.mjs +0 -1
@@ -1,7 +1,5 @@
1
- import { z } from 'zod';
2
- import { A as Attribute, h as ComputedAttributeState } from './attributes-_b3Db8vT.js';
3
- import { V as ValidationMessages, a as ValidationResult } from './types-DqLi1tx1.js';
4
1
  import { IconName } from '@stndrds/constants';
2
+ import { h as ComputedAttributeState, A as Attribute } from './attributes-_b3Db8vT.js';
5
3
  import { Uuid } from './utils.js';
6
4
  import { M as MigrationDefinition } from './migrations-DcuJZ8qO.js';
7
5
 
@@ -33,6 +31,21 @@ interface PresetNode {
33
31
  /** Max depth allowed for preset.structure to keep instantiation predictable. */
34
32
  declare const MAX_PRESET_DEPTH = 5;
35
33
 
34
+ /** Visibility scopes shared by resources that can be workspace-wide or actor-private. */
35
+ declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
36
+ type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
37
+ /**
38
+ * Scope a list-view tab reads. Deliberately a SEPARATE union from
39
+ * {@link ResourceVisibility}: a stored resource is always exactly one of
40
+ * `workspace` or `private`, while a tab may also read across both.
41
+ *
42
+ * `all` is not a third resource state — it means "impose no scope", so the tab
43
+ * returns whatever the mandatory viewer predicate already allows: every
44
+ * workspace record plus the viewer's own private ones. Never assign an `all`
45
+ * tab scope to a record's `visibility` column.
46
+ */
47
+ declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private"];
48
+ type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
36
49
  /**
37
50
  * Timestamps for tracking creation and updates
38
51
  */
@@ -113,6 +126,16 @@ interface ObjectAttribute {
113
126
  interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
114
127
  id: Uuid;
115
128
  objectId: Uuid;
129
+ /**
130
+ * Name of the owning object. Present on every row read through the repository
131
+ * (`object_records.object_name` is denormalized and always selected), absent
132
+ * on records built in memory before a write.
133
+ */
134
+ objectName?: string;
135
+ /** Workspace-wide or owner-private visibility enforced by repository queries. */
136
+ visibility: ResourceVisibility;
137
+ /** Owning actor for private records; always null for workspace records. */
138
+ ownedBy: Uuid | null;
116
139
  /**
117
140
  * Display label computed from the object's labelExpression.
118
141
  * Computed dynamically based on record values.
@@ -157,6 +180,8 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
157
180
  * Optional for backward compatibility with existing records.
158
181
  */
159
182
  lastUpdatedBy?: string;
183
+ /** Storage-managed exact optimistic-lock token for atomic record writes. */
184
+ writeVersion?: number;
160
185
  /** Schema version at the time this record was last migrated */
161
186
  schemaVersion: number;
162
187
  }
@@ -176,7 +201,7 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
176
201
  * }
177
202
  * ```
178
203
  */
179
- declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy"];
204
+ declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
180
205
  /**
181
206
  * Type for system field names
182
207
  */
@@ -186,7 +211,7 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
186
211
  * These names conflict with ObjectRecord properties.
187
212
  *
188
213
  * Includes:
189
- * - System fields (id, createdAt, updatedAt, createdBy, lastUpdatedBy)
214
+ * - System fields (id, timestamps, actor audit fields, visibility, ownership)
190
215
  * - Other ObjectRecord properties (objectId, label, values, metadata, deletedAt)
191
216
  *
192
217
  * @example
@@ -196,7 +221,7 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
196
221
  * }
197
222
  * ```
198
223
  */
199
- declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion"];
224
+ declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "owned_by"];
200
225
  /**
201
226
  * Type for reserved attribute names
202
227
  */
@@ -208,74 +233,4 @@ type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
208
233
  declare const RESERVED_OBJECT_NAMES: readonly ["skill"];
209
234
  type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
210
235
 
211
- /**
212
- * Create a Zod schema for any attribute type.
213
- * Returns a strict validator that does NOT handle optional fields.
214
- * Use createFormAttributeValidator for form validation with optional support.
215
- *
216
- * @param attr - The attribute to create a validator for
217
- * @param messages - Custom validation messages for i18n support
218
- */
219
- declare function createAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
220
- /**
221
- * Create a Zod schema for form validation.
222
- * - Normalizes empty values (empty strings, empty objects) to null for optional fields
223
- * - Accepts custom messages for i18n support
224
- *
225
- * Use this in UI forms where optional fields may have null/undefined values.
226
- *
227
- * @param attr - The attribute to create a validator for
228
- * @param messages - Custom validation messages for i18n support
229
- */
230
- declare function createFormAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
231
-
232
- /**
233
- * Validate data against an attribute schema
234
- */
235
- declare function validateAttribute(attr: Attribute, value: unknown): ValidationResult;
236
- /**
237
- * Validate data against an object schema
238
- */
239
- declare function validateObject(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
240
- /**
241
- * Validate and throw if invalid.
242
- *
243
- * Throws `ValidationError` (code `SCHEMA_VALIDATION_FAILED`) on failure so HTTP
244
- * adapters can map it to 400. Generic `Error` would bubble up to a 500.
245
- */
246
- declare function validateObjectOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
247
- /**
248
- * Validate data in draft mode.
249
- * - All attributes are treated as optional (no required validation)
250
- * - Provided values are still validated for format/type correctness
251
- */
252
- declare function validateDraft(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
253
- /**
254
- * Validate draft data and throw if format validation fails.
255
- *
256
- * Same contract as `validateObjectOrThrow` but skips `required()` checks.
257
- * Throws `ValidationError` so HTTP adapters map it to 400.
258
- */
259
- declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
260
- /**
261
- * Throw a `ValidationError` when `data` contains keys that do not correspond
262
- * to any attribute declared on `objectDef`.
263
- *
264
- * Call this on **client-supplied input** before Zod validation so the error
265
- * message clearly names every offending key. Do NOT call on merged data that
266
- * includes existing record values — older records may legitimately carry stale
267
- * keys that predate this guard (see issue #658).
268
- *
269
- * Maps to HTTP 400 via `SchemaExceptionFilter` (code SCHEMA_VALIDATION_FAILED).
270
- */
271
- declare function rejectUnknownAttributesOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): void;
272
- /**
273
- * Get the list of required attributes that are missing values.
274
- */
275
- declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data: Record<string, unknown>): Attribute[];
276
- /**
277
- * Check if a record is complete (all required attributes have valid values).
278
- */
279
- declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
280
-
281
- export { type DocumentLayout as D, type FolderPreset as F, MAX_PRESET_DEPTH as M, type ObjectDefinition as O, type PresetNode as P, RESERVED_ATTRIBUTE_NAMES as R, SYSTEM_FIELD_NAMES as S, type Timestamps as T, validateDraftOrThrow as a, validateObject as b, createFormAttributeValidator as c, validateObjectOrThrow as d, createAttributeValidator as e, validateAttribute as f, getMissingRequiredAttributes as g, type DocumentLayoutVariant as h, isRecordComplete as i, type ObjectAttribute as j, type ObjectRecord as k, RESERVED_OBJECT_NAMES as l, type ReservedAttributeName as m, type ReservedObjectName as n, type SystemFieldName as o, rejectUnknownAttributesOrThrow as r, validateDraft as v };
236
+ export { type DocumentLayout as D, type FolderPreset as F, type ListViewTabVisibility as L, MAX_PRESET_DEPTH as M, type ObjectDefinition as O, type PresetNode as P, type ResourceVisibility as R, SYSTEM_FIELD_NAMES as S, type Timestamps as T, type ObjectRecord as a, type DocumentLayoutVariant as b, LIST_VIEW_TAB_VISIBILITIES as c, type ObjectAttribute as d, RESERVED_ATTRIBUTE_NAMES as e, RESERVED_OBJECT_NAMES as f, RESOURCE_VISIBILITIES as g, type ReservedAttributeName as h, type ReservedObjectName as i, type SystemFieldName as j };
@@ -1,7 +1,5 @@
1
- import { z } from 'zod';
2
- import { A as Attribute, h as ComputedAttributeState } from './attributes-lBLiOIY3.mjs';
3
- import { V as ValidationMessages, a as ValidationResult } from './types-DNz3ITS-.mjs';
4
1
  import { IconName } from '@stndrds/constants';
2
+ import { h as ComputedAttributeState, A as Attribute } from './attributes-lBLiOIY3.mjs';
5
3
  import { Uuid } from './utils.mjs';
6
4
  import { M as MigrationDefinition } from './migrations-BXd2ZGfM.mjs';
7
5
 
@@ -33,6 +31,21 @@ interface PresetNode {
33
31
  /** Max depth allowed for preset.structure to keep instantiation predictable. */
34
32
  declare const MAX_PRESET_DEPTH = 5;
35
33
 
34
+ /** Visibility scopes shared by resources that can be workspace-wide or actor-private. */
35
+ declare const RESOURCE_VISIBILITIES: readonly ["workspace", "private"];
36
+ type ResourceVisibility = (typeof RESOURCE_VISIBILITIES)[number];
37
+ /**
38
+ * Scope a list-view tab reads. Deliberately a SEPARATE union from
39
+ * {@link ResourceVisibility}: a stored resource is always exactly one of
40
+ * `workspace` or `private`, while a tab may also read across both.
41
+ *
42
+ * `all` is not a third resource state — it means "impose no scope", so the tab
43
+ * returns whatever the mandatory viewer predicate already allows: every
44
+ * workspace record plus the viewer's own private ones. Never assign an `all`
45
+ * tab scope to a record's `visibility` column.
46
+ */
47
+ declare const LIST_VIEW_TAB_VISIBILITIES: readonly ["all", "workspace", "private"];
48
+ type ListViewTabVisibility = (typeof LIST_VIEW_TAB_VISIBILITIES)[number];
36
49
  /**
37
50
  * Timestamps for tracking creation and updates
38
51
  */
@@ -113,6 +126,16 @@ interface ObjectAttribute {
113
126
  interface ObjectRecord<TValues extends Record<string, unknown> = Record<string, unknown>> extends Timestamps {
114
127
  id: Uuid;
115
128
  objectId: Uuid;
129
+ /**
130
+ * Name of the owning object. Present on every row read through the repository
131
+ * (`object_records.object_name` is denormalized and always selected), absent
132
+ * on records built in memory before a write.
133
+ */
134
+ objectName?: string;
135
+ /** Workspace-wide or owner-private visibility enforced by repository queries. */
136
+ visibility: ResourceVisibility;
137
+ /** Owning actor for private records; always null for workspace records. */
138
+ ownedBy: Uuid | null;
116
139
  /**
117
140
  * Display label computed from the object's labelExpression.
118
141
  * Computed dynamically based on record values.
@@ -157,6 +180,8 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
157
180
  * Optional for backward compatibility with existing records.
158
181
  */
159
182
  lastUpdatedBy?: string;
183
+ /** Storage-managed exact optimistic-lock token for atomic record writes. */
184
+ writeVersion?: number;
160
185
  /** Schema version at the time this record was last migrated */
161
186
  schemaVersion: number;
162
187
  }
@@ -176,7 +201,7 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
176
201
  * }
177
202
  * ```
178
203
  */
179
- declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy"];
204
+ declare const SYSTEM_FIELD_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy"];
180
205
  /**
181
206
  * Type for system field names
182
207
  */
@@ -186,7 +211,7 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
186
211
  * These names conflict with ObjectRecord properties.
187
212
  *
188
213
  * Includes:
189
- * - System fields (id, createdAt, updatedAt, createdBy, lastUpdatedBy)
214
+ * - System fields (id, timestamps, actor audit fields, visibility, ownership)
190
215
  * - Other ObjectRecord properties (objectId, label, values, metadata, deletedAt)
191
216
  *
192
217
  * @example
@@ -196,7 +221,7 @@ type SystemFieldName = (typeof SYSTEM_FIELD_NAMES)[number];
196
221
  * }
197
222
  * ```
198
223
  */
199
- declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion"];
224
+ declare const RESERVED_ATTRIBUTE_NAMES: readonly ["id", "createdAt", "updatedAt", "createdBy", "lastUpdatedBy", "visibility", "ownedBy", "objectId", "label", "embeddingText", "values", "metadata", "deletedAt", "deletedBy", "schemaVersion", "owned_by"];
200
225
  /**
201
226
  * Type for reserved attribute names
202
227
  */
@@ -208,74 +233,4 @@ type ReservedAttributeName = (typeof RESERVED_ATTRIBUTE_NAMES)[number];
208
233
  declare const RESERVED_OBJECT_NAMES: readonly ["skill"];
209
234
  type ReservedObjectName = (typeof RESERVED_OBJECT_NAMES)[number];
210
235
 
211
- /**
212
- * Create a Zod schema for any attribute type.
213
- * Returns a strict validator that does NOT handle optional fields.
214
- * Use createFormAttributeValidator for form validation with optional support.
215
- *
216
- * @param attr - The attribute to create a validator for
217
- * @param messages - Custom validation messages for i18n support
218
- */
219
- declare function createAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
220
- /**
221
- * Create a Zod schema for form validation.
222
- * - Normalizes empty values (empty strings, empty objects) to null for optional fields
223
- * - Accepts custom messages for i18n support
224
- *
225
- * Use this in UI forms where optional fields may have null/undefined values.
226
- *
227
- * @param attr - The attribute to create a validator for
228
- * @param messages - Custom validation messages for i18n support
229
- */
230
- declare function createFormAttributeValidator(attr: Attribute, messages?: ValidationMessages): z.ZodTypeAny;
231
-
232
- /**
233
- * Validate data against an attribute schema
234
- */
235
- declare function validateAttribute(attr: Attribute, value: unknown): ValidationResult;
236
- /**
237
- * Validate data against an object schema
238
- */
239
- declare function validateObject(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
240
- /**
241
- * Validate and throw if invalid.
242
- *
243
- * Throws `ValidationError` (code `SCHEMA_VALIDATION_FAILED`) on failure so HTTP
244
- * adapters can map it to 400. Generic `Error` would bubble up to a 500.
245
- */
246
- declare function validateObjectOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
247
- /**
248
- * Validate data in draft mode.
249
- * - All attributes are treated as optional (no required validation)
250
- * - Provided values are still validated for format/type correctness
251
- */
252
- declare function validateDraft(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
253
- /**
254
- * Validate draft data and throw if format validation fails.
255
- *
256
- * Same contract as `validateObjectOrThrow` but skips `required()` checks.
257
- * Throws `ValidationError` so HTTP adapters map it to 400.
258
- */
259
- declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
260
- /**
261
- * Throw a `ValidationError` when `data` contains keys that do not correspond
262
- * to any attribute declared on `objectDef`.
263
- *
264
- * Call this on **client-supplied input** before Zod validation so the error
265
- * message clearly names every offending key. Do NOT call on merged data that
266
- * includes existing record values — older records may legitimately carry stale
267
- * keys that predate this guard (see issue #658).
268
- *
269
- * Maps to HTTP 400 via `SchemaExceptionFilter` (code SCHEMA_VALIDATION_FAILED).
270
- */
271
- declare function rejectUnknownAttributesOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): void;
272
- /**
273
- * Get the list of required attributes that are missing values.
274
- */
275
- declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data: Record<string, unknown>): Attribute[];
276
- /**
277
- * Check if a record is complete (all required attributes have valid values).
278
- */
279
- declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
280
-
281
- export { type DocumentLayout as D, type FolderPreset as F, MAX_PRESET_DEPTH as M, type ObjectDefinition as O, type PresetNode as P, RESERVED_ATTRIBUTE_NAMES as R, SYSTEM_FIELD_NAMES as S, type Timestamps as T, validateDraftOrThrow as a, validateObject as b, createFormAttributeValidator as c, validateObjectOrThrow as d, createAttributeValidator as e, validateAttribute as f, getMissingRequiredAttributes as g, type DocumentLayoutVariant as h, isRecordComplete as i, type ObjectAttribute as j, type ObjectRecord as k, RESERVED_OBJECT_NAMES as l, type ReservedAttributeName as m, type ReservedObjectName as n, type SystemFieldName as o, rejectUnknownAttributesOrThrow as r, validateDraft as v };
236
+ export { type DocumentLayout as D, type FolderPreset as F, type ListViewTabVisibility as L, MAX_PRESET_DEPTH as M, type ObjectDefinition as O, type PresetNode as P, type ResourceVisibility as R, SYSTEM_FIELD_NAMES as S, type Timestamps as T, type ObjectRecord as a, type DocumentLayoutVariant as b, LIST_VIEW_TAB_VISIBILITIES as c, type ObjectAttribute as d, RESERVED_ATTRIBUTE_NAMES as e, RESERVED_OBJECT_NAMES as f, RESOURCE_VISIBILITIES as g, type ReservedAttributeName as h, type ReservedObjectName as i, type SystemFieldName as j };
@@ -1,9 +1,11 @@
1
1
  export { V as ValidationMessages } from '../types-DNz3ITS-.mjs';
2
2
  export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.mjs';
3
- export { parseAttributeConfig } from './config/index.mjs';
4
- export { c as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, v as validateDraft, a as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-uKLet0kF.mjs';
3
+ export { ce as multiselectOptionWriteSchema, cf as parseAttributeConfig, cg as parseAttributeConfigForCreate, ch as parseAttributeConfigForUpdate, ci as selectOptionWriteSchema, cj as statusGroupSchema, ck as statusOptionWriteSchema } from '../index-DtxtOBYT.mjs';
4
+ export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema } from '../all-D5zeUllO.mjs';
5
+ export { a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, b as validateDraft, d as validateDraftOrThrow, e as validateObject, f as validateObjectOrThrow } from '../helpers-C1VVEAOO.mjs';
5
6
  import '../attributes-lBLiOIY3.mjs';
6
7
  import '@stndrds/constants';
7
8
  import '../utils.mjs';
8
9
  import 'zod';
10
+ import '../objects-BCaBw2ef.mjs';
9
11
  import '../migrations-BXd2ZGfM.mjs';
@@ -1,9 +1,11 @@
1
1
  export { V as ValidationMessages } from '../types-DqLi1tx1.js';
2
2
  export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.js';
3
- export { parseAttributeConfig } from './config/index.js';
4
- export { c as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, v as validateDraft, a as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-eyrnPJEF.js';
3
+ export { ce as multiselectOptionWriteSchema, cf as parseAttributeConfig, cg as parseAttributeConfigForCreate, ch as parseAttributeConfigForUpdate, ci as selectOptionWriteSchema, cj as statusGroupSchema, ck as statusOptionWriteSchema } from '../index-Bq1KrQkR.js';
4
+ export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema } from '../all--B2_3ksI.js';
5
+ export { a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, b as validateDraft, d as validateDraftOrThrow, e as validateObject, f as validateObjectOrThrow } from '../helpers-vQ6kp8ET.js';
5
6
  import '../attributes-_b3Db8vT.js';
6
7
  import '@stndrds/constants';
7
8
  import '../utils.js';
8
9
  import 'zod';
10
+ import '../objects-A1ED9af-.js';
9
11
  import '../migrations-DcuJZ8qO.js';
@@ -1,53 +1,125 @@
1
1
  'use strict';
2
2
 
3
- require('../chunk-PGERPYDR.js');
4
- var chunkL4U5QEQL_js = require('../chunk-L4U5QEQL.js');
5
- var chunkNI3HCSYH_js = require('../chunk-NI3HCSYH.js');
6
- require('../chunk-5WATIVCA.js');
7
- require('../chunk-SI34M4IC.js');
8
- require('../chunk-YIP5FJ5H.js');
9
- require('../chunk-QAF3HNKQ.js');
3
+ var chunk6ZDH3EJA_js = require('../chunk-6ZDH3EJA.js');
4
+ var chunkQN2N3IJZ_js = require('../chunk-QN2N3IJZ.js');
5
+ var chunkV6Q7HCA7_js = require('../chunk-V6Q7HCA7.js');
10
6
  require('../chunk-EW5XR2X3.js');
11
7
  require('../chunk-QWKLQRBX.js');
12
8
  require('../chunk-KNGWHQLR.js');
13
9
  require('../chunk-HTSTPTNZ.js');
14
10
  require('../chunk-V2UA2D4E.js');
15
- require('../chunk-ZBQEMIAV.js');
11
+ require('../chunk-5WATIVCA.js');
12
+ require('../chunk-SI34M4IC.js');
13
+ require('../chunk-YIP5FJ5H.js');
14
+ require('../chunk-ZPFOKBIN.js');
15
+ require('../chunk-FDIAOFHS.js');
16
16
  require('../chunk-ACKMC6FL.js');
17
17
  require('../chunk-E6JUYGJX.js');
18
- require('../chunk-EBGRZUIH.js');
18
+ require('../chunk-Q4SZAMJT.js');
19
19
  require('../chunk-EEH4XQ7W.js');
20
20
  var chunkYKWSHBT5_js = require('../chunk-YKWSHBT5.js');
21
21
 
22
22
 
23
23
 
24
+ Object.defineProperty(exports, "detailTabSchema", {
25
+ enumerable: true,
26
+ get: function () { return chunk6ZDH3EJA_js.detailTabSchema; }
27
+ });
28
+ Object.defineProperty(exports, "detailViewConfigSchema", {
29
+ enumerable: true,
30
+ get: function () { return chunk6ZDH3EJA_js.detailViewConfigSchema; }
31
+ });
32
+ Object.defineProperty(exports, "inverseSourceSchema", {
33
+ enumerable: true,
34
+ get: function () { return chunk6ZDH3EJA_js.inverseSourceSchema; }
35
+ });
36
+ Object.defineProperty(exports, "listViewConfigSchema", {
37
+ enumerable: true,
38
+ get: function () { return chunk6ZDH3EJA_js.listViewConfigSchema; }
39
+ });
40
+ Object.defineProperty(exports, "listViewTabSchema", {
41
+ enumerable: true,
42
+ get: function () { return chunk6ZDH3EJA_js.listViewTabSchema; }
43
+ });
44
+ Object.defineProperty(exports, "parseViewConfig", {
45
+ enumerable: true,
46
+ get: function () { return chunk6ZDH3EJA_js.parseViewConfig; }
47
+ });
48
+ Object.defineProperty(exports, "relationSourceSchema", {
49
+ enumerable: true,
50
+ get: function () { return chunk6ZDH3EJA_js.relationSourceSchema; }
51
+ });
52
+ Object.defineProperty(exports, "tableSourceSchema", {
53
+ enumerable: true,
54
+ get: function () { return chunk6ZDH3EJA_js.tableSourceSchema; }
55
+ });
56
+ Object.defineProperty(exports, "viewConfigByTypeSchema", {
57
+ enumerable: true,
58
+ get: function () { return chunk6ZDH3EJA_js.viewConfigByTypeSchema; }
59
+ });
60
+ Object.defineProperty(exports, "SCHEMA_LIMITS", {
61
+ enumerable: true,
62
+ get: function () { return chunkQN2N3IJZ_js.SCHEMA_LIMITS; }
63
+ });
64
+ Object.defineProperty(exports, "colorIdSchema", {
65
+ enumerable: true,
66
+ get: function () { return chunkQN2N3IJZ_js.colorIdSchema; }
67
+ });
68
+ Object.defineProperty(exports, "iconNameSchema", {
69
+ enumerable: true,
70
+ get: function () { return chunkQN2N3IJZ_js.iconNameSchema; }
71
+ });
72
+ Object.defineProperty(exports, "multiselectOptionWriteSchema", {
73
+ enumerable: true,
74
+ get: function () { return chunkQN2N3IJZ_js.multiselectOptionWriteSchema; }
75
+ });
24
76
  Object.defineProperty(exports, "parseAttributeConfig", {
25
77
  enumerable: true,
26
- get: function () { return chunkL4U5QEQL_js.parseAttributeConfig; }
78
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfig; }
79
+ });
80
+ Object.defineProperty(exports, "parseAttributeConfigForCreate", {
81
+ enumerable: true,
82
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForCreate; }
83
+ });
84
+ Object.defineProperty(exports, "parseAttributeConfigForUpdate", {
85
+ enumerable: true,
86
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForUpdate; }
87
+ });
88
+ Object.defineProperty(exports, "selectOptionWriteSchema", {
89
+ enumerable: true,
90
+ get: function () { return chunkQN2N3IJZ_js.selectOptionWriteSchema; }
91
+ });
92
+ Object.defineProperty(exports, "statusGroupSchema", {
93
+ enumerable: true,
94
+ get: function () { return chunkQN2N3IJZ_js.statusGroupSchema; }
95
+ });
96
+ Object.defineProperty(exports, "statusOptionWriteSchema", {
97
+ enumerable: true,
98
+ get: function () { return chunkQN2N3IJZ_js.statusOptionWriteSchema; }
27
99
  });
28
100
  Object.defineProperty(exports, "createFormAttributeValidator", {
29
101
  enumerable: true,
30
- get: function () { return chunkNI3HCSYH_js.createFormAttributeValidator; }
102
+ get: function () { return chunkV6Q7HCA7_js.createFormAttributeValidator; }
31
103
  });
32
104
  Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
33
105
  enumerable: true,
34
- get: function () { return chunkNI3HCSYH_js.rejectUnknownAttributesOrThrow; }
106
+ get: function () { return chunkV6Q7HCA7_js.rejectUnknownAttributesOrThrow; }
35
107
  });
36
108
  Object.defineProperty(exports, "validateDraft", {
37
109
  enumerable: true,
38
- get: function () { return chunkNI3HCSYH_js.validateDraft; }
110
+ get: function () { return chunkV6Q7HCA7_js.validateDraft; }
39
111
  });
40
112
  Object.defineProperty(exports, "validateDraftOrThrow", {
41
113
  enumerable: true,
42
- get: function () { return chunkNI3HCSYH_js.validateDraftOrThrow; }
114
+ get: function () { return chunkV6Q7HCA7_js.validateDraftOrThrow; }
43
115
  });
44
116
  Object.defineProperty(exports, "validateObject", {
45
117
  enumerable: true,
46
- get: function () { return chunkNI3HCSYH_js.validateObject; }
118
+ get: function () { return chunkV6Q7HCA7_js.validateObject; }
47
119
  });
48
120
  Object.defineProperty(exports, "validateObjectOrThrow", {
49
121
  enumerable: true,
50
- get: function () { return chunkNI3HCSYH_js.validateObjectOrThrow; }
122
+ get: function () { return chunkV6Q7HCA7_js.validateObjectOrThrow; }
51
123
  });
52
124
  Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
53
125
  enumerable: true,
@@ -1,18 +1,18 @@
1
- import '../chunk-SP3PNHYF.mjs';
2
- export { parseAttributeConfig } from '../chunk-UXCJ3NI4.mjs';
3
- export { createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-NGGU6BSN.mjs';
4
- import '../chunk-OSSGN43B.mjs';
5
- import '../chunk-Q44QKLN4.mjs';
6
- import '../chunk-UANQJ2GH.mjs';
7
- import '../chunk-U36ZIBEM.mjs';
1
+ export { detailTabSchema, detailViewConfigSchema, inverseSourceSchema, listViewConfigSchema, listViewTabSchema, parseViewConfig, relationSourceSchema, tableSourceSchema, viewConfigByTypeSchema } from '../chunk-F6ATLCIR.mjs';
2
+ export { SCHEMA_LIMITS, colorIdSchema, iconNameSchema, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema } from '../chunk-KDHDC7E6.mjs';
3
+ export { createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-QMLO7V5E.mjs';
8
4
  import '../chunk-QVLQPW3O.mjs';
9
5
  import '../chunk-ZDQ5AP26.mjs';
10
6
  import '../chunk-LV3FEUKU.mjs';
11
7
  import '../chunk-UXAHLSWC.mjs';
12
8
  import '../chunk-NS63SPNN.mjs';
13
- import '../chunk-QIWADKYA.mjs';
9
+ import '../chunk-OSSGN43B.mjs';
10
+ import '../chunk-Q44QKLN4.mjs';
11
+ import '../chunk-UANQJ2GH.mjs';
12
+ import '../chunk-O73ROMWQ.mjs';
13
+ import '../chunk-POULKEJM.mjs';
14
14
  import '../chunk-AYVHMVKQ.mjs';
15
15
  import '../chunk-YUFTHPOE.mjs';
16
- import '../chunk-JUKLL5RJ.mjs';
16
+ import '../chunk-R5LAJCBU.mjs';
17
17
  import '../chunk-GO6LQADH.mjs';
18
18
  export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from '../chunk-HRQEZUAA.mjs';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkEBGRZUIH_js = require('../../chunk-EBGRZUIH.js');
3
+ var chunkQ4SZAMJT_js = require('../../chunk-Q4SZAMJT.js');
4
4
  require('../../chunk-YKWSHBT5.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "createPhoneValidator", {
9
9
  enumerable: true,
10
- get: function () { return chunkEBGRZUIH_js.createPhoneValidator; }
10
+ get: function () { return chunkQ4SZAMJT_js.createPhoneValidator; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { createPhoneValidator } from '../../chunk-JUKLL5RJ.mjs';
1
+ export { createPhoneValidator } from '../../chunk-R5LAJCBU.mjs';
2
2
  import '../../chunk-HRQEZUAA.mjs';
@@ -1,20 +1,7 @@
1
- import { z } from 'zod';
2
- import { f as AttributeType } from '../../attributes-lBLiOIY3.mjs';
1
+ export { cl as attributeConfigSchemas, cm as getAttributeConfigSchema, ce as multiselectOptionWriteSchema, cf as parseAttributeConfig, cg as parseAttributeConfigForCreate, ch as parseAttributeConfigForUpdate, ci as selectOptionWriteSchema, cj as statusGroupSchema, ck as statusOptionWriteSchema } from '../../index-DtxtOBYT.mjs';
2
+ import 'zod';
3
+ import '../../attributes-lBLiOIY3.mjs';
3
4
  import '@stndrds/constants';
4
5
  import '../../utils.mjs';
5
-
6
- /**
7
- * Map of attribute type to config schema
8
- */
9
- declare const attributeConfigSchemas: Record<AttributeType, z.ZodObject<z.ZodRawShape>>;
10
- /**
11
- * Get the config schema for a specific attribute type
12
- */
13
- declare function getAttributeConfigSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
14
- /**
15
- * Validate and strip unknown properties from attribute config
16
- * This ensures only allowed properties are stored in the database
17
- */
18
- declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
19
-
20
- export { attributeConfigSchemas, getAttributeConfigSchema, parseAttributeConfig };
6
+ import '../../objects-BCaBw2ef.mjs';
7
+ import '../../migrations-BXd2ZGfM.mjs';
@@ -1,20 +1,7 @@
1
- import { z } from 'zod';
2
- import { f as AttributeType } from '../../attributes-_b3Db8vT.js';
1
+ export { cl as attributeConfigSchemas, cm as getAttributeConfigSchema, ce as multiselectOptionWriteSchema, cf as parseAttributeConfig, cg as parseAttributeConfigForCreate, ch as parseAttributeConfigForUpdate, ci as selectOptionWriteSchema, cj as statusGroupSchema, ck as statusOptionWriteSchema } from '../../index-Bq1KrQkR.js';
2
+ import 'zod';
3
+ import '../../attributes-_b3Db8vT.js';
3
4
  import '@stndrds/constants';
4
5
  import '../../utils.js';
5
-
6
- /**
7
- * Map of attribute type to config schema
8
- */
9
- declare const attributeConfigSchemas: Record<AttributeType, z.ZodObject<z.ZodRawShape>>;
10
- /**
11
- * Get the config schema for a specific attribute type
12
- */
13
- declare function getAttributeConfigSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
14
- /**
15
- * Validate and strip unknown properties from attribute config
16
- * This ensures only allowed properties are stored in the database
17
- */
18
- declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
19
-
20
- export { attributeConfigSchemas, getAttributeConfigSchema, parseAttributeConfig };
6
+ import '../../objects-A1ED9af-.js';
7
+ import '../../migrations-DcuJZ8qO.js';
@@ -1,18 +1,48 @@
1
1
  'use strict';
2
2
 
3
- var chunkL4U5QEQL_js = require('../../chunk-L4U5QEQL.js');
3
+ var chunkQN2N3IJZ_js = require('../../chunk-QN2N3IJZ.js');
4
+ require('../../chunk-5WATIVCA.js');
5
+ require('../../chunk-SI34M4IC.js');
6
+ require('../../chunk-YIP5FJ5H.js');
7
+ require('../../chunk-ZPFOKBIN.js');
8
+ require('../../chunk-FDIAOFHS.js');
9
+ require('../../chunk-YKWSHBT5.js');
4
10
 
5
11
 
6
12
 
7
13
  Object.defineProperty(exports, "attributeConfigSchemas", {
8
14
  enumerable: true,
9
- get: function () { return chunkL4U5QEQL_js.attributeConfigSchemas; }
15
+ get: function () { return chunkQN2N3IJZ_js.attributeConfigSchemas; }
10
16
  });
11
17
  Object.defineProperty(exports, "getAttributeConfigSchema", {
12
18
  enumerable: true,
13
- get: function () { return chunkL4U5QEQL_js.getAttributeConfigSchema; }
19
+ get: function () { return chunkQN2N3IJZ_js.getAttributeConfigSchema; }
20
+ });
21
+ Object.defineProperty(exports, "multiselectOptionWriteSchema", {
22
+ enumerable: true,
23
+ get: function () { return chunkQN2N3IJZ_js.multiselectOptionWriteSchema; }
14
24
  });
15
25
  Object.defineProperty(exports, "parseAttributeConfig", {
16
26
  enumerable: true,
17
- get: function () { return chunkL4U5QEQL_js.parseAttributeConfig; }
27
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfig; }
28
+ });
29
+ Object.defineProperty(exports, "parseAttributeConfigForCreate", {
30
+ enumerable: true,
31
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForCreate; }
32
+ });
33
+ Object.defineProperty(exports, "parseAttributeConfigForUpdate", {
34
+ enumerable: true,
35
+ get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForUpdate; }
36
+ });
37
+ Object.defineProperty(exports, "selectOptionWriteSchema", {
38
+ enumerable: true,
39
+ get: function () { return chunkQN2N3IJZ_js.selectOptionWriteSchema; }
40
+ });
41
+ Object.defineProperty(exports, "statusGroupSchema", {
42
+ enumerable: true,
43
+ get: function () { return chunkQN2N3IJZ_js.statusGroupSchema; }
44
+ });
45
+ Object.defineProperty(exports, "statusOptionWriteSchema", {
46
+ enumerable: true,
47
+ get: function () { return chunkQN2N3IJZ_js.statusOptionWriteSchema; }
18
48
  });