@stndrds/schema 1.0.0-alpha.292 → 1.0.0-alpha.294

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.
Files changed (35) hide show
  1. package/dist/{all-FGIrc6mI.d.ts → all-CDJSpI46.d.ts} +105 -6
  2. package/dist/{all-DaucFjyz.d.mts → all-Cru_CaSY.d.mts} +105 -6
  3. package/dist/{chunk-KLDZHAGX.mjs → chunk-2WWGHULM.mjs} +1 -1
  4. package/dist/{chunk-3YCZ5H3H.js → chunk-4KMUATDG.js} +9 -1
  5. package/dist/{chunk-7WEOBXXA.mjs → chunk-CLZORRMS.mjs} +9 -1
  6. package/dist/{chunk-ZHB4VBCX.js → chunk-DVXGSTWJ.js} +3 -3
  7. package/dist/{chunk-RDYTVHNN.js → chunk-HURC6CW3.js} +4 -4
  8. package/dist/{chunk-QYJ532XI.mjs → chunk-JZNR4HKQ.mjs} +60 -27
  9. package/dist/{chunk-5JMQNH2A.js → chunk-KAWYU7TE.js} +4 -4
  10. package/dist/{chunk-UW3BOSB6.mjs → chunk-QT35SI3K.mjs} +1 -1
  11. package/dist/{chunk-JSQCTLV5.mjs → chunk-R2DAEDRF.mjs} +1 -1
  12. package/dist/{chunk-D4A6FL67.js → chunk-T5PM73EF.js} +96 -59
  13. package/dist/exceptions.d.mts +7 -0
  14. package/dist/exceptions.d.ts +7 -0
  15. package/dist/exceptions.js +39 -39
  16. package/dist/exceptions.mjs +1 -1
  17. package/dist/{index-Eh1tYq3i.d.mts → index-BdVnHL3F.d.mts} +27 -7
  18. package/dist/{index-0VG9u1XW.d.ts → index-CFhPHQaI.d.ts} +27 -7
  19. package/dist/index.d.mts +885 -429
  20. package/dist/index.d.ts +885 -429
  21. package/dist/index.js +655 -334
  22. package/dist/index.mjs +332 -61
  23. package/dist/utils.js +8 -8
  24. package/dist/utils.mjs +2 -2
  25. package/dist/validation/all.d.mts +2 -2
  26. package/dist/validation/all.d.ts +2 -2
  27. package/dist/validation/all.js +29 -29
  28. package/dist/validation/all.mjs +4 -4
  29. package/dist/validation/config/index.d.mts +1 -1
  30. package/dist/validation/config/index.d.ts +1 -1
  31. package/dist/validation/config/index.js +12 -12
  32. package/dist/validation/config/index.mjs +2 -2
  33. package/dist/validation/object/index.js +14 -14
  34. package/dist/validation/object/index.mjs +2 -2
  35. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { SCHEMA_LIMITS, iconNameSchema } from './chunk-UW3BOSB6.mjs';
2
- import { ValidationError } from './chunk-7WEOBXXA.mjs';
1
+ import { SCHEMA_LIMITS, iconNameSchema } from './chunk-QT35SI3K.mjs';
2
+ import { ValidationError } from './chunk-CLZORRMS.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  // src/types/system-attributes.ts
@@ -153,6 +153,13 @@ var FORMULA_OPERATORS = [
153
153
  "is_empty",
154
154
  "is_not_empty"
155
155
  ];
156
+ var LOCATION_FILTER_PROPERTIES = ["city", "postalCode", "country"];
157
+ function isLocationFilterProperty(name) {
158
+ return LOCATION_FILTER_PROPERTIES.includes(name);
159
+ }
160
+ function isLocationPartOperator(operator) {
161
+ return TEXT_OPERATORS.includes(operator);
162
+ }
156
163
  var ATTRIBUTE_FILTER_OPERATORS = {
157
164
  text: TEXT_OPERATORS,
158
165
  richtext: [],
@@ -710,12 +717,9 @@ function assertDynamicValueForAttribute(rule, attrType) {
710
717
  throw new ValidationError(m, [{ path: ["value"], message: m }]);
711
718
  }
712
719
  }
