@stndrds/schema 1.0.0-alpha.136 → 1.0.0-alpha.138
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/{helpers-BiGe0rbb.d.mts → helpers-CoFQtNfq.d.mts} +5 -5
- package/dist/{helpers-MWhnBsDK.d.ts → helpers-D-4aV3ki.d.ts} +5 -5
- package/dist/index.d.mts +275 -34
- package/dist/index.d.ts +275 -34
- package/dist/index.js +298 -11
- package/dist/index.mjs +297 -12
- package/dist/validation/all.d.mts +1 -1
- package/dist/validation/all.d.ts +1 -1
- package/dist/validation/object/index.d.mts +2 -2
- package/dist/validation/object/index.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -541,7 +541,7 @@ var RESERVED_ATTRIBUTE_NAMES = [
|
|
|
541
541
|
];
|
|
542
542
|
|
|
543
543
|
// src/types/permissions.ts
|
|
544
|
-
var ALL_ACTIONS = ["read", "create", "update", "delete"];
|
|
544
|
+
var ALL_ACTIONS = ["read", "create", "update", "delete", "manage"];
|
|
545
545
|
function actionsToAccessLevel(actions) {
|
|
546
546
|
if (actions.length === 0) return "none";
|
|
547
547
|
if (actions.length === 1 && actions[0] === "read") return "read-only";
|
|
@@ -611,7 +611,7 @@ var SYSTEM_ATTRIBUTES = {
|
|
|
611
611
|
system: true,
|
|
612
612
|
multiple: false,
|
|
613
613
|
icon: "user",
|
|
614
|
-
description: "
|
|
614
|
+
description: "Actor who created this record"
|
|
615
615
|
},
|
|
616
616
|
lastUpdatedBy: {
|
|
617
617
|
id: "system:lastUpdatedBy",
|
|
@@ -623,7 +623,7 @@ var SYSTEM_ATTRIBUTES = {
|
|
|
623
623
|
system: true,
|
|
624
624
|
multiple: false,
|
|
625
625
|
icon: "user",
|
|
626
|
-
description: "
|
|
626
|
+
description: "Actor who last modified this record"
|
|
627
627
|
},
|
|
628
628
|
/**
|
|
629
629
|
* System attribute for free-form document attachments.
|
|
@@ -943,8 +943,8 @@ function renderLabelExpression(template, values, fallback = DEFAULT_LABEL_FALLBA
|
|
|
943
943
|
break;
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
946
|
+
const isEmpty2 = value == null || value === "";
|
|
947
|
+
if (isEmpty2 && pipes.length === 0) return "";
|
|
948
948
|
for (const pipeExpr of pipes) {
|
|
949
949
|
const { name: pipeName, args } = parsePipeExpression(pipeExpr);
|
|
950
950
|
const simpleFn = simplePipes[pipeName];
|
|
@@ -1005,17 +1005,45 @@ var SYSTEM_RESOURCES = {
|
|
|
1005
1005
|
/** Tenant settings, audit logs, workflow execution, document generation */
|
|
1006
1006
|
WORKSPACE: "workspace",
|
|
1007
1007
|
/** Object definitions, attributes, views, workflow definitions */
|
|
1008
|
-
ARCHITECT: "architect"
|
|
1008
|
+
ARCHITECT: "architect",
|
|
1009
|
+
/** Runtime feature toggles */
|
|
1010
|
+
FEATURE_FLAGS: "feature-flags",
|
|
1011
|
+
/** Uploaded files and file storage */
|
|
1012
|
+
FILES: "files",
|
|
1013
|
+
/** Saved object views */
|
|
1014
|
+
VIEWS: "views",
|
|
1015
|
+
/** Forms and form submissions */
|
|
1016
|
+
FORMS: "forms",
|
|
1017
|
+
/** Documents and document slots */
|
|
1018
|
+
DOCUMENTS: "documents",
|
|
1019
|
+
/** Audit log access */
|
|
1020
|
+
AUDIT: "audit",
|
|
1021
|
+
/** Programmatic access keys */
|
|
1022
|
+
API_KEYS: "api-keys"
|
|
1009
1023
|
};
|
|
1010
1024
|
var ALL_SYSTEM_RESOURCES = [
|
|
1011
1025
|
SYSTEM_RESOURCES.PEOPLE,
|
|
1012
1026
|
SYSTEM_RESOURCES.WORKSPACE,
|
|
1013
|
-
SYSTEM_RESOURCES.ARCHITECT
|
|
1027
|
+
SYSTEM_RESOURCES.ARCHITECT,
|
|
1028
|
+
SYSTEM_RESOURCES.FEATURE_FLAGS,
|
|
1029
|
+
SYSTEM_RESOURCES.FILES,
|
|
1030
|
+
SYSTEM_RESOURCES.VIEWS,
|
|
1031
|
+
SYSTEM_RESOURCES.FORMS,
|
|
1032
|
+
SYSTEM_RESOURCES.DOCUMENTS,
|
|
1033
|
+
SYSTEM_RESOURCES.AUDIT,
|
|
1034
|
+
SYSTEM_RESOURCES.API_KEYS
|
|
1014
1035
|
];
|
|
1015
1036
|
var SYSTEM_RESOURCE_LABELS = {
|
|
1016
1037
|
people: "People",
|
|
1017
1038
|
workspace: "Workspace",
|
|
1018
|
-
architect: "Architect"
|
|
1039
|
+
architect: "Architect",
|
|
1040
|
+
"feature-flags": "Feature flags",
|
|
1041
|
+
files: "Files",
|
|
1042
|
+
views: "Views",
|
|
1043
|
+
forms: "Forms",
|
|
1044
|
+
documents: "Documents",
|
|
1045
|
+
audit: "Audit",
|
|
1046
|
+
"api-keys": "API keys"
|
|
1019
1047
|
};
|
|
1020
1048
|
var DEFAULT_ROLES = {
|
|
1021
1049
|
/** Full platform access - can manage everything */
|
|
@@ -1031,7 +1059,7 @@ var DEFAULT_ROLE_DESCRIPTIONS = {
|
|
|
1031
1059
|
owner: "Full access to all platform features and data",
|
|
1032
1060
|
member: "Can view, create, edit and delete business data"
|
|
1033
1061
|
};
|
|
1034
|
-
var ALL_ACTIONS2 = ["read", "create", "update", "delete"];
|
|
1062
|
+
var ALL_ACTIONS2 = ["read", "create", "update", "delete", "manage"];
|
|
1035
1063
|
var DEFAULT_ROLE_PERMISSIONS = {
|
|
1036
1064
|
owner: {
|
|
1037
1065
|
system: [{ target: "*", actions: ALL_ACTIONS2 }],
|
|
@@ -2615,10 +2643,20 @@ var ObjectBuilder = class {
|
|
|
2615
2643
|
return this;
|
|
2616
2644
|
}
|
|
2617
2645
|
/**
|
|
2618
|
-
* Set metadata
|
|
2646
|
+
* Set metadata. Merges with any previously set metadata (preserves keys
|
|
2647
|
+
* written by other builder methods like `.order()`).
|
|
2619
2648
|
*/
|
|
2620
2649
|
metadata(value) {
|
|
2621
|
-
this.obj.metadata = value;
|
|
2650
|
+
this.obj.metadata = { ...this.obj.metadata, ...value };
|
|
2651
|
+
return this;
|
|
2652
|
+
}
|
|
2653
|
+
/**
|
|
2654
|
+
* Set the display order used by the sidebar (and any other UI that
|
|
2655
|
+
* surfaces objects). Lower values appear first; objects without an
|
|
2656
|
+
* order fall back to alphabetical order at the consumer level.
|
|
2657
|
+
*/
|
|
2658
|
+
order(value) {
|
|
2659
|
+
this.obj.metadata = { ...this.obj.metadata, order: value };
|
|
2622
2660
|
return this;
|
|
2623
2661
|
}
|
|
2624
2662
|
/**
|
|
@@ -5176,4 +5214,251 @@ function getRelationPath(path) {
|
|
|
5176
5214
|
return parts.slice(0, -1).join(".");
|
|
5177
5215
|
}
|
|
5178
5216
|
|
|
5179
|
-
|
|
5217
|
+
// src/filters/operators.ts
|
|
5218
|
+
var isEmpty = (v) => v === null || v === void 0 || v === "" || Array.isArray(v) && v.length === 0;
|
|
5219
|
+
var toStr = (v) => v == null ? "" : String(v);
|
|
5220
|
+
var toNum = (v) => {
|
|
5221
|
+
if (v == null || v === "") return null;
|
|
5222
|
+
const n = typeof v === "number" ? v : Number(v);
|
|
5223
|
+
return Number.isFinite(n) ? n : null;
|
|
5224
|
+
};
|
|
5225
|
+
var toDate = (v) => {
|
|
5226
|
+
if (v == null) return null;
|
|
5227
|
+
const d = v instanceof Date ? v : new Date(String(v));
|
|
5228
|
+
return Number.isNaN(d.getTime()) ? null : d;
|
|
5229
|
+
};
|
|
5230
|
+
var toArr = (v) => Array.isArray(v) ? v : v == null ? [] : [v];
|
|
5231
|
+
function relativeDateBoundary(rel) {
|
|
5232
|
+
const ms = {
|
|
5233
|
+
days: 864e5,
|
|
5234
|
+
weeks: 6048e5,
|
|
5235
|
+
months: 2592e6,
|
|
5236
|
+
years: 31536e6
|
|
5237
|
+
};
|
|
5238
|
+
const offset = rel.amount * ms[rel.unit] * (rel.direction === "future" ? 1 : -1);
|
|
5239
|
+
return new Date(Date.now() + offset);
|
|
5240
|
+
}
|
|
5241
|
+
var OPERATOR_SPECS = {
|
|
5242
|
+
// ---- text-style ----
|
|
5243
|
+
is: {
|
|
5244
|
+
appliesTo: ["text", "textarea", "phone", "status", "select", "date", "formula"],
|
|
5245
|
+
evaluateInMemory: (v, rv) => toStr(v) === toStr(rv)
|
|
5246
|
+
},
|
|
5247
|
+
is_not: {
|
|
5248
|
+
appliesTo: ["text", "textarea", "phone", "status", "select", "date", "formula"],
|
|
5249
|
+
evaluateInMemory: (v, rv) => toStr(v) !== toStr(rv)
|
|
5250
|
+
},
|
|
5251
|
+
contains: {
|
|
5252
|
+
appliesTo: [
|
|
5253
|
+
"text",
|
|
5254
|
+
"textarea",
|
|
5255
|
+
"phone",
|
|
5256
|
+
"location",
|
|
5257
|
+
"user",
|
|
5258
|
+
"multiselect",
|
|
5259
|
+
"relation",
|
|
5260
|
+
"document",
|
|
5261
|
+
"formula"
|
|
5262
|
+
],
|
|
5263
|
+
evaluateInMemory: (v, rv) => {
|
|
5264
|
+
if (Array.isArray(v)) return v.map(toStr).includes(toStr(rv));
|
|
5265
|
+
return toStr(v).toLowerCase().includes(toStr(rv).toLowerCase());
|
|
5266
|
+
}
|
|
5267
|
+
},
|
|
5268
|
+
not_contains: {
|
|
5269
|
+
appliesTo: [
|
|
5270
|
+
"text",
|
|
5271
|
+
"textarea",
|
|
5272
|
+
"phone",
|
|
5273
|
+
"user",
|
|
5274
|
+
"multiselect",
|
|
5275
|
+
"relation",
|
|
5276
|
+
"document",
|
|
5277
|
+
"formula"
|
|
5278
|
+
],
|
|
5279
|
+
evaluateInMemory: (v, rv) => {
|
|
5280
|
+
if (Array.isArray(v)) return !v.map(toStr).includes(toStr(rv));
|
|
5281
|
+
return !toStr(v).toLowerCase().includes(toStr(rv).toLowerCase());
|
|
5282
|
+
}
|
|
5283
|
+
},
|
|
5284
|
+
starts_with: {
|
|
5285
|
+
appliesTo: ["text", "textarea", "formula"],
|
|
5286
|
+
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().startsWith(toStr(rv).toLowerCase())
|
|
5287
|
+
},
|
|
5288
|
+
ends_with: {
|
|
5289
|
+
appliesTo: ["text", "textarea", "formula"],
|
|
5290
|
+
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().endsWith(toStr(rv).toLowerCase())
|
|
5291
|
+
},
|
|
5292
|
+
is_empty: {
|
|
5293
|
+
appliesTo: [
|
|
5294
|
+
"text",
|
|
5295
|
+
"textarea",
|
|
5296
|
+
"richtext",
|
|
5297
|
+
"number",
|
|
5298
|
+
"phone",
|
|
5299
|
+
"currency",
|
|
5300
|
+
"status",
|
|
5301
|
+
"select",
|
|
5302
|
+
"date",
|
|
5303
|
+
"multiselect",
|
|
5304
|
+
"location",
|
|
5305
|
+
"file",
|
|
5306
|
+
"user",
|
|
5307
|
+
"relation",
|
|
5308
|
+
"rating",
|
|
5309
|
+
"formula",
|
|
5310
|
+
"document"
|
|
5311
|
+
],
|
|
5312
|
+
evaluateInMemory: (v) => isEmpty(v)
|
|
5313
|
+
},
|
|
5314
|
+
is_not_empty: {
|
|
5315
|
+
appliesTo: [
|
|
5316
|
+
"text",
|
|
5317
|
+
"textarea",
|
|
5318
|
+
"richtext",
|
|
5319
|
+
"number",
|
|
5320
|
+
"phone",
|
|
5321
|
+
"currency",
|
|
5322
|
+
"status",
|
|
5323
|
+
"select",
|
|
5324
|
+
"date",
|
|
5325
|
+
"multiselect",
|
|
5326
|
+
"location",
|
|
5327
|
+
"file",
|
|
5328
|
+
"user",
|
|
5329
|
+
"relation",
|
|
5330
|
+
"rating",
|
|
5331
|
+
"formula",
|
|
5332
|
+
"document"
|
|
5333
|
+
],
|
|
5334
|
+
evaluateInMemory: (v) => !isEmpty(v)
|
|
5335
|
+
},
|
|
5336
|
+
// ---- numeric ----
|
|
5337
|
+
eq: {
|
|
5338
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5339
|
+
evaluateInMemory: (v, rv) => toNum(v) === toNum(rv)
|
|
5340
|
+
},
|
|
5341
|
+
neq: {
|
|
5342
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5343
|
+
evaluateInMemory: (v, rv) => toNum(v) !== toNum(rv)
|
|
5344
|
+
},
|
|
5345
|
+
lt: {
|
|
5346
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5347
|
+
evaluateInMemory: (v, rv) => {
|
|
5348
|
+
const a = toNum(v);
|
|
5349
|
+
const b = toNum(rv);
|
|
5350
|
+
return a !== null && b !== null && a < b;
|
|
5351
|
+
}
|
|
5352
|
+
},
|
|
5353
|
+
gt: {
|
|
5354
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5355
|
+
evaluateInMemory: (v, rv) => {
|
|
5356
|
+
const a = toNum(v);
|
|
5357
|
+
const b = toNum(rv);
|
|
5358
|
+
return a !== null && b !== null && a > b;
|
|
5359
|
+
}
|
|
5360
|
+
},
|
|
5361
|
+
lte: {
|
|
5362
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5363
|
+
evaluateInMemory: (v, rv) => {
|
|
5364
|
+
const a = toNum(v);
|
|
5365
|
+
const b = toNum(rv);
|
|
5366
|
+
return a !== null && b !== null && a <= b;
|
|
5367
|
+
}
|
|
5368
|
+
},
|
|
5369
|
+
gte: {
|
|
5370
|
+
appliesTo: ["number", "currency", "rating", "formula"],
|
|
5371
|
+
evaluateInMemory: (v, rv) => {
|
|
5372
|
+
const a = toNum(v);
|
|
5373
|
+
const b = toNum(rv);
|
|
5374
|
+
return a !== null && b !== null && a >= b;
|
|
5375
|
+
}
|
|
5376
|
+
},
|
|
5377
|
+
// ---- checkbox ----
|
|
5378
|
+
is_checked: {
|
|
5379
|
+
appliesTo: ["checkbox"],
|
|
5380
|
+
evaluateInMemory: (v) => v === true
|
|
5381
|
+
},
|
|
5382
|
+
is_not_checked: {
|
|
5383
|
+
appliesTo: ["checkbox"],
|
|
5384
|
+
evaluateInMemory: (v) => v !== true
|
|
5385
|
+
},
|
|
5386
|
+
// ---- date ----
|
|
5387
|
+
before: {
|
|
5388
|
+
appliesTo: ["date"],
|
|
5389
|
+
evaluateInMemory: (v, rv) => {
|
|
5390
|
+
const a = toDate(v);
|
|
5391
|
+
const b = toDate(rv);
|
|
5392
|
+
return a !== null && b !== null && a < b;
|
|
5393
|
+
}
|
|
5394
|
+
},
|
|
5395
|
+
after: {
|
|
5396
|
+
appliesTo: ["date"],
|
|
5397
|
+
evaluateInMemory: (v, rv) => {
|
|
5398
|
+
const a = toDate(v);
|
|
5399
|
+
const b = toDate(rv);
|
|
5400
|
+
return a !== null && b !== null && a > b;
|
|
5401
|
+
}
|
|
5402
|
+
},
|
|
5403
|
+
on_or_before: {
|
|
5404
|
+
appliesTo: ["date"],
|
|
5405
|
+
evaluateInMemory: (v, rv) => {
|
|
5406
|
+
const a = toDate(v);
|
|
5407
|
+
const b = toDate(rv);
|
|
5408
|
+
return a !== null && b !== null && a <= b;
|
|
5409
|
+
}
|
|
5410
|
+
},
|
|
5411
|
+
on_or_after: {
|
|
5412
|
+
appliesTo: ["date"],
|
|
5413
|
+
evaluateInMemory: (v, rv) => {
|
|
5414
|
+
const a = toDate(v);
|
|
5415
|
+
const b = toDate(rv);
|
|
5416
|
+
return a !== null && b !== null && a >= b;
|
|
5417
|
+
}
|
|
5418
|
+
},
|
|
5419
|
+
is_within: {
|
|
5420
|
+
appliesTo: ["date"],
|
|
5421
|
+
evaluateInMemory: (v, rv) => {
|
|
5422
|
+
const d = toDate(v);
|
|
5423
|
+
if (!d) return false;
|
|
5424
|
+
const rel = rv;
|
|
5425
|
+
const boundary = relativeDateBoundary(rel);
|
|
5426
|
+
return rel.direction === "future" ? d >= /* @__PURE__ */ new Date() && d <= boundary : d >= boundary && d <= /* @__PURE__ */ new Date();
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5429
|
+
// ---- select multi-value ----
|
|
5430
|
+
any_of: {
|
|
5431
|
+
appliesTo: ["status", "select", "relation", "document"],
|
|
5432
|
+
evaluateInMemory: (v, rv) => {
|
|
5433
|
+
const ruleArr = toArr(rv).map(toStr);
|
|
5434
|
+
const valArr = toArr(v).map(toStr);
|
|
5435
|
+
return valArr.some((x) => ruleArr.includes(x));
|
|
5436
|
+
}
|
|
5437
|
+
},
|
|
5438
|
+
none_of: {
|
|
5439
|
+
appliesTo: ["status", "select", "relation", "document"],
|
|
5440
|
+
evaluateInMemory: (v, rv) => {
|
|
5441
|
+
const ruleArr = toArr(rv).map(toStr);
|
|
5442
|
+
const valArr = toArr(v).map(toStr);
|
|
5443
|
+
return !valArr.some((x) => ruleArr.includes(x));
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
};
|
|
5447
|
+
|
|
5448
|
+
// src/filters/evaluate.ts
|
|
5449
|
+
function evaluateFilterState(state, values, attributes) {
|
|
5450
|
+
if (state.rules.length === 0) return true;
|
|
5451
|
+
const attrByName = new Map(attributes.map((a) => [a.name, a]));
|
|
5452
|
+
const reducer = state.combinator === "or" ? "some" : "every";
|
|
5453
|
+
return state.rules[reducer]((rule) => evaluateRule(rule, values, attrByName));
|
|
5454
|
+
}
|
|
5455
|
+
function evaluateRule(rule, values, attrByName) {
|
|
5456
|
+
const attr = attrByName.get(rule.attribute);
|
|
5457
|
+
if (!attr) return false;
|
|
5458
|
+
const spec = OPERATOR_SPECS[rule.operator];
|
|
5459
|
+
if (!spec) return false;
|
|
5460
|
+
if (!spec.appliesTo.includes(attr.type)) return false;
|
|
5461
|
+
return spec.evaluateInMemory(values[rule.attribute], rule.value, attr);
|
|
5462
|
+
}
|
|
5463
|
+
|
|
5464
|
+
export { ALL_ACTIONS, ALL_SYSTEM_RESOURCES, AccessDeniedError, ActivityTabConfig, AttributeInUseError, AttributeNotFoundError, BEHAVIOR_PROPERTIES, ConcurrentModificationError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DetailViewBuilder, DocumentsTabConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, ForbiddenError, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, InvalidPathError, ListViewBuilder, ListViewTabConfigBuilder, MaxDepthExceededError, MemoryNotFoundError, NO_VALUE_OPERATORS, NoopGeocodingAdapter, NotFoundError, NotImplementedError, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectNotFoundError, ObjectReferencedError, PRESENTATION_PROPERTIES, PolicyViolationError, ProtectedResourceError, ProtectedRoleError, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RecordNotFoundError, RecordReferencedError, RelationGroupBuilder, RepositoryError, RichtextTabConfig, RoleNotFoundError, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_FIELD_NAMES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, StorageError, SyncError, TabBuilder, TableTabConfig, USER_STATUSES, ValidationError, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getPathDepth, getRelationPath, getRollupFilterOperators, getSystemAttributeList, getTargetAttributeName, group, hasOptions, hasRelationReferences, inferInverseCardinality, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isDefaultRole, isDetailView, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isUniversalRelation, isValidationError, jsonFlag, listView, location, multiselect, number, numberFlag, object, parsePath, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, viewRegistry };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { V as ValidationMessages } from '../types-DT8dfR2I.mjs';
|
|
2
2
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.mjs';
|
|
3
3
|
export { parseAttributeConfig } from './config/index.mjs';
|
|
4
|
-
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-CoFQtNfq.mjs';
|
|
5
5
|
import '../attributes-DcHM27jS.mjs';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.mjs';
|
package/dist/validation/all.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { V as ValidationMessages } from '../types-CUbVw7X2.js';
|
|
2
2
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.js';
|
|
3
3
|
export { parseAttributeConfig } from './config/index.js';
|
|
4
|
-
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraftOrThrow, b as validateObject, d as validateObjectOrThrow } from '../helpers-D-4aV3ki.js';
|
|
5
5
|
import '../attributes-CNpcbVbv.js';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as ObjectDefinition } from '../../helpers-
|
|
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-
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-CoFQtNfq.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-CoFQtNfq.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../../attributes-DcHM27jS.mjs';
|
|
5
5
|
import '@stndrds/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as ObjectDefinition } from '../../helpers-
|
|
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-
|
|
1
|
+
import { O as ObjectDefinition } from '../../helpers-D-4aV3ki.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-D-4aV3ki.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../../attributes-CNpcbVbv.js';
|
|
5
5
|
import '@stndrds/constants';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.138",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"expr-eval": "^2.0.2",
|
|
132
132
|
"libphonenumber-js": "^1.12.31",
|
|
133
133
|
"zod": "^4.2.1",
|
|
134
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
134
|
+
"@stndrds/constants": "1.0.0-alpha.138"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/node": "^25.0.3",
|