@stndrds/schema 1.0.0-alpha.281 → 1.0.0-alpha.282

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 (75) hide show
  1. package/dist/{all-BVp3k9Hi.d.ts → all-C3EaFLCU.d.ts} +4 -3
  2. package/dist/{all-CnIU2anT.d.mts → all-CQMswOrw.d.mts} +4 -3
  3. package/dist/{attributes-D8eHv5Kf.d.ts → attributes-CU871AfG.d.ts} +12 -12
  4. package/dist/{attributes--M1ifW8_.d.mts → attributes-DoiGyNFk.d.mts} +12 -12
  5. package/dist/{chunk-LRFLSFIA.js → chunk-DIMTNM3F.js} +7 -3
  6. package/dist/{chunk-XCLVXM7F.mjs → chunk-EFSS7PGC.mjs} +1 -1
  7. package/dist/{chunk-SYQDFZ74.mjs → chunk-HOVUEYEQ.mjs} +32 -0
  8. package/dist/{chunk-TU6ECJFZ.js → chunk-KIMECN6D.js} +65 -35
  9. package/dist/{chunk-HWZRSXFB.js → chunk-L4KLYMUI.js} +32 -0
  10. package/dist/{chunk-OYHBQMC7.js → chunk-LBGLB443.js} +3 -3
  11. package/dist/{chunk-MLTXSBOB.mjs → chunk-PLTLAMWJ.mjs} +1 -1
  12. package/dist/{chunk-ORPCS24B.mjs → chunk-QGRYOIHT.mjs} +34 -4
  13. package/dist/{chunk-A5PPZ2FM.mjs → chunk-R34LOMT7.mjs} +5 -1
  14. package/dist/{chunk-E47WAI5K.js → chunk-V4MZOTLV.js} +4 -4
  15. package/dist/exceptions.d.mts +20 -3
  16. package/dist/exceptions.d.ts +20 -3
  17. package/dist/exceptions.js +39 -39
  18. package/dist/exceptions.mjs +1 -1
  19. package/dist/{helpers-DyoPqiSz.d.ts → helpers-BNr-Dppk.d.ts} +3 -3
  20. package/dist/{helpers-BiABdSxK.d.mts → helpers-CfEOUBmB.d.mts} +3 -3
  21. package/dist/{index-TMlrIKAY.d.ts → index-Br7koyHF.d.ts} +41 -6
  22. package/dist/{index-DWoqObyG.d.mts → index-D9XBjFnu.d.mts} +41 -6
  23. package/dist/index.d.mts +320 -83
  24. package/dist/index.d.ts +320 -83
  25. package/dist/index.js +459 -251
  26. package/dist/index.mjs +229 -31
  27. package/dist/{migrations-B1kkIhIX.d.ts → migrations-BGWgXHXb.d.ts} +1 -1
  28. package/dist/{migrations-BNlQVzDC.d.mts → migrations-C-GN1xx_.d.mts} +1 -1
  29. package/dist/{objects-DmMqHn3L.d.mts → objects-BRypaBpi.d.mts} +2 -4
  30. package/dist/{objects-DgFojgwH.d.ts → objects-BiOMwzLL.d.ts} +2 -4
  31. package/dist/{types-DHqXzkgW.d.mts → types-80c2rOUZ.d.mts} +1 -1
  32. package/dist/{types-DYYFto8d.d.ts → types-DqYz8Iv_.d.ts} +1 -1
  33. package/dist/utils.js +8 -8
  34. package/dist/utils.mjs +2 -2
  35. package/dist/validation/all.d.mts +7 -7
  36. package/dist/validation/all.d.ts +7 -7
  37. package/dist/validation/all.js +29 -29
  38. package/dist/validation/all.mjs +4 -4
  39. package/dist/validation/complex/currency.d.mts +2 -2
  40. package/dist/validation/complex/currency.d.ts +2 -2
  41. package/dist/validation/complex/location.d.mts +2 -2
  42. package/dist/validation/complex/location.d.ts +2 -2
  43. package/dist/validation/complex/phone.d.mts +2 -2
  44. package/dist/validation/complex/phone.d.ts +2 -2
  45. package/dist/validation/complex/relation.d.mts +2 -2
  46. package/dist/validation/complex/relation.d.ts +2 -2
  47. package/dist/validation/complex/richtext.d.mts +2 -2
  48. package/dist/validation/complex/richtext.d.ts +2 -2
  49. package/dist/validation/complex/select.d.mts +2 -2
  50. package/dist/validation/complex/select.d.ts +2 -2
  51. package/dist/validation/complex/user.d.mts +2 -2
  52. package/dist/validation/complex/user.d.ts +2 -2
  53. package/dist/validation/computed/formula.d.mts +2 -2
  54. package/dist/validation/computed/formula.d.ts +2 -2
  55. package/dist/validation/computed/rollup.d.mts +2 -2
  56. package/dist/validation/computed/rollup.d.ts +2 -2
  57. package/dist/validation/config/index.d.mts +4 -4
  58. package/dist/validation/config/index.d.ts +4 -4
  59. package/dist/validation/config/index.js +11 -11
  60. package/dist/validation/config/index.mjs +2 -2
  61. package/dist/validation/core/index.d.mts +3 -3
  62. package/dist/validation/core/index.d.ts +3 -3
  63. package/dist/validation/object/index.d.mts +5 -5
  64. package/dist/validation/object/index.d.ts +5 -5
  65. package/dist/validation/object/index.js +14 -14
  66. package/dist/validation/object/index.mjs +2 -2
  67. package/dist/validation/primitives/checkbox.d.mts +2 -2
  68. package/dist/validation/primitives/checkbox.d.ts +2 -2
  69. package/dist/validation/primitives/date.d.mts +2 -2
  70. package/dist/validation/primitives/date.d.ts +2 -2
  71. package/dist/validation/primitives/number.d.mts +2 -2
  72. package/dist/validation/primitives/number.d.ts +2 -2
  73. package/dist/validation/primitives/text.d.mts +2 -2
  74. package/dist/validation/primitives/text.d.ts +2 -2
  75. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
