@standards/schema 1.0.0-alpha.382 → 1.0.0-alpha.385
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/{all-BgYwavNm.d.mts → all-Czr26_QP.d.ts} +1115 -1116
- package/dist/{all-DjdKldjX.d.ts → all-DIAipZSx.d.mts} +1115 -1116
- package/dist/api/index.d.mts +2986 -2923
- package/dist/api/index.d.ts +2986 -2923
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/attribute-validators-COsyRG9V.mjs +11 -0
- package/dist/attribute-validators-CQEf6iqM.js +11 -0
- package/dist/{attributes-kAhQzg8-.d.ts → attributes-BcA_reJZ.d.ts} +58 -59
- package/dist/{attributes-aTeqx6cK.d.mts → attributes-eqr1vdPP.d.mts} +58 -59
- package/dist/checkbox-C9aJ-6gq.d.ts +10 -0
- package/dist/checkbox-DfXrFM2z.d.mts +10 -0
- package/dist/config-C1CDWJf8.mjs +2 -0
- package/dist/config-DUQAd-Ur.js +2 -0
- package/dist/{core-397tQy5q.js → core-DAxRlJ5i.js} +1 -1
- package/dist/{core-BLHhNykL.mjs → core-rKI7Q9_U.mjs} +1 -1
- package/dist/{date-D007KyTI.d.ts → date-BzggmHjS.d.mts} +5 -6
- package/dist/{date-CxqDOhA0.d.mts → date-CdaoV9_L.d.ts} +5 -6
- package/dist/{exceptions-DjPVyS-Q.d.mts → exceptions-CgzBcQIl.d.mts} +70 -70
- package/dist/{exceptions-DjPVyS-Q.d.ts → exceptions-CgzBcQIl.d.ts} +70 -70
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-CiTBL4gH.d.ts → index-BSYjSdhW.d.mts} +17 -18
- package/dist/{index-DLO8JpnY.d.ts → index-CCH94vyR.d.ts} +6 -7
- package/dist/{index-DPO5w-fC.d.mts → index-D1iR2xuc.d.ts} +17 -18
- package/dist/{index-D7TEaPqX.d.ts → index-DFQSFYiY.d.mts} +2863 -2790
- package/dist/{index-DwQWBzYJ.d.mts → index-DKjcsjFG.d.ts} +2863 -2790
- package/dist/{index-Bu9xF5Nq.d.ts → index-e1Oh8ngS.d.ts} +78 -78
- package/dist/{index-BmNMneu3.d.mts → index-jDwfdudj.d.mts} +78 -78
- package/dist/{index-3HZjBOpj.d.mts → index-zJz3LbXr.d.mts} +6 -7
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/number-B3u9vPtb.d.ts +10 -0
- package/dist/number-Br56q0hL.d.mts +10 -0
- package/dist/object-BF5y6bgs.mjs +4 -0
- package/dist/object-Kx-ADbIo.js +4 -0
- package/dist/{objects-B4DgFZ82.d.ts → objects-CLxyZh-U.d.ts} +66 -57
- package/dist/{objects-C9f6hFW_.d.mts → objects-DxEMaC2Z.d.mts} +66 -57
- package/dist/phone-BGJea5sr.mjs +2 -0
- package/dist/phone-DrHyIujN.js +2 -0
- package/dist/record-aggregates-Cj3p3_ce.js +2 -0
- package/dist/{record-aggregates-CzG86pUS.mjs → record-aggregates-DQXrIuGE.mjs} +1 -1
- package/dist/record-operation-7-DRRONb.mjs +2 -0
- package/dist/record-operation-Bbn-LZhq.js +2 -0
- package/dist/text-2DB_Jc_x.js +2 -0
- package/dist/text-BaxaZ5Vv.mjs +2 -0
- package/dist/text-Bvk4ila8.d.ts +10 -0
- package/dist/text-C5NnfCJg.d.mts +10 -0
- package/dist/{utils-gY3d9Dwp.js → utils-B-gGq3FS.js} +1 -1
- package/dist/{utils-B7Dlrtnx.d.ts → utils-B2bq4zLb.d.ts} +15 -16
- package/dist/{utils-DbRMK8NI.d.mts → utils-CRx-eR8T.d.mts} +15 -16
- package/dist/{utils-fXIvFFl6.mjs → utils-DaejNWxh.mjs} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +4 -4
- package/dist/validation/complex/currency.d.ts +4 -4
- package/dist/validation/complex/currency.js +1 -1
- package/dist/validation/complex/currency.mjs +1 -1
- package/dist/validation/complex/location.d.mts +4 -4
- package/dist/validation/complex/location.d.ts +4 -4
- package/dist/validation/complex/location.js +1 -1
- package/dist/validation/complex/location.mjs +1 -1
- package/dist/validation/complex/phone.d.mts +4 -4
- package/dist/validation/complex/phone.d.ts +4 -4
- package/dist/validation/complex/phone.js +1 -1
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +6 -6
- package/dist/validation/complex/relation.d.ts +6 -6
- package/dist/validation/complex/relation.js +1 -1
- package/dist/validation/complex/relation.mjs +1 -1
- package/dist/validation/complex/richtext.d.mts +4 -4
- package/dist/validation/complex/richtext.d.ts +4 -4
- package/dist/validation/complex/richtext.js +1 -1
- package/dist/validation/complex/richtext.mjs +1 -1
- package/dist/validation/complex/select.d.mts +6 -6
- package/dist/validation/complex/select.d.ts +6 -6
- package/dist/validation/complex/select.js +1 -1
- package/dist/validation/complex/select.mjs +1 -1
- package/dist/validation/complex/user.d.mts +4 -4
- package/dist/validation/complex/user.d.ts +4 -4
- package/dist/validation/complex/user.js +1 -1
- package/dist/validation/complex/user.mjs +1 -1
- package/dist/validation/computed/formula.d.mts +4 -4
- package/dist/validation/computed/formula.d.ts +4 -4
- package/dist/validation/computed/formula.js +1 -1
- package/dist/validation/computed/formula.mjs +1 -1
- package/dist/validation/computed/rollup.d.mts +4 -4
- package/dist/validation/computed/rollup.d.ts +4 -4
- package/dist/validation/computed/rollup.js +1 -1
- package/dist/validation/computed/rollup.mjs +1 -1
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +1 -1
- package/dist/validation/config/index.mjs +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/core/index.js +1 -1
- package/dist/validation/core/index.mjs +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/object/index.js +1 -1
- package/dist/validation/object/index.mjs +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/checkbox.js +1 -1
- package/dist/validation/primitives/checkbox.mjs +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/date.js +1 -1
- package/dist/validation/primitives/date.mjs +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/number.js +1 -1
- package/dist/validation/primitives/number.mjs +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/dist/validation/primitives/text.js +1 -1
- package/dist/validation/primitives/text.mjs +1 -1
- package/dist/view-config.schema-BOuNAZ5T.js +2 -0
- package/dist/view-config.schema-Dl5GkAzl.mjs +2 -0
- package/dist/zod-locale-D_QkXhnp.d.mts +2 -0
- package/dist/zod-locale-D_QkXhnp.d.ts +2 -0
- package/dist/zod-locale.d.mts +2 -0
- package/dist/zod-locale.d.ts +2 -0
- package/dist/zod-locale.js +2 -0
- package/dist/zod-locale.mjs +2 -0
- package/package.json +17 -3
- package/dist/attribute-validators-DRqhAt2t.mjs +0 -11
- package/dist/attribute-validators-WAoJbap5.js +0 -11
- package/dist/checkbox-BZvZOraX.d.mts +0 -11
- package/dist/checkbox-n0YV1O13.d.ts +0 -11
- package/dist/config-BIxnbUN8.mjs +0 -2
- package/dist/config-DdjlHdPg.js +0 -2
- package/dist/number-CgBxEbjI.d.mts +0 -11
- package/dist/number-DncH-WRO.d.ts +0 -11
- package/dist/object-DcgxLvip.js +0 -4
- package/dist/object-Dzl7sfq8.mjs +0 -4
- package/dist/phone-BB-tzcSr.js +0 -2
- package/dist/phone-Bca_xiOX.mjs +0 -2
- package/dist/record-aggregates-DwpIJ2Dv.js +0 -2
- package/dist/record-operation-BSXczk7v.js +0 -2
- package/dist/record-operation-C9oXHmfF.mjs +0 -2
- package/dist/text-A9AJ1wUO.js +0 -2
- package/dist/text-C8Lb-NFo.mjs +0 -2
- package/dist/text-DDoY_LcQ.d.ts +0 -11
- package/dist/text-DeUqCFp9.d.mts +0 -11
- package/dist/view-config.schema-BQ9tU_9G.js +0 -2
- package/dist/view-config.schema-BmjCQJ51.mjs +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { ObjectImage, RecordAppearance } from "./objects-CLxyZh-U.js";
|
|
3
|
+
import { Attribute, AttributeType } from "./attributes-BcA_reJZ.js";
|
|
4
|
+
import * as z$2 from "zod";
|
|
5
5
|
import { ColorId, IconName } from "@standards/constants";
|
|
6
6
|
//#region src/types/mutations.d.ts
|
|
7
|
-
interface AddAttributeInput {
|
|
7
|
+
export interface AddAttributeInput {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
10
|
type: AttributeType;
|
|
@@ -17,7 +17,7 @@ interface AddAttributeInput {
|
|
|
17
17
|
metadata?: Record<string, unknown>;
|
|
18
18
|
[key: string]: unknown;
|
|
19
19
|
}
|
|
20
|
-
interface CreateCustomObjectInput {
|
|
20
|
+
export interface CreateCustomObjectInput {
|
|
21
21
|
name: string;
|
|
22
22
|
label: string;
|
|
23
23
|
pluralLabel?: string;
|
|
@@ -26,38 +26,39 @@ interface CreateCustomObjectInput {
|
|
|
26
26
|
description?: string;
|
|
27
27
|
icon?: IconName;
|
|
28
28
|
color?: ColorId;
|
|
29
|
-
|
|
29
|
+
image?: ObjectImage;
|
|
30
30
|
attributes?: (Attribute | {
|
|
31
31
|
build: () => Attribute;
|
|
32
32
|
})[];
|
|
33
33
|
metadata?: Record<string, unknown>;
|
|
34
34
|
}
|
|
35
|
-
interface UpdateObjectInput {
|
|
35
|
+
export interface UpdateObjectInput {
|
|
36
36
|
label?: string;
|
|
37
37
|
pluralLabel?: string;
|
|
38
38
|
description?: string;
|
|
39
39
|
icon?: IconName;
|
|
40
40
|
/** `null` clears it: the colour then derives from the object name. */
|
|
41
41
|
color?: ColorId | null;
|
|
42
|
-
/** `null` clears it: record images then crop to a square. */
|
|
43
|
-
|
|
42
|
+
/** `null` clears it: record images then crop to a square, and are found nowhere. */
|
|
43
|
+
image?: ObjectImage | null;
|
|
44
44
|
labelExpression?: string;
|
|
45
45
|
embeddingExpression?: string;
|
|
46
46
|
metadata?: Record<string, unknown>;
|
|
47
47
|
}
|
|
48
|
-
interface RelationOption {
|
|
48
|
+
export interface RelationOption {
|
|
49
49
|
id: string;
|
|
50
50
|
objectId: string;
|
|
51
51
|
objectName: string;
|
|
52
52
|
objectLabel: string;
|
|
53
53
|
objectIcon?: string;
|
|
54
54
|
objectColor?: ColorId;
|
|
55
|
-
|
|
55
|
+
/** How the target object crops its records' images: all an option needs of its image settings. */
|
|
56
|
+
objectImage?: Pick<ObjectImage, "shape">;
|
|
56
57
|
/** The target record's own icon / image; absent when it has neither. */
|
|
57
58
|
appearance?: RecordAppearance;
|
|
58
59
|
label: string;
|
|
59
60
|
}
|
|
60
|
-
interface RelationOptionsResponse {
|
|
61
|
+
export interface RelationOptionsResponse {
|
|
61
62
|
options: RelationOption[];
|
|
62
63
|
hasMore: boolean;
|
|
63
64
|
total: number;
|
|
@@ -74,7 +75,7 @@ interface RelationOptionsResponse {
|
|
|
74
75
|
* genuine open record among them, on the wire. Single source: the runtime
|
|
75
76
|
* prompt imports this instead of keeping its own copy.
|
|
76
77
|
*/
|
|
77
|
-
declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
|
|
78
|
+
export declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
|
|
78
79
|
/**
|
|
79
80
|
* The omitted base keys one attribute type's wire offers back, each with the
|
|
80
81
|
* wire schema it is validated by. Karl's ruling on #4537 (2026-09-27, «
|
|
@@ -84,11 +85,11 @@ declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description",
|
|
|
84
85
|
* (`ADD_ATTRIBUTE_WIRE`) and the prompt (`attribute-reference.ts`), so the
|
|
85
86
|
* key the model is told about is the key the wire accepts.
|
|
86
87
|
*/
|
|
87
|
-
declare const WIRE_OFFERED_BASE_CONFIG: Partial<Record<AttributeType, Partial<Record<(typeof WIRE_OMITTED_CONFIG_KEYS)[number], z$
|
|
88
|
+
export declare const WIRE_OFFERED_BASE_CONFIG: Partial<Record<AttributeType, Partial<Record<(typeof WIRE_OMITTED_CONFIG_KEYS)[number], z$2.ZodType>>>>;
|
|
88
89
|
/** The keys hidden from `attributeType`'s wire config and its prompt line. */
|
|
89
|
-
declare function wireOmittedConfigKeysFor(attributeType: AttributeType): readonly string[];
|
|
90
|
+
export declare function wireOmittedConfigKeysFor(attributeType: AttributeType): readonly string[];
|
|
90
91
|
/** `omit()` mask of the type keys hidden from `attributeType`'s wire. */
|
|
91
|
-
declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<string, true>;
|
|
92
|
+
export declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<string, true>;
|
|
92
93
|
/**
|
|
93
94
|
* Builds the `superRefine` that refuses a key belonging to a DIFFERENT type
|
|
94
95
|
* than the one sent.
|
|
@@ -102,19 +103,19 @@ declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<
|
|
|
102
103
|
* keys that type does accept so the next call is right. One factory rather
|
|
103
104
|
* than two near-identical loops — the second one drifted first.
|
|
104
105
|
*/
|
|
105
|
-
declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z$
|
|
106
|
-
declare const statusGroupSchema: z$
|
|
106
|
+
export declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z$2.RefinementCtx, path?: readonly string[]) => void;
|
|
107
|
+
export declare const statusGroupSchema: z$2.ZodEnum<{
|
|
107
108
|
idle: "idle";
|
|
108
109
|
in_progress: "in_progress";
|
|
109
110
|
finished: "finished";
|
|
110
111
|
}>;
|
|
111
|
-
declare const selectOptionWriteSchema: z$
|
|
112
|
-
value: z$
|
|
113
|
-
label: z$
|
|
114
|
-
description: z$
|
|
115
|
-
inverse: z$
|
|
116
|
-
archived: z$
|
|
117
|
-
color: z$
|
|
112
|
+
export declare const selectOptionWriteSchema: z$2.ZodObject<{
|
|
113
|
+
value: z$2.ZodString;
|
|
114
|
+
label: z$2.ZodString;
|
|
115
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
116
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
117
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
118
|
+
color: z$2.ZodEnum<{
|
|
118
119
|
stone: "stone";
|
|
119
120
|
clay: "clay";
|
|
120
121
|
brick: "brick";
|
|
@@ -127,14 +128,14 @@ declare const selectOptionWriteSchema: z$1.ZodObject<{
|
|
|
127
128
|
iris: "iris";
|
|
128
129
|
peony: "peony";
|
|
129
130
|
}>;
|
|
130
|
-
}, z$
|
|
131
|
-
declare const multiselectOptionWriteSchema: z$
|
|
132
|
-
value: z$
|
|
133
|
-
label: z$
|
|
134
|
-
description: z$
|
|
135
|
-
inverse: z$
|
|
136
|
-
archived: z$
|
|
137
|
-
color: z$
|
|
131
|
+
}, z$2.core.$strict>;
|
|
132
|
+
export declare const multiselectOptionWriteSchema: z$2.ZodObject<{
|
|
133
|
+
value: z$2.ZodString;
|
|
134
|
+
label: z$2.ZodString;
|
|
135
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
136
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
137
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
138
|
+
color: z$2.ZodEnum<{
|
|
138
139
|
stone: "stone";
|
|
139
140
|
clay: "clay";
|
|
140
141
|
brick: "brick";
|
|
@@ -147,14 +148,14 @@ declare const multiselectOptionWriteSchema: z$1.ZodObject<{
|
|
|
147
148
|
iris: "iris";
|
|
148
149
|
peony: "peony";
|
|
149
150
|
}>;
|
|
150
|
-
}, z$
|
|
151
|
-
declare const statusOptionWriteSchema: z$
|
|
152
|
-
value: z$
|
|
153
|
-
label: z$
|
|
154
|
-
description: z$
|
|
155
|
-
inverse: z$
|
|
156
|
-
archived: z$
|
|
157
|
-
color: z$
|
|
151
|
+
}, z$2.core.$strict>;
|
|
152
|
+
export declare const statusOptionWriteSchema: z$2.ZodObject<{
|
|
153
|
+
value: z$2.ZodString;
|
|
154
|
+
label: z$2.ZodString;
|
|
155
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
156
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
157
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
158
|
+
color: z$2.ZodEnum<{
|
|
158
159
|
stone: "stone";
|
|
159
160
|
clay: "clay";
|
|
160
161
|
brick: "brick";
|
|
@@ -167,12 +168,12 @@ declare const statusOptionWriteSchema: z$1.ZodObject<{
|
|
|
167
168
|
iris: "iris";
|
|
168
169
|
peony: "peony";
|
|
169
170
|
}>;
|
|
170
|
-
group: z$
|
|
171
|
+
group: z$2.ZodEnum<{
|
|
171
172
|
idle: "idle";
|
|
172
173
|
in_progress: "in_progress";
|
|
173
174
|
finished: "finished";
|
|
174
175
|
}>;
|
|
175
|
-
}, z$
|
|
176
|
+
}, z$2.core.$strict>;
|
|
176
177
|
/**
|
|
177
178
|
* Drops, from every option of an attribute config or body, the keys
|
|
178
179
|
* `optionSchema` does not know — typically an `id` the code builder accepted
|
|
@@ -185,7 +186,7 @@ declare const statusOptionWriteSchema: z$1.ZodObject<{
|
|
|
185
186
|
* or option that is not the expected shape is left for strict validation to
|
|
186
187
|
* refuse.
|
|
187
188
|
*/
|
|
188
|
-
declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
189
|
+
export declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
189
190
|
/**
|
|
190
191
|
* Property types whose config differs from `baseConfigSchema` only by
|
|
191
192
|
* independent optional scalars — no options array, no relation targets. Same
|
|
@@ -199,65 +200,65 @@ declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
|
199
200
|
* ten separate members, each paying its own JSON Schema object/`$defs`
|
|
200
201
|
* boilerplate, blew the budget even after the base config keys were omitted.
|
|
201
202
|
*/
|
|
202
|
-
declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
|
|
203
|
-
declare const propertyAttributeSchema: z$
|
|
204
|
-
[k: string]: z$
|
|
205
|
-
}>, z$
|
|
206
|
-
[k: string]: z$
|
|
207
|
-
}>, z$
|
|
208
|
-
declare const propertySchemaSchema: z$
|
|
209
|
-
definitions: z$
|
|
210
|
-
[k: string]: z$
|
|
211
|
-
}>, z$
|
|
212
|
-
[k: string]: z$
|
|
213
|
-
}>, z$
|
|
214
|
-
}, z$
|
|
203
|
+
export declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
|
|
204
|
+
export declare const propertyAttributeSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
205
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
206
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
207
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
208
|
+
}>, z$2.core.$strip>[]], "type">;
|
|
209
|
+
export declare const propertySchemaSchema: z$2.ZodObject<{
|
|
210
|
+
definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
211
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
212
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
213
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
214
|
+
}>, z$2.core.$strip>[]], "type">>;
|
|
215
|
+
}, z$2.core.$strip>;
|
|
215
216
|
/**
|
|
216
217
|
* The wire-facing property union, derived from the stored one: the same seven
|
|
217
218
|
* simple types merged into one member, the option-carrying types alongside,
|
|
218
219
|
* everything the model never sets omitted, and `.strict()` so an invented key
|
|
219
220
|
* is refused by name instead of silently stripped at store.
|
|
220
221
|
*/
|
|
221
|
-
declare const propertyAttributeWireSchema: z$
|
|
222
|
-
[k: string]: z$
|
|
223
|
-
}>, z$
|
|
224
|
-
[k: string]: z$
|
|
225
|
-
}>, z$
|
|
226
|
-
declare const propertySchemaWireSchema: z$
|
|
227
|
-
definitions: z$
|
|
228
|
-
[k: string]: z$
|
|
229
|
-
}>, z$
|
|
230
|
-
[k: string]: z$
|
|
231
|
-
}>, z$
|
|
232
|
-
}, z$
|
|
222
|
+
export declare const propertyAttributeWireSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
223
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
224
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
225
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
226
|
+
}>, z$2.core.$strip>[]], "type">;
|
|
227
|
+
export declare const propertySchemaWireSchema: z$2.ZodObject<{
|
|
228
|
+
definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
229
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
230
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
231
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
232
|
+
}>, z$2.core.$strip>[]], "type">>;
|
|
233
|
+
}, z$2.core.$strict>;
|
|
233
234
|
/**
|
|
234
235
|
* A month or a year has no time of day and no range end to pair with in this
|
|
235
236
|
* slice (#5325): `precision` narrower than a day is refused beside
|
|
236
237
|
* `includeTime` or `endDate`, on the attribute and on each date property it
|
|
237
238
|
* qualifies an edge with.
|
|
238
239
|
*/
|
|
239
|
-
declare function datePrecisionIssues(type: string, config: Record<string, unknown>, path?: PropertyKey[]): {
|
|
240
|
+
export declare function datePrecisionIssues(type: string, config: Record<string, unknown>, path?: PropertyKey[]): {
|
|
240
241
|
path: PropertyKey[];
|
|
241
242
|
message: string;
|
|
242
243
|
}[];
|
|
243
244
|
/**
|
|
244
245
|
* Map of attribute type to config schema
|
|
245
246
|
*/
|
|
246
|
-
declare const attributeConfigSchemas: Record<AttributeType, z$
|
|
247
|
+
export declare const attributeConfigSchemas: Record<AttributeType, z$2.ZodObject<z$2.ZodRawShape>>;
|
|
247
248
|
/**
|
|
248
249
|
* Get the config schema for a specific attribute type
|
|
249
250
|
*/
|
|
250
|
-
declare function getAttributeConfigSchema(type: AttributeType): z$
|
|
251
|
+
export declare function getAttributeConfigSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
|
|
251
252
|
/**
|
|
252
253
|
* Validate and strip unknown properties from attribute config
|
|
253
254
|
* This ensures only allowed properties are stored in the database
|
|
254
255
|
*/
|
|
255
|
-
declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
|
|
256
|
+
export declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
|
|
256
257
|
/**
|
|
257
258
|
* The config contract as a WRITE applies it: the stored schema plus the
|
|
258
259
|
* stricter option and icon rules newly written values must satisfy.
|
|
259
260
|
*/
|
|
260
|
-
declare function getAttributeConfigWriteSchema(type: AttributeType): z$
|
|
261
|
+
export declare function getAttributeConfigWriteSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
|
|
261
262
|
/**
|
|
262
263
|
* Strict parser for newly created attribute definitions.
|
|
263
264
|
*
|
|
@@ -265,7 +266,7 @@ declare function getAttributeConfigWriteSchema(type: AttributeType): z$1.ZodObje
|
|
|
265
266
|
* contract, while newly written icons and select-like option objects are
|
|
266
267
|
* validated strictly.
|
|
267
268
|
*/
|
|
268
|
-
declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
|
|
269
|
+
export declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
|
|
269
270
|
/**
|
|
270
271
|
* Patch-aware parser for persisted attributes.
|
|
271
272
|
*
|
|
@@ -273,6 +274,5 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
273
274
|
* list. Omission means the stored legacy list is preserved without
|
|
274
275
|
* reconstruction, including options that predate required colours/groups.
|
|
275
276
|
*/
|
|
276
|
-
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
277
|
-
//#endregion
|
|
278
|
-
export { AddAttributeInput as C, UpdateObjectInput as D, RelationOptionsResponse as E, withoutUnknownOptionKeys as S, RelationOption as T, selectOptionWriteSchema as _, datePrecisionIssues as a, wireHiddenTypeConfigMask as b, multiselectOptionWriteSchema as c, parseAttributeConfigForUpdate as d, propertyAttributeSchema as f, refuseForeignKeys as g, propertySchemaWireSchema as h, attributeConfigSchemas as i, parseAttributeConfig as l, propertySchemaSchema as m, WIRE_OFFERED_BASE_CONFIG as n, getAttributeConfigSchema as o, propertyAttributeWireSchema as p, WIRE_OMITTED_CONFIG_KEYS as r, getAttributeConfigWriteSchema as s, SIMPLE_PROPERTY_TYPES as t, parseAttributeConfigForCreate as u, statusGroupSchema as v, CreateCustomObjectInput as w, wireOmittedConfigKeysFor as x, statusOptionWriteSchema as y };
|
|
277
|
+
export declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
278
|
+
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { ObjectImage, RecordAppearance } from "./objects-DxEMaC2Z.mjs";
|
|
3
|
+
import { Attribute, AttributeType } from "./attributes-eqr1vdPP.mjs";
|
|
4
|
+
import * as z$2 from "zod";
|
|
5
5
|
import { ColorId, IconName } from "@standards/constants";
|
|
6
6
|
//#region src/types/mutations.d.ts
|
|
7
|
-
interface AddAttributeInput {
|
|
7
|
+
export interface AddAttributeInput {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
10
|
type: AttributeType;
|
|
@@ -17,7 +17,7 @@ interface AddAttributeInput {
|
|
|
17
17
|
metadata?: Record<string, unknown>;
|
|
18
18
|
[key: string]: unknown;
|
|
19
19
|
}
|
|
20
|
-
interface CreateCustomObjectInput {
|
|
20
|
+
export interface CreateCustomObjectInput {
|
|
21
21
|
name: string;
|
|
22
22
|
label: string;
|
|
23
23
|
pluralLabel?: string;
|
|
@@ -26,38 +26,39 @@ interface CreateCustomObjectInput {
|
|
|
26
26
|
description?: string;
|
|
27
27
|
icon?: IconName;
|
|
28
28
|
color?: ColorId;
|
|
29
|
-
|
|
29
|
+
image?: ObjectImage;
|
|
30
30
|
attributes?: (Attribute | {
|
|
31
31
|
build: () => Attribute;
|
|
32
32
|
})[];
|
|
33
33
|
metadata?: Record<string, unknown>;
|
|
34
34
|
}
|
|
35
|
-
interface UpdateObjectInput {
|
|
35
|
+
export interface UpdateObjectInput {
|
|
36
36
|
label?: string;
|
|
37
37
|
pluralLabel?: string;
|
|
38
38
|
description?: string;
|
|
39
39
|
icon?: IconName;
|
|
40
40
|
/** `null` clears it: the colour then derives from the object name. */
|
|
41
41
|
color?: ColorId | null;
|
|
42
|
-
/** `null` clears it: record images then crop to a square. */
|
|
43
|
-
|
|
42
|
+
/** `null` clears it: record images then crop to a square, and are found nowhere. */
|
|
43
|
+
image?: ObjectImage | null;
|
|
44
44
|
labelExpression?: string;
|
|
45
45
|
embeddingExpression?: string;
|
|
46
46
|
metadata?: Record<string, unknown>;
|
|
47
47
|
}
|
|
48
|
-
interface RelationOption {
|
|
48
|
+
export interface RelationOption {
|
|
49
49
|
id: string;
|
|
50
50
|
objectId: string;
|
|
51
51
|
objectName: string;
|
|
52
52
|
objectLabel: string;
|
|
53
53
|
objectIcon?: string;
|
|
54
54
|
objectColor?: ColorId;
|
|
55
|
-
|
|
55
|
+
/** How the target object crops its records' images: all an option needs of its image settings. */
|
|
56
|
+
objectImage?: Pick<ObjectImage, "shape">;
|
|
56
57
|
/** The target record's own icon / image; absent when it has neither. */
|
|
57
58
|
appearance?: RecordAppearance;
|
|
58
59
|
label: string;
|
|
59
60
|
}
|
|
60
|
-
interface RelationOptionsResponse {
|
|
61
|
+
export interface RelationOptionsResponse {
|
|
61
62
|
options: RelationOption[];
|
|
62
63
|
hasMore: boolean;
|
|
63
64
|
total: number;
|
|
@@ -74,7 +75,7 @@ interface RelationOptionsResponse {
|
|
|
74
75
|
* genuine open record among them, on the wire. Single source: the runtime
|
|
75
76
|
* prompt imports this instead of keeping its own copy.
|
|
76
77
|
*/
|
|
77
|
-
declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
|
|
78
|
+
export declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
|
|
78
79
|
/**
|
|
79
80
|
* The omitted base keys one attribute type's wire offers back, each with the
|
|
80
81
|
* wire schema it is validated by. Karl's ruling on #4537 (2026-09-27, «
|
|
@@ -84,11 +85,11 @@ declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description",
|
|
|
84
85
|
* (`ADD_ATTRIBUTE_WIRE`) and the prompt (`attribute-reference.ts`), so the
|
|
85
86
|
* key the model is told about is the key the wire accepts.
|
|
86
87
|
*/
|
|
87
|
-
declare const WIRE_OFFERED_BASE_CONFIG: Partial<Record<AttributeType, Partial<Record<(typeof WIRE_OMITTED_CONFIG_KEYS)[number], z$
|
|
88
|
+
export declare const WIRE_OFFERED_BASE_CONFIG: Partial<Record<AttributeType, Partial<Record<(typeof WIRE_OMITTED_CONFIG_KEYS)[number], z$2.ZodType>>>>;
|
|
88
89
|
/** The keys hidden from `attributeType`'s wire config and its prompt line. */
|
|
89
|
-
declare function wireOmittedConfigKeysFor(attributeType: AttributeType): readonly string[];
|
|
90
|
+
export declare function wireOmittedConfigKeysFor(attributeType: AttributeType): readonly string[];
|
|
90
91
|
/** `omit()` mask of the type keys hidden from `attributeType`'s wire. */
|
|
91
|
-
declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<string, true>;
|
|
92
|
+
export declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<string, true>;
|
|
92
93
|
/**
|
|
93
94
|
* Builds the `superRefine` that refuses a key belonging to a DIFFERENT type
|
|
94
95
|
* than the one sent.
|
|
@@ -102,19 +103,19 @@ declare function wireHiddenTypeConfigMask(attributeType: AttributeType): Record<
|
|
|
102
103
|
* keys that type does accept so the next call is right. One factory rather
|
|
103
104
|
* than two near-identical loops — the second one drifted first.
|
|
104
105
|
*/
|
|
105
|
-
declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z$
|
|
106
|
-
declare const statusGroupSchema: z$
|
|
106
|
+
export declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z$2.RefinementCtx, path?: readonly string[]) => void;
|
|
107
|
+
export declare const statusGroupSchema: z$2.ZodEnum<{
|
|
107
108
|
idle: "idle";
|
|
108
109
|
in_progress: "in_progress";
|
|
109
110
|
finished: "finished";
|
|
110
111
|
}>;
|
|
111
|
-
declare const selectOptionWriteSchema: z$
|
|
112
|
-
value: z$
|
|
113
|
-
label: z$
|
|
114
|
-
description: z$
|
|
115
|
-
inverse: z$
|
|
116
|
-
archived: z$
|
|
117
|
-
color: z$
|
|
112
|
+
export declare const selectOptionWriteSchema: z$2.ZodObject<{
|
|
113
|
+
value: z$2.ZodString;
|
|
114
|
+
label: z$2.ZodString;
|
|
115
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
116
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
117
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
118
|
+
color: z$2.ZodEnum<{
|
|
118
119
|
stone: "stone";
|
|
119
120
|
clay: "clay";
|
|
120
121
|
brick: "brick";
|
|
@@ -127,14 +128,14 @@ declare const selectOptionWriteSchema: z$1.ZodObject<{
|
|
|
127
128
|
iris: "iris";
|
|
128
129
|
peony: "peony";
|
|
129
130
|
}>;
|
|
130
|
-
}, z$
|
|
131
|
-
declare const multiselectOptionWriteSchema: z$
|
|
132
|
-
value: z$
|
|
133
|
-
label: z$
|
|
134
|
-
description: z$
|
|
135
|
-
inverse: z$
|
|
136
|
-
archived: z$
|
|
137
|
-
color: z$
|
|
131
|
+
}, z$2.core.$strict>;
|
|
132
|
+
export declare const multiselectOptionWriteSchema: z$2.ZodObject<{
|
|
133
|
+
value: z$2.ZodString;
|
|
134
|
+
label: z$2.ZodString;
|
|
135
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
136
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
137
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
138
|
+
color: z$2.ZodEnum<{
|
|
138
139
|
stone: "stone";
|
|
139
140
|
clay: "clay";
|
|
140
141
|
brick: "brick";
|
|
@@ -147,14 +148,14 @@ declare const multiselectOptionWriteSchema: z$1.ZodObject<{
|
|
|
147
148
|
iris: "iris";
|
|
148
149
|
peony: "peony";
|
|
149
150
|
}>;
|
|
150
|
-
}, z$
|
|
151
|
-
declare const statusOptionWriteSchema: z$
|
|
152
|
-
value: z$
|
|
153
|
-
label: z$
|
|
154
|
-
description: z$
|
|
155
|
-
inverse: z$
|
|
156
|
-
archived: z$
|
|
157
|
-
color: z$
|
|
151
|
+
}, z$2.core.$strict>;
|
|
152
|
+
export declare const statusOptionWriteSchema: z$2.ZodObject<{
|
|
153
|
+
value: z$2.ZodString;
|
|
154
|
+
label: z$2.ZodString;
|
|
155
|
+
description: z$2.ZodOptional<z$2.ZodString>;
|
|
156
|
+
inverse: z$2.ZodOptional<z$2.ZodString>;
|
|
157
|
+
archived: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
158
|
+
color: z$2.ZodEnum<{
|
|
158
159
|
stone: "stone";
|
|
159
160
|
clay: "clay";
|
|
160
161
|
brick: "brick";
|
|
@@ -167,12 +168,12 @@ declare const statusOptionWriteSchema: z$1.ZodObject<{
|
|
|
167
168
|
iris: "iris";
|
|
168
169
|
peony: "peony";
|
|
169
170
|
}>;
|
|
170
|
-
group: z$
|
|
171
|
+
group: z$2.ZodEnum<{
|
|
171
172
|
idle: "idle";
|
|
172
173
|
in_progress: "in_progress";
|
|
173
174
|
finished: "finished";
|
|
174
175
|
}>;
|
|
175
|
-
}, z$
|
|
176
|
+
}, z$2.core.$strict>;
|
|
176
177
|
/**
|
|
177
178
|
* Drops, from every option of an attribute config or body, the keys
|
|
178
179
|
* `optionSchema` does not know — typically an `id` the code builder accepted
|
|
@@ -185,7 +186,7 @@ declare const statusOptionWriteSchema: z$1.ZodObject<{
|
|
|
185
186
|
* or option that is not the expected shape is left for strict validation to
|
|
186
187
|
* refuse.
|
|
187
188
|
*/
|
|
188
|
-
declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
189
|
+
export declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
189
190
|
/**
|
|
190
191
|
* Property types whose config differs from `baseConfigSchema` only by
|
|
191
192
|
* independent optional scalars — no options array, no relation targets. Same
|
|
@@ -199,65 +200,65 @@ declare function withoutUnknownOptionKeys<T extends object>(config: T): T;
|
|
|
199
200
|
* ten separate members, each paying its own JSON Schema object/`$defs`
|
|
200
201
|
* boilerplate, blew the budget even after the base config keys were omitted.
|
|
201
202
|
*/
|
|
202
|
-
declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
|
|
203
|
-
declare const propertyAttributeSchema: z$
|
|
204
|
-
[k: string]: z$
|
|
205
|
-
}>, z$
|
|
206
|
-
[k: string]: z$
|
|
207
|
-
}>, z$
|
|
208
|
-
declare const propertySchemaSchema: z$
|
|
209
|
-
definitions: z$
|
|
210
|
-
[k: string]: z$
|
|
211
|
-
}>, z$
|
|
212
|
-
[k: string]: z$
|
|
213
|
-
}>, z$
|
|
214
|
-
}, z$
|
|
203
|
+
export declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
|
|
204
|
+
export declare const propertyAttributeSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
205
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
206
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
207
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
208
|
+
}>, z$2.core.$strip>[]], "type">;
|
|
209
|
+
export declare const propertySchemaSchema: z$2.ZodObject<{
|
|
210
|
+
definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
211
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
212
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
213
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
214
|
+
}>, z$2.core.$strip>[]], "type">>;
|
|
215
|
+
}, z$2.core.$strip>;
|
|
215
216
|
/**
|
|
216
217
|
* The wire-facing property union, derived from the stored one: the same seven
|
|
217
218
|
* simple types merged into one member, the option-carrying types alongside,
|
|
218
219
|
* everything the model never sets omitted, and `.strict()` so an invented key
|
|
219
220
|
* is refused by name instead of silently stripped at store.
|
|
220
221
|
*/
|
|
221
|
-
declare const propertyAttributeWireSchema: z$
|
|
222
|
-
[k: string]: z$
|
|
223
|
-
}>, z$
|
|
224
|
-
[k: string]: z$
|
|
225
|
-
}>, z$
|
|
226
|
-
declare const propertySchemaWireSchema: z$
|
|
227
|
-
definitions: z$
|
|
228
|
-
[k: string]: z$
|
|
229
|
-
}>, z$
|
|
230
|
-
[k: string]: z$
|
|
231
|
-
}>, z$
|
|
232
|
-
}, z$
|
|
222
|
+
export declare const propertyAttributeWireSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
223
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
224
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
225
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
226
|
+
}>, z$2.core.$strip>[]], "type">;
|
|
227
|
+
export declare const propertySchemaWireSchema: z$2.ZodObject<{
|
|
228
|
+
definitions: z$2.ZodArray<z$2.ZodDiscriminatedUnion<[z$2.ZodObject<Readonly<{
|
|
229
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
230
|
+
}>, z$2.core.$strip>, ...z$2.ZodObject<Readonly<{
|
|
231
|
+
[k: string]: z$2.core.$ZodType<unknown, unknown, z$2.core.$ZodTypeInternals<unknown, unknown>>;
|
|
232
|
+
}>, z$2.core.$strip>[]], "type">>;
|
|
233
|
+
}, z$2.core.$strict>;
|
|
233
234
|
/**
|
|
234
235
|
* A month or a year has no time of day and no range end to pair with in this
|
|
235
236
|
* slice (#5325): `precision` narrower than a day is refused beside
|
|
236
237
|
* `includeTime` or `endDate`, on the attribute and on each date property it
|
|
237
238
|
* qualifies an edge with.
|
|
238
239
|
*/
|
|
239
|
-
declare function datePrecisionIssues(type: string, config: Record<string, unknown>, path?: PropertyKey[]): {
|
|
240
|
+
export declare function datePrecisionIssues(type: string, config: Record<string, unknown>, path?: PropertyKey[]): {
|
|
240
241
|
path: PropertyKey[];
|
|
241
242
|
message: string;
|
|
242
243
|
}[];
|
|
243
244
|
/**
|
|
244
245
|
* Map of attribute type to config schema
|
|
245
246
|
*/
|
|
246
|
-
declare const attributeConfigSchemas: Record<AttributeType, z$
|
|
247
|
+
export declare const attributeConfigSchemas: Record<AttributeType, z$2.ZodObject<z$2.ZodRawShape>>;
|
|
247
248
|
/**
|
|
248
249
|
* Get the config schema for a specific attribute type
|
|
249
250
|
*/
|
|
250
|
-
declare function getAttributeConfigSchema(type: AttributeType): z$
|
|
251
|
+
export declare function getAttributeConfigSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
|
|
251
252
|
/**
|
|
252
253
|
* Validate and strip unknown properties from attribute config
|
|
253
254
|
* This ensures only allowed properties are stored in the database
|
|
254
255
|
*/
|
|
255
|
-
declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
|
|
256
|
+
export declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
|
|
256
257
|
/**
|
|
257
258
|
* The config contract as a WRITE applies it: the stored schema plus the
|
|
258
259
|
* stricter option and icon rules newly written values must satisfy.
|
|
259
260
|
*/
|
|
260
|
-
declare function getAttributeConfigWriteSchema(type: AttributeType): z$
|
|
261
|
+
export declare function getAttributeConfigWriteSchema(type: AttributeType): z$2.ZodObject<z$2.ZodRawShape>;
|
|
261
262
|
/**
|
|
262
263
|
* Strict parser for newly created attribute definitions.
|
|
263
264
|
*
|
|
@@ -265,7 +266,7 @@ declare function getAttributeConfigWriteSchema(type: AttributeType): z$1.ZodObje
|
|
|
265
266
|
* contract, while newly written icons and select-like option objects are
|
|
266
267
|
* validated strictly.
|
|
267
268
|
*/
|
|
268
|
-
declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
|
|
269
|
+
export declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
|
|
269
270
|
/**
|
|
270
271
|
* Patch-aware parser for persisted attributes.
|
|
271
272
|
*
|
|
@@ -273,6 +274,5 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
273
274
|
* list. Omission means the stored legacy list is preserved without
|
|
274
275
|
* reconstruction, including options that predate required colours/groups.
|
|
275
276
|
*/
|
|
276
|
-
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
277
|
-
//#endregion
|
|
278
|
-
export { AddAttributeInput as C, UpdateObjectInput as D, RelationOptionsResponse as E, withoutUnknownOptionKeys as S, RelationOption as T, selectOptionWriteSchema as _, datePrecisionIssues as a, wireHiddenTypeConfigMask as b, multiselectOptionWriteSchema as c, parseAttributeConfigForUpdate as d, propertyAttributeSchema as f, refuseForeignKeys as g, propertySchemaWireSchema as h, attributeConfigSchemas as i, parseAttributeConfig as l, propertySchemaSchema as m, WIRE_OFFERED_BASE_CONFIG as n, getAttributeConfigSchema as o, propertyAttributeWireSchema as p, WIRE_OMITTED_CONFIG_KEYS as r, getAttributeConfigWriteSchema as s, SIMPLE_PROPERTY_TYPES as t, parseAttributeConfigForCreate as u, statusGroupSchema as v, CreateCustomObjectInput as w, wireOmittedConfigKeysFor as x, statusOptionWriteSchema as y };
|
|
277
|
+
export declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
278
|
+
//#endregion
|