@stndrds/schema 0.1.0-alpha.67 → 1.0.0-alpha.102
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-D7yQuTJK.d.mts +665 -0
- package/dist/attributes-DcbQC-4b.d.ts +665 -0
- package/dist/chunk-3JINFUN3.js +81 -0
- package/dist/chunk-4KRLCWJM.mjs +8 -0
- package/dist/chunk-4TC27SMF.mjs +18 -0
- package/dist/chunk-56QI6UTK.js +32 -0
- package/dist/chunk-5JVVPJJW.mjs +208 -0
- package/dist/chunk-5XL3JP73.mjs +83 -0
- package/dist/chunk-7HFZ7MVR.mjs +28 -0
- package/dist/chunk-ACQ3TUFK.js +10 -0
- package/dist/chunk-AYCSVKI2.mjs +14 -0
- package/dist/chunk-BLXQGQLK.mjs +10 -0
- package/dist/chunk-D7WFIGXW.js +14 -0
- package/dist/chunk-FRCDMQER.js +47 -0
- package/dist/chunk-GCRHSPZN.js +16 -0
- package/dist/chunk-IRTRJH37.mjs +8 -0
- package/dist/chunk-ITTQ4FGR.mjs +14 -0
- package/dist/chunk-J5HRK3WD.js +10 -0
- package/dist/chunk-KNYZH2WD.mjs +18 -0
- package/dist/chunk-KWVCGQ7N.mjs +78 -0
- package/dist/chunk-MAKSIK3P.js +10 -0
- package/dist/chunk-N7T66JVY.js +86 -0
- package/dist/chunk-OAQWRMTP.js +10 -0
- package/dist/chunk-OLJLCVNY.mjs +8 -0
- package/dist/chunk-P2BE2A2G.js +64 -0
- package/dist/chunk-PGERPYDR.js +2 -0
- package/dist/chunk-QWZHR2OO.js +12 -0
- package/dist/chunk-QY6QFRRV.mjs +41 -0
- package/dist/chunk-QYNPB37W.js +221 -0
- package/dist/chunk-R4CJHCC4.mjs +60 -0
- package/dist/chunk-RJ4LOX7P.js +22 -0
- package/dist/chunk-ROAZLZA2.js +20 -0
- package/dist/chunk-RUYUFXNW.mjs +12 -0
- package/dist/chunk-SP3PNHYF.mjs +1 -0
- package/dist/chunk-SS2NR6DH.mjs +176 -0
- package/dist/chunk-T225DB55.js +33 -0
- package/dist/chunk-TKN73433.js +20 -0
- package/dist/chunk-TMYBEXBT.mjs +8 -0
- package/dist/chunk-UQVW4KPP.mjs +30 -0
- package/dist/chunk-V6DE3MXC.js +180 -0
- package/dist/chunk-VXOTYFEW.js +16 -0
- package/dist/chunk-WV4V64D5.mjs +20 -0
- package/dist/helpers-DD6JzYfI.d.mts +860 -0
- package/dist/helpers-kMS5R7KX.d.ts +860 -0
- package/dist/index.d.mts +3597 -1768
- package/dist/index.d.ts +3597 -1768
- package/dist/index.js +4957 -1955
- package/dist/index.mjs +3920 -1116
- package/dist/types-BAPgWlpX.d.mts +39 -0
- package/dist/types-mZPUEZl0.d.ts +39 -0
- package/dist/utils.d.mts +20 -55
- package/dist/utils.d.ts +20 -55
- package/dist/utils.js +26 -19
- package/dist/utils.mjs +1 -19
- package/dist/validation/all.d.mts +8 -0
- package/dist/validation/all.d.ts +8 -0
- package/dist/validation/all.js +56 -0
- package/dist/validation/all.mjs +19 -0
- package/dist/validation/complex/currency.d.mts +15 -0
- package/dist/validation/complex/currency.d.ts +15 -0
- package/dist/validation/complex/currency.js +11 -0
- package/dist/validation/complex/currency.mjs +2 -0
- package/dist/validation/complex/file.d.mts +13 -0
- package/dist/validation/complex/file.d.ts +13 -0
- package/dist/validation/complex/file.js +11 -0
- package/dist/validation/complex/file.mjs +2 -0
- package/dist/validation/complex/location.d.mts +22 -0
- package/dist/validation/complex/location.d.ts +22 -0
- package/dist/validation/complex/location.js +11 -0
- package/dist/validation/complex/location.mjs +2 -0
- package/dist/validation/complex/phone.d.mts +22 -0
- package/dist/validation/complex/phone.d.ts +22 -0
- package/dist/validation/complex/phone.js +11 -0
- package/dist/validation/complex/phone.mjs +2 -0
- package/dist/validation/complex/relation.d.mts +25 -0
- package/dist/validation/complex/relation.d.ts +25 -0
- package/dist/validation/complex/relation.js +19 -0
- package/dist/validation/complex/relation.mjs +2 -0
- package/dist/validation/complex/richtext.d.mts +13 -0
- package/dist/validation/complex/richtext.d.ts +13 -0
- package/dist/validation/complex/richtext.js +11 -0
- package/dist/validation/complex/richtext.mjs +2 -0
- package/dist/validation/complex/select.d.mts +20 -0
- package/dist/validation/complex/select.d.ts +20 -0
- package/dist/validation/complex/select.js +19 -0
- package/dist/validation/complex/select.mjs +2 -0
- package/dist/validation/complex/user.d.mts +13 -0
- package/dist/validation/complex/user.d.ts +13 -0
- package/dist/validation/complex/user.js +11 -0
- package/dist/validation/complex/user.mjs +2 -0
- package/dist/validation/computed/formula.d.mts +14 -0
- package/dist/validation/computed/formula.d.ts +14 -0
- package/dist/validation/computed/formula.js +11 -0
- package/dist/validation/computed/formula.mjs +2 -0
- package/dist/validation/computed/rollup.d.mts +14 -0
- package/dist/validation/computed/rollup.d.ts +14 -0
- package/dist/validation/computed/rollup.js +11 -0
- package/dist/validation/computed/rollup.mjs +2 -0
- package/dist/validation/config/index.d.mts +20 -0
- package/dist/validation/config/index.d.ts +20 -0
- package/dist/validation/config/index.js +18 -0
- package/dist/validation/config/index.mjs +1 -0
- package/dist/validation/core/index.d.mts +19 -0
- package/dist/validation/core/index.d.ts +19 -0
- package/dist/validation/core/index.js +14 -0
- package/dist/validation/core/index.mjs +1 -0
- package/dist/validation/object/index.d.mts +31 -0
- package/dist/validation/object/index.d.ts +31 -0
- package/dist/validation/object/index.js +70 -0
- package/dist/validation/object/index.mjs +17 -0
- package/dist/validation/primitives/checkbox.d.mts +12 -0
- package/dist/validation/primitives/checkbox.d.ts +12 -0
- package/dist/validation/primitives/checkbox.js +11 -0
- package/dist/validation/primitives/checkbox.mjs +2 -0
- package/dist/validation/primitives/date.d.mts +12 -0
- package/dist/validation/primitives/date.d.ts +12 -0
- package/dist/validation/primitives/date.js +11 -0
- package/dist/validation/primitives/date.mjs +2 -0
- package/dist/validation/primitives/number.d.mts +12 -0
- package/dist/validation/primitives/number.d.ts +12 -0
- package/dist/validation/primitives/number.js +11 -0
- package/dist/validation/primitives/number.mjs +2 -0
- package/dist/validation/primitives/rating.d.mts +12 -0
- package/dist/validation/primitives/rating.d.ts +12 -0
- package/dist/validation/primitives/rating.js +11 -0
- package/dist/validation/primitives/rating.mjs +2 -0
- package/dist/validation/primitives/text.d.mts +17 -0
- package/dist/validation/primitives/text.d.ts +17 -0
- package/dist/validation/primitives/text.js +15 -0
- package/dist/validation/primitives/text.mjs +2 -0
- package/package.json +108 -13
- package/dist/chunk-36UBIXJN.js +0 -82
- package/dist/chunk-3RG5ZIWI.js +0 -10
- package/dist/chunk-A6T4UUZ2.mjs +0 -18669
- package/dist/chunk-NEVERCM3.js +0 -41
- package/dist/chunk-SV4BCGQU.mjs +0 -617
- package/dist/chunk-TOTUS3YS.js +0 -18669
- package/dist/chunk-U4AB53AM.js +0 -617
- package/dist/chunk-V2RPPE2Y.mjs +0 -41
- package/dist/chunk-V5QXU2OK.mjs +0 -82
- package/dist/chunk-Y6FXYEAI.mjs +0 -10
- package/dist/default-roles-42X3TJI5.mjs +0 -21
- package/dist/default-roles-C3FYDYMN.js +0 -21
- package/dist/runtime-BgtwoMx5.d.ts +0 -12759
- package/dist/runtime-DQlTgVZJ.d.mts +0 -12759
- package/dist/runtime.d.mts +0 -6
- package/dist/runtime.d.ts +0 -6
- package/dist/runtime.js +0 -323
- package/dist/runtime.mjs +0 -323
- package/dist/validation/validators.d.mts +0 -4
- package/dist/validation/validators.d.ts +0 -4
- package/dist/validation/validators.js +0 -121
- package/dist/validation/validators.mjs +0 -121
- package/dist/validators-BROsLGn4.d.mts +0 -1556
- package/dist/validators-CEzdvxEq.d.ts +0 -1556
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { M as MultiRelationAttribute, R as RelationAttribute, S as SingleRelationAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a single relation attribute (cardinality: "one")
|
|
9
|
+
* Supports hybrid format `{ id, props }` from qualified relations.
|
|
10
|
+
* IMPORTANT: Validates the ID but preserves the original format (keeps props).
|
|
11
|
+
*/
|
|
12
|
+
declare function createSingleRelationValidator(attr: SingleRelationAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
13
|
+
/**
|
|
14
|
+
* Create a Zod schema for a multi relation attribute (cardinality: "many")
|
|
15
|
+
* Supports hybrid format arrays with `{ id, props }` items from qualified relations.
|
|
16
|
+
* IMPORTANT: Validates the IDs but preserves the original format (keeps props).
|
|
17
|
+
*/
|
|
18
|
+
declare function createMultiRelationValidator(attr: MultiRelationAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Zod schema for a relation attribute
|
|
21
|
+
* Dispatches to single or multi validator based on cardinality
|
|
22
|
+
*/
|
|
23
|
+
declare function createRelationValidator(attr: RelationAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
24
|
+
|
|
25
|
+
export { createMultiRelationValidator, createRelationValidator, createSingleRelationValidator };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkP2BE2A2G_js = require('../../chunk-P2BE2A2G.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createMultiRelationValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkP2BE2A2G_js.createMultiRelationValidator; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createRelationValidator", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkP2BE2A2G_js.createRelationValidator; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "createSingleRelationValidator", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkP2BE2A2G_js.createSingleRelationValidator; }
|
|
19
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { a as RichtextAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a richtext attribute.
|
|
9
|
+
* Validates semantic markdown content as a string.
|
|
10
|
+
*/
|
|
11
|
+
declare function createRichtextValidator(attr: RichtextAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
12
|
+
|
|
13
|
+
export { createRichtextValidator };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { a as RichtextAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a richtext attribute.
|
|
9
|
+
* Validates semantic markdown content as a string.
|
|
10
|
+
*/
|
|
11
|
+
declare function createRichtextValidator(attr: RichtextAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
12
|
+
|
|
13
|
+
export { createRichtextValidator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQWZHR2OO_js = require('../../chunk-QWZHR2OO.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createRichtextValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkQWZHR2OO_js.createRichtextValidator; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a select attribute
|
|
9
|
+
*/
|
|
10
|
+
declare function createSelectValidator(attr: SelectAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
11
|
+
/**
|
|
12
|
+
* Create a Zod schema for a multiselect attribute
|
|
13
|
+
*/
|
|
14
|
+
declare function createMultiselectValidator(attr: MultiselectAttribute, messages?: ValidationMessages): z.ZodArray<z.ZodTypeAny>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a Zod schema for a status attribute
|
|
17
|
+
*/
|
|
18
|
+
declare function createStatusValidator(attr: StatusAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
19
|
+
|
|
20
|
+
export { createMultiselectValidator, createSelectValidator, createStatusValidator };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { b as MultiselectAttribute, c as SelectAttribute, d as StatusAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a select attribute
|
|
9
|
+
*/
|
|
10
|
+
declare function createSelectValidator(attr: SelectAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
11
|
+
/**
|
|
12
|
+
* Create a Zod schema for a multiselect attribute
|
|
13
|
+
*/
|
|
14
|
+
declare function createMultiselectValidator(attr: MultiselectAttribute, messages?: ValidationMessages): z.ZodArray<z.ZodTypeAny>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a Zod schema for a status attribute
|
|
17
|
+
*/
|
|
18
|
+
declare function createStatusValidator(attr: StatusAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
19
|
+
|
|
20
|
+
export { createMultiselectValidator, createSelectValidator, createStatusValidator };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk56QI6UTK_js = require('../../chunk-56QI6UTK.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createMultiselectValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk56QI6UTK_js.createMultiselectValidator; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createSelectValidator", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk56QI6UTK_js.createSelectValidator; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "createStatusValidator", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk56QI6UTK_js.createStatusValidator; }
|
|
19
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { U as UserAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a user attribute
|
|
9
|
+
* Supports both single user (UUID) and multiple users (array of UUIDs)
|
|
10
|
+
*/
|
|
11
|
+
declare function createUserValidator(attr: UserAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
12
|
+
|
|
13
|
+
export { createUserValidator };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { U as UserAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a user attribute
|
|
9
|
+
* Supports both single user (UUID) and multiple users (array of UUIDs)
|
|
10
|
+
*/
|
|
11
|
+
declare function createUserValidator(attr: UserAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
12
|
+
|
|
13
|
+
export { createUserValidator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVXOTYFEW_js = require('../../chunk-VXOTYFEW.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createUserValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkVXOTYFEW_js.createUserValidator; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { e as FormulaAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a formula attribute.
|
|
9
|
+
* Formula attributes are read-only (computed at runtime).
|
|
10
|
+
* They accept any value during validation but are ignored during record creation/update.
|
|
11
|
+
*/
|
|
12
|
+
declare function createFormulaValidator(_attr: FormulaAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
13
|
+
|
|
14
|
+
export { createFormulaValidator };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { e as FormulaAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a formula attribute.
|
|
9
|
+
* Formula attributes are read-only (computed at runtime).
|
|
10
|
+
* They accept any value during validation but are ignored during record creation/update.
|
|
11
|
+
*/
|
|
12
|
+
declare function createFormulaValidator(_attr: FormulaAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
13
|
+
|
|
14
|
+
export { createFormulaValidator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOAQWRMTP_js = require('../../chunk-OAQWRMTP.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createFormulaValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkOAQWRMTP_js.createFormulaValidator; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { f as RollupAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a rollup attribute.
|
|
9
|
+
* Rollup attributes are read-only (computed from related records).
|
|
10
|
+
* They accept any value during validation but are ignored during record creation/update.
|
|
11
|
+
*/
|
|
12
|
+
declare function createRollupValidator(_attr: RollupAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
13
|
+
|
|
14
|
+
export { createRollupValidator };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { f as RollupAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a rollup attribute.
|
|
9
|
+
* Rollup attributes are read-only (computed from related records).
|
|
10
|
+
* They accept any value during validation but are ignored during record creation/update.
|
|
11
|
+
*/
|
|
12
|
+
declare function createRollupValidator(_attr: RollupAttribute, _messages?: ValidationMessages): z.ZodUnknown;
|
|
13
|
+
|
|
14
|
+
export { createRollupValidator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkACQ3TUFK_js = require('../../chunk-ACQ3TUFK.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createRollupValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkACQ3TUFK_js.createRollupValidator; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { j as AttributeType } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import '@stndrds/constants';
|
|
4
|
+
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 };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { j as AttributeType } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import '@stndrds/constants';
|
|
4
|
+
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 };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkV6DE3MXC_js = require('../../chunk-V6DE3MXC.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "attributeConfigSchemas", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkV6DE3MXC_js.attributeConfigSchemas; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getAttributeConfigSchema", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkV6DE3MXC_js.getAttributeConfigSchema; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkV6DE3MXC_js.parseAttributeConfig; }
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { attributeConfigSchemas, getAttributeConfigSchema, parseAttributeConfig } from '../../chunk-SS2NR6DH.mjs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
2
|
+
export { a as ValidationResult } from '../../types-BAPgWlpX.mjs';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import '../../attributes-D7yQuTJK.mjs';
|
|
5
|
+
import '@stndrds/constants';
|
|
6
|
+
import '../../utils.mjs';
|
|
7
|
+
|
|
8
|
+
declare const DEFAULT_VALIDATION_MESSAGES: ValidationMessages;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Format Zod validation errors into a consistent structure.
|
|
12
|
+
* This eliminates code duplication across multiple validation functions.
|
|
13
|
+
*/
|
|
14
|
+
declare function formatZodErrors(error: z.ZodError): Array<{
|
|
15
|
+
path: string[];
|
|
16
|
+
message: string;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, formatZodErrors };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
2
|
+
export { a as ValidationResult } from '../../types-mZPUEZl0.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import '../../attributes-DcbQC-4b.js';
|
|
5
|
+
import '@stndrds/constants';
|
|
6
|
+
import '../../utils.js';
|
|
7
|
+
|
|
8
|
+
declare const DEFAULT_VALIDATION_MESSAGES: ValidationMessages;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Format Zod validation errors into a consistent structure.
|
|
12
|
+
* This eliminates code duplication across multiple validation functions.
|
|
13
|
+
*/
|
|
14
|
+
declare function formatZodErrors(error: z.ZodError): Array<{
|
|
15
|
+
path: string[];
|
|
16
|
+
message: string;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, formatZodErrors };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkT225DB55_js = require('../../chunk-T225DB55.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkT225DB55_js.DEFAULT_VALIDATION_MESSAGES; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "formatZodErrors", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkT225DB55_js.formatZodErrors; }
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from '../../chunk-UQVW4KPP.mjs';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-DD6JzYfI.mjs';
|
|
2
|
+
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-DD6JzYfI.mjs';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import '../../attributes-D7yQuTJK.mjs';
|
|
5
|
+
import '@stndrds/constants';
|
|
6
|
+
import '../../utils.mjs';
|
|
7
|
+
import '../../types-BAPgWlpX.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Create a Zod schema for an entire object
|
|
11
|
+
*
|
|
12
|
+
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
13
|
+
* present in record data but are not part of the mutable schema.
|
|
14
|
+
*
|
|
15
|
+
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
16
|
+
* are stable after module load and never mutated at runtime.
|
|
17
|
+
*/
|
|
18
|
+
declare function createObjectValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Zod schema for draft validation.
|
|
21
|
+
* All attributes become optional, but provided values are still validated.
|
|
22
|
+
*
|
|
23
|
+
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
24
|
+
* present in record data but are not part of the mutable schema.
|
|
25
|
+
*
|
|
26
|
+
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
27
|
+
* are stable after module load and never mutated at runtime.
|
|
28
|
+
*/
|
|
29
|
+
declare function createDraftValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
30
|
+
|
|
31
|
+
export { createDraftValidator, createObjectValidator };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-kMS5R7KX.js';
|
|
2
|
+
export { c as computeRecordStatus, e as createAttributeValidator, a as createFormAttributeValidator, g as getMissingRequiredAttributes, i as isRecordComplete, f as validateAttribute, h as validateDraft, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../../helpers-kMS5R7KX.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import '../../attributes-DcbQC-4b.js';
|
|
5
|
+
import '@stndrds/constants';
|
|
6
|
+
import '../../utils.js';
|
|
7
|
+
import '../../types-mZPUEZl0.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Create a Zod schema for an entire object
|
|
11
|
+
*
|
|
12
|
+
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
13
|
+
* present in record data but are not part of the mutable schema.
|
|
14
|
+
*
|
|
15
|
+
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
16
|
+
* are stable after module load and never mutated at runtime.
|
|
17
|
+
*/
|
|
18
|
+
declare function createObjectValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Zod schema for draft validation.
|
|
21
|
+
* All attributes become optional, but provided values are still validated.
|
|
22
|
+
*
|
|
23
|
+
* Uses passthrough mode to allow computed fields (formula, rollup) that may be
|
|
24
|
+
* present in record data but are not part of the mutable schema.
|
|
25
|
+
*
|
|
26
|
+
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
27
|
+
* are stable after module load and never mutated at runtime.
|
|
28
|
+
*/
|
|
29
|
+
declare function createDraftValidator(objectDef: ObjectDefinition): z.ZodType<Record<string, unknown>>;
|
|
30
|
+
|
|
31
|
+
export { createDraftValidator, createObjectValidator };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQYNPB37W_js = require('../../chunk-QYNPB37W.js');
|
|
4
|
+
require('../../chunk-MAKSIK3P.js');
|
|
5
|
+
require('../../chunk-J5HRK3WD.js');
|
|
6
|
+
require('../../chunk-TKN73433.js');
|
|
7
|
+
require('../../chunk-D7WFIGXW.js');
|
|
8
|
+
require('../../chunk-3JINFUN3.js');
|
|
9
|
+
require('../../chunk-QWZHR2OO.js');
|
|
10
|
+
require('../../chunk-56QI6UTK.js');
|
|
11
|
+
require('../../chunk-VXOTYFEW.js');
|
|
12
|
+
require('../../chunk-OAQWRMTP.js');
|
|
13
|
+
require('../../chunk-ACQ3TUFK.js');
|
|
14
|
+
require('../../chunk-GCRHSPZN.js');
|
|
15
|
+
require('../../chunk-ROAZLZA2.js');
|
|
16
|
+
require('../../chunk-RJ4LOX7P.js');
|
|
17
|
+
require('../../chunk-N7T66JVY.js');
|
|
18
|
+
require('../../chunk-P2BE2A2G.js');
|
|
19
|
+
require('../../chunk-T225DB55.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Object.defineProperty(exports, "computeRecordStatus", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkQYNPB37W_js.computeRecordStatus; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "createAttributeValidator", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkQYNPB37W_js.createAttributeValidator; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "createDraftValidator", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkQYNPB37W_js.createDraftValidator; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkQYNPB37W_js.createFormAttributeValidator; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "createObjectValidator", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkQYNPB37W_js.createObjectValidator; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "getMissingRequiredAttributes", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkQYNPB37W_js.getMissingRequiredAttributes; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "isRecordComplete", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkQYNPB37W_js.isRecordComplete; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "validateAttribute", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkQYNPB37W_js.validateAttribute; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "validateDraft", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkQYNPB37W_js.validateDraft; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunkQYNPB37W_js.validateDraftOrThrow; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "validateObject", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return chunkQYNPB37W_js.validateObject; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunkQYNPB37W_js.validateObjectOrThrow; }
|
|
70
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { computeRecordStatus, createAttributeValidator, createDraftValidator, createFormAttributeValidator, createObjectValidator, getMissingRequiredAttributes, isRecordComplete, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../../chunk-5JVVPJJW.mjs';
|
|
2
|
+
import '../../chunk-TMYBEXBT.mjs';
|
|
3
|
+
import '../../chunk-4KRLCWJM.mjs';
|
|
4
|
+
import '../../chunk-KNYZH2WD.mjs';
|
|
5
|
+
import '../../chunk-RUYUFXNW.mjs';
|
|
6
|
+
import '../../chunk-KWVCGQ7N.mjs';
|
|
7
|
+
import '../../chunk-BLXQGQLK.mjs';
|
|
8
|
+
import '../../chunk-7HFZ7MVR.mjs';
|
|
9
|
+
import '../../chunk-ITTQ4FGR.mjs';
|
|
10
|
+
import '../../chunk-IRTRJH37.mjs';
|
|
11
|
+
import '../../chunk-OLJLCVNY.mjs';
|
|
12
|
+
import '../../chunk-AYCSVKI2.mjs';
|
|
13
|
+
import '../../chunk-4TC27SMF.mjs';
|
|
14
|
+
import '../../chunk-WV4V64D5.mjs';
|
|
15
|
+
import '../../chunk-5XL3JP73.mjs';
|
|
16
|
+
import '../../chunk-R4CJHCC4.mjs';
|
|
17
|
+
import '../../chunk-UQVW4KPP.mjs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { g as CheckboxAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a checkbox attribute
|
|
9
|
+
*/
|
|
10
|
+
declare function createCheckboxValidator(_attr: CheckboxAttribute, _messages?: ValidationMessages): z.ZodBoolean;
|
|
11
|
+
|
|
12
|
+
export { createCheckboxValidator };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { g as CheckboxAttribute } from '../../attributes-DcbQC-4b.js';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-mZPUEZl0.js';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a checkbox attribute
|
|
9
|
+
*/
|
|
10
|
+
declare function createCheckboxValidator(_attr: CheckboxAttribute, _messages?: ValidationMessages): z.ZodBoolean;
|
|
11
|
+
|
|
12
|
+
export { createCheckboxValidator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkMAKSIK3P_js = require('../../chunk-MAKSIK3P.js');
|
|
4
|
+
require('../../chunk-T225DB55.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createCheckboxValidator", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkMAKSIK3P_js.createCheckboxValidator; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { D as DateAttribute } from '../../attributes-D7yQuTJK.mjs';
|
|
3
|
+
import { V as ValidationMessages } from '../../types-BAPgWlpX.mjs';
|
|
4
|
+
import '@stndrds/constants';
|
|
5
|
+
import '../../utils.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a Zod schema for a date attribute
|
|
9
|
+
*/
|
|
10
|
+
declare function createDateValidator(attr: DateAttribute, messages?: ValidationMessages): z.ZodTypeAny;
|
|
11
|
+
|
|
12
|
+
export { createDateValidator };
|