- import './types-DYYFto8d.js';
1
+ import './types-DqYz8Iv_.js';
2
2
  import './validation/core/index.js';
3
- import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-TMlrIKAY.js';
3
+ import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-Br7koyHF.js';
4
4
  import { z } from 'zod';
5
- import './helpers-DyoPqiSz.js';
5
+ import './helpers-BNr-Dppk.js';
6
6
 
7
7
  declare const SCHEMA_LIMITS: {
8
8
  readonly attributesPerObject: 300;
@@ -13,6 +13,7 @@ declare const SCHEMA_LIMITS: {
13
13
  readonly columnsPerTab: 50;
14
14
  readonly optionsPerAttribute: 200;
15
15
  readonly sidePanelAttributes: 100;
16
+ readonly sidePanelPanes: 20;
16
17
  readonly filterRulesPerTab: 50;
17
18
  readonly sortsPerTab: 20;
18
19
  readonly emailAttributesPerTab: 30;
@@ -1,8 +1,8 @@
1
- import './types-DHqXzkgW.mjs';
1
+ import './types-80c2rOUZ.mjs';
2
2
  import './validation/core/index.mjs';
3
- import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-DWoqObyG.mjs';
3
+ import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-D9XBjFnu.mjs';
4
4
  import { z } from 'zod';
5
- import './helpers-BiABdSxK.mjs';
5
+ import './helpers-CfEOUBmB.mjs';
6
6
 
7
7
  declare const SCHEMA_LIMITS: {
8
8
  readonly attributesPerObject: 300;
@@ -13,6 +13,7 @@ declare const SCHEMA_LIMITS: {
13
13
  readonly columnsPerTab: 50;
14
14
  readonly optionsPerAttribute: 200;
15
15
  readonly sidePanelAttributes: 100;
16
+ readonly sidePanelPanes: 20;
16
17
  readonly filterRulesPerTab: 50;
17
18
  readonly sortsPerTab: 20;
18
19
  readonly emailAttributesPerTab: 30;
@@ -36,22 +36,11 @@ type ComputedValueType = {
36
36
  kind: "collection";
37
37
  itemType: "text" | "number" | "boolean" | "date" | "select";
38
38
  };
39
- type ComputedStateStatus = "pending" | "fresh" | "stale" | "failed";
40
39
  interface ComputedOptionsSource {
41
40
  objectName: string;
42
41
  attributeName: string;
43
42
  attributeId?: string;
44
43
  }
45
- interface ComputedAttributeState {
46
- attributeName: string;
47
- status: ComputedStateStatus;
48
- computedAt: Date | null;
49
- staleSince: Date | null;
50
- dependenciesHash: string | null;
51
- jobId: string | null;
52
- error: string | null;
53
- updatedAt: Date;
54
- }
55
44
  type ComputedDependency = {
56
45
  kind: "local";
57
46
  attributeName: string;
@@ -530,6 +519,17 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
530
519
  * Used when function="original" to render values as the target type
531
520
  */
532
521
  targetAttributeType?: AttributeType;
522
+ /**
523
+ * Cached currency code of a currency target, from its `defaultCurrency`
524
+ * (#2644). The stored rollup value stays a bare number; this is the
525
+ * schema-derived channel that lets a single-code sum/avg render with its
526
+ * symbol. Absent → the value renders bare, exactly as before.
527
+ *
528
+ * Named for what it holds — an ISO 4217 CODE — rather than the siblings'
529
+ * `targetAttribute*` prefix: `targetAttributeCurrency` would read as a
530
+ * `Currency` value, which this deliberately is not.
531
+ */
532
+ targetCurrencyCode?: CurrencyCode;
533
533
  /**
534
534
  * Cached options from target attribute (for select/status/multiselect display)
535
535
  * Required when function="original" and target is a select-like type
@@ -580,4 +580,4 @@ declare function isAttributeSortable(attr: {
580
580
  type: AttributeType;
581
581
  }): boolean;
582
582
 
583
- export { type NumberUnit as $, type Attribute as A, type BilateralConfig as B, type CurrencyAttribute as C, type DateAttribute as D, type UserReferenceType as E, type FormulaAttribute as F, type AttributeGroup as G, type BaseAttribute as H, type ComputedFieldKind as I, type ComputedFormulaBinaryNode as J, type ComputedFormulaBinaryOperator as K, type LocationAttribute as L, type MultiRelationAttribute as M, type NumberAttribute as N, type Option as O, type PhoneAttribute as P, type ComputedFormulaCallNode as Q, type RelationAttribute as R, type SingleRelationAttribute as S, type TextAttribute as T, type UserAttribute as U, type ComputedFormulaLiteralNode as V, ComputedFormulaParseError as W, type ComputedFormulaPathNode as X, type ComputedStateStatus as Y, type DateFormat as Z, type DateValue as _, type RichtextAttribute as a, type OptionPropertyAttribute as a0, type PropertyType as a1, RELATION_TARGET_ANY as a2, type RichTextAttribute as a3, type StatusGroup as a4, hasOptions as a5, inferInverseCardinality as a6, isAttributeSortable as a7, isBilateralRelation as a8, isUniversalRelation as a9, parseComputedFormula as aa, resolvePropertyDefinitions as ab, type MultiselectAttribute as b, type SelectAttribute as c, type StatusAttribute as d, type RollupAttribute as e, type AttributeType as f, type CheckboxAttribute as g, type ComputedAttributeState as h, type ComputedValueType as i, type ComputedReturnType as j, type ComputedOptionsSource as k, type ComputedDependency as l, type ComputedPlan as m, type ComputedFormulaAstNode as n, type LocationGranularity as o, type Location as p, type DateRangeValue as q, type DocumentAttribute as r, type Phone as s, type Currency as t, type PropertySchema as u, type TimeFormat as v, type PropertyAttribute as w, type FormulaReturnType as x, type RelationTarget as y, type RollupFunction as z };
583
+ export { type PropertyType as $, type Attribute as A, type BilateralConfig as B, type CurrencyAttribute as C, type DateAttribute as D, type AttributeGroup as E, type FormulaAttribute as F, type BaseAttribute as G, type ComputedFieldKind as H, type ComputedFormulaBinaryNode as I, type ComputedFormulaBinaryOperator as J, type ComputedFormulaCallNode as K, type LocationAttribute as L, type MultiRelationAttribute as M, type NumberAttribute as N, type Option as O, type PhoneAttribute as P, type ComputedFormulaLiteralNode as Q, type RelationAttribute as R, type SingleRelationAttribute as S, type TextAttribute as T, type UserAttribute as U, ComputedFormulaParseError as V, type ComputedFormulaPathNode as W, type DateFormat as X, type DateValue as Y, type NumberUnit as Z, type OptionPropertyAttribute as _, type RichtextAttribute as a, RELATION_TARGET_ANY as a0, type RichTextAttribute as a1, type StatusGroup as a2, hasOptions as a3, inferInverseCardinality as a4, isAttributeSortable as a5, isBilateralRelation as a6, isUniversalRelation as a7, parseComputedFormula as a8, resolvePropertyDefinitions as a9, type MultiselectAttribute as b, type SelectAttribute as c, type StatusAttribute as d, type RollupAttribute as e, type AttributeType as f, type CheckboxAttribute as g, type ComputedValueType as h, type ComputedReturnType as i, type ComputedOptionsSource as j, type ComputedDependency as k, type ComputedPlan as l, type ComputedFormulaAstNode as m, type LocationGranularity as n, type Location as o, type DateRangeValue as p, type DocumentAttribute as q, type Phone as r, type Currency as s, type PropertySchema as t, type TimeFormat as u, type PropertyAttribute as v, type FormulaReturnType as w, type RelationTarget as x, type RollupFunction as y, type UserReferenceType as z };
@@ -36,22 +36,11 @@ type ComputedValueType = {
36
36
  kind: "collection";
37
37
  itemType: "text" | "number" | "boolean" | "date" | "select";
38
38
  };
39
- type ComputedStateStatus = "pending" | "fresh" | "stale" | "failed";
40
39
  interface ComputedOptionsSource {
41
40
  objectName: string;
42
41
  attributeName: string;
43
42
  attributeId?: string;
44
43
  }
45
- interface ComputedAttributeState {
46
- attributeName: string;
47
- status: ComputedStateStatus;
48
- computedAt: Date | null;
49
- staleSince: Date | null;
50
- dependenciesHash: string | null;
51
- jobId: string | null;
52
- error: string | null;
53
- updatedAt: Date;
54
- }
55
44
  type ComputedDependency = {
56
45
  kind: "local";
57
46
  attributeName: string;
@@ -530,6 +519,17 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
530
519
  * Used when function="original" to render values as the target type
531
520
  */
532
521
  targetAttributeType?: AttributeType;
522
+ /**
523
+ * Cached currency code of a currency target, from its `defaultCurrency`
524
+ * (#2644). The stored rollup value stays a bare number; this is the
525
+ * schema-derived channel that lets a single-code sum/avg render with its
526
+ * symbol. Absent → the value renders bare, exactly as before.
527
+ *
528
+ * Named for what it holds — an ISO 4217 CODE — rather than the siblings'
529
+ * `targetAttribute*` prefix: `targetAttributeCurrency` would read as a
530
+ * `Currency` value, which this deliberately is not.
531
+ */
532
+ targetCurrencyCode?: CurrencyCode;
533
533
  /**
534
534
  * Cached options from target attribute (for select/status/multiselect display)
535
535
  * Required when function="original" and target is a select-like type
@@ -580,4 +580,4 @@ declare function isAttributeSortable(attr: {
580
580
  type: AttributeType;
581
581
  }): boolean;
582
582
 
583
- export { type NumberUnit as $, type Attribute as A, type BilateralConfig as B, type CurrencyAttribute as C, type DateAttribute as D, type UserReferenceType as E, type FormulaAttribute as F, type AttributeGroup as G, type BaseAttribute as H, type ComputedFieldKind as I, type ComputedFormulaBinaryNode as J, type ComputedFormulaBinaryOperator as K, type LocationAttribute as L, type MultiRelationAttribute as M, type NumberAttribute as N, type Option as O, type PhoneAttribute as P, type ComputedFormulaCallNode as Q, type RelationAttribute as R, type SingleRelationAttribute as S, type TextAttribute as T, type UserAttribute as U, type ComputedFormulaLiteralNode as V, ComputedFormulaParseError as W, type ComputedFormulaPathNode as X, type ComputedStateStatus as Y, type DateFormat as Z, type DateValue as _, type RichtextAttribute as a, type OptionPropertyAttribute as a0, type PropertyType as a1, RELATION_TARGET_ANY as a2, type RichTextAttribute as a3, type StatusGroup as a4, hasOptions as a5, inferInverseCardinality as a6, isAttributeSortable as a7, isBilateralRelation as a8, isUniversalRelation as a9, parseComputedFormula as aa, resolvePropertyDefinitions as ab, type MultiselectAttribute as b, type SelectAttribute as c, type StatusAttribute as d, type RollupAttribute as e, type AttributeType as f, type CheckboxAttribute as g, type ComputedAttributeState as h, type ComputedValueType as i, type ComputedReturnType as j, type ComputedOptionsSource as k, type ComputedDependency as l, type ComputedPlan as m, type ComputedFormulaAstNode as n, type LocationGranularity as o, type Location as p, type DateRangeValue as q, type DocumentAttribute as r, type Phone as s, type Currency as t, type PropertySchema as u, type TimeFormat as v, type PropertyAttribute as w, type FormulaReturnType as x, type RelationTarget as y, type RollupFunction as z };
583
+ export { type PropertyType as $, type Attribute as A, type BilateralConfig as B, type CurrencyAttribute as C, type DateAttribute as D, type AttributeGroup as E, type FormulaAttribute as F, type BaseAttribute as G, type ComputedFieldKind as H, type ComputedFormulaBinaryNode as I, type ComputedFormulaBinaryOperator as J, type ComputedFormulaCallNode as K, type LocationAttribute as L, type MultiRelationAttribute as M, type NumberAttribute as N, type Option as O, type PhoneAttribute as P, type ComputedFormulaLiteralNode as Q, type RelationAttribute as R, type SingleRelationAttribute as S, type TextAttribute as T, type UserAttribute as U, ComputedFormulaParseError as V, type ComputedFormulaPathNode as W, type DateFormat as X, type DateValue as Y, type NumberUnit as Z, type OptionPropertyAttribute as _, type RichtextAttribute as a, RELATION_TARGET_ANY as a0, type RichTextAttribute as a1, type StatusGroup as a2, hasOptions as a3, inferInverseCardinality as a4, isAttributeSortable as a5, isBilateralRelation as a6, isUniversalRelation as a7, parseComputedFormula as a8, resolvePropertyDefinitions as a9, type MultiselectAttribute as b, type SelectAttribute as c, type StatusAttribute as d, type RollupAttribute as e, type AttributeType as f, type CheckboxAttribute as g, type ComputedValueType as h, type ComputedReturnType as i, type ComputedOptionsSource as j, type ComputedDependency as k, type ComputedPlan as l, type ComputedFormulaAstNode as m, type LocationGranularity as n, type Location as o, type DateRangeValue as p, type DocumentAttribute as q, type Phone as r, type Currency as s, type PropertySchema as t, type TimeFormat as u, type PropertyAttribute as v, type FormulaReturnType as w, type RelationTarget as x, type RollupFunction as y, type UserReferenceType as z };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHWZRSXFB_js = require('./chunk-HWZRSXFB.js');
3
+ var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
4
4
  var zod = require('zod');
5
5
  var constants = require('@stndrds/constants');
6
6
 
@@ -318,6 +318,7 @@ var SCHEMA_LIMITS = {
318
318
  columnsPerTab: 50,
319
319
  optionsPerAttribute: 200,
320
320
  sidePanelAttributes: 100,
321
+ sidePanelPanes: 20,
321
322
  filterRulesPerTab: 50,
322
323
  sortsPerTab: 20,
323
324
  emailAttributesPerTab: 30,
@@ -512,6 +513,9 @@ var rollupConfigSchema = baseConfigSchema.extend({
512
513
  decimals: zod.z.number().int().min(0).max(10).optional(),
513
514
  targetAttributeType: zod.z.string().optional(),
514
515
  targetAttributeOptions: zod.z.array(optionSchema).optional(),
516
+ // The sum's symbol (#2644) — declared here or `.strip()` eats it before
517
+ // storage, exactly the fate this schema spares its two siblings above.
518
+ targetCurrencyCode: zod.z.string().length(3).optional(),
515
519
  optionsSource: computedOptionsSourceSchema.optional()
516
520
  });
517
521
  var propertySchemaPassthrough = zod.z.object({ definitions: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())) }).passthrough();
@@ -571,7 +575,7 @@ function getAttributeConfigWriteSchema(type) {
571
575
  }
572
576
  }
573
577
  function validationErrorFromIssues(issues) {
574
- return chunkHWZRSXFB_js.ValidationError.fromZodErrors(
578
+ return chunkL4KLYMUI_js.ValidationError.fromZodErrors(
575
579
  issues.map((issue) => ({
576
580
  path: issue.path.map((segment) => typeof segment === "symbol" ? String(segment) : segment),
577
581
  message: issue.message
@@ -594,7 +598,7 @@ function validatePatchedIcon(patch) {
594
598
  }
595
599
  const result = iconNameSchema.optional().safeParse(patch.icon);
596
600
  if (!result.success) {
597
- throw chunkHWZRSXFB_js.ValidationError.fromZodErrors(
601
+ throw chunkL4KLYMUI_js.ValidationError.fromZodErrors(
598
602
  result.error.issues.map((issue) => ({
599
603
  path: [
600
604
  "icon",
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-SYQDFZ74.mjs';
1
+ import { ValidationError } from './chunk-HOVUEYEQ.mjs';
2
2
 
3
3
  // src/utils/canonical-json.ts
4
4
  function canonicalStringify(value) {
@@ -19,8 +19,40 @@ var SchemaErrorCode = {
19
19
  PROTECTED_VIEW: "SCHEMA_PROTECTED_VIEW",
20
20
  PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE",
21
21
  // Permissions
22
+ //
23
+ // `FORBIDDEN` means "you lack permission", and only that (#2681).
22
24
  FORBIDDEN: "SCHEMA_FORBIDDEN",
23
25
  ACCESS_DENIED: "SCHEMA_ACCESS_DENIED",
26
+ // Refusals that are NOT permission denials (#2681)
27
+ //
28
+ // `FORBIDDEN`'s message is redacted to a neutral sentence (#2675), which is
29
+ // honest only while the code means one thing. It did not: a workspace
30
+ // invariant (the last owner), a state gate (a disarmed reflex), an
31
+ // immutability refusal (system forms) and a missing actor context each told
32
+ // a caller who holds every permission that they lack one, sending them to an
33
+ // administrator with nothing to grant. So a refusal a permission grant would
34
+ // NOT lift takes one of the codes below — plus `SYSTEM_ENTITY_IMMUTABLE`,
35
+ // which already existed — and keeps the explanatory message that names its
36
+ // remedy. Every one answers 403, exactly as it did while miscoded: the
37
+ // ruling changed the semantics, not a single HTTP status.
38
+ //
39
+ // A fifth site was seen and deliberately left alone: `ApiKeyService`'s
40
+ // missing-actor refusal answers 400 `VALIDATION_FAILED`, and moving it here
41
+ // would change a public HTTP status — which the ruling forbids. It stays at
42
+ // its 400 pending a ruling of its own.
43
+ /**
44
+ * A workspace RULE refuses the write — the last owner cannot be removed.
45
+ *
46
+ * Not `INVARIANT_VIOLATION`, despite the name: that one is an internal
47
+ * "should never happen" assertion, a bug signal nobody outside the codebase
48
+ * can act on. This is the opposite — a rule the caller can act on, reached
49
+ * by a request that was entirely well-formed, whose message tells them how.
50
+ */
51
+ WORKSPACE_INVARIANT: "SCHEMA_WORKSPACE_INVARIANT",
52
+ /** The resource's own state refuses the operation — a disarmed reflex run. */
53
+ STATE_GATE: "SCHEMA_STATE_GATE",
54
+ /** The operation needs an actor and the request carried none. */
55
+ ACTOR_CONTEXT_REQUIRED: "SCHEMA_ACTOR_CONTEXT_REQUIRED",
24
56
  // Connectors
25
57
  CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED",
26
58
  CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE",
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkLRFLSFIA_js = require('./chunk-LRFLSFIA.js');
4
- var chunkHWZRSXFB_js = require('./chunk-HWZRSXFB.js');
3
+ var chunkDIMTNM3F_js = require('./chunk-DIMTNM3F.js');
4
+ var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  // src/types/system-attributes.ts
@@ -500,7 +500,7 @@ function canonicalizeFilterValue(rule, effectiveType) {
500
500
  const message = `Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(
501
501
  value
502
502
  )}`;
503
- throw new chunkHWZRSXFB_js.ValidationError(message, [{ path: ["value"], message }]);
503
+ throw new chunkL4KLYMUI_js.ValidationError(message, [{ path: ["value"], message }]);
504
504
  }
505
505
  function hasCurrencyAmount(value) {
506
506
  if (typeof value !== "object") return true;
@@ -661,13 +661,13 @@ function resolveCanonicalOperator(rawOperator, effectiveType) {
661
661
  const replacement = REMOVED_OPERATOR_REPLACEMENTS[rawOperator];
662
662
  if (replacement) {
663
663
  const m = `Unknown filter operator "${rawOperator}" \u2014 use ${replacement}`;
664
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["operator"], message: m }]);
664
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["operator"], message: m }]);
665
665
  }
666
666
  const normalized = normalizeOperator(rawOperator);
667
667
  const membership = SUBSTRING_TO_MEMBERSHIP[normalized];
668
668
  if (membership && SET_MEMBERSHIP_TYPES.has(effectiveType)) {
669
669
  const m = `Operator "${normalized}" is not valid for type "${effectiveType}" \u2014 use "${membership}"`;
670
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["operator"], message: m }]);
670
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["operator"], message: m }]);
671
671
  }
