@stndrds/schema 1.0.0-alpha.209 → 1.0.0-alpha.211
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-BEc_7_q_.d.ts → attributes-CwDiLLzP.d.ts} +23 -1
- package/dist/{attributes-DoQp0NSn.d.mts → attributes-DNlA-yww.d.mts} +23 -1
- package/dist/{chunk-QEZUDVTN.mjs → chunk-CI6EGLL6.mjs} +1 -1
- package/dist/{chunk-BV3IUMMW.js → chunk-EEH4XQ7W.js} +2 -2
- package/dist/{chunk-XZ5RG2OG.mjs → chunk-GO6LQADH.mjs} +2 -2
- package/dist/{chunk-PLUTE7FU.js → chunk-IH37K3BX.js} +8 -7
- package/dist/{chunk-T6L2MUG2.js → chunk-KNGWHQLR.js} +1 -1
- package/dist/{chunk-ZDMOXF3U.mjs → chunk-LV3FEUKU.mjs} +1 -1
- package/dist/{chunk-ROLWVTU3.js → chunk-Q5DIOYUE.js} +1 -1
- package/dist/{chunk-NWB6IKLM.mjs → chunk-UXWFFBQO.mjs} +5 -4
- package/dist/{helpers-DdsQA9U2.d.mts → helpers-CyYKowT9.d.mts} +2 -2
- package/dist/{helpers-B-hjtjTM.d.ts → helpers-DQ22uMWd.d.ts} +2 -2
- package/dist/index.d.mts +55 -7
- package/dist/index.d.ts +55 -7
- package/dist/index.js +104 -67
- package/dist/index.mjs +42 -6
- package/dist/{types-BW1U6xfV.d.ts → types-Bi3ZZIZJ.d.ts} +1 -1
- package/dist/{types-CnSQ9gCC.d.mts → types-BlVvybnQ.d.mts} +1 -1
- package/dist/validation/all.d.mts +3 -3
- package/dist/validation/all.d.ts +3 -3
- package/dist/validation/all.js +11 -11
- package/dist/validation/all.mjs +4 -4
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/file.d.mts +2 -2
- package/dist/validation/complex/file.d.ts +2 -2
- package/dist/validation/complex/file.js +2 -2
- package/dist/validation/complex/file.mjs +1 -1
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/relation.js +4 -4
- package/dist/validation/complex/relation.mjs +1 -1
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/complex/user.js +2 -2
- package/dist/validation/complex/user.mjs +1 -1
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +3 -3
- package/dist/validation/object/index.d.ts +3 -3
- package/dist/validation/object/index.js +17 -17
- package/dist/validation/object/index.mjs +4 -4
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
var chunkFRCDMQER_js = require('./chunk-FRCDMQER.js');
|
|
4
4
|
require('./chunk-PGERPYDR.js');
|
|
5
5
|
var chunkNSM2JPC3_js = require('./chunk-NSM2JPC3.js');
|
|
6
|
-
var
|
|
6
|
+
var chunkIH37K3BX_js = require('./chunk-IH37K3BX.js');
|
|
7
7
|
require('./chunk-5WATIVCA.js');
|
|
8
8
|
require('./chunk-O44XVGHE.js');
|
|
9
9
|
require('./chunk-YIP5FJ5H.js');
|
|
10
10
|
require('./chunk-SGSGREPG.js');
|
|
11
11
|
require('./chunk-EW5XR2X3.js');
|
|
12
12
|
require('./chunk-QWKLQRBX.js');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-KNGWHQLR.js');
|
|
14
14
|
require('./chunk-HTSTPTNZ.js');
|
|
15
15
|
require('./chunk-V2UA2D4E.js');
|
|
16
16
|
require('./chunk-ACKMC6FL.js');
|
|
17
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-Q5DIOYUE.js');
|
|
18
18
|
require('./chunk-E6JUYGJX.js');
|
|
19
19
|
var chunkEBGRZUIH_js = require('./chunk-EBGRZUIH.js');
|
|
20
|
-
require('./chunk-
|
|
20
|
+
require('./chunk-EEH4XQ7W.js');
|
|
21
21
|
var chunkYKWSHBT5_js = require('./chunk-YKWSHBT5.js');
|
|
22
22
|
var constants = require('@stndrds/constants');
|
|
23
23
|
var z3 = require('zod');
|
|
@@ -410,6 +410,19 @@ function isAttributeSortable2(attr) {
|
|
|
410
410
|
return isAttributeSortable(attr);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
+
// src/types/autofill.ts
|
|
414
|
+
var AUTOFILL_ELIGIBLE_TYPES = [
|
|
415
|
+
"text",
|
|
416
|
+
"number",
|
|
417
|
+
"checkbox",
|
|
418
|
+
"date",
|
|
419
|
+
"phone",
|
|
420
|
+
"currency",
|
|
421
|
+
"status",
|
|
422
|
+
"select",
|
|
423
|
+
"multiselect"
|
|
424
|
+
];
|
|
425
|
+
|
|
413
426
|
// src/types/document-layout.ts
|
|
414
427
|
var MAX_PRESET_DEPTH = 5;
|
|
415
428
|
|
|
@@ -1272,7 +1285,7 @@ var BaseAttributeBuilder = class {
|
|
|
1272
1285
|
* @see https://standardschema.dev/
|
|
1273
1286
|
*/
|
|
1274
1287
|
get "~standard"() {
|
|
1275
|
-
const zodSchema =
|
|
1288
|
+
const zodSchema = chunkIH37K3BX_js.createAttributeValidator(this.build());
|
|
1276
1289
|
return createStandardSchemaProps(zodSchema);
|
|
1277
1290
|
}
|
|
1278
1291
|
constructor(type, name, label) {
|
|
@@ -1352,6 +1365,15 @@ var BaseAttributeBuilder = class {
|
|
|
1352
1365
|
this.attr.placeholder = value;
|
|
1353
1366
|
return this;
|
|
1354
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Enable AI autofill for this attribute. `from` is mandatory:
|
|
1370
|
+
* empty array = document-only, non-empty = also triggered when those
|
|
1371
|
+
* source attributes change. Eligibility by type is validated at schema sync.
|
|
1372
|
+
*/
|
|
1373
|
+
autofill(config) {
|
|
1374
|
+
this.attr.autofill = config;
|
|
1375
|
+
return this;
|
|
1376
|
+
}
|
|
1355
1377
|
description(value) {
|
|
1356
1378
|
this.attr.description = value;
|
|
1357
1379
|
return this;
|
|
@@ -2036,9 +2058,9 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2036
2058
|
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
2037
2059
|
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
2038
2060
|
const target = this.attr.targetAttribute ?? "field";
|
|
2039
|
-
throw new
|
|
2061
|
+
throw new chunkIH37K3BX_js.SchemaError(
|
|
2040
2062
|
`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${targetType}") was given. To surface a plain ${targetType} value from a related record, use a formula instead \u2014 e.g. formula({ name: "${this.attr.name}", label: "\u2026" }).expression("${relation2}.${target}").`,
|
|
2041
|
-
|
|
2063
|
+
chunkIH37K3BX_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2042
2064
|
);
|
|
2043
2065
|
}
|
|
2044
2066
|
return super.build();
|
|
@@ -2534,7 +2556,7 @@ var ObjectBuilder = class {
|
|
|
2534
2556
|
* @see https://standardschema.dev/
|
|
2535
2557
|
*/
|
|
2536
2558
|
get "~standard"() {
|
|
2537
|
-
const zodSchema =
|
|
2559
|
+
const zodSchema = chunkIH37K3BX_js.createObjectValidator(this.build());
|
|
2538
2560
|
return createStandardSchemaProps(zodSchema);
|
|
2539
2561
|
}
|
|
2540
2562
|
/**
|
|
@@ -2738,17 +2760,17 @@ var ObjectBuilder = class {
|
|
|
2738
2760
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2739
2761
|
}
|
|
2740
2762
|
if (!this._labelExpression) {
|
|
2741
|
-
throw new
|
|
2763
|
+
throw new chunkIH37K3BX_js.SchemaError(
|
|
2742
2764
|
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2743
|
-
|
|
2765
|
+
chunkIH37K3BX_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2744
2766
|
);
|
|
2745
2767
|
}
|
|
2746
2768
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2747
2769
|
if (!labelResult.success) {
|
|
2748
2770
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2749
|
-
throw new
|
|
2771
|
+
throw new chunkIH37K3BX_js.SchemaError(
|
|
2750
2772
|
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2751
|
-
|
|
2773
|
+
chunkIH37K3BX_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2752
2774
|
);
|
|
2753
2775
|
}
|
|
2754
2776
|
const sortedVersions = [...this._migrations].sort((a, b) => a.version - b.version);
|
|
@@ -2787,7 +2809,7 @@ var ObjectBuilder = class {
|
|
|
2787
2809
|
objectNameSchema.parse(name);
|
|
2788
2810
|
} catch (error) {
|
|
2789
2811
|
if (error instanceof z3__default.default.ZodError) {
|
|
2790
|
-
throw new
|
|
2812
|
+
throw new chunkIH37K3BX_js.SchemaError(error.issues[0].message, chunkIH37K3BX_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
2791
2813
|
}
|
|
2792
2814
|
throw error;
|
|
2793
2815
|
}
|
|
@@ -6735,7 +6757,7 @@ function assertOperatorForType(operator, type, context) {
|
|
|
6735
6757
|
if (!ops?.includes(operator)) {
|
|
6736
6758
|
const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
|
|
6737
6759
|
const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
|
|
6738
|
-
throw new
|
|
6760
|
+
throw new chunkIH37K3BX_js.ValidationError(summary, [
|
|
6739
6761
|
{
|
|
6740
6762
|
path: ["operator"],
|
|
6741
6763
|
message: summary
|
|
@@ -6743,40 +6765,52 @@ function assertOperatorForType(operator, type, context) {
|
|
|
6743
6765
|
]);
|
|
6744
6766
|
}
|
|
6745
6767
|
}
|
|
6768
|
+
var RELATIVE_DATE_UNITS = /* @__PURE__ */ new Set(["days", "weeks", "months", "years"]);
|
|
6769
|
+
var RELATIVE_DATE_DIRECTIONS = /* @__PURE__ */ new Set(["past", "future"]);
|
|
6770
|
+
function assertRelativeDateValue(rule) {
|
|
6771
|
+
if (rule.operator !== "is_within") return;
|
|
6772
|
+
const v = rule.value;
|
|
6773
|
+
const valid = typeof v === "object" && v !== null && typeof v.amount === "number" && Number.isFinite(v.amount) && v.amount > 0 && typeof v.unit === "string" && RELATIVE_DATE_UNITS.has(v.unit) && typeof v.direction === "string" && RELATIVE_DATE_DIRECTIONS.has(v.direction);
|
|
6774
|
+
if (!valid) {
|
|
6775
|
+
const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
|
|
6776
|
+
throw new chunkIH37K3BX_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6746
6779
|
function assertDynamicValueForAttribute(rule, attrType) {
|
|
6747
6780
|
if (!isDynamicValue(rule.value)) return;
|
|
6748
6781
|
const v = rule.value;
|
|
6749
6782
|
if (v.dynamic === "actor" && attrType !== "user") {
|
|
6750
6783
|
const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
|
|
6751
|
-
throw new
|
|
6784
|
+
throw new chunkIH37K3BX_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
6752
6785
|
}
|
|
6753
6786
|
if (v.dynamic === "date" && attrType !== "date") {
|
|
6754
6787
|
const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
|
|
6755
|
-
throw new
|
|
6788
|
+
throw new chunkIH37K3BX_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
6756
6789
|
}
|
|
6757
6790
|
}
|
|
6758
6791
|
function validateQualifiedRule(rule, context) {
|
|
6759
6792
|
const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
|
|
6760
6793
|
const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
|
|
6761
6794
|
if (!(rootAttr || systemOps)) {
|
|
6762
|
-
throw new
|
|
6795
|
+
throw new chunkIH37K3BX_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
|
|
6763
6796
|
{ path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
|
|
6764
6797
|
]);
|
|
6765
6798
|
}
|
|
6766
6799
|
if (rule.quantifier !== void 0 && !rule.property) {
|
|
6767
6800
|
const m = `quantifier is only valid on qualified edge rules (set "property")`;
|
|
6768
|
-
throw new
|
|
6801
|
+
throw new chunkIH37K3BX_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
|
|
6769
6802
|
}
|
|
6770
6803
|
if (!rootAttr) {
|
|
6771
6804
|
if (rule.property) {
|
|
6772
|
-
throw new
|
|
6805
|
+
throw new chunkIH37K3BX_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
|
|
6773
6806
|
{ path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
|
|
6774
6807
|
]);
|
|
6775
6808
|
}
|
|
6776
6809
|
if (!systemOps.includes(rule.operator)) {
|
|
6777
6810
|
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
6778
|
-
throw new
|
|
6811
|
+
throw new chunkIH37K3BX_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
6779
6812
|
}
|
|
6813
|
+
assertRelativeDateValue(rule);
|
|
6780
6814
|
return;
|
|
6781
6815
|
}
|
|
6782
6816
|
if (!rule.property) {
|
|
@@ -6785,29 +6819,31 @@ function validateQualifiedRule(rule, context) {
|
|
|
6785
6819
|
if (!ops.includes(rule.operator)) {
|
|
6786
6820
|
const validList = ops.length ? ops.join(", ") : "(not filterable)";
|
|
6787
6821
|
const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
|
|
6788
|
-
throw new
|
|
6822
|
+
throw new chunkIH37K3BX_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
6789
6823
|
}
|
|
6824
|
+
assertRelativeDateValue(rule);
|
|
6790
6825
|
return;
|
|
6791
6826
|
}
|
|
6792
6827
|
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
6793
|
-
throw new
|
|
6828
|
+
throw new chunkIH37K3BX_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
|
|
6794
6829
|
{ path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
|
|
6795
6830
|
]);
|
|
6796
6831
|
}
|
|
6797
6832
|
const propSchema = rootAttr.properties;
|
|
6798
6833
|
if (!propSchema) {
|
|
6799
|
-
throw new
|
|
6834
|
+
throw new chunkIH37K3BX_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
|
|
6800
6835
|
{ path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
|
|
6801
6836
|
]);
|
|
6802
6837
|
}
|
|
6803
6838
|
const propDef = propSchema.definitions.find((p) => p.name === rule.property);
|
|
6804
6839
|
if (!propDef) {
|
|
6805
|
-
throw new
|
|
6840
|
+
throw new chunkIH37K3BX_js.ValidationError(
|
|
6806
6841
|
`Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
|
|
6807
6842
|
[{ path: ["property"], message: `Unknown property: ${rule.property}` }]
|
|
6808
6843
|
);
|
|
6809
6844
|
}
|
|
6810
6845
|
assertOperatorForType(rule.operator, propDef.type, "property");
|
|
6846
|
+
assertRelativeDateValue(rule);
|
|
6811
6847
|
}
|
|
6812
6848
|
|
|
6813
6849
|
Object.defineProperty(exports, "asTenantId", {
|
|
@@ -6844,175 +6880,175 @@ Object.defineProperty(exports, "parseComputedFormula", {
|
|
|
6844
6880
|
});
|
|
6845
6881
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
6846
6882
|
enumerable: true,
|
|
6847
|
-
get: function () { return
|
|
6883
|
+
get: function () { return chunkIH37K3BX_js.AccessDeniedError; }
|
|
6848
6884
|
});
|
|
6849
6885
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
6850
6886
|
enumerable: true,
|
|
6851
|
-
get: function () { return
|
|
6887
|
+
get: function () { return chunkIH37K3BX_js.AttributeInUseError; }
|
|
6852
6888
|
});
|
|
6853
6889
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
6854
6890
|
enumerable: true,
|
|
6855
|
-
get: function () { return
|
|
6891
|
+
get: function () { return chunkIH37K3BX_js.AttributeNotFoundError; }
|
|
6856
6892
|
});
|
|
6857
6893
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
6858
6894
|
enumerable: true,
|
|
6859
|
-
get: function () { return
|
|
6895
|
+
get: function () { return chunkIH37K3BX_js.ChangeTypeNotSupportedError; }
|
|
6860
6896
|
});
|
|
6861
6897
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
6862
6898
|
enumerable: true,
|
|
6863
|
-
get: function () { return
|
|
6899
|
+
get: function () { return chunkIH37K3BX_js.ConcurrentModificationError; }
|
|
6864
6900
|
});
|
|
6865
6901
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
6866
6902
|
enumerable: true,
|
|
6867
|
-
get: function () { return
|
|
6903
|
+
get: function () { return chunkIH37K3BX_js.DestructiveSyncNotAllowedError; }
|
|
6868
6904
|
});
|
|
6869
6905
|
Object.defineProperty(exports, "DuplicateError", {
|
|
6870
6906
|
enumerable: true,
|
|
6871
|
-
get: function () { return
|
|
6907
|
+
get: function () { return chunkIH37K3BX_js.DuplicateError; }
|
|
6872
6908
|
});
|
|
6873
6909
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
6874
6910
|
enumerable: true,
|
|
6875
|
-
get: function () { return
|
|
6911
|
+
get: function () { return chunkIH37K3BX_js.ForbiddenError; }
|
|
6876
6912
|
});
|
|
6877
6913
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
6878
6914
|
enumerable: true,
|
|
6879
|
-
get: function () { return
|
|
6915
|
+
get: function () { return chunkIH37K3BX_js.MemoryNotFoundError; }
|
|
6880
6916
|
});
|
|
6881
6917
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
6882
6918
|
enumerable: true,
|
|
6883
|
-
get: function () { return
|
|
6919
|
+
get: function () { return chunkIH37K3BX_js.MigrationTimeoutError; }
|
|
6884
6920
|
});
|
|
6885
6921
|
Object.defineProperty(exports, "NotFoundError", {
|
|
6886
6922
|
enumerable: true,
|
|
6887
|
-
get: function () { return
|
|
6923
|
+
get: function () { return chunkIH37K3BX_js.NotFoundError; }
|
|
6888
6924
|
});
|
|
6889
6925
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
6890
6926
|
enumerable: true,
|
|
6891
|
-
get: function () { return
|
|
6927
|
+
get: function () { return chunkIH37K3BX_js.NotImplementedError; }
|
|
6892
6928
|
});
|
|
6893
6929
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
6894
6930
|
enumerable: true,
|
|
6895
|
-
get: function () { return
|
|
6931
|
+
get: function () { return chunkIH37K3BX_js.ObjectNotFoundError; }
|
|
6896
6932
|
});
|
|
6897
6933
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
6898
6934
|
enumerable: true,
|
|
6899
|
-
get: function () { return
|
|
6935
|
+
get: function () { return chunkIH37K3BX_js.ObjectReferencedError; }
|
|
6900
6936
|
});
|
|
6901
6937
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
6902
6938
|
enumerable: true,
|
|
6903
|
-
get: function () { return
|
|
6939
|
+
get: function () { return chunkIH37K3BX_js.OrphanSystemAttributeError; }
|
|
6904
6940
|
});
|
|
6905
6941
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
6906
6942
|
enumerable: true,
|
|
6907
|
-
get: function () { return
|
|
6943
|
+
get: function () { return chunkIH37K3BX_js.ProtectedResourceError; }
|
|
6908
6944
|
});
|
|
6909
6945
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
6910
6946
|
enumerable: true,
|
|
6911
|
-
get: function () { return
|
|
6947
|
+
get: function () { return chunkIH37K3BX_js.ProtectedRoleError; }
|
|
6912
6948
|
});
|
|
6913
6949
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
6914
6950
|
enumerable: true,
|
|
6915
|
-
get: function () { return
|
|
6951
|
+
get: function () { return chunkIH37K3BX_js.RecordNotFoundError; }
|
|
6916
6952
|
});
|
|
6917
6953
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
6918
6954
|
enumerable: true,
|
|
6919
|
-
get: function () { return
|
|
6955
|
+
get: function () { return chunkIH37K3BX_js.RecordReferencedError; }
|
|
6920
6956
|
});
|
|
6921
6957
|
Object.defineProperty(exports, "RepositoryError", {
|
|
6922
6958
|
enumerable: true,
|
|
6923
|
-
get: function () { return
|
|
6959
|
+
get: function () { return chunkIH37K3BX_js.RepositoryError; }
|
|
6924
6960
|
});
|
|
6925
6961
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
6926
6962
|
enumerable: true,
|
|
6927
|
-
get: function () { return
|
|
6963
|
+
get: function () { return chunkIH37K3BX_js.RoleNotFoundError; }
|
|
6928
6964
|
});
|
|
6929
6965
|
Object.defineProperty(exports, "SchemaError", {
|
|
6930
6966
|
enumerable: true,
|
|
6931
|
-
get: function () { return
|
|
6967
|
+
get: function () { return chunkIH37K3BX_js.SchemaError; }
|
|
6932
6968
|
});
|
|
6933
6969
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
6934
6970
|
enumerable: true,
|
|
6935
|
-
get: function () { return
|
|
6971
|
+
get: function () { return chunkIH37K3BX_js.SchemaErrorCode; }
|
|
6936
6972
|
});
|
|
6937
6973
|
Object.defineProperty(exports, "StorageError", {
|
|
6938
6974
|
enumerable: true,
|
|
6939
|
-
get: function () { return
|
|
6975
|
+
get: function () { return chunkIH37K3BX_js.StorageError; }
|
|
6940
6976
|
});
|
|
6941
6977
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
6942
6978
|
enumerable: true,
|
|
6943
|
-
get: function () { return
|
|
6979
|
+
get: function () { return chunkIH37K3BX_js.SyncCascadeError; }
|
|
6944
6980
|
});
|
|
6945
6981
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
6946
6982
|
enumerable: true,
|
|
6947
|
-
get: function () { return
|
|
6983
|
+
get: function () { return chunkIH37K3BX_js.SyncConflictError; }
|
|
6948
6984
|
});
|
|
6949
6985
|
Object.defineProperty(exports, "SyncError", {
|
|
6950
6986
|
enumerable: true,
|
|
6951
|
-
get: function () { return
|
|
6987
|
+
get: function () { return chunkIH37K3BX_js.SyncError; }
|
|
6952
6988
|
});
|
|
6953
6989
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
6954
6990
|
enumerable: true,
|
|
6955
|
-
get: function () { return
|
|
6991
|
+
get: function () { return chunkIH37K3BX_js.SystemEntityImmutableError; }
|
|
6956
6992
|
});
|
|
6957
6993
|
Object.defineProperty(exports, "ValidationError", {
|
|
6958
6994
|
enumerable: true,
|
|
6959
|
-
get: function () { return
|
|
6995
|
+
get: function () { return chunkIH37K3BX_js.ValidationError; }
|
|
6960
6996
|
});
|
|
6961
6997
|
Object.defineProperty(exports, "computeRecordStatus", {
|
|
6962
6998
|
enumerable: true,
|
|
6963
|
-
get: function () { return
|
|
6999
|
+
get: function () { return chunkIH37K3BX_js.computeRecordStatus; }
|
|
6964
7000
|
});
|
|
6965
7001
|
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
6966
7002
|
enumerable: true,
|
|
6967
|
-
get: function () { return
|
|
7003
|
+
get: function () { return chunkIH37K3BX_js.createFormAttributeValidator; }
|
|
6968
7004
|
});
|
|
6969
7005
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
6970
7006
|
enumerable: true,
|
|
6971
|
-
get: function () { return
|
|
7007
|
+
get: function () { return chunkIH37K3BX_js.isAttributeInUseError; }
|
|
6972
7008
|
});
|
|
6973
7009
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
6974
7010
|
enumerable: true,
|
|
6975
|
-
get: function () { return
|
|
7011
|
+
get: function () { return chunkIH37K3BX_js.isNotFoundError; }
|
|
6976
7012
|
});
|
|
6977
7013
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
6978
7014
|
enumerable: true,
|
|
6979
|
-
get: function () { return
|
|
7015
|
+
get: function () { return chunkIH37K3BX_js.isObjectReferencedError; }
|
|
6980
7016
|
});
|
|
6981
7017
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
6982
7018
|
enumerable: true,
|
|
6983
|
-
get: function () { return
|
|
7019
|
+
get: function () { return chunkIH37K3BX_js.isProtectedResourceError; }
|
|
6984
7020
|
});
|
|
6985
7021
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
6986
7022
|
enumerable: true,
|
|
6987
|
-
get: function () { return
|
|
7023
|
+
get: function () { return chunkIH37K3BX_js.isRecordReferencedError; }
|
|
6988
7024
|
});
|
|
6989
7025
|
Object.defineProperty(exports, "isSchemaError", {
|
|
6990
7026
|
enumerable: true,
|
|
6991
|
-
get: function () { return
|
|
7027
|
+
get: function () { return chunkIH37K3BX_js.isSchemaError; }
|
|
6992
7028
|
});
|
|
6993
7029
|
Object.defineProperty(exports, "isValidationError", {
|
|
6994
7030
|
enumerable: true,
|
|
6995
|
-
get: function () { return
|
|
7031
|
+
get: function () { return chunkIH37K3BX_js.isValidationError; }
|
|
6996
7032
|
});
|
|
6997
7033
|
Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
|
|
6998
7034
|
enumerable: true,
|
|
6999
|
-
get: function () { return
|
|
7035
|
+
get: function () { return chunkIH37K3BX_js.rejectUnknownAttributesOrThrow; }
|
|
7000
7036
|
});
|
|
7001
7037
|
Object.defineProperty(exports, "validateDraft", {
|
|
7002
7038
|
enumerable: true,
|
|
7003
|
-
get: function () { return
|
|
7039
|
+
get: function () { return chunkIH37K3BX_js.validateDraft; }
|
|
7004
7040
|
});
|
|
7005
7041
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
7006
7042
|
enumerable: true,
|
|
7007
|
-
get: function () { return
|
|
7043
|
+
get: function () { return chunkIH37K3BX_js.validateDraftOrThrow; }
|
|
7008
7044
|
});
|
|
7009
7045
|
Object.defineProperty(exports, "validateObject", {
|
|
7010
7046
|
enumerable: true,
|
|
7011
|
-
get: function () { return
|
|
7047
|
+
get: function () { return chunkIH37K3BX_js.validateObject; }
|
|
7012
7048
|
});
|
|
7013
7049
|
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
7014
7050
|
enumerable: true,
|
|
7015
|
-
get: function () { return
|
|
7051
|
+
get: function () { return chunkIH37K3BX_js.validateObjectOrThrow; }
|
|
7016
7052
|
});
|
|
7017
7053
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
7018
7054
|
enumerable: true,
|
|
@@ -7026,6 +7062,7 @@ exports.ALLOWED_PROPERTY_TYPES = ALLOWED_PROPERTY_TYPES;
|
|
|
7026
7062
|
exports.ALL_ACTIONS = ALL_ACTIONS;
|
|
7027
7063
|
exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES;
|
|
7028
7064
|
exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
|
|
7065
|
+
exports.AUTOFILL_ELIGIBLE_TYPES = AUTOFILL_ELIGIBLE_TYPES;
|
|
7029
7066
|
exports.ActivityTabConfig = ActivityTabConfig;
|
|
7030
7067
|
exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES;
|
|
7031
7068
|
exports.COMPUTED_FUNCTIONS = COMPUTED_FUNCTIONS;
|
package/dist/index.mjs
CHANGED
|
@@ -3,22 +3,22 @@ export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY
|
|
|
3
3
|
import './chunk-SP3PNHYF.mjs';
|
|
4
4
|
import { parseComputedFormula } from './chunk-AAXJJNY6.mjs';
|
|
5
5
|
export { ComputedFormulaParseError, parseAttributeConfig, parseComputedFormula } from './chunk-AAXJJNY6.mjs';
|
|
6
|
-
import { createObjectValidator, SchemaError, SchemaErrorCode, ValidationError, createAttributeValidator } from './chunk-
|
|
7
|
-
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, computeRecordStatus, createFormAttributeValidator, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-
|
|
6
|
+
import { createObjectValidator, SchemaError, SchemaErrorCode, ValidationError, createAttributeValidator } from './chunk-UXWFFBQO.mjs';
|
|
7
|
+
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, computeRecordStatus, createFormAttributeValidator, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-UXWFFBQO.mjs';
|
|
8
8
|
import './chunk-OSSGN43B.mjs';
|
|
9
9
|
import './chunk-6I2R22CX.mjs';
|
|
10
10
|
import './chunk-UANQJ2GH.mjs';
|
|
11
11
|
import './chunk-NOMHDOVE.mjs';
|
|
12
12
|
import './chunk-QVLQPW3O.mjs';
|
|
13
13
|
import './chunk-ZDQ5AP26.mjs';
|
|
14
|
-
import './chunk-
|
|
14
|
+
import './chunk-LV3FEUKU.mjs';
|
|
15
15
|
import './chunk-UXAHLSWC.mjs';
|
|
16
16
|
import './chunk-NS63SPNN.mjs';
|
|
17
17
|
import './chunk-AYVHMVKQ.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-CI6EGLL6.mjs';
|
|
19
19
|
import './chunk-YUFTHPOE.mjs';
|
|
20
20
|
import { formatPhoneForDisplay } from './chunk-JUKLL5RJ.mjs';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-GO6LQADH.mjs';
|
|
22
22
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './chunk-HRQEZUAA.mjs';
|
|
23
23
|
import { ICONS, getCountryDisplayNameByIso3 } from '@stndrds/constants';
|
|
24
24
|
import z3, { z } from 'zod';
|
|
@@ -407,6 +407,19 @@ function isAttributeSortable2(attr) {
|
|
|
407
407
|
return isAttributeSortable(attr);
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
// src/types/autofill.ts
|
|
411
|
+
var AUTOFILL_ELIGIBLE_TYPES = [
|
|
412
|
+
"text",
|
|
413
|
+
"number",
|
|
414
|
+
"checkbox",
|
|
415
|
+
"date",
|
|
416
|
+
"phone",
|
|
417
|
+
"currency",
|
|
418
|
+
"status",
|
|
419
|
+
"select",
|
|
420
|
+
"multiselect"
|
|
421
|
+
];
|
|
422
|
+
|
|
410
423
|
// src/types/document-layout.ts
|
|
411
424
|
var MAX_PRESET_DEPTH = 5;
|
|
412
425
|
|
|
@@ -1349,6 +1362,15 @@ var BaseAttributeBuilder = class {
|
|
|
1349
1362
|
this.attr.placeholder = value;
|
|
1350
1363
|
return this;
|
|
1351
1364
|
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Enable AI autofill for this attribute. `from` is mandatory:
|
|
1367
|
+
* empty array = document-only, non-empty = also triggered when those
|
|
1368
|
+
* source attributes change. Eligibility by type is validated at schema sync.
|
|
1369
|
+
*/
|
|
1370
|
+
autofill(config) {
|
|
1371
|
+
this.attr.autofill = config;
|
|
1372
|
+
return this;
|
|
1373
|
+
}
|
|
1352
1374
|
description(value) {
|
|
1353
1375
|
this.attr.description = value;
|
|
1354
1376
|
return this;
|
|
@@ -6740,6 +6762,17 @@ function assertOperatorForType(operator, type, context) {
|
|
|
6740
6762
|
]);
|
|
6741
6763
|
}
|
|
6742
6764
|
}
|
|
6765
|
+
var RELATIVE_DATE_UNITS = /* @__PURE__ */ new Set(["days", "weeks", "months", "years"]);
|
|
6766
|
+
var RELATIVE_DATE_DIRECTIONS = /* @__PURE__ */ new Set(["past", "future"]);
|
|
6767
|
+
function assertRelativeDateValue(rule) {
|
|
6768
|
+
if (rule.operator !== "is_within") return;
|
|
6769
|
+
const v = rule.value;
|
|
6770
|
+
const valid = typeof v === "object" && v !== null && typeof v.amount === "number" && Number.isFinite(v.amount) && v.amount > 0 && typeof v.unit === "string" && RELATIVE_DATE_UNITS.has(v.unit) && typeof v.direction === "string" && RELATIVE_DATE_DIRECTIONS.has(v.direction);
|
|
6771
|
+
if (!valid) {
|
|
6772
|
+
const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
|
|
6773
|
+
throw new ValidationError(m, [{ path: ["value"], message: m }]);
|
|
6774
|
+
}
|
|
6775
|
+
}
|
|
6743
6776
|
function assertDynamicValueForAttribute(rule, attrType) {
|
|
6744
6777
|
if (!isDynamicValue(rule.value)) return;
|
|
6745
6778
|
const v = rule.value;
|
|
@@ -6774,6 +6807,7 @@ function validateQualifiedRule(rule, context) {
|
|
|
6774
6807
|
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
6775
6808
|
throw new ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
6776
6809
|
}
|
|
6810
|
+
assertRelativeDateValue(rule);
|
|
6777
6811
|
return;
|
|
6778
6812
|
}
|
|
6779
6813
|
if (!rule.property) {
|
|
@@ -6784,6 +6818,7 @@ function validateQualifiedRule(rule, context) {
|
|
|
6784
6818
|
const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
|
|
6785
6819
|
throw new ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
6786
6820
|
}
|
|
6821
|
+
assertRelativeDateValue(rule);
|
|
6787
6822
|
return;
|
|
6788
6823
|
}
|
|
6789
6824
|
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
@@ -6805,6 +6840,7 @@ function validateQualifiedRule(rule, context) {
|
|
|
6805
6840
|
);
|
|
6806
6841
|
}
|
|
6807
6842
|
assertOperatorForType(rule.operator, propDef.type, "property");
|
|
6843
|
+
assertRelativeDateValue(rule);
|
|
6808
6844
|
}
|
|
6809
6845
|
|
|
6810
|
-
export { ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, ActivityTabConfig, BEHAVIOR_PROPERTIES, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ComputedFormulaCompileError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_DOCUMENT_SLOT, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentSlotValidationError, DocumentsTabConfig, EMPTY_VALUE_PLACEHOLDER, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, ListViewBuilder, ListViewTabConfigBuilder, MAX_PRESET_DEPTH, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NO_VALUE_OPERATORS, NoopGeocodingAdapter, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, PRESENTATION_PROPERTIES, QUALIFIED_SEPARATOR, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RelationGroupBuilder, RichtextTabConfig, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, TabBuilder, TableTabConfig, USER_STATUSES, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, hasOptions, inferInverseCardinality, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable2 as isAttributeSortable, isBilateralRelation, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isPlainRecord, isRelationGroup, isStandardSchema, isUniversalRelation, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
6846
|
+
export { ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUTOFILL_ELIGIBLE_TYPES, ActivityTabConfig, BEHAVIOR_PROPERTIES, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ComputedFormulaCompileError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_DOCUMENT_SLOT, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentSlotValidationError, DocumentsTabConfig, EMPTY_VALUE_PLACEHOLDER, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, ListViewBuilder, ListViewTabConfigBuilder, MAX_PRESET_DEPTH, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NO_VALUE_OPERATORS, NoopGeocodingAdapter, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, PRESENTATION_PROPERTIES, QUALIFIED_SEPARATOR, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RelationGroupBuilder, RichtextTabConfig, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, TabBuilder, TableTabConfig, USER_STATUSES, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, hasOptions, inferInverseCardinality, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable2 as isAttributeSortable, isBilateralRelation, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isPlainRecord, isRelationGroup, isStandardSchema, isUniversalRelation, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { V as ValidationMessages } from '../types-
|
|
1
|
+
export { V as ValidationMessages } from '../types-BlVvybnQ.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, r as rejectUnknownAttributesOrThrow, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-
|
|
5
|
-
import '../attributes-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-CyYKowT9.mjs';
|
|
5
|
+
import '../attributes-DNlA-yww.mjs';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.mjs';
|
|
8
8
|
import 'zod';
|
package/dist/validation/all.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { V as ValidationMessages } from '../types-
|
|
1
|
+
export { V as ValidationMessages } from '../types-Bi3ZZIZJ.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, r as rejectUnknownAttributesOrThrow, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-
|
|
5
|
-
import '../attributes-
|
|
4
|
+
export { c as computeRecordStatus, a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from '../helpers-DQ22uMWd.js';
|
|
5
|
+
import '../attributes-CwDiLLzP.js';
|
|
6
6
|
import '@stndrds/constants';
|
|
7
7
|
import '../utils.js';
|
|
8
8
|
import 'zod';
|