713
- function locationQueryHint(type) {
714
- return type === "location" ? ' Location attributes cannot be filtered on their text \u2014 use the full-text "query" parameter to match a city, address or postal code.' : "";
715
- }
716
- function withLocationQueryHint(message, type) {
717
- const hint = locationQueryHint(type);
718
- return hint ? `${message}.${hint}` : message;
720
+ var LOCATION_PARTS_LIST = LOCATION_FILTER_PROPERTIES.map((part) => `"${part}"`).join(", ");
721
+ function locationPartsHint(type) {
722
+ return type === "location" ? ` A location is filtered on one of its parts: set "property" to one of ${LOCATION_PARTS_LIST} and use a text operator (e.g. contains).` : "";
719
723
  }
720
724
  function collectQualifiedRuleIssues(rule, context) {
721
725
  try {
@@ -730,7 +734,9 @@ function validateQualifiedRule(rule, context) {
730
734
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
731
735
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
732
736
  if (!(rootAttr || systemOps)) {
733
- const dottedHint = rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
737
+ const [head, ...tail] = rule.attribute.split(".");
738
+ const dottedRoot = tail.length > 0 ? context.attributes.find((a) => a.name === head) : void 0;
739
+ const dottedHint = dottedRoot?.type === "location" ? ` Dotted paths are not supported \u2014 set "attribute" to "${head}" and "property" to ${isLocationFilterProperty(tail[0] ?? "") ? `"${tail[0]}"` : `one of ${LOCATION_PARTS_LIST}`}.` : rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
734
740
  const m = `Unknown attribute: ${rule.attribute}${dottedHint}`;
735
741
  throw new ValidationError(m, [{ path: ["attribute"], message: m }]);
736
742
  }
@@ -759,28 +765,30 @@ function validateQualifiedRule(rule, context) {
759
765
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, rootAttr.type);
760
766
  if (!ops.includes(normalizedOperator2)) {
761
767
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
762
- const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationQueryHint(rootAttr.type)}`;
768
+ const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationPartsHint(rootAttr.type)}`;
763
769
  throw new ValidationError(summary, [{ path: ["operator"], message: summary }]);
764
770
  }
765
771
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
766
772
  return;
767
773
  }
774
+ if (rootAttr.type === "location") {
775
+ if (rule.quantifier !== void 0) {
776
+ const m = "quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";
777
+ throw new ValidationError(m, [{ path: ["quantifier"], message: m }]);
778
+ }
779
+ if (!isLocationFilterProperty(rule.property)) {
780
+ const m = `Property "${rule.property}" is not a part of location "${rule.attribute}". Valid parts: ${LOCATION_PARTS_LIST}.`;
781
+ throw new ValidationError(m, [{ path: ["property"], message: m }]);
782
+ }
783
+ assertDynamicValueForAttribute(rule, "text");
784
+ const normalizedOperator2 = assertOperatorForType(rule.operator, "text", "property");
785
+ applyCanonicalForm(rule, normalizedOperator2, "text");
786
+ return;
787
+ }
768
788
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
769
- throw new ValidationError(
770
- withLocationQueryHint(
771
- `Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`,
772
- rootAttr.type
773
- ),
774
- [
775
- {
776
- path: ["property"],
777
- message: withLocationQueryHint(
778
- `Attribute "${rule.attribute}" is not a reference type`,
779
- rootAttr.type
780
- )
781
- }
782
- ]
783
- );
789
+ throw new ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
790
+ { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
791
+ ]);
784
792
  }
785
793
  const propSchema = rootAttr.properties;
