@standards/schema 1.0.0-alpha.384 → 1.0.0-alpha.386
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-C9OPP-r1.d.ts → all-4D2kFfWM.d.mts} +1115 -1116
- package/dist/{all-CYmW48oj.d.mts → all-DmTOfJJI.d.ts} +1115 -1116
- package/dist/api/index.d.mts +2890 -2890
- package/dist/api/index.d.ts +2890 -2890
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/attribute-validators-COsyRG9V.mjs +11 -0
- package/dist/attribute-validators-CUqsP1j_.js +11 -0
- package/dist/{attributes-D35Lcoui.d.ts → attributes-BcA_reJZ.d.ts} +58 -59
- package/dist/{attributes-CZD_B0mZ.d.mts → attributes-eqr1vdPP.d.mts} +58 -59
- package/dist/checkbox-C9aJ-6gq.d.ts +10 -0
- package/dist/checkbox-DfXrFM2z.d.mts +10 -0
- package/dist/config-C1CDWJf8.mjs +2 -0
- package/dist/config-eqfYa9Bh.js +2 -0
- package/dist/{core-397tQy5q.js → core-DAxRlJ5i.js} +1 -1
- package/dist/{core-BLHhNykL.mjs → core-rKI7Q9_U.mjs} +1 -1
- package/dist/{date-CQdP6Dxe.d.ts → date-BzggmHjS.d.mts} +5 -6
- package/dist/{date-B9051Wxe.d.mts → date-CdaoV9_L.d.ts} +5 -6
- package/dist/{exceptions-DoP6VK0v.d.mts → exceptions-CgzBcQIl.d.mts} +69 -70
- package/dist/{exceptions-DoP6VK0v.d.ts → exceptions-CgzBcQIl.d.ts} +69 -70
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/{index-E9rSexij.d.ts → index-BSYjSdhW.d.mts} +17 -18
- package/dist/{index-CgEVJG3l.d.ts → index-BmQgUhtq.d.mts} +2770 -2769
- package/dist/{index-BLXzRQr9.d.ts → index-CCH94vyR.d.ts} +6 -7
- package/dist/{index-D0L0GHU0.d.mts → index-D1iR2xuc.d.ts} +17 -18
- package/dist/{index-BS-60koN.d.mts → index-DjWbCMUZ.d.ts} +2770 -2769
- package/dist/{index-CH-Vc-pK.d.ts → index-e1Oh8ngS.d.ts} +73 -74
- package/dist/{index-B3wdnfLl.d.mts → index-jDwfdudj.d.mts} +73 -74
- package/dist/{index-CSDAHifu.d.mts → index-zJz3LbXr.d.mts} +6 -7
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/number-B3u9vPtb.d.ts +10 -0
- package/dist/number-Br56q0hL.d.mts +10 -0
- package/dist/object-5-wnsH0o.js +4 -0
- package/dist/object-BF5y6bgs.mjs +4 -0
- package/dist/{objects-CH22DJOx.d.ts → objects-CLxyZh-U.d.ts} +54 -55
- package/dist/{objects-DhKrQEo4.d.mts → objects-DxEMaC2Z.d.mts} +54 -55
- package/dist/phone-BGJea5sr.mjs +2 -0
- package/dist/phone-DHXyNkVY.js +2 -0
- package/dist/record-aggregates-Cj3p3_ce.js +2 -0
- package/dist/{record-aggregates-CzG86pUS.mjs → record-aggregates-DQXrIuGE.mjs} +1 -1
- package/dist/record-operation-7-DRRONb.mjs +2 -0
- package/dist/record-operation-BcbgQ-0b.js +2 -0
- package/dist/rolldown-runtime-DETHMehu.js +2 -0
- package/dist/text-BaxaZ5Vv.mjs +2 -0
- package/dist/text-Bvk4ila8.d.ts +10 -0
- package/dist/text-C5NnfCJg.d.mts +10 -0
- package/dist/text-DVrTGjjX.js +2 -0
- package/dist/{utils-gY3d9Dwp.js → utils-B-gGq3FS.js} +1 -1
- package/dist/{utils-C_J_p_tL.d.ts → utils-B2bq4zLb.d.ts} +15 -16
- package/dist/{utils-CkcPS_M9.d.mts → utils-CRx-eR8T.d.mts} +15 -16
- package/dist/{utils-fXIvFFl6.mjs → utils-DaejNWxh.mjs} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +4 -4
- package/dist/validation/complex/currency.d.ts +4 -4
- package/dist/validation/complex/currency.js +1 -1
- package/dist/validation/complex/currency.mjs +1 -1
- package/dist/validation/complex/location.d.mts +4 -4
- package/dist/validation/complex/location.d.ts +4 -4
- package/dist/validation/complex/location.js +1 -1
- package/dist/validation/complex/location.mjs +1 -1
- package/dist/validation/complex/phone.d.mts +4 -4
- package/dist/validation/complex/phone.d.ts +4 -4
- package/dist/validation/complex/phone.js +1 -1
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +6 -6
- package/dist/validation/complex/relation.d.ts +6 -6
- package/dist/validation/complex/relation.js +1 -1
- package/dist/validation/complex/relation.mjs +1 -1
- package/dist/validation/complex/richtext.d.mts +4 -4
- package/dist/validation/complex/richtext.d.ts +4 -4
- package/dist/validation/complex/richtext.js +1 -1
- package/dist/validation/complex/richtext.mjs +1 -1
- package/dist/validation/complex/select.d.mts +6 -6
- package/dist/validation/complex/select.d.ts +6 -6
- package/dist/validation/complex/select.js +1 -1
- package/dist/validation/complex/select.mjs +1 -1
- package/dist/validation/complex/user.d.mts +4 -4
- package/dist/validation/complex/user.d.ts +4 -4
- package/dist/validation/complex/user.js +1 -1
- package/dist/validation/complex/user.mjs +1 -1
- package/dist/validation/computed/formula.d.mts +4 -4
- package/dist/validation/computed/formula.d.ts +4 -4
- package/dist/validation/computed/formula.js +1 -1
- package/dist/validation/computed/formula.mjs +1 -1
- package/dist/validation/computed/rollup.d.mts +4 -4
- package/dist/validation/computed/rollup.d.ts +4 -4
- package/dist/validation/computed/rollup.js +1 -1
- package/dist/validation/computed/rollup.mjs +1 -1
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +1 -1
- package/dist/validation/config/index.mjs +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/core/index.js +1 -1
- package/dist/validation/core/index.mjs +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/object/index.js +1 -1
- package/dist/validation/object/index.mjs +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/checkbox.js +1 -1
- package/dist/validation/primitives/checkbox.mjs +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/date.js +1 -1
- package/dist/validation/primitives/date.mjs +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/number.js +1 -1
- package/dist/validation/primitives/number.mjs +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/dist/validation/primitives/text.js +1 -1
- package/dist/validation/primitives/text.mjs +1 -1
- package/dist/view-config.schema-Dl5GkAzl.mjs +2 -0
- package/dist/view-config.schema-DwZVS0Gn.js +2 -0
- package/dist/zod-locale-D_QkXhnp.d.mts +2 -0
- package/dist/zod-locale-D_QkXhnp.d.ts +2 -0
- package/dist/zod-locale.d.mts +2 -0
- package/dist/zod-locale.d.ts +2 -0
- package/dist/zod-locale.js +2 -0
- package/dist/zod-locale.mjs +2 -0
- package/package.json +17 -3
- package/dist/attribute-validators-DRqhAt2t.mjs +0 -11
- package/dist/attribute-validators-WAoJbap5.js +0 -11
- package/dist/checkbox-CQRDh5tF.d.ts +0 -11
- package/dist/checkbox-D00iEidf.d.mts +0 -11
- package/dist/config-BIxnbUN8.mjs +0 -2
- package/dist/config-DdjlHdPg.js +0 -2
- package/dist/number-BwCSeK20.d.ts +0 -11
- package/dist/number-CisXUosg.d.mts +0 -11
- package/dist/object-DcgxLvip.js +0 -4
- package/dist/object-Dzl7sfq8.mjs +0 -4
- package/dist/phone-BB-tzcSr.js +0 -2
- package/dist/phone-Bca_xiOX.mjs +0 -2
- package/dist/record-aggregates-DwpIJ2Dv.js +0 -2
- package/dist/record-operation-B7t5aXW3.js +0 -2
- package/dist/record-operation-DueJTyDh.mjs +0 -2
- package/dist/text-A9AJ1wUO.js +0 -2
- package/dist/text-C8Lb-NFo.mjs +0 -2
- package/dist/text-SkYUYEnE.d.ts +0 -11
- package/dist/text-Z1_WL8cd.d.mts +0 -11
- package/dist/view-config.schema-BqO1hmWR.mjs +0 -2
- package/dist/view-config.schema-DVoE_g3g.js +0 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
2
|
+
import * as z$2 from "zod";
|
|
3
3
|
//#region src/lib/permission-grants.d.ts
|
|
4
|
-
declare const PERMISSION_ACTIONS: readonly ["read", "create", "update", "delete", "manage"];
|
|
4
|
+
export declare const PERMISSION_ACTIONS: readonly ["read", "create", "update", "delete", "manage"];
|
|
5
5
|
/** The only definition of a valid grant (spec B1). */
|
|
6
|
-
declare const permissionGrantSchema: z$
|
|
7
|
-
scope: z$
|
|
6
|
+
export declare const permissionGrantSchema: z$2.ZodObject<{
|
|
7
|
+
scope: z$2.ZodEnum<{
|
|
8
8
|
object: "object";
|
|
9
9
|
system: "system";
|
|
10
10
|
}>;
|
|
11
|
-
target: z$
|
|
12
|
-
actions: z$
|
|
11
|
+
target: z$2.ZodString;
|
|
12
|
+
actions: z$2.ZodArray<z$2.ZodEnum<{
|
|
13
13
|
read: "read";
|
|
14
14
|
create: "create";
|
|
15
15
|
update: "update";
|
|
16
16
|
delete: "delete";
|
|
17
17
|
manage: "manage";
|
|
18
18
|
}>>;
|
|
19
|
-
}, z$
|
|
20
|
-
type PermissionGrant = z$
|
|
21
|
-
interface GrantIssue {
|
|
19
|
+
}, z$2.core.$strict>;
|
|
20
|
+
export type PermissionGrant = z$2.infer<typeof permissionGrantSchema>;
|
|
21
|
+
export interface GrantIssue {
|
|
22
22
|
target: string;
|
|
23
23
|
reason: "shape" | "unknown-resource" | "off-level" | "split-capability" | "unknown-object" | "object-action";
|
|
24
24
|
}
|
|
25
|
-
declare function findGrantIssues(grants: readonly unknown[], context: {
|
|
25
|
+
export declare function findGrantIssues(grants: readonly unknown[], context: {
|
|
26
26
|
objectNames: ReadonlySet<string>;
|
|
27
27
|
}): GrantIssue[];
|
|
28
28
|
//#endregion
|
|
@@ -30,7 +30,7 @@ declare function findGrantIssues(grants: readonly unknown[], context: {
|
|
|
30
30
|
/**
|
|
31
31
|
* Error codes for schema exceptions
|
|
32
32
|
*/
|
|
33
|
-
declare const SchemaErrorCode: {
|
|
33
|
+
export declare const SchemaErrorCode: {
|
|
34
34
|
readonly CONNECTOR_INVALID_SIGNATURE: "SCHEMA_CONNECTOR_INVALID_SIGNATURE";
|
|
35
35
|
readonly DRAFT_REVISION_CONFLICT: "DRAFT_REVISION_CONFLICT";
|
|
36
36
|
readonly UNKNOWN: "SCHEMA_UNKNOWN_ERROR";
|
|
@@ -265,18 +265,18 @@ declare const SchemaErrorCode: {
|
|
|
265
265
|
/** The provider returned vectors whose length differs from the configured dimensions. */
|
|
266
266
|
readonly EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH";
|
|
267
267
|
};
|
|
268
|
-
type SchemaErrorCode = (typeof SchemaErrorCode)[keyof typeof SchemaErrorCode];
|
|
268
|
+
export type SchemaErrorCode = (typeof SchemaErrorCode)[keyof typeof SchemaErrorCode];
|
|
269
269
|
/**
|
|
270
270
|
* Base error class for all schema-related errors
|
|
271
271
|
*/
|
|
272
272
|
/** What a `SchemaError` serialises to; a subclass may withhold `name` and `details`. */
|
|
273
|
-
interface SchemaErrorJson {
|
|
273
|
+
export interface SchemaErrorJson {
|
|
274
274
|
code: SchemaErrorCode;
|
|
275
275
|
message: string;
|
|
276
276
|
name?: string;
|
|
277
277
|
details?: Record<string, unknown>;
|
|
278
278
|
}
|
|
279
|
-
declare class SchemaError extends Error {
|
|
279
|
+
export declare class SchemaError extends Error {
|
|
280
280
|
readonly code: SchemaErrorCode;
|
|
281
281
|
readonly details?: Record<string, unknown>;
|
|
282
282
|
constructor(message: string, code?: SchemaErrorCode, details?: Record<string, unknown>);
|
|
@@ -285,7 +285,7 @@ declare class SchemaError extends Error {
|
|
|
285
285
|
/**
|
|
286
286
|
* Base class for "not found" errors
|
|
287
287
|
*/
|
|
288
|
-
declare class NotFoundError extends SchemaError {
|
|
288
|
+
export declare class NotFoundError extends SchemaError {
|
|
289
289
|
/** Literal discriminator for `Effect.catchTag`; a widened `string` breaks narrowing. */
|
|
290
290
|
readonly _tag = "NotFoundError";
|
|
291
291
|
readonly resourceType: string;
|
|
@@ -295,25 +295,25 @@ declare class NotFoundError extends SchemaError {
|
|
|
295
295
|
/**
|
|
296
296
|
* Object not found error
|
|
297
297
|
*/
|
|
298
|
-
declare class ObjectNotFoundError extends NotFoundError {
|
|
298
|
+
export declare class ObjectNotFoundError extends NotFoundError {
|
|
299
299
|
constructor(objectId: string);
|
|
300
300
|
}
|
|
301
301
|
/**
|
|
302
302
|
* Attribute not found error
|
|
303
303
|
*/
|
|
304
|
-
declare class AttributeNotFoundError extends NotFoundError {
|
|
304
|
+
export declare class AttributeNotFoundError extends NotFoundError {
|
|
305
305
|
constructor(attributeId: string);
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
308
|
* Record not found error
|
|
309
309
|
*/
|
|
310
|
-
declare class RecordNotFoundError extends NotFoundError {
|
|
310
|
+
export declare class RecordNotFoundError extends NotFoundError {
|
|
311
311
|
constructor(recordId: string);
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
314
|
* Validation error with field-level details
|
|
315
315
|
*/
|
|
316
|
-
interface ValidationErrorDetail {
|
|
316
|
+
export interface ValidationErrorDetail {
|
|
317
317
|
path: string[];
|
|
318
318
|
message: string;
|
|
319
319
|
code?: string;
|
|
@@ -321,7 +321,7 @@ interface ValidationErrorDetail {
|
|
|
321
321
|
/**
|
|
322
322
|
* Validation error thrown when data fails schema validation
|
|
323
323
|
*/
|
|
324
|
-
declare class ValidationError extends SchemaError {
|
|
324
|
+
export declare class ValidationError extends SchemaError {
|
|
325
325
|
/** Literal discriminator for `Effect.catchTag`; a widened `string` breaks narrowing. */
|
|
326
326
|
readonly _tag = "ValidationError";
|
|
327
327
|
readonly errors: ValidationErrorDetail[];
|
|
@@ -347,21 +347,21 @@ declare class ValidationError extends SchemaError {
|
|
|
347
347
|
* The first detail's `path[0]` is the declared attribute name, so the boot
|
|
348
348
|
* report pins the refusal to it.
|
|
349
349
|
*/
|
|
350
|
-
declare class AmbiguousSchemaChangeError extends ValidationError {
|
|
350
|
+
export declare class AmbiguousSchemaChangeError extends ValidationError {
|
|
351
351
|
readonly code: "SCHEMA_AMBIGUOUS_CHANGE";
|
|
352
352
|
constructor(message: string, errors: ValidationErrorDetail[]);
|
|
353
353
|
}
|
|
354
|
-
type AggregateErrorCode = typeof SchemaErrorCode.AGGREGATE_MIXED_CURRENCY | typeof SchemaErrorCode.AGGREGATE_SEARCH_UNSUPPORTED;
|
|
354
|
+
export type AggregateErrorCode = typeof SchemaErrorCode.AGGREGATE_MIXED_CURRENCY | typeof SchemaErrorCode.AGGREGATE_SEARCH_UNSUPPORTED;
|
|
355
355
|
/**
|
|
356
356
|
* An aggregate request the runtime cannot answer (`AGGREGATE_*` codes).
|
|
357
357
|
* HTTP status: 400 Bad Request.
|
|
358
358
|
*/
|
|
359
|
-
declare class AggregateValidationError extends ValidationError {
|
|
359
|
+
export declare class AggregateValidationError extends ValidationError {
|
|
360
360
|
readonly code: AggregateErrorCode;
|
|
361
361
|
constructor(code: AggregateErrorCode, message: string, errors?: ValidationErrorDetail[]);
|
|
362
362
|
}
|
|
363
363
|
/** A `content.page` tab that references a page: the record view holding it. */
|
|
364
|
-
interface PageReference {
|
|
364
|
+
export interface PageReference {
|
|
365
365
|
object: string;
|
|
366
366
|
view: string;
|
|
367
367
|
content: string;
|
|
@@ -372,17 +372,17 @@ interface PageReference {
|
|
|
372
372
|
* readers cannot see). Lists every referencing tab.
|
|
373
373
|
* HTTP status: 400 Bad Request.
|
|
374
374
|
*/
|
|
375
|
-
declare class PageReferencedError extends ValidationError {
|
|
375
|
+
export declare class PageReferencedError extends ValidationError {
|
|
376
376
|
readonly code: "PAGE_REFERENCED";
|
|
377
377
|
readonly references: PageReference[];
|
|
378
378
|
constructor(message: string, references: PageReference[]);
|
|
379
379
|
}
|
|
380
|
-
type ToolGroupGrantErrorCode = typeof SchemaErrorCode.AGENT_TOOL_GROUP_UNKNOWN | typeof SchemaErrorCode.AGENT_TOOL_GROUP_NOT_CONTAINED | typeof SchemaErrorCode.AGENT_TOOL_GROUP_SCOPE_MISSING | typeof SchemaErrorCode.AGENT_TOOL_GROUP_HARNESS | typeof SchemaErrorCode.AGENT_TOOL_GROUP_NEEDS_PERSON | typeof SchemaErrorCode.AGENT_TOOL_GROUP_ROUTINE_ONLY | typeof SchemaErrorCode.AGENT_TOOL_GROUP_REQUIRES;
|
|
380
|
+
export type ToolGroupGrantErrorCode = typeof SchemaErrorCode.AGENT_TOOL_GROUP_UNKNOWN | typeof SchemaErrorCode.AGENT_TOOL_GROUP_NOT_CONTAINED | typeof SchemaErrorCode.AGENT_TOOL_GROUP_SCOPE_MISSING | typeof SchemaErrorCode.AGENT_TOOL_GROUP_HARNESS | typeof SchemaErrorCode.AGENT_TOOL_GROUP_NEEDS_PERSON | typeof SchemaErrorCode.AGENT_TOOL_GROUP_ROUTINE_ONLY | typeof SchemaErrorCode.AGENT_TOOL_GROUP_REQUIRES;
|
|
381
381
|
/**
|
|
382
382
|
* A `toolGroups` entry refused by `assertToolGroupsGrantable`.
|
|
383
383
|
* HTTP status: 400 Bad Request.
|
|
384
384
|
*/
|
|
385
|
-
declare class ToolGroupGrantError extends ValidationError {
|
|
385
|
+
export declare class ToolGroupGrantError extends ValidationError {
|
|
386
386
|
readonly code: ToolGroupGrantErrorCode;
|
|
387
387
|
readonly grant: string;
|
|
388
388
|
constructor(code: ToolGroupGrantErrorCode, grant: string, message: string);
|
|
@@ -390,7 +390,7 @@ declare class ToolGroupGrantError extends ValidationError {
|
|
|
390
390
|
/**
|
|
391
391
|
* Error thrown when attempting to modify a protected (system) resource
|
|
392
392
|
*/
|
|
393
|
-
declare class ProtectedResourceError extends SchemaError {
|
|
393
|
+
export declare class ProtectedResourceError extends SchemaError {
|
|
394
394
|
readonly resourceType: "object" | "attribute" | "view";
|
|
395
395
|
readonly resourceName: string;
|
|
396
396
|
readonly operation: "delete" | "modify";
|
|
@@ -399,7 +399,7 @@ declare class ProtectedResourceError extends SchemaError {
|
|
|
399
399
|
/**
|
|
400
400
|
* Error thrown during native object synchronization
|
|
401
401
|
*/
|
|
402
|
-
declare class SyncError extends SchemaError {
|
|
402
|
+
export declare class SyncError extends SchemaError {
|
|
403
403
|
readonly objectName: string;
|
|
404
404
|
readonly cause?: Error;
|
|
405
405
|
constructor(objectName: string, message: string, cause?: Error);
|
|
@@ -409,7 +409,7 @@ declare class SyncError extends SchemaError {
|
|
|
409
409
|
* System entities are declared in code and immutable at runtime.
|
|
410
410
|
* HTTP status: 403 Forbidden.
|
|
411
411
|
*/
|
|
412
|
-
declare class SystemEntityImmutableError extends SchemaError {
|
|
412
|
+
export declare class SystemEntityImmutableError extends SchemaError {
|
|
413
413
|
readonly entityType: string;
|
|
414
414
|
readonly entityName: string;
|
|
415
415
|
constructor(entityType: string, entityName: string);
|
|
@@ -424,7 +424,7 @@ interface SyncConflictParams {
|
|
|
424
424
|
* or constraints. The dev must resolve manually (relax constraints, migrate
|
|
425
425
|
* values, or rename).
|
|
426
426
|
*/
|
|
427
|
-
declare class SyncConflictError extends SchemaError {
|
|
427
|
+
export declare class SyncConflictError extends SchemaError {
|
|
428
428
|
readonly objectName: string;
|
|
429
429
|
readonly attributeName?: string;
|
|
430
430
|
readonly reason: string;
|
|
@@ -435,7 +435,7 @@ declare class SyncConflictError extends SchemaError {
|
|
|
435
435
|
* declared in code. The dev forgot to remove those attributes too, or kept the
|
|
436
436
|
* object inconsistently.
|
|
437
437
|
*/
|
|
438
|
-
declare class SyncCascadeError extends SchemaError {
|
|
438
|
+
export declare class SyncCascadeError extends SchemaError {
|
|
439
439
|
readonly objectName: string;
|
|
440
440
|
readonly conflictingAttributes: string[];
|
|
441
441
|
constructor(objectName: string, conflictingAttributes: string[]);
|
|
@@ -445,7 +445,7 @@ declare class SyncCascadeError extends SchemaError {
|
|
|
445
445
|
* system:false. This invariant should never be violated — if seen, it's a bug
|
|
446
446
|
* in the boot reconciliation logic or in a manual DB mutation.
|
|
447
447
|
*/
|
|
448
|
-
declare class OrphanSystemAttributeError extends SchemaError {
|
|
448
|
+
export declare class OrphanSystemAttributeError extends SchemaError {
|
|
449
449
|
readonly objectName: string;
|
|
450
450
|
readonly attributeName: string;
|
|
451
451
|
constructor(objectName: string, attributeName: string);
|
|
@@ -461,7 +461,7 @@ declare class OrphanSystemAttributeError extends SchemaError {
|
|
|
461
461
|
* domain reads better with different wording (e.g. "already registered for
|
|
462
462
|
* type X").
|
|
463
463
|
*/
|
|
464
|
-
declare class DuplicateError extends SchemaError {
|
|
464
|
+
export declare class DuplicateError extends SchemaError {
|
|
465
465
|
readonly resourceType: string;
|
|
466
466
|
readonly resourceName: string;
|
|
467
467
|
constructor(resourceType: string, resourceName: string, message?: string);
|
|
@@ -480,26 +480,26 @@ declare const RESERVED_NAME_CONTEXTS: {
|
|
|
480
480
|
readonly bundle: "cannot be claimed by a bundle";
|
|
481
481
|
readonly source: "cannot be declared by a schema source";
|
|
482
482
|
};
|
|
483
|
-
declare class ReservedObjectNameError extends SchemaError {
|
|
483
|
+
export declare class ReservedObjectNameError extends SchemaError {
|
|
484
484
|
readonly objectName: string;
|
|
485
485
|
constructor(objectName: string, context: keyof typeof RESERVED_NAME_CONTEXTS);
|
|
486
486
|
}
|
|
487
487
|
/**
|
|
488
488
|
* Check if an error is a SchemaError
|
|
489
489
|
*/
|
|
490
|
-
declare function isSchemaError(error: unknown): error is SchemaError;
|
|
490
|
+
export declare function isSchemaError(error: unknown): error is SchemaError;
|
|
491
491
|
/**
|
|
492
492
|
* Check if an error is a NotFoundError
|
|
493
493
|
*/
|
|
494
|
-
declare function isNotFoundError(error: unknown): error is NotFoundError;
|
|
494
|
+
export declare function isNotFoundError(error: unknown): error is NotFoundError;
|
|
495
495
|
/**
|
|
496
496
|
* Check if an error is a ValidationError
|
|
497
497
|
*/
|
|
498
|
-
declare function isValidationError(error: unknown): error is ValidationError;
|
|
498
|
+
export declare function isValidationError(error: unknown): error is ValidationError;
|
|
499
499
|
/**
|
|
500
500
|
* Check if an error is a ProtectedResourceError
|
|
501
501
|
*/
|
|
502
|
-
declare function isProtectedResourceError(error: unknown): error is ProtectedResourceError;
|
|
502
|
+
export declare function isProtectedResourceError(error: unknown): error is ProtectedResourceError;
|
|
503
503
|
/**
|
|
504
504
|
* Error thrown when a user lacks permission to perform an action.
|
|
505
505
|
*
|
|
@@ -507,7 +507,7 @@ declare function isProtectedResourceError(error: unknown): error is ProtectedRes
|
|
|
507
507
|
* carry a refusal a permission grant would not lift: use `WORKSPACE_INVARIANT`,
|
|
508
508
|
* `STATE_GATE`, `ACTOR_CONTEXT_REQUIRED` or `SYSTEM_ENTITY_IMMUTABLE` instead.
|
|
509
509
|
*/
|
|
510
|
-
declare class ForbiddenError extends SchemaError {
|
|
510
|
+
export declare class ForbiddenError extends SchemaError {
|
|
511
511
|
/** Literal discriminator for `Effect.catchTag`; a widened `string` breaks narrowing. */
|
|
512
512
|
readonly _tag = "ForbiddenError";
|
|
513
513
|
readonly objectName: string;
|
|
@@ -518,7 +518,7 @@ declare class ForbiddenError extends SchemaError {
|
|
|
518
518
|
/**
|
|
519
519
|
* Error thrown when trying to modify a protected role
|
|
520
520
|
*/
|
|
521
|
-
declare class ProtectedRoleError extends SchemaError {
|
|
521
|
+
export declare class ProtectedRoleError extends SchemaError {
|
|
522
522
|
readonly roleName: string;
|
|
523
523
|
readonly operation: "delete" | "modify";
|
|
524
524
|
constructor(roleName: string, operation: "delete" | "modify");
|
|
@@ -528,7 +528,7 @@ declare class ProtectedRoleError extends SchemaError {
|
|
|
528
528
|
* catalog (spec B1): an unknown resource, a level the catalog never declared,
|
|
529
529
|
* a split capability, an unknown object, or a shape the schema rejects.
|
|
530
530
|
*/
|
|
531
|
-
declare class InvalidPermissionGrantError extends SchemaError {
|
|
531
|
+
export declare class InvalidPermissionGrantError extends SchemaError {
|
|
532
532
|
readonly issues: GrantIssue[];
|
|
533
533
|
readonly _tag = "InvalidPermissionGrantError";
|
|
534
534
|
constructor(issues: GrantIssue[]);
|
|
@@ -536,7 +536,7 @@ declare class InvalidPermissionGrantError extends SchemaError {
|
|
|
536
536
|
/**
|
|
537
537
|
* Role not found error
|
|
538
538
|
*/
|
|
539
|
-
declare class RoleNotFoundError extends NotFoundError {
|
|
539
|
+
export declare class RoleNotFoundError extends NotFoundError {
|
|
540
540
|
constructor(roleId: string);
|
|
541
541
|
}
|
|
542
542
|
/**
|
|
@@ -544,17 +544,17 @@ declare class RoleNotFoundError extends NotFoundError {
|
|
|
544
544
|
* Clients should retry the operation with fresh data.
|
|
545
545
|
* Maps to HTTP 409 Conflict.
|
|
546
546
|
*/
|
|
547
|
-
declare class ConcurrentModificationError extends SchemaError {
|
|
547
|
+
export declare class ConcurrentModificationError extends SchemaError {
|
|
548
548
|
constructor(recordId: string);
|
|
549
549
|
}
|
|
550
550
|
/**
|
|
551
551
|
* Storage operation type for error context
|
|
552
552
|
*/
|
|
553
|
-
type StorageOperation = "upload" | "download" | "delete" | "signedUrl";
|
|
553
|
+
export type StorageOperation = "upload" | "download" | "delete" | "signedUrl";
|
|
554
554
|
/**
|
|
555
555
|
* Error thrown when a storage operation fails
|
|
556
556
|
*/
|
|
557
|
-
declare class StorageError extends SchemaError {
|
|
557
|
+
export declare class StorageError extends SchemaError {
|
|
558
558
|
readonly operation: StorageOperation;
|
|
559
559
|
readonly path?: string;
|
|
560
560
|
readonly cause?: string;
|
|
@@ -563,7 +563,7 @@ declare class StorageError extends SchemaError {
|
|
|
563
563
|
/**
|
|
564
564
|
* Error thrown when access to a resource is denied (e.g., tenant path mismatch)
|
|
565
565
|
*/
|
|
566
|
-
declare class AccessDeniedError extends SchemaError {
|
|
566
|
+
export declare class AccessDeniedError extends SchemaError {
|
|
567
567
|
readonly resource: string;
|
|
568
568
|
readonly reason?: string;
|
|
569
569
|
constructor(resource: string, reason?: string);
|
|
@@ -571,11 +571,11 @@ declare class AccessDeniedError extends SchemaError {
|
|
|
571
571
|
/**
|
|
572
572
|
* Repository operation type for error context
|
|
573
573
|
*/
|
|
574
|
-
type RepositoryOperation = "create" | "update" | "delete" | "query";
|
|
574
|
+
export type RepositoryOperation = "create" | "update" | "delete" | "query";
|
|
575
575
|
/**
|
|
576
576
|
* Error thrown when a repository operation fails
|
|
577
577
|
*/
|
|
578
|
-
declare class RepositoryError extends SchemaError {
|
|
578
|
+
export declare class RepositoryError extends SchemaError {
|
|
579
579
|
readonly operation: RepositoryOperation;
|
|
580
580
|
readonly entity: string;
|
|
581
581
|
readonly cause?: string;
|
|
@@ -593,8 +593,8 @@ declare class RepositoryError extends SchemaError {
|
|
|
593
593
|
* - `rejected` — the backend refused this payload (malformed, too large).
|
|
594
594
|
* Deterministic: the same payload is refused again.
|
|
595
595
|
*/
|
|
596
|
-
type SearchBackendFailureKind = "unavailable" | "capacity" | "rejected";
|
|
597
|
-
interface SearchBackendErrorOptions {
|
|
596
|
+
export type SearchBackendFailureKind = "unavailable" | "capacity" | "rejected";
|
|
597
|
+
export interface SearchBackendErrorOptions {
|
|
598
598
|
/** Defaults to `unavailable`. */
|
|
599
599
|
kind?: SearchBackendFailureKind;
|
|
600
600
|
/** The backend's own machine code, e.g. Meili's `malformed_payload`. */
|
|
@@ -619,7 +619,7 @@ interface SearchBackendErrorOptions {
|
|
|
619
619
|
* fixed `detail` in its message, so a full disk pages as itself rather than
|
|
620
620
|
* as a transient outage.
|
|
621
621
|
*/
|
|
622
|
-
declare class SearchBackendError extends SchemaError {
|
|
622
|
+
export declare class SearchBackendError extends SchemaError {
|
|
623
623
|
readonly scope: string;
|
|
624
624
|
readonly cause?: string;
|
|
625
625
|
readonly kind: SearchBackendFailureKind;
|
|
@@ -633,7 +633,7 @@ declare class SearchBackendError extends SchemaError {
|
|
|
633
633
|
* succeed; the records query service answers the read through Postgres
|
|
634
634
|
* instead, so a search never returns a wrong or failed answer for it.
|
|
635
635
|
*/
|
|
636
|
-
declare class SearchPathNotIndexedError extends SchemaError {
|
|
636
|
+
export declare class SearchPathNotIndexedError extends SchemaError {
|
|
637
637
|
readonly scope: string;
|
|
638
638
|
readonly role: "filter" | "sort";
|
|
639
639
|
readonly cause?: string;
|
|
@@ -642,7 +642,7 @@ declare class SearchPathNotIndexedError extends SchemaError {
|
|
|
642
642
|
/**
|
|
643
643
|
* Error thrown when a feature or method is not yet implemented
|
|
644
644
|
*/
|
|
645
|
-
declare class NotImplementedError extends SchemaError {
|
|
645
|
+
export declare class NotImplementedError extends SchemaError {
|
|
646
646
|
readonly feature: string;
|
|
647
647
|
readonly milestone?: string;
|
|
648
648
|
constructor(feature: string, milestone?: string);
|
|
@@ -650,13 +650,13 @@ declare class NotImplementedError extends SchemaError {
|
|
|
650
650
|
/**
|
|
651
651
|
* Memory entry not found error
|
|
652
652
|
*/
|
|
653
|
-
declare class MemoryNotFoundError extends NotFoundError {
|
|
653
|
+
export declare class MemoryNotFoundError extends NotFoundError {
|
|
654
654
|
constructor(memoryId: string);
|
|
655
655
|
}
|
|
656
656
|
/**
|
|
657
657
|
* Reference information for a record that is blocking deletion.
|
|
658
658
|
*/
|
|
659
|
-
interface RecordReference {
|
|
659
|
+
export interface RecordReference {
|
|
660
660
|
/** Technical name of the object (e.g., "contacts") */
|
|
661
661
|
objectName: string;
|
|
662
662
|
/** Display label of the object (e.g., "Contacts") */
|
|
@@ -670,7 +670,7 @@ interface RecordReference {
|
|
|
670
670
|
* This implements the "Restrict" behavior: deletion is blocked and the user
|
|
671
671
|
* must first remove or update the referencing records.
|
|
672
672
|
*/
|
|
673
|
-
declare class RecordReferencedError extends SchemaError {
|
|
673
|
+
export declare class RecordReferencedError extends SchemaError {
|
|
674
674
|
readonly recordId: string;
|
|
675
675
|
readonly references: RecordReference[];
|
|
676
676
|
constructor(recordId: string, references: RecordReference[]);
|
|
@@ -678,7 +678,7 @@ declare class RecordReferencedError extends SchemaError {
|
|
|
678
678
|
/**
|
|
679
679
|
* Usage context where an attribute is being used.
|
|
680
680
|
*/
|
|
681
|
-
type AttributeUsage = "labelExpression" | "embeddingExpression" | "view" | "filter";
|
|
681
|
+
export type AttributeUsage = "labelExpression" | "embeddingExpression" | "view" | "filter";
|
|
682
682
|
/**
|
|
683
683
|
* Thrown when attempting to delete an attribute that is in use.
|
|
684
684
|
*
|
|
@@ -687,7 +687,7 @@ type AttributeUsage = "labelExpression" | "embeddingExpression" | "view" | "filt
|
|
|
687
687
|
* - A saved view's column configuration
|
|
688
688
|
* - A saved filter condition
|
|
689
689
|
*/
|
|
690
|
-
declare class AttributeInUseError extends SchemaError {
|
|
690
|
+
export declare class AttributeInUseError extends SchemaError {
|
|
691
691
|
readonly attributeName: string;
|
|
692
692
|
readonly usage: AttributeUsage;
|
|
693
693
|
/** Where exactly, when the usage alone would not let the caller find it. */
|
|
@@ -700,7 +700,7 @@ declare class AttributeInUseError extends SchemaError {
|
|
|
700
700
|
* Objects cannot be deleted if other objects have relation attributes
|
|
701
701
|
* pointing to them as a target.
|
|
702
702
|
*/
|
|
703
|
-
declare class ObjectReferencedError extends SchemaError {
|
|
703
|
+
export declare class ObjectReferencedError extends SchemaError {
|
|
704
704
|
readonly objectName: string;
|
|
705
705
|
readonly referencingObjects: string[];
|
|
706
706
|
constructor(objectName: string, referencingObjects: string[]);
|
|
@@ -712,7 +712,7 @@ declare class ObjectReferencedError extends SchemaError {
|
|
|
712
712
|
* the server publisher can share one error vocabulary without either package
|
|
713
713
|
* depending on the other.
|
|
714
714
|
*/
|
|
715
|
-
declare class RealtimeRateLimitedError extends SchemaError {
|
|
715
|
+
export declare class RealtimeRateLimitedError extends SchemaError {
|
|
716
716
|
constructor();
|
|
717
717
|
}
|
|
718
718
|
/**
|
|
@@ -721,7 +721,7 @@ declare class RealtimeRateLimitedError extends SchemaError {
|
|
|
721
721
|
* the scope grew past the cap during the read, mid-stream (`atLeast`: the
|
|
722
722
|
* total is a lower bound), where the transport destroys the connection.
|
|
723
723
|
*/
|
|
724
|
-
declare class ExportTooLargeError extends SchemaError {
|
|
724
|
+
export declare class ExportTooLargeError extends SchemaError {
|
|
725
725
|
constructor(total: number, max: number, { atLeast }?: {
|
|
726
726
|
atLeast?: boolean;
|
|
727
727
|
});
|
|
@@ -731,32 +731,31 @@ declare class ExportTooLargeError extends SchemaError {
|
|
|
731
731
|
* block's aggregate or list. The caller may retry; nothing was written.
|
|
732
732
|
* HTTP status: 504 Gateway Timeout.
|
|
733
733
|
*/
|
|
734
|
-
declare class QueryTimeoutError extends SchemaError {
|
|
734
|
+
export declare class QueryTimeoutError extends SchemaError {
|
|
735
735
|
constructor();
|
|
736
736
|
}
|
|
737
737
|
/**
|
|
738
738
|
* A Supabase Realtime publish did not reach the channel.
|
|
739
739
|
*/
|
|
740
|
-
declare class RealtimeDeliveryError extends SchemaError {
|
|
740
|
+
export declare class RealtimeDeliveryError extends SchemaError {
|
|
741
741
|
constructor();
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
744
|
* A Supabase Realtime channel could not be subscribed to.
|
|
745
745
|
*/
|
|
746
|
-
declare class RealtimeSubscriptionError extends SchemaError {
|
|
746
|
+
export declare class RealtimeSubscriptionError extends SchemaError {
|
|
747
747
|
constructor();
|
|
748
748
|
}
|
|
749
749
|
/**
|
|
750
750
|
* Check if an error is a RecordReferencedError
|
|
751
751
|
*/
|
|
752
|
-
declare function isRecordReferencedError(error: unknown): error is RecordReferencedError;
|
|
752
|
+
export declare function isRecordReferencedError(error: unknown): error is RecordReferencedError;
|
|
753
753
|
/**
|
|
754
754
|
* Check if an error is an AttributeInUseError
|
|
755
755
|
*/
|
|
756
|
-
declare function isAttributeInUseError(error: unknown): error is AttributeInUseError;
|
|
756
|
+
export declare function isAttributeInUseError(error: unknown): error is AttributeInUseError;
|
|
757
757
|
/**
|
|
758
758
|
* Check if an error is an ObjectReferencedError
|
|
759
759
|
*/
|
|
760
|
-
declare function isObjectReferencedError(error: unknown): error is ObjectReferencedError;
|
|
761
|
-
//#endregion
|
|
762
|
-
export { isObjectReferencedError as $, RepositoryError as A, SearchPathNotIndexedError as B, QueryTimeoutError as C, RecordNotFoundError as D, RealtimeSubscriptionError as E, SchemaErrorCode as F, SyncError as G, StorageOperation as H, SchemaErrorJson as I, ToolGroupGrantErrorCode as J, SystemEntityImmutableError as K, SearchBackendError as L, ReservedObjectNameError as M, RoleNotFoundError as N, RecordReference as O, SchemaError as P, isNotFoundError as Q, SearchBackendErrorOptions as R, ProtectedRoleError as S, RealtimeRateLimitedError as T, SyncCascadeError as U, StorageError as V, SyncConflictError as W, ValidationErrorDetail as X, ValidationError as Y, isAttributeInUseError as Z, ObjectReferencedError as _, AttributeInUseError as a, PERMISSION_ACTIONS as at, PageReferencedError as b, ConcurrentModificationError as c, permissionGrantSchema as ct, ForbiddenError as d, isProtectedResourceError as et, InvalidPermissionGrantError as f, ObjectNotFoundError as g, NotImplementedError as h, AmbiguousSchemaChangeError as i, GrantIssue as it, RepositoryOperation as j, RecordReferencedError as k, DuplicateError as l, NotFoundError as m, AggregateErrorCode as n, isSchemaError as nt, AttributeNotFoundError as o, PermissionGrant as ot, MemoryNotFoundError as p, ToolGroupGrantError as q, AggregateValidationError as r, isValidationError as rt, AttributeUsage as s, findGrantIssues as st, AccessDeniedError as t, isRecordReferencedError as tt, ExportTooLargeError as u, OrphanSystemAttributeError as v, RealtimeDeliveryError as w, ProtectedResourceError as x, PageReference as y, SearchBackendFailureKind as z };
|
|
760
|
+
export declare function isObjectReferencedError(error: unknown): error is ObjectReferencedError;
|
|
761
|
+
//#endregion
|
package/dist/exceptions.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { AccessDeniedError, AggregateErrorCode, AggregateValidationError, AmbiguousSchemaChangeError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ConcurrentModificationError, DuplicateError, ExportTooLargeError, ForbiddenError, InvalidPermissionGrantError, MemoryNotFoundError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, PageReference, PageReferencedError, ProtectedResourceError, ProtectedRoleError, QueryTimeoutError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaErrorJson, SearchBackendError, SearchBackendErrorOptions, SearchBackendFailureKind, SearchPathNotIndexedError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ToolGroupGrantError, ToolGroupGrantErrorCode, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from "./exceptions-CgzBcQIl.mjs";
|
|
3
3
|
export { AccessDeniedError, AggregateErrorCode, AggregateValidationError, AmbiguousSchemaChangeError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ConcurrentModificationError, DuplicateError, ExportTooLargeError, ForbiddenError, InvalidPermissionGrantError, MemoryNotFoundError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, PageReference, PageReferencedError, ProtectedResourceError, ProtectedRoleError, QueryTimeoutError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaErrorJson, SearchBackendError, SearchBackendErrorOptions, SearchBackendFailureKind, SearchPathNotIndexedError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ToolGroupGrantError, ToolGroupGrantErrorCode, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
package/dist/exceptions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { AccessDeniedError, AggregateErrorCode, AggregateValidationError, AmbiguousSchemaChangeError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ConcurrentModificationError, DuplicateError, ExportTooLargeError, ForbiddenError, InvalidPermissionGrantError, MemoryNotFoundError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, PageReference, PageReferencedError, ProtectedResourceError, ProtectedRoleError, QueryTimeoutError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaErrorJson, SearchBackendError, SearchBackendErrorOptions, SearchBackendFailureKind, SearchPathNotIndexedError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ToolGroupGrantError, ToolGroupGrantErrorCode, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from "./exceptions-CgzBcQIl.js";
|
|
3
3
|
export { AccessDeniedError, AggregateErrorCode, AggregateValidationError, AmbiguousSchemaChangeError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ConcurrentModificationError, DuplicateError, ExportTooLargeError, ForbiddenError, InvalidPermissionGrantError, MemoryNotFoundError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, PageReference, PageReferencedError, ProtectedResourceError, ProtectedRoleError, QueryTimeoutError, RealtimeDeliveryError, RealtimeRateLimitedError, RealtimeSubscriptionError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaErrorJson, SearchBackendError, SearchBackendErrorOptions, SearchBackendFailureKind, SearchPathNotIndexedError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ToolGroupGrantError, ToolGroupGrantErrorCode, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import { ObjectDefinition } from "./objects-DxEMaC2Z.mjs";
|
|
3
|
+
import { Attribute } from "./attributes-eqr1vdPP.mjs";
|
|
4
|
+
import { ValidationMessages, ValidationResult } from "./index-zJz3LbXr.mjs";
|
|
5
|
+
import * as z$2 from "zod";
|
|
6
6
|
//#region src/validation/object/attribute-factory.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Create a Zod schema for any attribute type.
|
|
@@ -12,7 +12,7 @@ import { z as z$1 } from "zod";
|
|
|
12
12
|
* @param attr - The attribute to create a validator for
|
|
13
13
|
* @param messages - Custom validation messages for i18n support
|
|
14
14
|
*/
|
|
15
|
-
declare function createAttributeValidator(attr: Attribute, messages?: ValidationMessages): z$
|
|
15
|
+
export declare function createAttributeValidator(attr: Attribute, messages?: ValidationMessages): z$2.ZodTypeAny;
|
|
16
16
|
/**
|
|
17
17
|
* Create a Zod schema for form validation.
|
|
18
18
|
* - Normalizes empty values (empty strings, empty objects) to null for optional fields
|
|
@@ -23,7 +23,7 @@ declare function createAttributeValidator(attr: Attribute, messages?: Validation
|
|
|
23
23
|
* @param attr - The attribute to create a validator for
|
|
24
24
|
* @param messages - Custom validation messages for i18n support
|
|
25
25
|
*/
|
|
26
|
-
declare function createFormAttributeValidator(attr: Attribute, messages?: ValidationMessages): z$
|
|
26
|
+
export declare function createFormAttributeValidator(attr: Attribute, messages?: ValidationMessages): z$2.ZodTypeAny;
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/validation/object/object-validator.d.ts
|
|
29
29
|
/**
|
|
@@ -35,7 +35,7 @@ declare function createFormAttributeValidator(attr: Attribute, messages?: Valida
|
|
|
35
35
|
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
36
36
|
* are stable after module load and never mutated at runtime.
|
|
37
37
|
*/
|
|
38
|
-
declare function createObjectValidator(objectDef: ObjectDefinition): z$
|
|
38
|
+
export declare function createObjectValidator(objectDef: ObjectDefinition): z$2.ZodType<Record<string, unknown>>;
|
|
39
39
|
/**
|
|
40
40
|
* Create a Zod schema for draft validation.
|
|
41
41
|
* All attributes become optional, but provided values are still validated.
|
|
@@ -46,37 +46,37 @@ declare function createObjectValidator(objectDef: ObjectDefinition): z$1.ZodType
|
|
|
46
46
|
* Result is cached per ObjectDefinition instance — safe because ObjectDefinitions
|
|
47
47
|
* are stable after module load and never mutated at runtime.
|
|
48
48
|
*/
|
|
49
|
-
declare function createDraftValidator(objectDef: ObjectDefinition): z$
|
|
49
|
+
export declare function createDraftValidator(objectDef: ObjectDefinition): z$2.ZodType<Record<string, unknown>>;
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/validation/object/helpers.d.ts
|
|
52
52
|
/**
|
|
53
53
|
* Validate data against an attribute schema
|
|
54
54
|
*/
|
|
55
|
-
declare function validateAttribute(attr: Attribute, value: unknown): ValidationResult;
|
|
55
|
+
export declare function validateAttribute(attr: Attribute, value: unknown): ValidationResult;
|
|
56
56
|
/**
|
|
57
57
|
* Validate data against an object schema
|
|
58
58
|
*/
|
|
59
|
-
declare function validateObject(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
59
|
+
export declare function validateObject(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
60
60
|
/**
|
|
61
61
|
* Validate and throw if invalid.
|
|
62
62
|
*
|
|
63
63
|
* Throws `ValidationError` (code `SCHEMA_VALIDATION_FAILED`) on failure so HTTP
|
|
64
64
|
* adapters can map it to 400. Generic `Error` would bubble up to a 500.
|
|
65
65
|
*/
|
|
66
|
-
declare function validateObjectOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
66
|
+
export declare function validateObjectOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
67
67
|
/**
|
|
68
68
|
* Validate data in draft mode.
|
|
69
69
|
* - All attributes are treated as optional (no required validation)
|
|
70
70
|
* - Provided values are still validated for format/type correctness
|
|
71
71
|
*/
|
|
72
|
-
declare function validateDraft(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
72
|
+
export declare function validateDraft(objectDef: ObjectDefinition, data: Record<string, unknown>): ValidationResult;
|
|
73
73
|
/**
|
|
74
74
|
* Validate draft data and throw if format validation fails.
|
|
75
75
|
*
|
|
76
76
|
* Same contract as `validateObjectOrThrow` but skips `required()` checks.
|
|
77
77
|
* Throws `ValidationError` so HTTP adapters map it to 400.
|
|
78
78
|
*/
|
|
79
|
-
declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
79
|
+
export declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
|
|
80
80
|
/**
|
|
81
81
|
* Throw a `ValidationError` when `data` contains keys that do not correspond
|
|
82
82
|
* to any attribute declared on `objectDef`.
|
|
@@ -88,14 +88,13 @@ declare function validateDraftOrThrow(objectDef: ObjectDefinition, data: Record<
|
|
|
88
88
|
*
|
|
89
89
|
* Maps to HTTP 400 via `SchemaExceptionFilter` (code SCHEMA_VALIDATION_FAILED).
|
|
90
90
|
*/
|
|
91
|
-
declare function rejectUnknownAttributesOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): void;
|
|
91
|
+
export declare function rejectUnknownAttributesOrThrow(objectDef: ObjectDefinition, data: Record<string, unknown>): void;
|
|
92
92
|
/**
|
|
93
93
|
* Get the list of required attributes that are missing values.
|
|
94
94
|
*/
|
|
95
|
-
declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data: Record<string, unknown>): Attribute[];
|
|
95
|
+
export declare function getMissingRequiredAttributes(objectDef: ObjectDefinition, data: Record<string, unknown>): Attribute[];
|
|
96
96
|
/**
|
|
97
97
|
* Check if a record is complete (all required attributes have valid values).
|
|
98
98
|
*/
|
|
99
|
-
declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
|
|
100
|
-
//#endregion
|
|
101
|
-
export { validateDraft as a, validateObjectOrThrow as c, createAttributeValidator as d, createFormAttributeValidator as f, validateAttribute as i, createDraftValidator as l, isRecordComplete as n, validateDraftOrThrow as o, rejectUnknownAttributesOrThrow as r, validateObject as s, getMissingRequiredAttributes as t, createObjectValidator as u };
|
|
99
|
+
export declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<string, unknown>): boolean;
|
|
100
|
+
//#endregion
|