672
672
  return normalized;
673
673
  }
@@ -677,7 +677,7 @@ function assertOperatorForType(operator, type, context) {
677
677
  if (!ops?.includes(normalized)) {
678
678
  const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
679
679
  const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
680
- throw new chunkHWZRSXFB_js.ValidationError(summary, [
680
+ throw new chunkL4KLYMUI_js.ValidationError(summary, [
681
681
  {
682
682
  path: ["operator"],
683
683
  message: summary
@@ -690,7 +690,7 @@ function assertRelativeDateValue(rule) {
690
690
  if (rule.operator !== "is_within") return;
691
691
  if (!isRelativeDateValue(rule.value)) {
692
692
  const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
693
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["value"], message: m }]);
693
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["value"], message: m }]);
694
694
  }
695
695
  }
696
696
  function applyCanonicalForm(rule, operator, effectiveType) {
@@ -703,11 +703,11 @@ function assertDynamicValueForAttribute(rule, attrType) {
703
703
  const v = rule.value;
704
704
  if (v.dynamic === "actor" && attrType !== "user") {
705
705
  const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
706
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["value"], message: m }]);
706
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["value"], message: m }]);
707
707
  }
708
708
  if (v.dynamic === "date" && attrType !== "date") {
709
709
  const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
710
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["value"], message: m }]);
710
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["value"], message: m }]);
711
711
  }
