@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.
- package/dist/{attributes-_6tvjbyl.d.ts → attributes-_b3Db8vT.d.ts} +1 -23
- package/dist/{attributes-Cmkc7UgJ.d.mts → attributes-lBLiOIY3.d.mts} +1 -23
- package/dist/chunk-NGGU6BSN.mjs +216 -0
- package/dist/chunk-NI3HCSYH.js +229 -0
- package/dist/{chunk-54WDPQ6R.mjs → chunk-QIWADKYA.mjs} +12 -216
- package/dist/{chunk-TS3PJOMZ.js → chunk-ZBQEMIAV.js} +11 -227
- package/dist/exceptions.d.mts +458 -0
- package/dist/exceptions.d.ts +458 -0
- package/dist/exceptions.js +154 -0
- package/dist/exceptions.mjs +1 -0
- package/dist/{helpers-BTC6TsKH.d.ts → helpers-eyrnPJEF.d.ts} +4 -39
- package/dist/{helpers-BO10yqih.d.mts → helpers-uKLet0kF.d.mts} +4 -39
- package/dist/index.d.mts +150 -476
- package/dist/index.d.ts +150 -476
- package/dist/index.js +238 -139
- package/dist/index.mjs +131 -35
- package/dist/migrations-BXd2ZGfM.d.mts +39 -0
- package/dist/migrations-DcuJZ8qO.d.ts +39 -0
- package/dist/{types-CVswgCx9.d.mts → types-DNz3ITS-.d.mts} +1 -1
- package/dist/{types-B_UZK_6m.d.ts → types-DqLi1tx1.d.ts} +1 -1
- package/dist/validation/all.d.mts +4 -3
- package/dist/validation/all.d.ts +4 -3
- package/dist/validation/all.js +10 -9
- package/dist/validation/all.mjs +4 -3
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +5 -4
- package/dist/validation/object/index.d.ts +5 -4
- package/dist/validation/object/index.js +16 -15
- package/dist/validation/object/index.mjs +4 -3
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +7 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute,
|
|
3
|
-
import { V as ValidationMessages, a as ValidationResult } from './types-
|
|
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
|
|
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 };
|