@stndrds/schema 1.0.0-alpha.336 → 1.0.0-alpha.337
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/{all-Cen87Ixs.d.mts → all-4UvqwWvq.d.mts} +11 -11
- package/dist/{all-SqlYyhI8.d.ts → all-CHS22jdr.d.ts} +11 -11
- package/dist/{checkbox-B0drQb0k.d.mts → checkbox-Bz3UR7v-.d.mts} +2 -2
- package/dist/{checkbox-3svoI60z.d.ts → checkbox-DF2BWd3r.d.ts} +2 -2
- package/dist/{date-u9Xa5EkT.d.ts → date-DBSBgOqg.d.ts} +2 -2
- package/dist/{date-CORVrilQ.d.mts → date-Do-4n4Ou.d.mts} +2 -2
- package/dist/{exceptions-LUovX1Xh.d.mts → exceptions-DZrk5n7t.d.mts} +2 -0
- package/dist/{exceptions-LUovX1Xh.d.ts → exceptions-DZrk5n7t.d.ts} +2 -0
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-CmGHLozK.d.mts → index-BGv_lB_c.d.mts} +1 -1
- package/dist/{index-BcjEnWLU.d.ts → index-CLTVHoQ4.d.ts} +2 -2
- package/dist/{index-C0VbD25z.d.ts → index-CO-zwdxS.d.ts} +1 -1
- package/dist/{index-CxNwSJ7O.d.mts → index-CRhCzlVm.d.mts} +2 -2
- package/dist/{index-BxlwF7Mg.d.mts → index-D6o37TYA.d.mts} +1 -1
- package/dist/{index-Bsfq_aDE.d.ts → index-DMtutoRi.d.ts} +1 -1
- package/dist/index.d.mts +28 -28
- package/dist/index.d.ts +28 -28
- package/dist/{number-dfPBKJ09.d.ts → number-BgQH6KjT.d.ts} +2 -2
- package/dist/{number-BhkK5Nuu.d.mts → number-PuhjSGfn.d.mts} +2 -2
- package/dist/{text-DF7MUSRq.d.ts → text-DBbxpQWo.d.ts} +2 -2
- package/dist/{text-B8oxuO3F.d.mts → text-DzIbQJJh.d.mts} +2 -2
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- 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/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/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 +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
3
|
-
import { m as ListViewTabVisibility } from "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./text-
|
|
7
|
-
import "./number-
|
|
8
|
-
import "./checkbox-
|
|
9
|
-
import "./date-
|
|
2
|
+
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.mjs";
|
|
3
|
+
import { m as ListViewTabVisibility } from "./index-CRhCzlVm.mjs";
|
|
4
|
+
import "./index-D6o37TYA.mjs";
|
|
5
|
+
import "./index-BGv_lB_c.mjs";
|
|
6
|
+
import "./text-DzIbQJJh.mjs";
|
|
7
|
+
import "./number-PuhjSGfn.mjs";
|
|
8
|
+
import "./checkbox-Bz3UR7v-.mjs";
|
|
9
|
+
import "./date-Do-4n4Ou.mjs";
|
|
10
10
|
import { IconName } from "@stndrds/constants";
|
|
11
11
|
import { z as z$1 } from "zod";
|
|
12
12
|
//#region src/types/filters.d.ts
|
|
@@ -518,9 +518,9 @@ declare const publishedViewContentDefinitionSchema: z$1.ZodDiscriminatedUnion<[z
|
|
|
518
518
|
relation?: string | undefined;
|
|
519
519
|
}>>;
|
|
520
520
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
521
|
-
all: "all";
|
|
522
521
|
workspace: "workspace";
|
|
523
522
|
private: "private";
|
|
523
|
+
all: "all";
|
|
524
524
|
}>>;
|
|
525
525
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
526
526
|
relationProperty: z$1.ZodString;
|
|
@@ -756,9 +756,9 @@ declare function draftContentViewDefinitionSchemaFor({ asideRule }?: {
|
|
|
756
756
|
relation?: string | undefined;
|
|
757
757
|
}>>;
|
|
758
758
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
759
|
-
all: "all";
|
|
760
759
|
workspace: "workspace";
|
|
761
760
|
private: "private";
|
|
761
|
+
all: "all";
|
|
762
762
|
}>>;
|
|
763
763
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
764
764
|
relationProperty: z$1.ZodString;
|
|
@@ -1005,9 +1005,9 @@ declare const draftContentViewDefinitionSchema: z$1.ZodObject<{
|
|
|
1005
1005
|
relation?: string | undefined;
|
|
1006
1006
|
}>>;
|
|
1007
1007
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1008
|
-
all: "all";
|
|
1009
1008
|
workspace: "workspace";
|
|
1010
1009
|
private: "private";
|
|
1010
|
+
all: "all";
|
|
1011
1011
|
}>>;
|
|
1012
1012
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
1013
1013
|
relationProperty: z$1.ZodString;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
3
|
-
import { m as ListViewTabVisibility } from "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./text-
|
|
7
|
-
import "./number-
|
|
8
|
-
import "./checkbox-
|
|
9
|
-
import "./date-
|
|
2
|
+
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.js";
|
|
3
|
+
import { m as ListViewTabVisibility } from "./index-CLTVHoQ4.js";
|
|
4
|
+
import "./index-CO-zwdxS.js";
|
|
5
|
+
import "./index-DMtutoRi.js";
|
|
6
|
+
import "./text-DBbxpQWo.js";
|
|
7
|
+
import "./number-BgQH6KjT.js";
|
|
8
|
+
import "./checkbox-DF2BWd3r.js";
|
|
9
|
+
import "./date-DBSBgOqg.js";
|
|
10
10
|
import { z as z$1 } from "zod";
|
|
11
11
|
import { IconName } from "@stndrds/constants";
|
|
12
12
|
//#region src/types/filters.d.ts
|
|
@@ -518,9 +518,9 @@ declare const publishedViewContentDefinitionSchema: z$1.ZodDiscriminatedUnion<[z
|
|
|
518
518
|
relation?: string | undefined;
|
|
519
519
|
}>>;
|
|
520
520
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
521
|
-
all: "all";
|
|
522
521
|
workspace: "workspace";
|
|
523
522
|
private: "private";
|
|
523
|
+
all: "all";
|
|
524
524
|
}>>;
|
|
525
525
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
526
526
|
relationProperty: z$1.ZodString;
|
|
@@ -756,9 +756,9 @@ declare function draftContentViewDefinitionSchemaFor({ asideRule }?: {
|
|
|
756
756
|
relation?: string | undefined;
|
|
757
757
|
}>>;
|
|
758
758
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
759
|
-
all: "all";
|
|
760
759
|
workspace: "workspace";
|
|
761
760
|
private: "private";
|
|
761
|
+
all: "all";
|
|
762
762
|
}>>;
|
|
763
763
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
764
764
|
relationProperty: z$1.ZodString;
|
|
@@ -1005,9 +1005,9 @@ declare const draftContentViewDefinitionSchema: z$1.ZodObject<{
|
|
|
1005
1005
|
relation?: string | undefined;
|
|
1006
1006
|
}>>;
|
|
1007
1007
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1008
|
-
all: "all";
|
|
1009
1008
|
workspace: "workspace";
|
|
1010
1009
|
private: "private";
|
|
1010
|
+
all: "all";
|
|
1011
1011
|
}>>;
|
|
1012
1012
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
1013
1013
|
relationProperty: z$1.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { et as CheckboxAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { et as CheckboxAttribute } from "./exceptions-DZrk5n7t.mjs";
|
|
3
|
+
import { r as ValidationMessages } from "./index-BGv_lB_c.mjs";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/checkbox.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { et as CheckboxAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { et as CheckboxAttribute } from "./exceptions-DZrk5n7t.js";
|
|
3
|
+
import { r as ValidationMessages } from "./index-DMtutoRi.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/checkbox.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { rt as DateAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { rt as DateAttribute } from "./exceptions-DZrk5n7t.js";
|
|
3
|
+
import { r as ValidationMessages } from "./index-DMtutoRi.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/date.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { rt as DateAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { rt as DateAttribute } from "./exceptions-DZrk5n7t.mjs";
|
|
3
|
+
import { r as ValidationMessages } from "./index-BGv_lB_c.mjs";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/date.d.ts
|
|
6
6
|
/**
|
|
@@ -943,6 +943,8 @@ declare const SchemaErrorCode: {
|
|
|
943
943
|
readonly CONFIGURATION_REQUIRED: "CONFIGURATION_REQUIRED";
|
|
944
944
|
readonly SEARCH_ADAPTER_REQUIRED: "SEARCH_ADAPTER_REQUIRED";
|
|
945
945
|
readonly CRON_REGISTRATION_FAILED: "CRON_REGISTRATION_FAILED";
|
|
946
|
+
/** Worker transport cleanup did not prove exclusive ownership was released. */
|
|
947
|
+
readonly JOB_WORKER_SHUTDOWN_FAILED: "JOB_WORKER_SHUTDOWN_FAILED";
|
|
946
948
|
readonly SEARCH_BACKEND_FAILED: "SEARCH_BACKEND_FAILED";
|
|
947
949
|
readonly INVARIANT_VIOLATION: "INVARIANT_VIOLATION";
|
|
948
950
|
readonly TENANT_CONTEXT_MISSING: "TENANT_CONTEXT_MISSING";
|
|
@@ -943,6 +943,8 @@ declare const SchemaErrorCode: {
|
|
|
943
943
|
readonly CONFIGURATION_REQUIRED: "CONFIGURATION_REQUIRED";
|
|
944
944
|
readonly SEARCH_ADAPTER_REQUIRED: "SEARCH_ADAPTER_REQUIRED";
|
|
945
945
|
readonly CRON_REGISTRATION_FAILED: "CRON_REGISTRATION_FAILED";
|
|
946
|
+
/** Worker transport cleanup did not prove exclusive ownership was released. */
|
|
947
|
+
readonly JOB_WORKER_SHUTDOWN_FAILED: "JOB_WORKER_SHUTDOWN_FAILED";
|
|
946
948
|
readonly SEARCH_BACKEND_FAILED: "SEARCH_BACKEND_FAILED";
|
|
947
949
|
readonly INVARIANT_VIOLATION: "INVARIANT_VIOLATION";
|
|
948
950
|
readonly TENANT_CONTEXT_MISSING: "TENANT_CONTEXT_MISSING";
|
package/dist/exceptions.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-
|
|
2
|
+
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DZrk5n7t.mjs";
|
|
3
3
|
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
package/dist/exceptions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-
|
|
2
|
+
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DZrk5n7t.js";
|
|
3
3
|
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
package/dist/exceptions.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
|
|
3
3
|
`);super(`Destructive schema operations detected (data will be lost):\n${n}\n\nThese are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:\n STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1\n\nOtherwise, revert your code changes or back up the data first.`,e.DESTRUCTIVE_NOT_ALLOWED,{operations:t}),this.name=`DestructiveSyncNotAllowedError`,this.operations=t}},MigrationTimeoutError=class extends SchemaError{constructor(t,n,r,i){super(`Migration for "${t}" exceeded the maximum duration (${i}ms). Migrated ${n}/${r} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,e.MIGRATION_TIMEOUT,{objectName:t,migrated:n,total:r,maxDurationMs:i}),this.name=`MigrationTimeoutError`,this.objectName=t,this.migrated=n,this.total=r,this.maxDurationMs=i}},ChangeTypeNotSupportedError=class extends SchemaError{constructor(t,n){super(`Cannot change type of attribute "${t}.${n}" via runtime API. Declare a migration in your schema code:\n object("${t}").migration(N, (m) =>\n m.changeType("${n}", from, to, { transform: (v) => ... })\n )`,e.CHANGE_TYPE_NOT_SUPPORTED,{objectName:t,attributeName:n}),this.name=`ChangeTypeNotSupportedError`,this.objectName=t,this.attributeName=n}},DuplicateError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.DUPLICATE_OBJECT:t===`attribute`?e.DUPLICATE_ATTRIBUTE:e.DUPLICATE,a=`${t.charAt(0).toUpperCase()}${t.slice(1)} "${n}" already exists`;super(r??a,i,{resourceType:t,resourceName:n}),this.name=`DuplicateError`,this.resourceType=t,this.resourceName=n}};const n={builder:`cannot be built by a consumer`,registry:`cannot be registered by a consumer`,bundle:`cannot be claimed by a bundle`,source:`cannot be declared by a schema source`};var ReservedObjectNameError=class extends SchemaError{constructor(t,r){super(`"${t}" is a framework-native object name and ${n[r]}: the framework ships it, pick another name.`,e.RESERVED_OBJECT_NAME,{objectName:t,context:r}),this.name=`ReservedObjectNameError`,this.objectName=t}};function isSchemaError(e){return e instanceof SchemaError}function isNotFoundError(e){return e instanceof NotFoundError}function isValidationError(e){return e instanceof t}function isProtectedResourceError(e){return e instanceof ProtectedResourceError}var ForbiddenError=class extends SchemaError{constructor(t,n,r){super(`No ${n} permission on object "${t}"`,e.FORBIDDEN,{objectName:t,action:n,userId:r}),this._tag=`ForbiddenError`,this.name=`ForbiddenError`,this.objectName=t,this.action=n,this.userId=r}},ProtectedRoleError=class extends SchemaError{constructor(t,n){super(`Cannot ${n} system role "${t}"`,e.PROTECTED_ROLE,{roleName:t,operation:n}),this.name=`ProtectedRoleError`,this.roleName=t,this.operation=n}},RoleNotFoundError=class extends NotFoundError{constructor(t){super(`Role`,t,e.ROLE_NOT_FOUND),this.name=`RoleNotFoundError`}},ConcurrentModificationError=class extends SchemaError{constructor(t){super(`Record ${t} was modified by another request. Please refresh and try again.`,e.CONFLICT,{recordId:t})}},StorageError=class extends SchemaError{constructor(t,n,r,i){let a=t===`upload`?e.STORAGE_UPLOAD_FAILED:t===`download`?e.STORAGE_DOWNLOAD_FAILED:t===`delete`?e.STORAGE_DELETE_FAILED:e.STORAGE_URL_FAILED;super(`Storage ${t} failed: ${n}`,a,{operation:t,path:r,cause:i}),this.name=`StorageError`,this.operation=t,this.path=r,this.cause=i}},AccessDeniedError=class extends SchemaError{constructor(t,n){super(n??`Access denied to resource: ${t}`,e.ACCESS_DENIED,{resource:t,reason:n}),this.name=`AccessDeniedError`,this.resource=t,this.reason=n}},RepositoryError=class extends SchemaError{constructor(t,n,r,i){let a=t===`create`?e.REPOSITORY_CREATE_FAILED:t===`update`?e.REPOSITORY_UPDATE_FAILED:t===`delete`?e.REPOSITORY_DELETE_FAILED:e.REPOSITORY_QUERY_FAILED;super(`Failed to ${t} ${n}: ${r}${i?` (${i})`:``}`,a,{operation:t,entity:n,cause:i}),this.name=`RepositoryError`,this.operation=t,this.entity=n,this.cause=i}},SearchBackendError=class extends SchemaError{constructor(t,n){super(`Search backend unavailable for ${t}`,e.SEARCH_BACKEND_FAILED,{scope:t,cause:n}),this.name=`SearchBackendError`,this.scope=t,this.cause=n}},NotImplementedError=class extends SchemaError{constructor(t,n){let r=n?`${t}: not implemented (${n})`:`${t}: not implemented`;super(r,e.NOT_IMPLEMENTED,{feature:t,milestone:n}),this.name=`NotImplementedError`,this.feature=t,this.milestone=n}},MemoryNotFoundError=class extends NotFoundError{constructor(t){super(`Memory`,t,e.MEMORY_NOT_FOUND),this.name=`MemoryNotFoundError`}},RecordReferencedError=class extends SchemaError{constructor(t,n){let r=n.reduce((e,t)=>e+t.count,0);super(`Cannot delete record: referenced by ${r} record${r>1?`s`:``}`,e.RECORD_REFERENCED,{recordId:t,references:n}),this.name=`RecordReferencedError`,this.recordId=t,this.references=n}},AttributeInUseError=class extends SchemaError{constructor(t,n){super(`Cannot delete attribute "${t}": used in ${n}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n}},ObjectReferencedError=class extends SchemaError{constructor(t,n){super(`Cannot delete object "${t}": target of relations in ${n.join(`, `)}`,e.OBJECT_REFERENCED,{objectName:t,referencingObjects:n}),this.name=`ObjectReferencedError`,this.objectName=t,this.referencingObjects=n}};function isRecordReferencedError(e){return e instanceof RecordReferencedError}function isAttributeInUseError(e){return e instanceof AttributeInUseError}function isObjectReferencedError(e){return e instanceof ObjectReferencedError}exports.AccessDeniedError=AccessDeniedError,exports.AttributeInUseError=AttributeInUseError,exports.AttributeNotFoundError=AttributeNotFoundError,exports.ChangeTypeNotSupportedError=ChangeTypeNotSupportedError,exports.ConcurrentModificationError=ConcurrentModificationError,exports.DestructiveSyncNotAllowedError=DestructiveSyncNotAllowedError,exports.DuplicateError=DuplicateError,exports.ForbiddenError=ForbiddenError,exports.MemoryNotFoundError=MemoryNotFoundError,exports.MigrationTimeoutError=MigrationTimeoutError,exports.NotFoundError=NotFoundError,exports.NotImplementedError=NotImplementedError,exports.ObjectNotFoundError=ObjectNotFoundError,exports.ObjectReferencedError=ObjectReferencedError,exports.OrphanSystemAttributeError=OrphanSystemAttributeError,exports.ProtectedResourceError=ProtectedResourceError,exports.ProtectedRoleError=ProtectedRoleError,exports.RecordNotFoundError=RecordNotFoundError,exports.RecordReferencedError=RecordReferencedError,exports.RepositoryError=RepositoryError,exports.ReservedObjectNameError=ReservedObjectNameError,exports.RoleNotFoundError=RoleNotFoundError,exports.SchemaError=SchemaError,exports.SchemaErrorCode=e,exports.SchemaPlanNotFoundError=SchemaPlanNotFoundError,exports.SearchBackendError=SearchBackendError,exports.StorageError=StorageError,exports.SyncCascadeError=SyncCascadeError,exports.SyncConflictError=SyncConflictError,exports.SyncError=SyncError,exports.SystemEntityImmutableError=SystemEntityImmutableError,exports.ValidationError=t,exports.isAttributeInUseError=isAttributeInUseError,exports.isNotFoundError=isNotFoundError,exports.isObjectReferencedError=isObjectReferencedError,exports.isProtectedResourceError=isProtectedResourceError,exports.isRecordReferencedError=isRecordReferencedError,exports.isSchemaError=isSchemaError,exports.isValidationError=isValidationError;
|
package/dist/exceptions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
|
|
2
|
+
const e={DRAFT_REVISION_CONFLICT:`DRAFT_REVISION_CONFLICT`,UNKNOWN:`SCHEMA_UNKNOWN_ERROR`,OBJECT_NOT_FOUND:`SCHEMA_OBJECT_NOT_FOUND`,ATTRIBUTE_NOT_FOUND:`SCHEMA_ATTRIBUTE_NOT_FOUND`,RECORD_NOT_FOUND:`SCHEMA_RECORD_NOT_FOUND`,SOURCE_NOT_FOUND:`SCHEMA_SOURCE_NOT_FOUND`,ROLE_NOT_FOUND:`SCHEMA_ROLE_NOT_FOUND`,MEMORY_NOT_FOUND:`SCHEMA_MEMORY_NOT_FOUND`,SCHEMA_PLAN_NOT_FOUND:`SCHEMA_PLAN_NOT_FOUND`,VALIDATION_FAILED:`SCHEMA_VALIDATION_FAILED`,INVALID_ATTRIBUTE_NAME:`SCHEMA_INVALID_ATTRIBUTE_NAME`,INVALID_OBJECT_NAME:`SCHEMA_INVALID_OBJECT_NAME`,RESERVED_OBJECT_NAME:`SCHEMA_RESERVED_OBJECT_NAME`,PROTECTED_OBJECT:`SCHEMA_PROTECTED_OBJECT`,PROTECTED_ATTRIBUTE:`SCHEMA_PROTECTED_ATTRIBUTE`,PROTECTED_VIEW:`SCHEMA_PROTECTED_VIEW`,PROTECTED_ROLE:`SCHEMA_PROTECTED_ROLE`,FORBIDDEN:`SCHEMA_FORBIDDEN`,ACCESS_DENIED:`SCHEMA_ACCESS_DENIED`,WORKSPACE_INVARIANT:`SCHEMA_WORKSPACE_INVARIANT`,STATE_GATE:`SCHEMA_STATE_GATE`,ACTOR_CONTEXT_REQUIRED:`SCHEMA_ACTOR_CONTEXT_REQUIRED`,CONNECTOR_AUTH_FAILED:`SCHEMA_CONNECTOR_AUTH_FAILED`,CONNECTOR_INVALID_STATE:`SCHEMA_CONNECTOR_INVALID_STATE`,CONNECTOR_GRANT_ORPHANED:`SCHEMA_CONNECTOR_GRANT_ORPHANED`,SYNC_FAILED:`SCHEMA_SYNC_FAILED`,SYNC_CONFLICT:`SCHEMA_SYNC_CONFLICT`,SYNC_CASCADE:`SCHEMA_SYNC_CASCADE`,ORPHAN_SYSTEM_ATTRIBUTE:`SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE`,SYSTEM_ENTITY_IMMUTABLE:`SCHEMA_SYSTEM_ENTITY_IMMUTABLE`,DESTRUCTIVE_NOT_ALLOWED:`SCHEMA_DESTRUCTIVE_NOT_ALLOWED`,MIGRATION_TIMEOUT:`SCHEMA_MIGRATION_TIMEOUT`,CHANGE_TYPE_NOT_SUPPORTED:`SCHEMA_CHANGE_TYPE_NOT_SUPPORTED`,DUPLICATE:`SCHEMA_DUPLICATE`,DUPLICATE_OBJECT:`SCHEMA_DUPLICATE_OBJECT`,DUPLICATE_ATTRIBUTE:`SCHEMA_DUPLICATE_ATTRIBUTE`,CONFLICT:`SCHEMA_CONFLICT`,STORAGE_UPLOAD_FAILED:`SCHEMA_STORAGE_UPLOAD_FAILED`,STORAGE_DOWNLOAD_FAILED:`SCHEMA_STORAGE_DOWNLOAD_FAILED`,STORAGE_DELETE_FAILED:`SCHEMA_STORAGE_DELETE_FAILED`,STORAGE_URL_FAILED:`SCHEMA_STORAGE_URL_FAILED`,REPOSITORY_CREATE_FAILED:`SCHEMA_REPOSITORY_CREATE_FAILED`,REPOSITORY_UPDATE_FAILED:`SCHEMA_REPOSITORY_UPDATE_FAILED`,REPOSITORY_DELETE_FAILED:`SCHEMA_REPOSITORY_DELETE_FAILED`,REPOSITORY_QUERY_FAILED:`SCHEMA_REPOSITORY_QUERY_FAILED`,NOT_IMPLEMENTED:`SCHEMA_NOT_IMPLEMENTED`,TIMEOUT:`SCHEMA_TIMEOUT`,RECORD_REFERENCED:`SCHEMA_RECORD_REFERENCED`,ATTRIBUTE_IN_USE:`SCHEMA_ATTRIBUTE_IN_USE`,OBJECT_REFERENCED:`SCHEMA_OBJECT_REFERENCED`,CONFIGURATION_REQUIRED:`CONFIGURATION_REQUIRED`,SEARCH_ADAPTER_REQUIRED:`SEARCH_ADAPTER_REQUIRED`,CRON_REGISTRATION_FAILED:`CRON_REGISTRATION_FAILED`,JOB_WORKER_SHUTDOWN_FAILED:`JOB_WORKER_SHUTDOWN_FAILED`,SEARCH_BACKEND_FAILED:`SEARCH_BACKEND_FAILED`,INVARIANT_VIOLATION:`INVARIANT_VIOLATION`,TENANT_CONTEXT_MISSING:`TENANT_CONTEXT_MISSING`,FEATURE_FLAGS_CONTEXT:`FEATURE_FLAGS_CONTEXT`,REALTIME_RATE_LIMITED:`REALTIME_RATE_LIMITED`,REALTIME_DELIVERY_FAILED:`REALTIME_DELIVERY_FAILED`,REALTIME_SUBSCRIPTION_FAILED:`REALTIME_SUBSCRIPTION_FAILED`,AGENT_UNKNOWN:`AGENT_UNKNOWN`,AGENT_DEPTH_EXCEEDED:`AGENT_DEPTH_EXCEEDED`,AGENT_COST_LIMIT_EXCEEDED:`AGENT_COST_LIMIT_EXCEEDED`,AGENT_TREE_COST_LIMIT_EXCEEDED:`AGENT_TREE_COST_LIMIT_EXCEEDED`,CREDITS_EXHAUSTED:`CREDITS_EXHAUSTED`,QUOTA_EXCEEDED:`QUOTA_EXCEEDED`,AGENT_SESSION_NOT_FOUND:`AGENT_SESSION_NOT_FOUND`,AGENT_DEFINITION_NOT_FOUND:`AGENT_DEFINITION_NOT_FOUND`,AGENT_RUN_CONFIG:`AGENT_RUN_CONFIG`,AGENT_STREAMING:`AGENT_STREAMING`,AGENT_MISSING_ACTOR:`AGENT_MISSING_ACTOR`,AGENT_INVALID_STATE:`AGENT_INVALID_STATE`,AGENT_COMPACTION_IMPOSSIBLE:`AGENT_COMPACTION_IMPOSSIBLE`,AGENT_COMPACTION_TIMEOUT:`AGENT_COMPACTION_TIMEOUT`,AGENT_LEASE_HELD:`AGENT_LEASE_HELD`,AGENT_LEASE_UNAVAILABLE:`AGENT_LEASE_UNAVAILABLE`,AGENT_WORK_MODE_REQUIRED:`AGENT_WORK_MODE_REQUIRED`,AGENT_MESSAGE_NOT_FOUND:`AGENT_MESSAGE_NOT_FOUND`,AGENT_MESSAGE_NOT_EDITABLE:`AGENT_MESSAGE_NOT_EDITABLE`,DEVICE_NOT_FOUND:`DEVICE_NOT_FOUND`,DEVICE_OFFLINE:`DEVICE_OFFLINE`,AI_UNKNOWN:`AI_UNKNOWN`,AI_USAGE_LIMIT_EXCEEDED:`AI_USAGE_LIMIT_EXCEEDED`,AI_INVALID_USAGE:`AI_INVALID_USAGE`,AI_INVALID_MODEL:`AI_INVALID_MODEL`,AI_INVALID_MODEL_INPUT:`AI_INVALID_MODEL_INPUT`,AI_REPOSITORY_ERROR:`AI_REPOSITORY_ERROR`,AI_GENERATION_FAILED:`AI_GENERATION_FAILED`,AI_IMAGE_USAGE_PENDING:`AI_IMAGE_USAGE_PENDING`,AI_IMAGE_GENERATION_INDETERMINATE:`AI_IMAGE_GENERATION_INDETERMINATE`,AI_IMAGE_PUBLICATION_FAILED:`AI_IMAGE_PUBLICATION_FAILED`,DOCUMENT_MIME_NOT_ACCEPTED:`DOCUMENT_MIME_NOT_ACCEPTED`,DOCUMENT_MULTIPLE_NOT_ALLOWED:`DOCUMENT_MULTIPLE_NOT_ALLOWED`,DOCUMENT_NOT_FOUND_FOR_OPERATION:`DOCUMENT_NOT_FOUND_FOR_OPERATION`,DOCUMENT_STORAGE_FAILED:`DOCUMENT_STORAGE_FAILED`,DOCUMENT_SIZE_EXCEEDED:`DOCUMENT_SIZE_EXCEEDED`,DOCUMENT_OCR_FAILED:`DOCUMENT_OCR_FAILED`,DOCUMENT_BLOB_EMPTY:`DOCUMENT_BLOB_EMPTY`,DOCUMENT_FILE_TOO_LARGE:`DOCUMENT_FILE_TOO_LARGE`,DOCUMENT_FILE_NOT_FOUND:`DOCUMENT_FILE_NOT_FOUND`,DOCUMENT_FILE_ALREADY_PACKED:`DOCUMENT_FILE_ALREADY_PACKED`,DOCUMENT_RECORD_NOT_FOUND:`DOCUMENT_RECORD_NOT_FOUND`,DOCUMENT_RECORD_OBJECT_MISMATCH:`DOCUMENT_RECORD_OBJECT_MISMATCH`,DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:`DOCUMENT_FOLDER_SERVICE_UNAVAILABLE`,DOCUMENT_FOLDER_PATH_NOT_FOUND:`DOCUMENT_FOLDER_PATH_NOT_FOUND`,EMAIL_PROVIDER_API_FAILED:`EMAIL_PROVIDER_API_FAILED`,EMAIL_SEND_FAILED:`EMAIL_SEND_FAILED`,EMAIL_SENT_NOT_STORED:`EMAIL_SENT_NOT_STORED`,EMAIL_BATCH_ITEM_FAILED:`EMAIL_BATCH_ITEM_FAILED`,CALENDAR_PROVIDER_API_FAILED:`CALENDAR_PROVIDER_API_FAILED`,REFLEX_INVALID_TRANSITION:`REFLEX_INVALID_TRANSITION`,REFLEX_INVALID_TOKEN:`REFLEX_INVALID_TOKEN`,REFLEX_CAPABILITY_DENIED:`REFLEX_CAPABILITY_DENIED`,REFLEX_GATEWAY_UNAVAILABLE:`REFLEX_GATEWAY_UNAVAILABLE`,REFLEX_BUNDLE_FAILED:`REFLEX_BUNDLE_FAILED`,REFLEX_EGRESS_DENIED:`REFLEX_EGRESS_DENIED`,REFLEX_PROTOCOL_VIOLATION:`REFLEX_PROTOCOL_VIOLATION`,REFLEX_RUN_FAILED:`REFLEX_RUN_FAILED`,REFLEX_RUN_TIMEOUT:`REFLEX_RUN_TIMEOUT`,REFLEX_DEPENDENCY_DRIFT:`REFLEX_DEPENDENCY_DRIFT`,REFLEX_NOT_READY:`REFLEX_NOT_READY`,REFLEX_INVARIANT_VIOLATION:`REFLEX_INVARIANT_VIOLATION`,EMBEDDING_MODEL_UNAVAILABLE:`EMBEDDING_MODEL_UNAVAILABLE`,EMBEDDING_DIMENSION_MISMATCH:`EMBEDDING_DIMENSION_MISMATCH`};var SchemaError=class extends Error{constructor(t,n=e.UNKNOWN,r){super(t),this.name=`SchemaError`,this.code=n,this.details=r,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}},NotFoundError=class extends SchemaError{constructor(t,n,r=e.RECORD_NOT_FOUND,i=`${t} with id "${n}" not found`){super(i,r,{resourceType:t,resourceId:n}),this._tag=`NotFoundError`,this.name=`NotFoundError`,this.resourceType=t,this.resourceId=n}},ObjectNotFoundError=class extends NotFoundError{constructor(t){super(`Object`,t,e.OBJECT_NOT_FOUND),this.name=`ObjectNotFoundError`}},AttributeNotFoundError=class extends NotFoundError{constructor(t){super(`Attribute`,t,e.ATTRIBUTE_NOT_FOUND),this.name=`AttributeNotFoundError`}},RecordNotFoundError=class extends NotFoundError{constructor(t){super(`Record`,t,e.RECORD_NOT_FOUND),this.name=`RecordNotFoundError`}},SchemaPlanNotFoundError=class extends NotFoundError{constructor(t){super(`Schema plan`,t,e.SCHEMA_PLAN_NOT_FOUND),this.name=`SchemaPlanNotFoundError`}},t=class ValidationError extends SchemaError{constructor(t,n){super(t,e.VALIDATION_FAILED,{errors:n}),this._tag=`ValidationError`,this.name=`ValidationError`,this.errors=n}static fromZodErrors(e){let t=e.map(e=>({path:e.path.map(String),message:e.message})),n=`Validation failed: ${t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `)}`;return new ValidationError(n,t)}},ProtectedResourceError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.PROTECTED_OBJECT:t===`view`?e.PROTECTED_VIEW:e.PROTECTED_ATTRIBUTE;super(`Cannot ${r} system ${t} "${n}"`,i,{resourceType:t,resourceName:n,operation:r}),this.name=`ProtectedResourceError`,this.resourceType=t,this.resourceName=n,this.operation=r}},SyncError=class extends SchemaError{constructor(t,n,r){super(`Failed to sync object "${t}": ${n}`,e.SYNC_FAILED,{objectName:t,cause:r?.message}),this.name=`SyncError`,this.objectName=t,this.cause=r}},SystemEntityImmutableError=class extends SchemaError{constructor(t,n){super(`Cannot mutate system ${t} "${n}". System entities are declared in code and immutable at runtime.`,e.SYSTEM_ENTITY_IMMUTABLE,{entityType:t,entityName:n}),this.name=`SystemEntityImmutableError`,this.entityType=t,this.entityName=n}},SyncConflictError=class extends SchemaError{constructor(t){let n=t.attributeName?`"${t.objectName}.${t.attributeName}"`:`"${t.objectName}"`;super(`Cannot promote runtime entity ${n}: ${t.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,e.SYNC_CONFLICT,{objectName:t.objectName,attributeName:t.attributeName,reason:t.reason}),this.name=`SyncConflictError`,this.objectName=t.objectName,this.attributeName=t.attributeName,this.reason=t.reason}},SyncCascadeError=class extends SchemaError{constructor(t,n){super(`Cannot demote object "${t}": attributes ${n.join(`, `)} are still declared in code. Remove them from code first, or restore the object.`,e.SYNC_CASCADE,{objectName:t,conflictingAttributes:n}),this.name=`SyncCascadeError`,this.objectName=t,this.conflictingAttributes=n}},OrphanSystemAttributeError=class extends SchemaError{constructor(t,n){super(`Attribute "${t}.${n}" is system:true but its object parent is system:false. This is an invariant violation.`,e.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:t,attributeName:n}),this.name=`OrphanSystemAttributeError`,this.objectName=t,this.attributeName=n}},DestructiveSyncNotAllowedError=class extends SchemaError{constructor(t){let n=t.map(e=>{let t=e;return t.name?`- ${e.type} "${t.name}"`:`- ${e.type}`}).join(`
|
|
3
3
|
`);super(`Destructive schema operations detected (data will be lost):\n${n}\n\nThese are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:\n STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1\n\nOtherwise, revert your code changes or back up the data first.`,e.DESTRUCTIVE_NOT_ALLOWED,{operations:t}),this.name=`DestructiveSyncNotAllowedError`,this.operations=t}},MigrationTimeoutError=class extends SchemaError{constructor(t,n,r,i){super(`Migration for "${t}" exceeded the maximum duration (${i}ms). Migrated ${n}/${r} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,e.MIGRATION_TIMEOUT,{objectName:t,migrated:n,total:r,maxDurationMs:i}),this.name=`MigrationTimeoutError`,this.objectName=t,this.migrated=n,this.total=r,this.maxDurationMs=i}},ChangeTypeNotSupportedError=class extends SchemaError{constructor(t,n){super(`Cannot change type of attribute "${t}.${n}" via runtime API. Declare a migration in your schema code:\n object("${t}").migration(N, (m) =>\n m.changeType("${n}", from, to, { transform: (v) => ... })\n )`,e.CHANGE_TYPE_NOT_SUPPORTED,{objectName:t,attributeName:n}),this.name=`ChangeTypeNotSupportedError`,this.objectName=t,this.attributeName=n}},DuplicateError=class extends SchemaError{constructor(t,n,r){let i=t===`object`?e.DUPLICATE_OBJECT:t===`attribute`?e.DUPLICATE_ATTRIBUTE:e.DUPLICATE,a=`${t.charAt(0).toUpperCase()}${t.slice(1)} "${n}" already exists`;super(r??a,i,{resourceType:t,resourceName:n}),this.name=`DuplicateError`,this.resourceType=t,this.resourceName=n}};const n={builder:`cannot be built by a consumer`,registry:`cannot be registered by a consumer`,bundle:`cannot be claimed by a bundle`,source:`cannot be declared by a schema source`};var ReservedObjectNameError=class extends SchemaError{constructor(t,r){super(`"${t}" is a framework-native object name and ${n[r]}: the framework ships it, pick another name.`,e.RESERVED_OBJECT_NAME,{objectName:t,context:r}),this.name=`ReservedObjectNameError`,this.objectName=t}};function isSchemaError(e){return e instanceof SchemaError}function isNotFoundError(e){return e instanceof NotFoundError}function isValidationError(e){return e instanceof t}function isProtectedResourceError(e){return e instanceof ProtectedResourceError}var ForbiddenError=class extends SchemaError{constructor(t,n,r){super(`No ${n} permission on object "${t}"`,e.FORBIDDEN,{objectName:t,action:n,userId:r}),this._tag=`ForbiddenError`,this.name=`ForbiddenError`,this.objectName=t,this.action=n,this.userId=r}},ProtectedRoleError=class extends SchemaError{constructor(t,n){super(`Cannot ${n} system role "${t}"`,e.PROTECTED_ROLE,{roleName:t,operation:n}),this.name=`ProtectedRoleError`,this.roleName=t,this.operation=n}},RoleNotFoundError=class extends NotFoundError{constructor(t){super(`Role`,t,e.ROLE_NOT_FOUND),this.name=`RoleNotFoundError`}},ConcurrentModificationError=class extends SchemaError{constructor(t){super(`Record ${t} was modified by another request. Please refresh and try again.`,e.CONFLICT,{recordId:t})}},StorageError=class extends SchemaError{constructor(t,n,r,i){let a=t===`upload`?e.STORAGE_UPLOAD_FAILED:t===`download`?e.STORAGE_DOWNLOAD_FAILED:t===`delete`?e.STORAGE_DELETE_FAILED:e.STORAGE_URL_FAILED;super(`Storage ${t} failed: ${n}`,a,{operation:t,path:r,cause:i}),this.name=`StorageError`,this.operation=t,this.path=r,this.cause=i}},AccessDeniedError=class extends SchemaError{constructor(t,n){super(n??`Access denied to resource: ${t}`,e.ACCESS_DENIED,{resource:t,reason:n}),this.name=`AccessDeniedError`,this.resource=t,this.reason=n}},RepositoryError=class extends SchemaError{constructor(t,n,r,i){let a=t===`create`?e.REPOSITORY_CREATE_FAILED:t===`update`?e.REPOSITORY_UPDATE_FAILED:t===`delete`?e.REPOSITORY_DELETE_FAILED:e.REPOSITORY_QUERY_FAILED;super(`Failed to ${t} ${n}: ${r}${i?` (${i})`:``}`,a,{operation:t,entity:n,cause:i}),this.name=`RepositoryError`,this.operation=t,this.entity=n,this.cause=i}},SearchBackendError=class extends SchemaError{constructor(t,n){super(`Search backend unavailable for ${t}`,e.SEARCH_BACKEND_FAILED,{scope:t,cause:n}),this.name=`SearchBackendError`,this.scope=t,this.cause=n}},NotImplementedError=class extends SchemaError{constructor(t,n){let r=n?`${t}: not implemented (${n})`:`${t}: not implemented`;super(r,e.NOT_IMPLEMENTED,{feature:t,milestone:n}),this.name=`NotImplementedError`,this.feature=t,this.milestone=n}},MemoryNotFoundError=class extends NotFoundError{constructor(t){super(`Memory`,t,e.MEMORY_NOT_FOUND),this.name=`MemoryNotFoundError`}},RecordReferencedError=class extends SchemaError{constructor(t,n){let r=n.reduce((e,t)=>e+t.count,0);super(`Cannot delete record: referenced by ${r} record${r>1?`s`:``}`,e.RECORD_REFERENCED,{recordId:t,references:n}),this.name=`RecordReferencedError`,this.recordId=t,this.references=n}},AttributeInUseError=class extends SchemaError{constructor(t,n){super(`Cannot delete attribute "${t}": used in ${n}`,e.ATTRIBUTE_IN_USE,{attributeName:t,usage:n}),this.name=`AttributeInUseError`,this.attributeName=t,this.usage=n}},ObjectReferencedError=class extends SchemaError{constructor(t,n){super(`Cannot delete object "${t}": target of relations in ${n.join(`, `)}`,e.OBJECT_REFERENCED,{objectName:t,referencingObjects:n}),this.name=`ObjectReferencedError`,this.objectName=t,this.referencingObjects=n}};function isRecordReferencedError(e){return e instanceof RecordReferencedError}function isAttributeInUseError(e){return e instanceof AttributeInUseError}function isObjectReferencedError(e){return e instanceof ObjectReferencedError}export{AccessDeniedError,AttributeInUseError,AttributeNotFoundError,ChangeTypeNotSupportedError,ConcurrentModificationError,DestructiveSyncNotAllowedError,DuplicateError,ForbiddenError,MemoryNotFoundError,MigrationTimeoutError,NotFoundError,NotImplementedError,ObjectNotFoundError,ObjectReferencedError,OrphanSystemAttributeError,ProtectedResourceError,ProtectedRoleError,RecordNotFoundError,RecordReferencedError,RepositoryError,ReservedObjectNameError,RoleNotFoundError,SchemaError,e as SchemaErrorCode,SchemaPlanNotFoundError,SearchBackendError,StorageError,SyncCascadeError,SyncConflictError,SyncError,SystemEntityImmutableError,t as ValidationError,isAttributeInUseError,isNotFoundError,isObjectReferencedError,isProtectedResourceError,isRecordReferencedError,isSchemaError,isValidationError};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-
|
|
3
|
-
import { i as ValidationResult, r as ValidationMessages } from "./index-
|
|
2
|
+
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DZrk5n7t.js";
|
|
3
|
+
import { i as ValidationResult, r as ValidationMessages } from "./index-DMtutoRi.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
import { IconName } from "@stndrds/constants";
|
|
6
6
|
//#region src/types/document-layout.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
2
|
+
import { Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.js";
|
|
3
3
|
import { z as z$1 } from "zod";
|
|
4
4
|
import { IconName } from "@stndrds/constants";
|
|
5
5
|
//#region src/types/mutations.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-
|
|
3
|
-
import { i as ValidationResult, r as ValidationMessages } from "./index-
|
|
2
|
+
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DZrk5n7t.mjs";
|
|
3
|
+
import { i as ValidationResult, r as ValidationMessages } from "./index-BGv_lB_c.mjs";
|
|
4
4
|
import { IconName } from "@stndrds/constants";
|
|
5
5
|
import { z as z$1 } from "zod";
|
|
6
6
|
//#region src/types/document-layout.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
2
|
+
import { Y as Attribute, Z as AttributeType } from "./exceptions-DZrk5n7t.mjs";
|
|
3
3
|
import { IconName } from "@stndrds/constants";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/types/mutations.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-
|
|
3
|
-
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-
|
|
4
|
-
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-
|
|
5
|
-
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-
|
|
6
|
-
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-
|
|
7
|
-
import { t as createTextValidator } from "./text-
|
|
8
|
-
import { t as createNumberValidator } from "./number-
|
|
9
|
-
import { t as createCheckboxValidator } from "./checkbox-
|
|
10
|
-
import { t as createDateValidator } from "./date-
|
|
2
|
+
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-DZrk5n7t.mjs";
|
|
3
|
+
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-4UvqwWvq.mjs";
|
|
4
|
+
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index-CRhCzlVm.mjs";
|
|
5
|
+
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-D6o37TYA.mjs";
|
|
6
|
+
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-BGv_lB_c.mjs";
|
|
7
|
+
import { t as createTextValidator } from "./text-DzIbQJJh.mjs";
|
|
8
|
+
import { t as createNumberValidator } from "./number-PuhjSGfn.mjs";
|
|
9
|
+
import { t as createCheckboxValidator } from "./checkbox-Bz3UR7v-.mjs";
|
|
10
|
+
import { t as createDateValidator } from "./date-Do-4n4Ou.mjs";
|
|
11
11
|
import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
|
|
12
12
|
import z, { z as z$1 } from "zod";
|
|
13
13
|
import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
@@ -7608,7 +7608,7 @@ export declare class ContentBuilder<T extends {
|
|
|
7608
7608
|
createMode: ContentCreateMode;
|
|
7609
7609
|
}>>;
|
|
7610
7610
|
visibility(this: ContentBuilder<T & Collection$1>, visibility: ListViewTabVisibility): ContentBuilder<SetFields<T & Collection$1, {
|
|
7611
|
-
visibility: "
|
|
7611
|
+
visibility: "workspace" | "private" | "all";
|
|
7612
7612
|
}>>;
|
|
7613
7613
|
descriptionAttribute<const N extends string>(this: ContentBuilder<T & Collection$1>, descriptionAttribute: N): ContentBuilder<SetFields<T & Collection$1, {
|
|
7614
7614
|
descriptionAttribute: N;
|
|
@@ -8453,7 +8453,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8453
8453
|
}, "type"> & {
|
|
8454
8454
|
type: "collection";
|
|
8455
8455
|
}, "visibility"> & {
|
|
8456
|
-
visibility: "
|
|
8456
|
+
visibility: "workspace" | "private" | "all";
|
|
8457
8457
|
} & Pick<Omit<Omit<Omit<{
|
|
8458
8458
|
type: "collection";
|
|
8459
8459
|
}, "source"> & {
|
|
@@ -8515,7 +8515,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8515
8515
|
}, "type"> & {
|
|
8516
8516
|
type: "collection";
|
|
8517
8517
|
}, "visibility"> & {
|
|
8518
|
-
visibility: "
|
|
8518
|
+
visibility: "workspace" | "private" | "all";
|
|
8519
8519
|
} & Pick<Omit<Omit<Omit<{
|
|
8520
8520
|
type: "collection";
|
|
8521
8521
|
}, "source"> & {
|
|
@@ -8579,7 +8579,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8579
8579
|
}, "type"> & {
|
|
8580
8580
|
type: "collection";
|
|
8581
8581
|
}, "visibility"> & {
|
|
8582
|
-
visibility: "
|
|
8582
|
+
visibility: "workspace" | "private" | "all";
|
|
8583
8583
|
} & Pick<Omit<Omit<Omit<{
|
|
8584
8584
|
type: "collection";
|
|
8585
8585
|
}, "source"> & {
|
|
@@ -8641,7 +8641,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8641
8641
|
}, "type"> & {
|
|
8642
8642
|
type: "collection";
|
|
8643
8643
|
}, "visibility"> & {
|
|
8644
|
-
visibility: "
|
|
8644
|
+
visibility: "workspace" | "private" | "all";
|
|
8645
8645
|
} & Pick<Omit<Omit<Omit<{
|
|
8646
8646
|
type: "collection";
|
|
8647
8647
|
}, "source"> & {
|
|
@@ -8707,7 +8707,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8707
8707
|
}, "type"> & {
|
|
8708
8708
|
type: "collection";
|
|
8709
8709
|
}, "visibility"> & {
|
|
8710
|
-
visibility: "
|
|
8710
|
+
visibility: "workspace" | "private" | "all";
|
|
8711
8711
|
} & Pick<Omit<Omit<Omit<{
|
|
8712
8712
|
type: "collection";
|
|
8713
8713
|
}, "source"> & {
|
|
@@ -8769,7 +8769,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8769
8769
|
}, "type"> & {
|
|
8770
8770
|
type: "collection";
|
|
8771
8771
|
}, "visibility"> & {
|
|
8772
|
-
visibility: "
|
|
8772
|
+
visibility: "workspace" | "private" | "all";
|
|
8773
8773
|
} & Pick<Omit<Omit<Omit<{
|
|
8774
8774
|
type: "collection";
|
|
8775
8775
|
}, "source"> & {
|
|
@@ -8833,7 +8833,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8833
8833
|
}, "type"> & {
|
|
8834
8834
|
type: "collection";
|
|
8835
8835
|
}, "visibility"> & {
|
|
8836
|
-
visibility: "
|
|
8836
|
+
visibility: "workspace" | "private" | "all";
|
|
8837
8837
|
} & Pick<Omit<Omit<Omit<{
|
|
8838
8838
|
type: "collection";
|
|
8839
8839
|
}, "source"> & {
|
|
@@ -8895,7 +8895,7 @@ export declare const DRIVE_LIST_VIEW: ViewDeclaration<"drive-list", "drives", "c
|
|
|
8895
8895
|
}, "type"> & {
|
|
8896
8896
|
type: "collection";
|
|
8897
8897
|
}, "visibility"> & {
|
|
8898
|
-
visibility: "
|
|
8898
|
+
visibility: "workspace" | "private" | "all";
|
|
8899
8899
|
} & Pick<Omit<Omit<Omit<{
|
|
8900
8900
|
type: "collection";
|
|
8901
8901
|
}, "source"> & {
|
|
@@ -9170,7 +9170,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9170
9170
|
}, "type"> & {
|
|
9171
9171
|
type: "collection";
|
|
9172
9172
|
}, "visibility"> & {
|
|
9173
|
-
visibility: "
|
|
9173
|
+
visibility: "workspace" | "private" | "all";
|
|
9174
9174
|
} & Pick<Omit<Omit<Omit<{
|
|
9175
9175
|
type: "collection";
|
|
9176
9176
|
}, "source"> & {
|
|
@@ -9232,7 +9232,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9232
9232
|
}, "type"> & {
|
|
9233
9233
|
type: "collection";
|
|
9234
9234
|
}, "visibility"> & {
|
|
9235
|
-
visibility: "
|
|
9235
|
+
visibility: "workspace" | "private" | "all";
|
|
9236
9236
|
} & Pick<Omit<Omit<Omit<{
|
|
9237
9237
|
type: "collection";
|
|
9238
9238
|
}, "source"> & {
|
|
@@ -9296,7 +9296,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9296
9296
|
}, "type"> & {
|
|
9297
9297
|
type: "collection";
|
|
9298
9298
|
}, "visibility"> & {
|
|
9299
|
-
visibility: "
|
|
9299
|
+
visibility: "workspace" | "private" | "all";
|
|
9300
9300
|
} & Pick<Omit<Omit<Omit<{
|
|
9301
9301
|
type: "collection";
|
|
9302
9302
|
}, "source"> & {
|
|
@@ -9358,7 +9358,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9358
9358
|
}, "type"> & {
|
|
9359
9359
|
type: "collection";
|
|
9360
9360
|
}, "visibility"> & {
|
|
9361
|
-
visibility: "
|
|
9361
|
+
visibility: "workspace" | "private" | "all";
|
|
9362
9362
|
} & Pick<Omit<Omit<Omit<{
|
|
9363
9363
|
type: "collection";
|
|
9364
9364
|
}, "source"> & {
|
|
@@ -9424,7 +9424,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9424
9424
|
}, "type"> & {
|
|
9425
9425
|
type: "collection";
|
|
9426
9426
|
}, "visibility"> & {
|
|
9427
|
-
visibility: "
|
|
9427
|
+
visibility: "workspace" | "private" | "all";
|
|
9428
9428
|
} & Pick<Omit<Omit<Omit<{
|
|
9429
9429
|
type: "collection";
|
|
9430
9430
|
}, "source"> & {
|
|
@@ -9486,7 +9486,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9486
9486
|
}, "type"> & {
|
|
9487
9487
|
type: "collection";
|
|
9488
9488
|
}, "visibility"> & {
|
|
9489
|
-
visibility: "
|
|
9489
|
+
visibility: "workspace" | "private" | "all";
|
|
9490
9490
|
} & Pick<Omit<Omit<Omit<{
|
|
9491
9491
|
type: "collection";
|
|
9492
9492
|
}, "source"> & {
|
|
@@ -9550,7 +9550,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9550
9550
|
}, "type"> & {
|
|
9551
9551
|
type: "collection";
|
|
9552
9552
|
}, "visibility"> & {
|
|
9553
|
-
visibility: "
|
|
9553
|
+
visibility: "workspace" | "private" | "all";
|
|
9554
9554
|
} & Pick<Omit<Omit<Omit<{
|
|
9555
9555
|
type: "collection";
|
|
9556
9556
|
}, "source"> & {
|
|
@@ -9612,7 +9612,7 @@ export declare const MEETING_LIST_VIEW: ViewDeclaration<"meeting-list", "meeting
|
|
|
9612
9612
|
}, "type"> & {
|
|
9613
9613
|
type: "collection";
|
|
9614
9614
|
}, "visibility"> & {
|
|
9615
|
-
visibility: "
|
|
9615
|
+
visibility: "workspace" | "private" | "all";
|
|
9616
9616
|
} & Pick<Omit<Omit<Omit<{
|
|
9617
9617
|
type: "collection";
|
|
9618
9618
|
}, "source"> & {
|
|
@@ -10197,7 +10197,7 @@ export declare const canonicalViewOperationSchema: z$1.ZodDiscriminatedUnion<[z$
|
|
|
10197
10197
|
kanbanColumnOrder?: string[] | undefined;
|
|
10198
10198
|
kanbanColumnVisibility?: Record<string, boolean> | undefined;
|
|
10199
10199
|
kanbanPinnedColumns?: string[] | undefined;
|
|
10200
|
-
visibility?: "
|
|
10200
|
+
visibility?: "workspace" | "private" | "all" | undefined;
|
|
10201
10201
|
columns?: (string | {
|
|
10202
10202
|
relationProperty: string;
|
|
10203
10203
|
})[] | undefined;
|
|
@@ -10359,9 +10359,9 @@ export declare const canonicalViewOperationSchema: z$1.ZodDiscriminatedUnion<[z$
|
|
|
10359
10359
|
relation?: string | undefined;
|
|
10360
10360
|
}>>;
|
|
10361
10361
|
visibility: z$1.ZodOptional<z$1.ZodEnum<{
|
|
10362
|
-
all: "all";
|
|
10363
10362
|
workspace: "workspace";
|
|
10364
10363
|
private: "private";
|
|
10364
|
+
all: "all";
|
|
10365
10365
|
}>>;
|
|
10366
10366
|
columns: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
10367
10367
|
relationProperty: z$1.ZodString;
|