712
712
  }
713
713
  function collectQualifiedRuleIssues(rule, context) {
@@ -715,7 +715,7 @@ function collectQualifiedRuleIssues(rule, context) {
715
715
  validateQualifiedRule({ ...rule }, context);
716
716
  return [];
717
717
  } catch (error) {
718
- if (!(error instanceof chunkHWZRSXFB_js.ValidationError)) throw error;
718
+ if (!(error instanceof chunkL4KLYMUI_js.ValidationError)) throw error;
719
719
  return error.errors.map((issue) => ({ ...issue, path: [...issue.path] }));
720
720
  }
721
721
  }
@@ -723,17 +723,17 @@ function validateQualifiedRule(rule, context) {
723
723
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
724
724
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
725
725
  if (!(rootAttr || systemOps)) {
726
- throw new chunkHWZRSXFB_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
726
+ throw new chunkL4KLYMUI_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
727
727
  { path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
728
728
  ]);
729
729
  }
730
730
  if (rule.quantifier !== void 0 && !rule.property) {
731
731
  const m = `quantifier is only valid on qualified edge rules (set "property")`;
732
- throw new chunkHWZRSXFB_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
732
+ throw new chunkL4KLYMUI_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
733
733
  }
734
734
  if (!rootAttr) {
735
735
  if (rule.property) {
736
- throw new chunkHWZRSXFB_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
736
+ throw new chunkL4KLYMUI_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
737
737
  { path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
738
738
  ]);
739
739
  }
