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

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 (59) hide show
  1. package/dist/{attributes-_6tvjbyl.d.ts → attributes-_b3Db8vT.d.ts} +1 -23
  2. package/dist/{attributes-Cmkc7UgJ.d.mts → attributes-lBLiOIY3.d.mts} +1 -23
  3. package/dist/chunk-NGGU6BSN.mjs +216 -0
  4. package/dist/chunk-NI3HCSYH.js +229 -0
  5. package/dist/{chunk-54WDPQ6R.mjs → chunk-QIWADKYA.mjs} +12 -216
  6. package/dist/{chunk-TS3PJOMZ.js → chunk-ZBQEMIAV.js} +11 -227
  7. package/dist/exceptions.d.mts +458 -0
  8. package/dist/exceptions.d.ts +458 -0
  9. package/dist/exceptions.js +154 -0
  10. package/dist/exceptions.mjs +1 -0
  11. package/dist/{helpers-BTC6TsKH.d.ts → helpers-eyrnPJEF.d.ts} +4 -39
  12. package/dist/{helpers-BO10yqih.d.mts → helpers-uKLet0kF.d.mts} +4 -39
  13. package/dist/index.d.mts +150 -476
  14. package/dist/index.d.ts +150 -476
  15. package/dist/index.js +238 -139
  16. package/dist/index.mjs +131 -35
  17. package/dist/migrations-BXd2ZGfM.d.mts +39 -0
  18. package/dist/migrations-DcuJZ8qO.d.ts +39 -0
  19. package/dist/{types-CVswgCx9.d.mts → types-DNz3ITS-.d.mts} +1 -1
  20. package/dist/{types-B_UZK_6m.d.ts → types-DqLi1tx1.d.ts} +1 -1
  21. package/dist/validation/all.d.mts +4 -3
  22. package/dist/validation/all.d.ts +4 -3
  23. package/dist/validation/all.js +10 -9
  24. package/dist/validation/all.mjs +4 -3
  25. package/dist/validation/complex/currency.d.mts +2 -2
  26. package/dist/validation/complex/currency.d.ts +2 -2
  27. package/dist/validation/complex/location.d.mts +2 -2
  28. package/dist/validation/complex/location.d.ts +2 -2
  29. package/dist/validation/complex/phone.d.mts +2 -2
  30. package/dist/validation/complex/phone.d.ts +2 -2
  31. package/dist/validation/complex/relation.d.mts +2 -2
  32. package/dist/validation/complex/relation.d.ts +2 -2
  33. package/dist/validation/complex/richtext.d.mts +2 -2
  34. package/dist/validation/complex/richtext.d.ts +2 -2
  35. package/dist/validation/complex/select.d.mts +2 -2
  36. package/dist/validation/complex/select.d.ts +2 -2
  37. package/dist/validation/complex/user.d.mts +2 -2
  38. package/dist/validation/complex/user.d.ts +2 -2
  39. package/dist/validation/computed/formula.d.mts +2 -2
  40. package/dist/validation/computed/formula.d.ts +2 -2
  41. package/dist/validation/computed/rollup.d.mts +2 -2
  42. package/dist/validation/computed/rollup.d.ts +2 -2
  43. package/dist/validation/config/index.d.mts +1 -1
  44. package/dist/validation/config/index.d.ts +1 -1
  45. package/dist/validation/core/index.d.mts +3 -3
  46. package/dist/validation/core/index.d.ts +3 -3
  47. package/dist/validation/object/index.d.mts +5 -4
  48. package/dist/validation/object/index.d.ts +5 -4
  49. package/dist/validation/object/index.js +16 -15
  50. package/dist/validation/object/index.mjs +4 -3
  51. package/dist/validation/primitives/checkbox.d.mts +2 -2
  52. package/dist/validation/primitives/checkbox.d.ts +2 -2
  53. package/dist/validation/primitives/date.d.mts +2 -2
  54. package/dist/validation/primitives/date.d.ts +2 -2
  55. package/dist/validation/primitives/number.d.mts +2 -2
  56. package/dist/validation/primitives/number.d.ts +2 -2
  57. package/dist/validation/primitives/text.d.mts +2 -2
  58. package/dist/validation/primitives/text.d.ts +2 -2
  59. package/package.json +7 -2
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { A as Attribute, g as AttributeType, h as ComputedAttributeState } from './attributes-Cmkc7UgJ.mjs';
3
- import { V as ValidationMessages, a as ValidationResult } from './types-CVswgCx9.mjs';
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
4
  import { IconName } from '@stndrds/constants';
5
5
  import { Uuid } from './utils.mjs';
6
+ import { M as MigrationDefinition } from './migrations-BXd2ZGfM.mjs';
6
7
 
7
8
  interface DocumentLayout {
8
9
  /** Named sub-folders auto-created at the top of the record's drive when first used via attach --variant. */
@@ -32,42 +33,6 @@ interface PresetNode {
32
33
  /** Max depth allowed for preset.structure to keep instantiation predictable. */
33
34
  declare const MAX_PRESET_DEPTH = 5;
34
35
 
35
- type BuiltInTransform = "toString" | "toNumber" | "toDate" | "toBoolean" | "toISOString";
36
- type SchemaOperation = {
37
- type: "add_attribute";
38
- attribute: Attribute;
39
- } | {
40
- type: "remove_attribute";
41
- name: string;
42
- backup_config: Attribute;
43
- } | {
44
- type: "rename_attribute";
45
- from: string;
46
- to: string;
47
- } | {
48
- type: "change_type";
49
- name: string;
50
- from: AttributeType;
51
- to: AttributeType;
52
- transform?: BuiltInTransform;
53
- } | {
54
- type: "update_config";
55
- name: string;
56
- from: Partial<Record<string, unknown>>;
57
- to: Partial<Record<string, unknown>>;
58
- } | {
59
- type: "remove_object";
60
- backup: Record<string, unknown>;
61
- } | {
62
- type: "rename_object";
63
- from: string;
64
- to: string;
65
- };
66
- interface MigrationDefinition {
67
- version: number;
68
- operations: SchemaOperation[];
69
- }
70
-
71
36
  /**
72
37
  * Timestamps for tracking creation and updates
73
38
  */
@@ -313,4 +278,4 @@ declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data:
313
278
  */
314
279
  declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
315
280
 
316
- export { type BuiltInTransform as B, type DocumentLayout as D, type FolderPreset as F, type MigrationDefinition as M, type ObjectDefinition as O, type PresetNode as P, RESERVED_ATTRIBUTE_NAMES as R, type SchemaOperation 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, MAX_PRESET_DEPTH as j, type ObjectAttribute as k, type ObjectRecord as l, RESERVED_OBJECT_NAMES as m, type ReservedAttributeName as n, type ReservedObjectName as o, SYSTEM_FIELD_NAMES as p, type SystemFieldName as q, rejectUnknownAttributesOrThrow as r, validateDraft as v };
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 };