@stndrds/schema 0.1.0-alpha.58 → 0.1.0-alpha.59
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/{chunk-2OS63USQ.js → chunk-DCTLP3ZD.js} +982 -154
- package/dist/{chunk-JRY236AO.mjs → chunk-O7FGYLYG.mjs} +853 -25
- package/dist/index.d.mts +177 -6
- package/dist/index.d.ts +177 -6
- package/dist/index.js +42 -6
- package/dist/index.mjs +37 -1
- package/dist/{runtime-C4vB_EcQ.d.ts → runtime-BRkoIwsC.d.ts} +258 -2
- package/dist/{runtime-SCsDOQi0.d.mts → runtime-Chz-bTNq.d.mts} +258 -2
- package/dist/runtime.d.mts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +4 -2
- package/dist/runtime.mjs +3 -1
- package/dist/validation/validators.d.mts +1 -1
- package/dist/validation/validators.d.ts +1 -1
- package/dist/{validators-BgmWgr-G.d.mts → validators-BIAmz0CD.d.mts} +145 -2
- package/dist/{validators-miARInAq.d.ts → validators-BPIB7Miq.d.ts} +145 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'zod';
|
|
2
|
-
export {
|
|
2
|
+
export { ao as DEFAULT_VALIDATION_MESSAGES, an as ValidationMessages, b8 as ValidationResult, aI as attributeConfigSchemas, at as checkboxConfigSchema, bh as computeRecordStatus, b5 as createAttributeValidator, aP as createCheckboxValidator, aS as createCurrencyValidator, aQ as createDateValidator, bc as createDraftValidator, aX as createFileValidator, b6 as createFormAttributeValidator, b1 as createFormulaValidator, aW as createLocationValidator, a_ as createMultiRelationValidator, aV as createMultiselectValidator, aO as createNumberValidator, b7 as createObjectValidator, aR as createPhoneValidator, b0 as createRatingValidator, a$ as createRelationValidator, b4 as createRichtextValidator, b2 as createRollupValidator, aU as createSelectValidator, aZ as createSingleRelationValidator, aT as createStatusValidator, b3 as createTextAreaValidator, aN as createTextValidator, aY as createUserValidator, aw as currencyConfigSchema, au as dateConfigSchema, aH as documentConfigSchema, aB as fileConfigSchema, am as formatZodErrors, aF as formulaConfigSchema, aJ as getAttributeConfigSchema, bf as getMissingRequiredAttributes, bg as isRecordComplete, ay as locationConfigSchema, aA as multiselectConfigSchema, as as numberConfigSchema, aL as parseAttributeConfig, av as phoneConfigSchema, aE as ratingConfigSchema, aD as relationConfigSchema, ar as richtextConfigSchema, aG as rollupConfigSchema, aM as safeParseAttributeConfig, az as selectConfigSchema, ax as statusConfigSchema, ap as textConfigSchema, aq as textareaConfigSchema, aC as userConfigSchema, b9 as validateAttribute, aK as validateAttributeConfig, bd as validateDraft, be as validateDraftOrThrow, ba as validateObject, bb as validateObjectOrThrow } from '../validators-BPIB7Miq.js';
|
|
3
3
|
import '@stndrds/constants';
|
|
4
4
|
import '../utils.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { CurrencyCode, IconName, ColorId, CountryIso3, MimeType } from '@stndrds/constants';
|
|
3
3
|
import { Uuid } from './utils.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -151,6 +151,147 @@ interface FeatureFlagsConfig {
|
|
|
151
151
|
defaults?: StaticFlagDefault[];
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Allowed property types in .qualifyWith()
|
|
156
|
+
*
|
|
157
|
+
* IMPORTANT: Complex types (formula, rollup, relation, file, user, document)
|
|
158
|
+
* are NOT supported to avoid duplicating backend behavior.
|
|
159
|
+
*/
|
|
160
|
+
type PropertyType = "text" | "textarea" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "select" | "multiselect" | "rating" | "location";
|
|
161
|
+
/**
|
|
162
|
+
* Forbidden property types that would require complex backend duplication
|
|
163
|
+
*/
|
|
164
|
+
declare const FORBIDDEN_PROPERTY_TYPES: readonly ["formula", "rollup", "relation", "file", "user", "document", "richtext"];
|
|
165
|
+
type ForbiddenPropertyType = (typeof FORBIDDEN_PROPERTY_TYPES)[number];
|
|
166
|
+
/**
|
|
167
|
+
* Base interface for all property definitions
|
|
168
|
+
*/
|
|
169
|
+
interface BasePropertyDefinition {
|
|
170
|
+
name: string;
|
|
171
|
+
label?: string;
|
|
172
|
+
required?: boolean;
|
|
173
|
+
description?: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Text property definition
|
|
177
|
+
*/
|
|
178
|
+
interface TextPropertyDefinition extends BasePropertyDefinition {
|
|
179
|
+
type: "text";
|
|
180
|
+
minLength?: number;
|
|
181
|
+
maxLength?: number;
|
|
182
|
+
pattern?: string;
|
|
183
|
+
placeholder?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Textarea property definition
|
|
187
|
+
*/
|
|
188
|
+
interface TextareaPropertyDefinition extends BasePropertyDefinition {
|
|
189
|
+
type: "textarea";
|
|
190
|
+
minLength?: number;
|
|
191
|
+
maxLength?: number;
|
|
192
|
+
placeholder?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Number property definition
|
|
196
|
+
*/
|
|
197
|
+
interface NumberPropertyDefinition extends BasePropertyDefinition {
|
|
198
|
+
type: "number";
|
|
199
|
+
min?: number;
|
|
200
|
+
max?: number;
|
|
201
|
+
decimal?: number;
|
|
202
|
+
integer?: boolean;
|
|
203
|
+
placeholder?: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Checkbox property definition
|
|
207
|
+
*/
|
|
208
|
+
interface CheckboxPropertyDefinition extends BasePropertyDefinition {
|
|
209
|
+
type: "checkbox";
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Date property definition
|
|
213
|
+
*/
|
|
214
|
+
interface DatePropertyDefinition extends BasePropertyDefinition {
|
|
215
|
+
type: "date";
|
|
216
|
+
includeTime?: boolean;
|
|
217
|
+
min?: string;
|
|
218
|
+
max?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Phone property definition
|
|
222
|
+
*/
|
|
223
|
+
interface PhonePropertyDefinition extends BasePropertyDefinition {
|
|
224
|
+
type: "phone";
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Currency property definition
|
|
228
|
+
*/
|
|
229
|
+
interface CurrencyPropertyDefinition extends BasePropertyDefinition {
|
|
230
|
+
type: "currency";
|
|
231
|
+
currency?: CurrencyCode;
|
|
232
|
+
min?: number;
|
|
233
|
+
max?: number;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Status property definition
|
|
237
|
+
*/
|
|
238
|
+
interface StatusPropertyDefinition extends BasePropertyDefinition {
|
|
239
|
+
type: "status";
|
|
240
|
+
options: Array<Option & {
|
|
241
|
+
group: StatusGroup;
|
|
242
|
+
}>;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Select property definition
|
|
246
|
+
*/
|
|
247
|
+
interface SelectPropertyDefinition extends BasePropertyDefinition {
|
|
248
|
+
type: "select";
|
|
249
|
+
options: Option[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Multiselect property definition
|
|
253
|
+
*/
|
|
254
|
+
interface MultiselectPropertyDefinition extends BasePropertyDefinition {
|
|
255
|
+
type: "multiselect";
|
|
256
|
+
options: Option[];
|
|
257
|
+
maxSelections?: number;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Rating property definition
|
|
261
|
+
*/
|
|
262
|
+
interface RatingPropertyDefinition extends BasePropertyDefinition {
|
|
263
|
+
type: "rating";
|
|
264
|
+
max?: number;
|
|
265
|
+
icon?: IconName;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Location property definition
|
|
269
|
+
*/
|
|
270
|
+
interface LocationPropertyDefinition extends BasePropertyDefinition {
|
|
271
|
+
type: "location";
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Union of all property definitions
|
|
275
|
+
*/
|
|
276
|
+
type PropertyDefinition = TextPropertyDefinition | TextareaPropertyDefinition | NumberPropertyDefinition | CheckboxPropertyDefinition | DatePropertyDefinition | PhonePropertyDefinition | CurrencyPropertyDefinition | StatusPropertyDefinition | SelectPropertyDefinition | MultiselectPropertyDefinition | RatingPropertyDefinition | LocationPropertyDefinition;
|
|
277
|
+
/**
|
|
278
|
+
* Schema defining properties for a qualified relation
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const schema: PropertySchema = {
|
|
283
|
+
* definitions: [
|
|
284
|
+
* { name: "role", type: "select", options: [...], required: true },
|
|
285
|
+
* { name: "shares", type: "number", min: 0 },
|
|
286
|
+
* { name: "percentage", type: "number", min: 0, max: 100, decimal: 2 }
|
|
287
|
+
* ]
|
|
288
|
+
* };
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
interface PropertySchema {
|
|
292
|
+
definitions: PropertyDefinition[];
|
|
293
|
+
}
|
|
294
|
+
|
|
154
295
|
type AttributeType = "text" | "textarea" | "richtext" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "location" | "select" | "multiselect" | "file" | "user" | "relation" | "rating" | "formula" | "rollup" | "document";
|
|
155
296
|
/**
|
|
156
297
|
* Status group categorization
|
|
@@ -336,6 +477,8 @@ interface RelationAttributeBase extends Omit<BaseAttribute<unknown>, "defaultVal
|
|
|
336
477
|
type: "relation";
|
|
337
478
|
/** Target objects that can be linked */
|
|
338
479
|
targets: RelationTarget[];
|
|
480
|
+
/** Optional properties schema for qualified relations */
|
|
481
|
+
properties?: PropertySchema;
|
|
339
482
|
}
|
|
340
483
|
/**
|
|
341
484
|
* Single relation attribute (one-to-one or many-to-one)
|
|
@@ -1485,4 +1628,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
|
|
|
1485
1628
|
*/
|
|
1486
1629
|
declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
|
|
1487
1630
|
|
|
1488
|
-
export { type
|
|
1631
|
+
export { type DateFormat as $, type Attribute as A, type FormulaReturnType as B, type CheckboxPropertyDefinition as C, type DateAttribute as D, type RollupAttribute as E, type FeatureGate as F, type RollupFunction as G, type AttributeType as H, type ObjectDefinition as I, type FlagValueType as J, type FeatureFlagDefinition as K, type LocationPropertyDefinition as L, type MultiselectPropertyDefinition as M, type NumberPropertyDefinition as N, type Option as O, type PropertyDefinition as P, type FlagLevel as Q, type RatingPropertyDefinition as R, type StatusPropertyDefinition as S, type TextPropertyDefinition as T, type UserAttribute as U, type FeatureFlagsRepository as V, type StaticFlagDefault as W, type ResolvedFlag as X, type AttributeGroup as Y, type BaseAttribute as Z, type NumberUnit as _, type DocumentAttribute as a, createRelationValidator as a$, type DateValue as a0, type Phone as a1, type Currency as a2, type Location as a3, type LocationGranularity as a4, RELATION_TARGET_ANY as a5, type RelationAttribute as a6, isUniversalRelation as a7, type FlagOverride as a8, type FeatureFlagsConfig as a9, multiselectConfigSchema as aA, fileConfigSchema as aB, userConfigSchema as aC, relationConfigSchema as aD, ratingConfigSchema as aE, formulaConfigSchema as aF, rollupConfigSchema as aG, documentConfigSchema as aH, attributeConfigSchemas as aI, getAttributeConfigSchema as aJ, validateAttributeConfig as aK, parseAttributeConfig as aL, safeParseAttributeConfig as aM, createTextValidator as aN, createNumberValidator as aO, createCheckboxValidator as aP, createDateValidator as aQ, createPhoneValidator as aR, createCurrencyValidator as aS, createStatusValidator as aT, createSelectValidator as aU, createMultiselectValidator as aV, createLocationValidator as aW, createFileValidator as aX, createUserValidator as aY, createSingleRelationValidator as aZ, createMultiRelationValidator as a_, RESERVED_ATTRIBUTE_NAMES as aa, SYSTEM_FIELD_NAMES as ab, type ReservedAttributeName as ac, type SystemFieldName as ad, type Timestamps as ae, type SharingMode as af, type ObjectAttribute as ag, type CompletionStatus as ah, type ObjectRecord as ai, type PropertyType as aj, FORBIDDEN_PROPERTY_TYPES as ak, type ForbiddenPropertyType as al, formatZodErrors as am, type ValidationMessages as an, DEFAULT_VALIDATION_MESSAGES as ao, textConfigSchema as ap, textareaConfigSchema as aq, richtextConfigSchema as ar, numberConfigSchema as as, checkboxConfigSchema as at, dateConfigSchema as au, phoneConfigSchema as av, currencyConfigSchema as aw, statusConfigSchema as ax, locationConfigSchema as ay, selectConfigSchema as az, type TextareaPropertyDefinition as b, createRatingValidator as b0, createFormulaValidator as b1, createRollupValidator as b2, createTextAreaValidator as b3, createRichtextValidator as b4, createAttributeValidator as b5, createFormAttributeValidator as b6, createObjectValidator as b7, type ValidationResult as b8, validateAttribute as b9, validateObject as ba, validateObjectOrThrow as bb, createDraftValidator as bc, validateDraft as bd, validateDraftOrThrow as be, getMissingRequiredAttributes as bf, isRecordComplete as bg, computeRecordStatus as bh, type DatePropertyDefinition as c, type PhonePropertyDefinition as d, type CurrencyPropertyDefinition as e, type StatusGroup as f, type SelectPropertyDefinition as g, type PropertySchema as h, type TextAttribute as i, type TextAreaAttribute as j, type RichtextAttribute as k, type RichtextFeature as l, type NumberAttribute as m, type CheckboxAttribute as n, type PhoneAttribute as o, type CurrencyAttribute as p, type StatusAttribute as q, type SelectAttribute as r, type MultiselectAttribute as s, type LocationAttribute as t, type FileAttribute as u, type SingleRelationAttribute as v, type MultiRelationAttribute as w, type RelationTarget as x, type RatingAttribute as y, type FormulaAttribute as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { CurrencyCode, IconName, ColorId, CountryIso3, MimeType } from '@stndrds/constants';
|
|
3
3
|
import { Uuid } from './utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -151,6 +151,147 @@ interface FeatureFlagsConfig {
|
|
|
151
151
|
defaults?: StaticFlagDefault[];
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Allowed property types in .qualifyWith()
|
|
156
|
+
*
|
|
157
|
+
* IMPORTANT: Complex types (formula, rollup, relation, file, user, document)
|
|
158
|
+
* are NOT supported to avoid duplicating backend behavior.
|
|
159
|
+
*/
|
|
160
|
+
type PropertyType = "text" | "textarea" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "select" | "multiselect" | "rating" | "location";
|
|
161
|
+
/**
|
|
162
|
+
* Forbidden property types that would require complex backend duplication
|
|
163
|
+
*/
|
|
164
|
+
declare const FORBIDDEN_PROPERTY_TYPES: readonly ["formula", "rollup", "relation", "file", "user", "document", "richtext"];
|
|
165
|
+
type ForbiddenPropertyType = (typeof FORBIDDEN_PROPERTY_TYPES)[number];
|
|
166
|
+
/**
|
|
167
|
+
* Base interface for all property definitions
|
|
168
|
+
*/
|
|
169
|
+
interface BasePropertyDefinition {
|
|
170
|
+
name: string;
|
|
171
|
+
label?: string;
|
|
172
|
+
required?: boolean;
|
|
173
|
+
description?: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Text property definition
|
|
177
|
+
*/
|
|
178
|
+
interface TextPropertyDefinition extends BasePropertyDefinition {
|
|
179
|
+
type: "text";
|
|
180
|
+
minLength?: number;
|
|
181
|
+
maxLength?: number;
|
|
182
|
+
pattern?: string;
|
|
183
|
+
placeholder?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Textarea property definition
|
|
187
|
+
*/
|
|
188
|
+
interface TextareaPropertyDefinition extends BasePropertyDefinition {
|
|
189
|
+
type: "textarea";
|
|
190
|
+
minLength?: number;
|
|
191
|
+
maxLength?: number;
|
|
192
|
+
placeholder?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Number property definition
|
|
196
|
+
*/
|
|
197
|
+
interface NumberPropertyDefinition extends BasePropertyDefinition {
|
|
198
|
+
type: "number";
|
|
199
|
+
min?: number;
|
|
200
|
+
max?: number;
|
|
201
|
+
decimal?: number;
|
|
202
|
+
integer?: boolean;
|
|
203
|
+
placeholder?: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Checkbox property definition
|
|
207
|
+
*/
|
|
208
|
+
interface CheckboxPropertyDefinition extends BasePropertyDefinition {
|
|
209
|
+
type: "checkbox";
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Date property definition
|
|
213
|
+
*/
|
|
214
|
+
interface DatePropertyDefinition extends BasePropertyDefinition {
|
|
215
|
+
type: "date";
|
|
216
|
+
includeTime?: boolean;
|
|
217
|
+
min?: string;
|
|
218
|
+
max?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Phone property definition
|
|
222
|
+
*/
|
|
223
|
+
interface PhonePropertyDefinition extends BasePropertyDefinition {
|
|
224
|
+
type: "phone";
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Currency property definition
|
|
228
|
+
*/
|
|
229
|
+
interface CurrencyPropertyDefinition extends BasePropertyDefinition {
|
|
230
|
+
type: "currency";
|
|
231
|
+
currency?: CurrencyCode;
|
|
232
|
+
min?: number;
|
|
233
|
+
max?: number;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Status property definition
|
|
237
|
+
*/
|
|
238
|
+
interface StatusPropertyDefinition extends BasePropertyDefinition {
|
|
239
|
+
type: "status";
|
|
240
|
+
options: Array<Option & {
|
|
241
|
+
group: StatusGroup;
|
|
242
|
+
}>;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Select property definition
|
|
246
|
+
*/
|
|
247
|
+
interface SelectPropertyDefinition extends BasePropertyDefinition {
|
|
248
|
+
type: "select";
|
|
249
|
+
options: Option[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Multiselect property definition
|
|
253
|
+
*/
|
|
254
|
+
interface MultiselectPropertyDefinition extends BasePropertyDefinition {
|
|
255
|
+
type: "multiselect";
|
|
256
|
+
options: Option[];
|
|
257
|
+
maxSelections?: number;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Rating property definition
|
|
261
|
+
*/
|
|
262
|
+
interface RatingPropertyDefinition extends BasePropertyDefinition {
|
|
263
|
+
type: "rating";
|
|
264
|
+
max?: number;
|
|
265
|
+
icon?: IconName;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Location property definition
|
|
269
|
+
*/
|
|
270
|
+
interface LocationPropertyDefinition extends BasePropertyDefinition {
|
|
271
|
+
type: "location";
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Union of all property definitions
|
|
275
|
+
*/
|
|
276
|
+
type PropertyDefinition = TextPropertyDefinition | TextareaPropertyDefinition | NumberPropertyDefinition | CheckboxPropertyDefinition | DatePropertyDefinition | PhonePropertyDefinition | CurrencyPropertyDefinition | StatusPropertyDefinition | SelectPropertyDefinition | MultiselectPropertyDefinition | RatingPropertyDefinition | LocationPropertyDefinition;
|
|
277
|
+
/**
|
|
278
|
+
* Schema defining properties for a qualified relation
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const schema: PropertySchema = {
|
|
283
|
+
* definitions: [
|
|
284
|
+
* { name: "role", type: "select", options: [...], required: true },
|
|
285
|
+
* { name: "shares", type: "number", min: 0 },
|
|
286
|
+
* { name: "percentage", type: "number", min: 0, max: 100, decimal: 2 }
|
|
287
|
+
* ]
|
|
288
|
+
* };
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
interface PropertySchema {
|
|
292
|
+
definitions: PropertyDefinition[];
|
|
293
|
+
}
|
|
294
|
+
|
|
154
295
|
type AttributeType = "text" | "textarea" | "richtext" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "location" | "select" | "multiselect" | "file" | "user" | "relation" | "rating" | "formula" | "rollup" | "document";
|
|
155
296
|
/**
|
|
156
297
|
* Status group categorization
|
|
@@ -336,6 +477,8 @@ interface RelationAttributeBase extends Omit<BaseAttribute<unknown>, "defaultVal
|
|
|
336
477
|
type: "relation";
|
|
337
478
|
/** Target objects that can be linked */
|
|
338
479
|
targets: RelationTarget[];
|
|
480
|
+
/** Optional properties schema for qualified relations */
|
|
481
|
+
properties?: PropertySchema;
|
|
339
482
|
}
|
|
340
483
|
/**
|
|
341
484
|
* Single relation attribute (one-to-one or many-to-one)
|
|
@@ -1485,4 +1628,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
|
|
|
1485
1628
|
*/
|
|
1486
1629
|
declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
|
|
1487
1630
|
|
|
1488
|
-
export { type
|
|
1631
|
+
export { type DateFormat as $, type Attribute as A, type FormulaReturnType as B, type CheckboxPropertyDefinition as C, type DateAttribute as D, type RollupAttribute as E, type FeatureGate as F, type RollupFunction as G, type AttributeType as H, type ObjectDefinition as I, type FlagValueType as J, type FeatureFlagDefinition as K, type LocationPropertyDefinition as L, type MultiselectPropertyDefinition as M, type NumberPropertyDefinition as N, type Option as O, type PropertyDefinition as P, type FlagLevel as Q, type RatingPropertyDefinition as R, type StatusPropertyDefinition as S, type TextPropertyDefinition as T, type UserAttribute as U, type FeatureFlagsRepository as V, type StaticFlagDefault as W, type ResolvedFlag as X, type AttributeGroup as Y, type BaseAttribute as Z, type NumberUnit as _, type DocumentAttribute as a, createRelationValidator as a$, type DateValue as a0, type Phone as a1, type Currency as a2, type Location as a3, type LocationGranularity as a4, RELATION_TARGET_ANY as a5, type RelationAttribute as a6, isUniversalRelation as a7, type FlagOverride as a8, type FeatureFlagsConfig as a9, multiselectConfigSchema as aA, fileConfigSchema as aB, userConfigSchema as aC, relationConfigSchema as aD, ratingConfigSchema as aE, formulaConfigSchema as aF, rollupConfigSchema as aG, documentConfigSchema as aH, attributeConfigSchemas as aI, getAttributeConfigSchema as aJ, validateAttributeConfig as aK, parseAttributeConfig as aL, safeParseAttributeConfig as aM, createTextValidator as aN, createNumberValidator as aO, createCheckboxValidator as aP, createDateValidator as aQ, createPhoneValidator as aR, createCurrencyValidator as aS, createStatusValidator as aT, createSelectValidator as aU, createMultiselectValidator as aV, createLocationValidator as aW, createFileValidator as aX, createUserValidator as aY, createSingleRelationValidator as aZ, createMultiRelationValidator as a_, RESERVED_ATTRIBUTE_NAMES as aa, SYSTEM_FIELD_NAMES as ab, type ReservedAttributeName as ac, type SystemFieldName as ad, type Timestamps as ae, type SharingMode as af, type ObjectAttribute as ag, type CompletionStatus as ah, type ObjectRecord as ai, type PropertyType as aj, FORBIDDEN_PROPERTY_TYPES as ak, type ForbiddenPropertyType as al, formatZodErrors as am, type ValidationMessages as an, DEFAULT_VALIDATION_MESSAGES as ao, textConfigSchema as ap, textareaConfigSchema as aq, richtextConfigSchema as ar, numberConfigSchema as as, checkboxConfigSchema as at, dateConfigSchema as au, phoneConfigSchema as av, currencyConfigSchema as aw, statusConfigSchema as ax, locationConfigSchema as ay, selectConfigSchema as az, type TextareaPropertyDefinition as b, createRatingValidator as b0, createFormulaValidator as b1, createRollupValidator as b2, createTextAreaValidator as b3, createRichtextValidator as b4, createAttributeValidator as b5, createFormAttributeValidator as b6, createObjectValidator as b7, type ValidationResult as b8, validateAttribute as b9, validateObject as ba, validateObjectOrThrow as bb, createDraftValidator as bc, validateDraft as bd, validateDraftOrThrow as be, getMissingRequiredAttributes as bf, isRecordComplete as bg, computeRecordStatus as bh, type DatePropertyDefinition as c, type PhonePropertyDefinition as d, type CurrencyPropertyDefinition as e, type StatusGroup as f, type SelectPropertyDefinition as g, type PropertySchema as h, type TextAttribute as i, type TextAreaAttribute as j, type RichtextAttribute as k, type RichtextFeature as l, type NumberAttribute as m, type CheckboxAttribute as n, type PhoneAttribute as o, type CurrencyAttribute as p, type StatusAttribute as q, type SelectAttribute as r, type MultiselectAttribute as s, type LocationAttribute as t, type FileAttribute as u, type SingleRelationAttribute as v, type MultiRelationAttribute as w, type RelationTarget as x, type RatingAttribute as y, type FormulaAttribute as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.59",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"jose": "^6.1.3",
|
|
36
36
|
"pdf-lib": "^1.17.1",
|
|
37
37
|
"zod": "^4.2.1",
|
|
38
|
-
"@stndrds/constants": "0.1.0-alpha.
|
|
38
|
+
"@stndrds/constants": "0.1.0-alpha.59"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.0.3",
|