@@ -741,7 +741,7 @@ function validateQualifiedRule(rule, context) {
741
741
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, effectiveType);
742
742
  if (!systemOps.includes(normalizedOperator2)) {
743
743
  const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
744
- throw new chunkHWZRSXFB_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
744
+ throw new chunkL4KLYMUI_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
745
745
  }
746
746
  applyCanonicalForm(rule, normalizedOperator2, effectiveType);
747
747
  return;
@@ -753,25 +753,25 @@ function validateQualifiedRule(rule, context) {
753
753
  if (!ops.includes(normalizedOperator2)) {
754
754
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
755
755
  const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
756
- throw new chunkHWZRSXFB_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
756
+ throw new chunkL4KLYMUI_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
757
757
  }
758
758
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
759
759
  return;
760
760
  }
761
761
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
762
- throw new chunkHWZRSXFB_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
762
+ throw new chunkL4KLYMUI_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
763
763
  { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
764
764
  ]);
765
765
  }
766
766
  const propSchema = rootAttr.properties;
767
767
  if (!propSchema) {
768
- throw new chunkHWZRSXFB_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
768
+ throw new chunkL4KLYMUI_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
769
769
  { path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
770
770
  ]);
771
771
  }
772
772
  const propDef = propSchema.definitions.find((p) => p.name === rule.property);