786
794
  if (!propSchema) {
@@ -841,6 +849,9 @@ var RESERVED_OBJECT_NAMES = ["skill"];
841
849
  var createModeSchema = z.enum(["redirect", "inline", "peek"]);
842
850
  var nonEmptyStringArraySchema = z.array(z.string()).min(1);
843
851
  var columnsSchema = z.array(z.string()).max(SCHEMA_LIMITS.columnsPerTab);
852
+ var displayAttributesSchema = z.array(z.string().min(1)).max(SCHEMA_LIMITS.columnsPerTab).refine((names) => new Set(names).size === names.length, {
853
+ message: "Displayed attribute names must be unique"
854
+ });
844
855
  var sortRuleSchema = z.object({
845
856
  attribute: z.string(),
846
857
  direction: z.enum(["asc", "desc"])
@@ -1281,6 +1292,8 @@ var listTabCommonShape = {
1281
1292
  // required so configs stored before the field existed still parse.
1282
1293
  visibility: z.enum(LIST_VIEW_TAB_VISIBILITIES).default("all"),
1283
1294
  columns: columnsSchema,
1295
+ descriptionAttribute: z.string().min(1).optional(),
1296
+ displayAttributes: displayAttributesSchema.optional(),
1284
1297
  filters: filterGroupSchema.optional(),
1285
1298
  sorts: sortsSchema.optional(),
1286
1299
  readOnly: z.boolean().optional(),
@@ -1289,11 +1302,15 @@ var listTabCommonShape = {
1289
1302
  var listTableTabSchema = z.object({
1290
1303
  ...listTabCommonShape,
1291
1304
  layout: z.literal("table"),
1292
- columnSizing: z.record(z.string(), z.number()).optional()
1305
+ columnSizing: z.record(z.string(), z.number()).optional(),
1306
+ // Opted-in system views expose their immutable code grouping as an inert
1307
+ // hint so Architect can return to Kanban after a saved layout change.
1308
+ groupByAttribute: z.string().min(1).optional()
1293
1309
  }).strict();
1294
1310
  var listKanbanTabSchema = z.object({
1295
1311
  ...listTabCommonShape,
1296
1312
  layout: z.literal("kanban"),
1313
+ columns: columnsSchema.default([]),
1297
1314
  groupByAttribute: z.string(),
1298
1315
  cardUserAttribute: z.string().optional(),
1299
1316
  cardDateAttribute: z.string().optional(),
@@ -1301,17 +1318,33 @@ var listKanbanTabSchema = z.object({
1301
1318
  kanbanColumnVisibility: z.record(z.string(), z.boolean()).optional(),
1302
1319
  kanbanPinnedColumns: z.array(z.string()).optional()
1303
1320
  }).strict();
1321
+ var listRowsTabSchema = z.object({
1322
+ ...listTabCommonShape,
1323
+ layout: z.literal("list"),
1324
+ columns: columnsSchema.default([]),
1325
+ columnSizing: z.record(z.string(), z.number()).optional(),
1326
+ groupByAttribute: z.string().min(1).optional()
1327
+ }).strict();
1304
1328
  var listViewTabSchema = z.discriminatedUnion("layout", [
1305
1329
  listTableTabSchema,
1330
+ listRowsTabSchema,
1306
1331
  listKanbanTabSchema
1307
1332
  ]);
1308
1333
  var _listViewConfigSchema = z.object({
1334
+ allowPresentationCustomization: z.boolean().optional(),
1309
1335
  defaultFilters: filterGroupSchema.optional(),
1310
1336
  tabs: z.array(listViewTabSchema).min(1).max(SCHEMA_LIMITS.tabsPerView)
1311
1337
  }).strict().superRefine((config, ctx) => {
1312
1338
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1313
1339
  let hasDefault = false;
1314
1340
  config.tabs.forEach((tab, index) => {
1341
+ if (tab.layout !== "kanban" && tab.groupByAttribute !== void 0 && config.allowPresentationCustomization !== true) {
1342
+ ctx.addIssue({
1343
+ code: "unrecognized_keys",
1344
+ keys: ["groupByAttribute"],
1345
+ path: ["tabs", index]
1346
+ });
1347
+ }
1315
1348
  if (!tab.default) return;
1316
1349
  if (hasDefault) {
1317
1350
  ctx.addIssue({
@@ -1396,4 +1429,4 @@ var LIST_TAB_KANBAN_KEYS = [
1396
1429
  "kanbanPinnedColumns"
1397
1430
  ];
1398
1431
 
1399
- export { ATTRIBUTE_FILTER_OPERATORS, LIST_TAB_KANBAN_KEYS, LIST_TAB_TABLE_KEYS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, columnsSchema, currentActor, detailTabDraftSchema, detailTabSchema, detailViewConfigSchema, extractCurrencyFilterValue, extractFilterValue, fieldSchema, fieldShape, fieldSlotSchema, filterGroupSchema, filterStateSchema, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, groupWriteSchema, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, sortsSchema, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema };
1432
+ export { ATTRIBUTE_FILTER_OPERATORS, LIST_TAB_KANBAN_KEYS, LIST_TAB_TABLE_KEYS, LIST_VIEW_TAB_VISIBILITIES, LOCATION_FILTER_PROPERTIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, columnsSchema, currentActor, detailTabDraftSchema, detailTabSchema, detailViewConfigSchema, displayAttributesSchema, extractCurrencyFilterValue, extractFilterValue, fieldSchema, fieldShape, fieldSlotSchema, filterGroupSchema, filterStateSchema, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, groupWriteSchema, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable, isDynamicValue, isLocationFilterProperty, isLocationPartOperator, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, sortsSchema, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
3
+ var chunk4KMUATDG_js = require('./chunk-4KMUATDG.js');
4
4
  var zod = require('zod');
5
5
  var constants = require('@stndrds/constants');
6
6
 
@@ -551,7 +551,7 @@ var attributeConfigSchemas = {
551
551
  function getAttributeConfigSchema(type) {
552
552
  const schema = attributeConfigSchemas[type];
553
553
  if (!schema) {
554
- throw new chunk3YCZ5H3H_js.ValidationError(`Unsupported attribute type: ${type}`, []);
554
+ throw new chunk4KMUATDG_js.ValidationError(`Unsupported attribute type: ${type}`, []);
555
555
  }
556
556
  return schema;
557
557
  }
@@ -575,7 +575,7 @@ function getAttributeConfigWriteSchema(type) {
575
575
  }
576
576
  }
577
577
  function validationErrorFromIssues(issues) {
578
- return chunk3YCZ5H3H_js.ValidationError.fromZodErrors(
578
+ return chunk4KMUATDG_js.ValidationError.fromZodErrors(
579
579
  issues.map((issue) => ({
580
580
  path: issue.path.map((segment) => typeof segment === "symbol" ? String(segment) : segment),
581
581
  message: issue.message
@@ -598,7 +598,7 @@ function validatePatchedIcon(patch) {
598
598
  }
599
599
  const result = iconNameSchema.optional().safeParse(patch.icon);
600
600
  if (!result.success) {
601
- throw chunk3YCZ5H3H_js.ValidationError.fromZodErrors(
601
+ throw chunk4KMUATDG_js.ValidationError.fromZodErrors(
602
602
  result.error.issues.map((issue) => ({
603
603
  path: [
604
604
  "icon",
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-7WEOBXXA.mjs';
1
+ import { ValidationError } from './chunk-CLZORRMS.mjs';
2
2
  import { z } from 'zod';
3
3
  import { ICONS, COLORS } from '@stndrds/constants';
4
4
 
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-7WEOBXXA.mjs';
1
+ import { ValidationError } from './chunk-CLZORRMS.mjs';
2
2
 
3
3
  // src/utils/canonical-json.ts
4
4
  function canonicalStringify(value) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk5JMQNH2A_js = require('./chunk-5JMQNH2A.js');
4
- var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
3
+ var chunkKAWYU7TE_js = require('./chunk-KAWYU7TE.js');
4
+ var chunk4KMUATDG_js = require('./chunk-4KMUATDG.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  // src/types/system-attributes.ts
@@ -155,6 +155,13 @@ var FORMULA_OPERATORS = [
155
155
  "is_empty",
156
156
  "is_not_empty"
157
157
  ];
158
+ var LOCATION_FILTER_PROPERTIES = ["city", "postalCode", "country"];
159
+ function isLocationFilterProperty(name) {
160
+ return LOCATION_FILTER_PROPERTIES.includes(name);
161
+ }
162
+ function isLocationPartOperator(operator) {
163
+ return TEXT_OPERATORS.includes(operator);
164
+ }
158
165
  var ATTRIBUTE_FILTER_OPERATORS = {
159
166
  text: TEXT_OPERATORS,
160
167
  richtext: [],
@@ -500,7 +507,7 @@ function canonicalizeFilterValue(rule, effectiveType) {
500
507
  const message = `Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(
501
508
  value
502
509
  )}`;
503
- throw new chunk3YCZ5H3H_js.ValidationError(message, [{ path: ["value"], message }]);
510
+ throw new chunk4KMUATDG_js.ValidationError(message, [{ path: ["value"], message }]);
504
511
  }
505
512
  function hasCurrencyAmount(value) {
506
513
  if (typeof value !== "object") return true;
@@ -663,13 +670,13 @@ function resolveCanonicalOperator(rawOperator, effectiveType) {
663
670
  const replacement = REMOVED_OPERATOR_REPLACEMENTS[rawOperator];
664
671
  if (replacement) {
665
672
  const m = `Unknown filter operator "${rawOperator}" \u2014 use ${replacement}`;
666
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
673
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["operator"], message: m }]);
667
674
  }
668
675
  const normalized = normalizeOperator(rawOperator);
669
676
  const membership = SUBSTRING_TO_MEMBERSHIP[normalized];
670
677
  if (membership && SET_MEMBERSHIP_TYPES.has(effectiveType)) {
671
678
  const m = `Operator "${normalized}" is not valid for type "${effectiveType}" \u2014 use "${membership}"`;
672
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
679
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["operator"], message: m }]);
673
680
  }
674
681
  return normalized;
675
682
  }
@@ -679,7 +686,7 @@ function assertOperatorForType(operator, type, context) {
679
686
  if (!ops?.includes(normalized)) {
680
687
  const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
681
688
  const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
682
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [
689
+ throw new chunk4KMUATDG_js.ValidationError(summary, [
683
690
  {
684
691
  path: ["operator"],
685
692
  message: summary
@@ -692,7 +699,7 @@ function assertRelativeDateValue(rule) {
692
699
  if (rule.operator !== "is_within") return;
693
700
  if (!isRelativeDateValue(rule.value)) {
694
701
  const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
695
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
702
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["value"], message: m }]);
696
703
  }
697
704
  }
698
705
  function applyCanonicalForm(rule, operator, effectiveType) {
@@ -705,26 +712,23 @@ function assertDynamicValueForAttribute(rule, attrType) {
705
712
  const v = rule.value;
706
713
  if (v.dynamic === "actor" && attrType !== "user") {
707
714
  const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
708
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
715
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["value"], message: m }]);
709
716
  }
710
717
  if (v.dynamic === "date" && attrType !== "date") {
711
718
  const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
712
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
719
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["value"], message: m }]);
713
720
  }
714
721
  }
715
- function locationQueryHint(type) {
716
- return type === "location" ? ' Location attributes cannot be filtered on their text \u2014 use the full-text "query" parameter to match a city, address or postal code.' : "";
717
- }
718
- function withLocationQueryHint(message, type) {
719
- const hint = locationQueryHint(type);
720
- return hint ? `${message}.${hint}` : message;
722
+ var LOCATION_PARTS_LIST = LOCATION_FILTER_PROPERTIES.map((part) => `"${part}"`).join(", ");
723
+ function locationPartsHint(type) {
724
+ return type === "location" ? ` A location is filtered on one of its parts: set "property" to one of ${LOCATION_PARTS_LIST} and use a text operator (e.g. contains).` : "";
721
725
  }
722
726
  function collectQualifiedRuleIssues(rule, context) {
723
727
  try {
724
728
  validateQualifiedRule({ ...rule }, context);
725
729
  return [];
726
730
  } catch (error) {
727
- if (!(error instanceof chunk3YCZ5H3H_js.ValidationError)) throw error;
731
+ if (!(error instanceof chunk4KMUATDG_js.ValidationError)) throw error;
728
732
  return error.errors.map((issue) => ({ ...issue, path: [...issue.path] }));
729
733
  }
730
734
  }
@@ -732,17 +736,19 @@ function validateQualifiedRule(rule, context) {
732
736
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
733
737
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
734
738
  if (!(rootAttr || systemOps)) {
735
- const dottedHint = rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
739
+ const [head, ...tail] = rule.attribute.split(".");
740
+ const dottedRoot = tail.length > 0 ? context.attributes.find((a) => a.name === head) : void 0;
741
+ const dottedHint = dottedRoot?.type === "location" ? ` Dotted paths are not supported \u2014 set "attribute" to "${head}" and "property" to ${isLocationFilterProperty(tail[0] ?? "") ? `"${tail[0]}"` : `one of ${LOCATION_PARTS_LIST}`}.` : rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
736
742
  const m = `Unknown attribute: ${rule.attribute}${dottedHint}`;
737
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["attribute"], message: m }]);
743
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["attribute"], message: m }]);
738
744
  }
739
745
  if (rule.quantifier !== void 0 && !rule.property) {
740
746
  const m = `quantifier is only valid on qualified edge rules (set "property")`;
741
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
747
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
742
748
  }
743
749
  if (!rootAttr) {
744
750
  if (rule.property) {
745
- throw new chunk3YCZ5H3H_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
751
+ throw new chunk4KMUATDG_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
746
752
  { path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
747
753
  ]);
748
754
  }
@@ -750,7 +756,7 @@ function validateQualifiedRule(rule, context) {
750
756
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, effectiveType);
751
757
  if (!systemOps.includes(normalizedOperator2)) {
752
758
  const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
753
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
759
+ throw new chunk4KMUATDG_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
754
760
  }
755
761
  applyCanonicalForm(rule, normalizedOperator2, effectiveType);
756
762
  return;
@@ -761,38 +767,40 @@ function validateQualifiedRule(rule, context) {
761
767
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, rootAttr.type);
762
768
  if (!ops.includes(normalizedOperator2)) {
763
769
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
764
- const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationQueryHint(rootAttr.type)}`;
765
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
770
+ const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationPartsHint(rootAttr.type)}`;
771
+ throw new chunk4KMUATDG_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
766
772
  }
767
773
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
768
774
  return;
769
775
  }
776
+ if (rootAttr.type === "location") {
777
+ if (rule.quantifier !== void 0) {
778
+ const m = "quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";
779
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
780
+ }
781
+ if (!isLocationFilterProperty(rule.property)) {
782
+ const m = `Property "${rule.property}" is not a part of location "${rule.attribute}". Valid parts: ${LOCATION_PARTS_LIST}.`;
783
+ throw new chunk4KMUATDG_js.ValidationError(m, [{ path: ["property"], message: m }]);
784
+ }
785
+ assertDynamicValueForAttribute(rule, "text");
786
+ const normalizedOperator2 = assertOperatorForType(rule.operator, "text", "property");
787
+ applyCanonicalForm(rule, normalizedOperator2, "text");
788
+ return;
789
+ }
770
790
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
771
- throw new chunk3YCZ5H3H_js.ValidationError(
772
- withLocationQueryHint(
773
- `Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`,
774
- rootAttr.type
775
- ),
776
- [
777
- {
778
- path: ["property"],
779
- message: withLocationQueryHint(
780
- `Attribute "${rule.attribute}" is not a reference type`,
781
- rootAttr.type
782
- )
783
- }
784
- ]
785
- );
791
+ throw new chunk4KMUATDG_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
792
+ { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
793
+ ]);
786
794
  }
787
795
  const propSchema = rootAttr.properties;
788
796
  if (!propSchema) {
789
- throw new chunk3YCZ5H3H_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
797
+ throw new chunk4KMUATDG_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
790
798
  { path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
791
799
  ]);
792
800
  }
793
801
  const propDef = propSchema.definitions.find((p) => p.name === rule.property);
794
802
  if (!propDef) {
795
- throw new chunk3YCZ5H3H_js.ValidationError(
803
+ throw new chunk4KMUATDG_js.ValidationError(
796
804
  `Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
797
805
  [{ path: ["property"], message: `Unknown property: ${rule.property}` }]
798
806
  );
@@ -808,7 +816,7 @@ function parseResourceVisibility(value) {
808
816
  if (typeof value === "string" && RESOURCE_VISIBILITIES.includes(value)) {
809
817
  return value;
810
818
  }
811
- throw new chunk3YCZ5H3H_js.ValidationError(
819
+ throw new chunk4KMUATDG_js.ValidationError(
812
820
  `visibility must be one of: ${RESOURCE_VISIBILITIES.join(", ")} (received: ${String(value)})`,
813
821
  []
814
822
  );
@@ -842,12 +850,15 @@ var RESERVED_OBJECT_NAMES = ["skill"];
842
850
  // src/validators/view-config.schema.ts
843
851
  var createModeSchema = zod.z.enum(["redirect", "inline", "peek"]);
844
852
  var nonEmptyStringArraySchema = zod.z.array(zod.z.string()).min(1);
845
- var columnsSchema = zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.columnsPerTab);
853
+ var columnsSchema = zod.z.array(zod.z.string()).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.columnsPerTab);
854
+ var displayAttributesSchema = zod.z.array(zod.z.string().min(1)).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.columnsPerTab).refine((names) => new Set(names).size === names.length, {
855
+ message: "Displayed attribute names must be unique"
856
+ });
846
857
  var sortRuleSchema = zod.z.object({
847
858
  attribute: zod.z.string(),
848
859
  direction: zod.z.enum(["asc", "desc"])
849
860
  }).strict();
850
- var sortsSchema = zod.z.array(sortRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sortsPerTab);
861
+ var sortsSchema = zod.z.array(sortRuleSchema).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.sortsPerTab);
851
862
  var relativeDateValueSchema = zod.z.object({
852
863
  amount: zod.z.number(),
853
864
  unit: zod.z.enum(["days", "weeks", "months", "years"]),
@@ -921,7 +932,7 @@ var filterRuleSchema = zod.z.object({
921
932
  operator: filterOperatorSchema,
922
933
  value: filterValueSchema
923
934
  }).strict();
924
- var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.filterRulesPerTab);
935
+ var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.filterRulesPerTab);
925
936
  var filterStateSchema = zod.z.object({
926
937
  combinator: zod.z.enum(["and", "or"]),
927
938
  rules: filterRulesSchema
@@ -1012,17 +1023,17 @@ var baseGroupShape = {
1012
1023
  var fieldGroupWriteSchema = zod.z.object({
1013
1024
  ...baseGroupShape,
1014
1025
  type: zod.z.literal("fields"),
1015
- fields: zod.z.array(fieldSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerGroup)
1026
+ fields: zod.z.array(fieldSchema).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.fieldsPerGroup)
1016
1027
  }).strict();
1017
1028
  var groupWriteSchema = fieldGroupWriteSchema;
1018
1029
  var baseTabShape = {
1019
1030
  id: zod.z.string(),
1020
1031
  name: zod.z.string(),
1021
1032
  label: zod.z.string(),
1022
- icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1033
+ icon: chunkKAWYU7TE_js.iconNameSchema.optional(),
1023
1034
  order: zod.z.number().optional()
1024
1035
  };
1025
- var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.groupsPerFormTab);
1036
+ var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.groupsPerFormTab);
1026
1037
  var formTabShape = {
1027
1038
  ...baseTabShape,
1028
1039
  type: zod.z.literal("form"),
@@ -1037,13 +1048,13 @@ function refineFormTab(tab, ctx) {
1037
1048
  (count, group) => count + (group.type === "fields" ? group.fields.length : 0),
1038
1049
  0
1039
1050
  );
1040
- if (totalFields > chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1051
+ if (totalFields > chunkKAWYU7TE_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1041
1052
  ctx.addIssue({
1042
1053
  code: "too_big",
1043
1054
  origin: "array",
1044
- maximum: chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab,
1055
+ maximum: chunkKAWYU7TE_js.SCHEMA_LIMITS.fieldsPerFormTab,
1045
1056
  inclusive: true,
1046
- message: `A form tab can contain at most ${chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1057
+ message: `A form tab can contain at most ${chunkKAWYU7TE_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1047
1058
  path: ["groups"]
1048
1059
  });
1049
1060
  }
@@ -1247,12 +1258,12 @@ var formsTabSchema = zod.z.object({
1247
1258
  var emailsTabSchema = zod.z.object({
1248
1259
  ...baseTabShape,
1249
1260
  type: zod.z.literal("emails"),
1250
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1261
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.emailAttributesPerTab)
1251
1262
  }).strict();
1252
1263
  var meetingsTabSchema = zod.z.object({
1253
1264
  ...baseTabShape,
1254
1265
  type: zod.z.literal("meetings"),
1255
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1266
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.emailAttributesPerTab)
1256
1267
  }).strict();
1257
1268
  var nonFormDetailTabSchemas = [
1258
1269
  tableTabSchema,
@@ -1275,7 +1286,7 @@ var detailTabDraftSchema = zod.z.discriminatedUnion("type", [
1275
1286
  var listTabCommonShape = {
1276
1287
  id: zod.z.string(),
1277
1288
  label: zod.z.string(),
1278
- icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1289
+ icon: chunkKAWYU7TE_js.iconNameSchema.optional(),
1279
1290
  default: zod.z.boolean().optional(),
1280
1291
  // Which records the tab scopes to. `"all"` is the default and means "impose
1281
1292
  // no scope" — the mandatory viewer predicate alone decides, so the tab shows
@@ -1283,6 +1294,8 @@ var listTabCommonShape = {
1283
1294
  // required so configs stored before the field existed still parse.
1284
1295
  visibility: zod.z.enum(LIST_VIEW_TAB_VISIBILITIES).default("all"),
1285
1296
  columns: columnsSchema,
1297
+ descriptionAttribute: zod.z.string().min(1).optional(),
1298
+ displayAttributes: displayAttributesSchema.optional(),
1286
1299
  filters: filterGroupSchema.optional(),
1287
1300
  sorts: sortsSchema.optional(),
1288
1301
  readOnly: zod.z.boolean().optional(),
@@ -1291,11 +1304,15 @@ var listTabCommonShape = {
1291
1304
  var listTableTabSchema = zod.z.object({
1292
1305
  ...listTabCommonShape,
1293
1306
  layout: zod.z.literal("table"),
1294
- columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional()
1307
+ columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
1308
+ // Opted-in system views expose their immutable code grouping as an inert
1309
+ // hint so Architect can return to Kanban after a saved layout change.
1310
+ groupByAttribute: zod.z.string().min(1).optional()
1295
1311
  }).strict();
1296
1312
  var listKanbanTabSchema = zod.z.object({
1297
1313
  ...listTabCommonShape,
1298
1314
  layout: zod.z.literal("kanban"),
1315
+ columns: columnsSchema.default([]),
1299
1316
  groupByAttribute: zod.z.string(),
1300
1317
  cardUserAttribute: zod.z.string().optional(),
1301
1318
  cardDateAttribute: zod.z.string().optional(),
@@ -1303,17 +1320,33 @@ var listKanbanTabSchema = zod.z.object({
1303
1320
  kanbanColumnVisibility: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
1304
1321
  kanbanPinnedColumns: zod.z.array(zod.z.string()).optional()
1305
1322
  }).strict();
1323
+ var listRowsTabSchema = zod.z.object({
1324
+ ...listTabCommonShape,
1325
+ layout: zod.z.literal("list"),
1326
+ columns: columnsSchema.default([]),
1327
+ columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
1328
+ groupByAttribute: zod.z.string().min(1).optional()
1329
+ }).strict();
1306
1330
  var listViewTabSchema = zod.z.discriminatedUnion("layout", [
1307
1331
  listTableTabSchema,
1332
+ listRowsTabSchema,
1308
1333
  listKanbanTabSchema
1309
1334
  ]);
1310
1335
  var _listViewConfigSchema = zod.z.object({
1336
+ allowPresentationCustomization: zod.z.boolean().optional(),
1311
1337
  defaultFilters: filterGroupSchema.optional(),
1312
- tabs: zod.z.array(listViewTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView)
1338
+ tabs: zod.z.array(listViewTabSchema).min(1).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.tabsPerView)
1313
1339
  }).strict().superRefine((config, ctx) => {
1314
1340
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1315
1341
  let hasDefault = false;
1316
1342
  config.tabs.forEach((tab, index) => {
1343
+ if (tab.layout !== "kanban" && tab.groupByAttribute !== void 0 && config.allowPresentationCustomization !== true) {
1344
+ ctx.addIssue({
1345
+ code: "unrecognized_keys",
1346
+ keys: ["groupByAttribute"],
1347
+ path: ["tabs", index]
1348
+ });
1349
+ }
1317
1350
  if (!tab.default) return;
1318
1351
  if (hasDefault) {
1319
1352
  ctx.addIssue({
@@ -1330,7 +1363,7 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1330
1363
  kind: zod.z.literal("fields"),
1331
1364
  id: zod.z.string().optional(),
1332
1365
  label: zod.z.string().optional(),
1333
- attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes)
1366
+ attributes: zod.z.array(zod.z.string()).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.sidePanelAttributes)
1334
1367
  }).strict(),
1335
1368
  zod.z.object({
1336
1369
  kind: zod.z.literal("activity"),
@@ -1349,10 +1382,10 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1349
1382
  }).strict()
1350
1383
  ]);
1351
1384
  var _detailViewConfigSchema = zod.z.object({
1352
- tabs: zod.z.array(detailTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView),
1385
+ tabs: zod.z.array(detailTabSchema).min(1).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.tabsPerView),
1353
1386
  sidePanel: zod.z.object({
1354
- attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1355
- panes: zod.z.array(sidePanelPaneSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1387
+ attributes: zod.z.array(zod.z.string()).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1388
+ panes: zod.z.array(sidePanelPaneSchema).max(chunkKAWYU7TE_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1356
1389
  width: zod.z.number().optional()
1357
1390
  }).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
1358
1391
  message: "sidePanel requires attributes or panes"
@@ -1402,6 +1435,7 @@ exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
1402
1435
  exports.LIST_TAB_KANBAN_KEYS = LIST_TAB_KANBAN_KEYS;
1403
1436
  exports.LIST_TAB_TABLE_KEYS = LIST_TAB_TABLE_KEYS;
1404
1437
  exports.LIST_VIEW_TAB_VISIBILITIES = LIST_VIEW_TAB_VISIBILITIES;
1438
+ exports.LOCATION_FILTER_PROPERTIES = LOCATION_FILTER_PROPERTIES;
1405
1439
  exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS;
1406
1440
  exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
1407
1441
  exports.REMOVED_OPERATOR_REPLACEMENTS = REMOVED_OPERATOR_REPLACEMENTS;
@@ -1420,6 +1454,7 @@ exports.currentActor = currentActor;
1420
1454
  exports.detailTabDraftSchema = detailTabDraftSchema;
1421
1455
  exports.detailTabSchema = detailTabSchema;
1422
1456
  exports.detailViewConfigSchema = detailViewConfigSchema;
1457
+ exports.displayAttributesSchema = displayAttributesSchema;
1423
1458
  exports.extractCurrencyFilterValue = extractCurrencyFilterValue;
1424
1459
  exports.extractFilterValue = extractFilterValue;
1425
1460
  exports.fieldSchema = fieldSchema;
@@ -1441,6 +1476,8 @@ exports.isAttributeKanbanGroupable = isAttributeKanbanGroupable;
1441
1476
  exports.isAttributeSearchable = isAttributeSearchable;
1442
1477
  exports.isAttributeSortable = isAttributeSortable;
1443
1478
  exports.isDynamicValue = isDynamicValue;
1479
+ exports.isLocationFilterProperty = isLocationFilterProperty;
1480
+ exports.isLocationPartOperator = isLocationPartOperator;
1444
1481
  exports.isManagedSystemAttribute = isManagedSystemAttribute;
1445
1482
  exports.isNoValueOperator = isNoValueOperator;
1446
1483
  exports.isRelativeDateValue = isRelativeDateValue;
@@ -96,10 +96,13 @@ declare const SchemaErrorCode: {
96
96
  readonly AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED";
97
97
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
98
98
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
99
+ readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
100
+ readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
99
101
  readonly AI_UNKNOWN: "AI_UNKNOWN";
100
102
  readonly AI_USAGE_LIMIT_EXCEEDED: "AI_USAGE_LIMIT_EXCEEDED";
101
103
  readonly AI_INVALID_USAGE: "AI_INVALID_USAGE";
102
104
  readonly AI_INVALID_MODEL: "AI_INVALID_MODEL";
105
+ readonly AI_INVALID_MODEL_INPUT: "AI_INVALID_MODEL_INPUT";
103
106
  readonly AI_REPOSITORY_ERROR: "AI_REPOSITORY_ERROR";
104
107
  readonly AI_GENERATION_FAILED: "AI_GENERATION_FAILED";
105
108
  readonly DOCUMENT_MIME_NOT_ACCEPTED: "DOCUMENT_MIME_NOT_ACCEPTED";
@@ -131,6 +134,10 @@ declare const SchemaErrorCode: {
131
134
  readonly REFLEX_DEPENDENCY_DRIFT: "REFLEX_DEPENDENCY_DRIFT";
132
135
  readonly REFLEX_NOT_READY: "REFLEX_NOT_READY";
133
136
  readonly REFLEX_INVARIANT_VIOLATION: "REFLEX_INVARIANT_VIOLATION";
137
+ /** The embeddings feature is enabled but no Gateway credential is configured. */
138
+ readonly EMBEDDING_MODEL_UNAVAILABLE: "EMBEDDING_MODEL_UNAVAILABLE";
139
+ /** The provider returned vectors whose length differs from the configured dimensions. */
140
+ readonly EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH";
134
141
  };
135
142
  type SchemaErrorCode = (typeof SchemaErrorCode)[keyof typeof SchemaErrorCode];
136
143
  /**