773
773
  if (!propDef) {
774
- throw new chunkHWZRSXFB_js.ValidationError(
774
+ throw new chunkL4KLYMUI_js.ValidationError(
775
775
  `Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
776
776
  [{ path: ["property"], message: `Unknown property: ${rule.property}` }]
777
777
  );
@@ -787,7 +787,7 @@ function parseResourceVisibility(value) {
787
787
  if (typeof value === "string" && RESOURCE_VISIBILITIES.includes(value)) {
788
788
  return value;
789
789
  }
790
- throw new chunkHWZRSXFB_js.ValidationError(
790
+ throw new chunkL4KLYMUI_js.ValidationError(
791
791
  `visibility must be one of: ${RESOURCE_VISIBILITIES.join(", ")} (received: ${String(value)})`,
792
792
  []
793
793
  );
@@ -821,12 +821,12 @@ var RESERVED_OBJECT_NAMES = ["skill"];
821
821
  // src/validators/view-config.schema.ts
822
822
  var createModeSchema = zod.z.enum(["redirect", "inline", "peek"]);
823
823
  var nonEmptyStringArraySchema = zod.z.array(zod.z.string()).min(1);
824
- var columnsSchema = zod.z.array(zod.z.string()).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.columnsPerTab);
824
+ var columnsSchema = zod.z.array(zod.z.string()).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.columnsPerTab);
825
825
  var sortRuleSchema = zod.z.object({
826
826
  attribute: zod.z.string(),
827
827
  direction: zod.z.enum(["asc", "desc"])
828
828
  }).strict();
829
- var sortsSchema = zod.z.array(sortRuleSchema).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.sortsPerTab);
829
+ var sortsSchema = zod.z.array(sortRuleSchema).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.sortsPerTab);
830
830
  var relativeDateValueSchema = zod.z.object({
831
831
  amount: zod.z.number(),
832
832
  unit: zod.z.enum(["days", "weeks", "months", "years"]),
@@ -900,7 +900,7 @@ var filterRuleSchema = zod.z.object({
900
900
  operator: filterOperatorSchema,
901
901
  value: filterValueSchema
902
902
  }).strict();
903
- var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.filterRulesPerTab);
903
+ var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.filterRulesPerTab);
904
904
  var filterStateSchema = zod.z.object({
905
905
  combinator: zod.z.enum(["and", "or"]),
906
906
  rules: filterRulesSchema
@@ -986,20 +986,20 @@ var baseGroupShape = {
986
986
  var fieldGroupWriteSchema = zod.z.object({
987
987
  ...baseGroupShape,
988
988
  type: zod.z.literal("fields"),
989
- fields: zod.z.array(fieldSchema).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.fieldsPerGroup)
989
+ fields: zod.z.array(fieldSchema).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.fieldsPerGroup)
990
990
  }).strict();
991
991
  var groupWriteSchema = fieldGroupWriteSchema;
992
992
  var baseTabShape = {
993
993
  id: zod.z.string(),
994
994
  name: zod.z.string(),
995
995
  label: zod.z.string(),
996
- icon: chunkLRFLSFIA_js.iconNameSchema.optional(),
996
+ icon: chunkDIMTNM3F_js.iconNameSchema.optional(),
997
997
  order: zod.z.number().optional()
998
998
  };
999
999
  var formTabWriteSchema = zod.z.object({
1000
1000
  ...baseTabShape,
1001
1001
  type: zod.z.literal("form"),
1002
- groups: zod.z.array(groupWriteSchema).min(1).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.groupsPerFormTab),
1002
+ groups: zod.z.array(groupWriteSchema).min(1).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.groupsPerFormTab),
1003
1003
  formColumns: zod.z.union([zod.z.literal(1), zod.z.literal(2), zod.z.literal(3)]).optional(),
1004
1004
  density: zod.z.enum(["compact", "comfortable", "spacious"]).optional()
1005
1005
  }).strict().superRefine((tab, ctx) => {
@@ -1008,13 +1008,13 @@ var formTabWriteSchema = zod.z.object({
1008
1008
  (count, group) => count + (group.type === "fields" ? group.fields.length : 0),
1009
1009
  0
1010
1010
  );
1011
- if (totalFields > chunkLRFLSFIA_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1011
+ if (totalFields > chunkDIMTNM3F_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1012
1012
  ctx.addIssue({
1013
1013
  code: "too_big",
1014
1014
  origin: "array",
1015
- maximum: chunkLRFLSFIA_js.SCHEMA_LIMITS.fieldsPerFormTab,
1015
+ maximum: chunkDIMTNM3F_js.SCHEMA_LIMITS.fieldsPerFormTab,
1016
1016
  inclusive: true,
1017
- message: `A form tab can contain at most ${chunkLRFLSFIA_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1017
+ message: `A form tab can contain at most ${chunkDIMTNM3F_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1018
1018
  path: ["groups"]
1019
1019
  });
1020
1020
  }
@@ -1216,12 +1216,12 @@ var formsTabSchema = zod.z.object({
1216
1216
  var emailsTabSchema = zod.z.object({
1217
1217
  ...baseTabShape,
1218
1218
  type: zod.z.literal("emails"),
1219
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.emailAttributesPerTab)
1219
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.emailAttributesPerTab)
1220
1220
  }).strict();
1221
1221
  var meetingsTabSchema = zod.z.object({
1222
1222
  ...baseTabShape,
1223
1223
  type: zod.z.literal("meetings"),
1224
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.emailAttributesPerTab)
1224
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.emailAttributesPerTab)
1225
1225
  }).strict();
1226
1226
  var detailTabSchema = zod.z.discriminatedUnion("type", [
1227
1227
  formTabWriteSchema,
@@ -1237,7 +1237,7 @@ var detailTabSchema = zod.z.discriminatedUnion("type", [
1237
1237
  var listTabCommonShape = {
1238
1238
  id: zod.z.string(),
1239
1239
  label: zod.z.string(),
1240
- icon: chunkLRFLSFIA_js.iconNameSchema.optional(),
1240
+ icon: chunkDIMTNM3F_js.iconNameSchema.optional(),
1241
1241
  default: zod.z.boolean().optional(),
1242
1242
  // Which records the tab scopes to. `"all"` is the default and means "impose
1243
1243
  // no scope" — the mandatory viewer predicate alone decides, so the tab shows
@@ -1271,7 +1271,7 @@ var listViewTabSchema = zod.z.discriminatedUnion("layout", [
1271
1271
  ]);
1272
1272
  var _listViewConfigSchema = zod.z.object({
1273
1273
  defaultFilters: filterGroupSchema.optional(),
1274
- tabs: zod.z.array(listViewTabSchema).min(1).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.tabsPerView)
1274
+ tabs: zod.z.array(listViewTabSchema).min(1).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.tabsPerView)
1275
1275
  }).strict().superRefine((config, ctx) => {
1276
1276
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1277
1277
  let hasDefault = false;
@@ -1287,12 +1287,42 @@ var _listViewConfigSchema = zod.z.object({
1287
1287
  hasDefault = true;
1288
1288
  });
1289
1289
  });
1290
+ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1291
+ zod.z.object({
1292
+ kind: zod.z.literal("fields"),
1293
+ id: zod.z.string().optional(),
1294
+ label: zod.z.string().optional(),
1295
+ attributes: zod.z.array(zod.z.string()).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.sidePanelAttributes)
1296
+ }).strict(),
1297
+ zod.z.object({
1298
+ kind: zod.z.literal("activity"),
1299
+ id: zod.z.string().optional(),
1300
+ label: zod.z.string().optional()
1301
+ }).strict(),
1302
+ zod.z.object({
1303
+ kind: zod.z.literal("documents"),
1304
+ // Required here alone: the documents content keys its stored sort mode
1305
+ // on this id, so a pane without one would share the main-column
1306
+ // documents tab's sort.
1307
+ id: zod.z.string(),
1308
+ label: zod.z.string().optional(),
1309
+ allowUpload: zod.z.boolean().optional(),
1310
+ allowRemove: zod.z.boolean().optional()
1311
+ }).strict()
1312
+ ]);
1290
1313
  var _detailViewConfigSchema = zod.z.object({
1291
- tabs: zod.z.array(detailTabSchema).min(1).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.tabsPerView),
1314
+ tabs: zod.z.array(detailTabSchema).min(1).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.tabsPerView),
1292
1315
  sidePanel: zod.z.object({
1293
- attributes: zod.z.array(zod.z.string()).max(chunkLRFLSFIA_js.SCHEMA_LIMITS.sidePanelAttributes),
1316
+ attributes: zod.z.array(zod.z.string()).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1317
+ panes: zod.z.array(sidePanelPaneSchema).max(chunkDIMTNM3F_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1294
1318
  width: zod.z.number().optional()
1295
- }).strict().optional()
1319
+ }).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
1320
+ message: "sidePanel requires attributes or panes"
1321
+ }).refine((sidePanel) => sidePanel.panes === void 0 || sidePanel.panes.length > 0, {
1322
+ message: "sidePanel panes must not be empty"
1323
+ }).refine((sidePanel) => sidePanel.attributes === void 0 || sidePanel.panes === void 0, {
1324
+ message: "sidePanel takes attributes or panes, not both"
1325
+ }).optional()
1296
1326
  }).strict().superRefine((config, ctx) => {
1297
1327
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1298
1328
  addDuplicateNameIssues(config.tabs, ctx, ["tabs"]);
@@ -21,8 +21,40 @@ var SchemaErrorCode = {
21
21
  PROTECTED_VIEW: "SCHEMA_PROTECTED_VIEW",
22
22
  PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE",
23
23
  // Permissions
24
+ //
25
+ // `FORBIDDEN` means "you lack permission", and only that (#2681).
24
26
  FORBIDDEN: "SCHEMA_FORBIDDEN",
25
27
  ACCESS_DENIED: "SCHEMA_ACCESS_DENIED",
28
+ // Refusals that are NOT permission denials (#2681)
29
+ //
30
+ // `FORBIDDEN`'s message is redacted to a neutral sentence (#2675), which is
31
+ // honest only while the code means one thing. It did not: a workspace
32
+ // invariant (the last owner), a state gate (a disarmed reflex), an
33
+ // immutability refusal (system forms) and a missing actor context each told
34
+ // a caller who holds every permission that they lack one, sending them to an
35
+ // administrator with nothing to grant. So a refusal a permission grant would
36
+ // NOT lift takes one of the codes below — plus `SYSTEM_ENTITY_IMMUTABLE`,
37
+ // which already existed — and keeps the explanatory message that names its
38
+ // remedy. Every one answers 403, exactly as it did while miscoded: the
39
+ // ruling changed the semantics, not a single HTTP status.
40
+ //
41
+ // A fifth site was seen and deliberately left alone: `ApiKeyService`'s
42
+ // missing-actor refusal answers 400 `VALIDATION_FAILED`, and moving it here
43
+ // would change a public HTTP status — which the ruling forbids. It stays at
44
+ // its 400 pending a ruling of its own.
45
+ /**
46
+ * A workspace RULE refuses the write — the last owner cannot be removed.
47
+ *
48
+ * Not `INVARIANT_VIOLATION`, despite the name: that one is an internal
49
+ * "should never happen" assertion, a bug signal nobody outside the codebase
50
+ * can act on. This is the opposite — a rule the caller can act on, reached
51
+ * by a request that was entirely well-formed, whose message tells them how.
52
+ */
53
+ WORKSPACE_INVARIANT: "SCHEMA_WORKSPACE_INVARIANT",
54
+ /** The resource's own state refuses the operation — a disarmed reflex run. */
55
+ STATE_GATE: "SCHEMA_STATE_GATE",
56
+ /** The operation needs an actor and the request carried none. */
57
+ ACTOR_CONTEXT_REQUIRED: "SCHEMA_ACTOR_CONTEXT_REQUIRED",
26
58
  // Connectors
27
59
  CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED",
28
60
  CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHWZRSXFB_js = require('./chunk-HWZRSXFB.js');
3
+ var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
4
4
 
5
5
  // src/utils/canonical-json.ts
6
6
  function canonicalStringify(value) {
@@ -17,10 +17,10 @@ function canonicalStringify(value) {
17
17
  case "object":
18
18
  break;
19
19
  default:
20
- throw new chunkHWZRSXFB_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
20
+ throw new chunkL4KLYMUI_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
21
21
  }
22
22
  const obj = v;
23
- if (seen.has(obj)) throw new chunkHWZRSXFB_js.ValidationError("Cannot canonicalize circular structure", []);
23
+ if (seen.has(obj)) throw new chunkL4KLYMUI_js.ValidationError("Cannot canonicalize circular structure", []);
24
24
  seen.add(obj);
25
25
  try {
26
26
  if (Array.isArray(obj)) return `[${obj.map((e) => encode(e) ?? "null").join(",")}]`;
@@ -7,7 +7,7 @@ import { createCheckboxValidator } from './chunk-OSSGN43B.mjs';
7
7
  import { createDateValidator } from './chunk-Q44QKLN4.mjs';
8
8
  import { createNumberValidator } from './chunk-UANQJ2GH.mjs';
9
9
  import { createTextValidator } from './chunk-O73ROMWQ.mjs';
10
- import { ValidationError } from './chunk-SYQDFZ74.mjs';
10
+ import { ValidationError } from './chunk-HOVUEYEQ.mjs';
11
11
  import { createCurrencyValidator } from './chunk-AYVHMVKQ.mjs';
12
12
  import { createLocationValidator } from './chunk-YUFTHPOE.mjs';
13
13
  import { createPhoneValidator } from './chunk-R5LAJCBU.mjs';