@judo/actions 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/api/constants.d.ts +2 -0
  2. package/dist/api/constants.d.ts.map +1 -1
  3. package/dist/api/index.d.ts +8 -8
  4. package/dist/api/judo-rest-api.d.ts +19 -5
  5. package/dist/api/judo-rest-api.d.ts.map +1 -1
  6. package/dist/api/model-converters.d.ts +5 -2
  7. package/dist/api/path-builder.d.ts +6 -2
  8. package/dist/api/transfer-deserializer.d.ts +24 -1
  9. package/dist/api/transfer-serializer.d.ts +27 -1
  10. package/dist/api/types.d.ts.map +1 -1
  11. package/dist/handlers/autocomplete/autocomplete-handlers.d.ts +1 -1
  12. package/dist/handlers/autocomplete/index.d.ts +1 -1
  13. package/dist/handlers/crud/crud-handlers.d.ts +1 -1
  14. package/dist/handlers/crud/crud-handlers.d.ts.map +1 -1
  15. package/dist/handlers/crud/index.d.ts +1 -1
  16. package/dist/handlers/form/form-handlers.d.ts +1 -1
  17. package/dist/handlers/form/index.d.ts +1 -1
  18. package/dist/handlers/index.d.ts +9 -9
  19. package/dist/handlers/navigation/index.d.ts +1 -1
  20. package/dist/handlers/navigation/navigation-handlers.d.ts +1 -1
  21. package/dist/handlers/operation/index.d.ts +1 -1
  22. package/dist/handlers/operation/operation-handlers.d.ts +1 -1
  23. package/dist/handlers/operation/operation-handlers.d.ts.map +1 -1
  24. package/dist/handlers/other/index.d.ts +1 -1
  25. package/dist/handlers/other/other-handlers.d.ts +1 -1
  26. package/dist/handlers/relation/index.d.ts +1 -1
  27. package/dist/handlers/relation/relation-handlers.d.ts +1 -1
  28. package/dist/handlers/selector/index.d.ts +1 -1
  29. package/dist/handlers/selector/selector-handlers.d.ts +1 -1
  30. package/dist/handlers/table/index.d.ts +1 -1
  31. package/dist/handlers/table/table-handlers.d.ts +1 -1
  32. package/dist/hooks/index.d.ts +2 -2
  33. package/dist/hooks/use-action-dispatcher.d.ts +3 -3
  34. package/dist/hooks/use-action-handler.d.ts +1 -1
  35. package/dist/index.d.ts +12 -12
  36. package/dist/index.js +361 -325
  37. package/dist/index.js.map +1 -1
  38. package/dist/lifecycle/error-interceptor.d.ts +40 -0
  39. package/dist/lifecycle/error-interceptor.d.ts.map +1 -0
  40. package/dist/lifecycle/execute-with-lifecycle.d.ts +10 -2
  41. package/dist/lifecycle/index.d.ts +2 -1
  42. package/dist/lifecycle/index.d.ts.map +1 -1
  43. package/dist/provider/api-context.d.ts +2 -2
  44. package/dist/provider/index.d.ts +1 -1
  45. package/dist/registry/action-handler-registry.d.ts +1 -1
  46. package/dist/registry/index.d.ts +1 -1
  47. package/dist/types.d.ts +14 -4
  48. package/dist/types.d.ts.map +1 -1
  49. package/package.json +5 -5
  50. package/dist/types-BRqo2AHD.js +0 -23
  51. package/dist/types-BRqo2AHD.js.map +0 -1
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Error handler interceptor integration for the action error pipeline.
3
+ *
4
+ * Bridges the `errorHandlerInterceptor` customization (resolved in `@judo/core`
5
+ * and threaded through the action context, so `@judo/actions` stays free of a
6
+ * `@judo/core` dependency) into the built-in handlers' error handling.
7
+ */
8
+ import type { ErrorHandlerInterceptorHook, ErrorHandlingOption } from "@judo/model-api";
9
+ /**
10
+ * Apply the error handler interceptor, if registered, to an error.
11
+ *
12
+ * Checks `shouldInterceptError(error, options)`; when it returns `true`, calls
13
+ * `interceptError(error, options, payload, dataPath)` and returns `true` so the
14
+ * caller skips its default error handling. When no interceptor is registered or
15
+ * it declines the error, returns `false` and the caller runs default handling.
16
+ *
17
+ * @param error - The error thrown by the failing dispatch.
18
+ * @param interceptor - The interceptor from the action context (optional).
19
+ * @param options - Contextual options describing the failing operation.
20
+ * @param payload - Optional request payload that triggered the error.
21
+ * @param dataPath - Optional data path associated with the failing call.
22
+ * @returns `true` when the interceptor handled the error (skip default handling).
23
+ */
24
+ export declare function maybeInterceptError(error: unknown, interceptor?: ErrorHandlerInterceptorHook, options?: ErrorHandlingOption, payload?: unknown, dataPath?: string): boolean;
25
+ /**
26
+ * Default CRUD error handling: store the error on the transfer so the container
27
+ * error boundary can render it. When an `errorHandlerInterceptor` accepts the
28
+ * error first, the default `setTransferError` is skipped.
29
+ *
30
+ * @param interceptor - The interceptor from the action context (may be undefined).
31
+ * @param setTransferError - The data store's `setTransferError` (may be undefined).
32
+ * @param transferId - The transfer id to associate the error with.
33
+ * @param error - The error thrown by the failing dispatch.
34
+ * @param options - Contextual options describing the failing operation.
35
+ * @returns `true` when the interceptor handled the error (default handling skipped).
36
+ */
37
+ export declare function handleCrudError(interceptor: ErrorHandlerInterceptorHook | undefined, data: {
38
+ setTransferError(id: string, error: Error): void;
39
+ } | undefined, transferId: string, error: unknown, options?: ErrorHandlingOption): boolean;
40
+ //# sourceMappingURL=error-interceptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-interceptor.d.ts","sourceRoot":"","sources":["../../src/lifecycle/error-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAExF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,2BAA2B,EACzC,OAAO,CAAC,EAAE,mBAAmB,EAC7B,OAAO,CAAC,EAAE,OAAO,EACjB,QAAQ,CAAC,EAAE,MAAM,GACf,OAAO,CAMT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC9B,WAAW,EAAE,2BAA2B,GAAG,SAAS,EACpD,IAAI,EAAE;IAAE,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,EACtE,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAMT"}
@@ -1,5 +1,13 @@
1
- import { ActionLifecycle, ActionHandlerContext, ActionHandlerFn } from '@judo/model-api';
2
- import { Action } from '../types';
1
+ /**
2
+ * Action lifecycle execution engine.
3
+ *
4
+ * Composes lifecycle overrides with built-in action handlers.
5
+ * The lifecycle wraps the default handler with before/after/onError hooks
6
+ * and allows full replacement of the execute phase.
7
+ */
8
+ import type { ActionLifecycle } from "@judo/model-api";
9
+ import type { ActionHandlerContext, ActionHandlerFn } from "@judo/model-api";
10
+ import type { Action } from "../types";
3
11
  /**
4
12
  * Execute an action with lifecycle overrides composed around a default handler.
5
13
  *
@@ -1,2 +1,3 @@
1
- export { executeWithLifecycle } from './execute-with-lifecycle';
1
+ export { executeWithLifecycle } from "./execute-with-lifecycle";
2
+ export { maybeInterceptError, handleCrudError } from "./error-interceptor";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { JudoRestApi } from '../api/judo-rest-api';
1
+ import { type ReactNode } from "react";
2
+ import type { JudoRestApi } from "../api/judo-rest-api";
3
3
  /**
4
4
  * API context type.
5
5
  */
@@ -1,2 +1,2 @@
1
- export { ApiProvider, useApi, type ApiContextType, type ApiProviderProps } from './api-context';
1
+ export { ApiProvider, useApi, type ApiContextType, type ApiProviderProps } from "./api-context";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Action, ActionHandlerHook } from '../types';
1
+ import type { Action, ActionHandlerHook } from "../types";
2
2
  /**
3
3
  * Get the handler for an action.
4
4
  * Returns the handler hook if found, undefined otherwise.
@@ -1,2 +1,2 @@
1
- export { getActionHandler, hasActionHandler } from './action-handler-registry';
1
+ export { getActionHandler, hasActionHandler } from "./action-handler-registry";
2
2
  //# sourceMappingURL=index.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { Action, Application } from '@judo/model-api';
2
1
  /**
3
2
  * @judo/actions - Type definitions
4
3
  *
@@ -9,8 +8,9 @@ import { Action, Application } from '@judo/model-api';
9
8
  * because model-api uses `unknown` for maximum flexibility, but built-in handlers
10
9
  * need typed access to navigation, data store, and registry services.
11
10
  */
12
- export type { Action, ActionDefinition, Application } from '@judo/model-api';
13
- export { ACTION_HANDLER_FACTORY } from '@judo/model-api';
11
+ export type { Action, ActionDefinition, Application } from "@judo/model-api";
12
+ export { ACTION_HANDLER_FACTORY } from "@judo/model-api";
13
+ import type { Action, Application, ErrorHandlerInterceptorHook } from "@judo/model-api";
14
14
  /**
15
15
  * Action types supported by the action handlers.
16
16
  */
@@ -218,8 +218,18 @@ export interface TypedActionHandlerContext {
218
218
  * Used by callers (e.g., TableRenderer) to refresh data after successful creates.
219
219
  */
220
220
  onDialogClose?: (result?: DialogCloseResult) => void;
221
+ /**
222
+ * Error handler interceptor, threaded from the `errorHandlerInterceptor`
223
+ * customization via the rendering layer. When present, built-in handlers
224
+ * check `shouldInterceptError` before their default error handling and
225
+ * delegate to `interceptError` when it returns `true`.
226
+ *
227
+ * Injected through the action context to keep `@judo/actions` free of a
228
+ * `@judo/core` dependency.
229
+ */
230
+ errorHandlerInterceptor?: ErrorHandlerInterceptorHook;
221
231
  }
222
- export type { ActionHandlerFn, ActionHandlerHook } from '@judo/model-api';
232
+ export type { ActionHandlerFn, ActionHandlerHook } from "@judo/model-api";
223
233
  /**
224
234
  * Typed handler function for built-in handlers.
225
235
  * Uses TypedActionHandlerContext instead of base ActionHandlerContext.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,UAAU,GAEnB,sBAAsB,GACtB,0BAA0B,GAC1B,6BAA6B,GAC7B,wBAAwB,GAExB,0BAA0B,GAC1B,gCAAgC,GAChC,wCAAwC,GAExC,8BAA8B,GAC9B,iCAAiC,GACjC,iCAAiC,GACjC,4CAA4C,GAC5C,+BAA+B,GAE/B,yBAAyB,GACzB,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,4BAA4B,GAC5B,2BAA2B,GAC3B,6BAA6B,GAE7B,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,uBAAuB,GACvB,iCAAiC,GACjC,gCAAgC,GAEhC,wBAAwB,GACxB,wBAAwB,GACxB,iCAAiC,GAEjC,+BAA+B,GAC/B,mCAAmC,GACnC,wCAAwC,GACxC,4CAA4C,GAC5C,4CAA4C,GAE5C,mCAAmC,GACnC,iCAAiC,GACjC,iCAAiC,GAEjC,0BAA0B,GAC1B,wBAAwB,CAAC;AAE5B;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI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2
  "name": "@judo/actions",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "license": "EPL-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,19 +26,19 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@judo/model-api": "0.31.0"
29
+ "@judo/model-api": "0.33.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@testing-library/react": "^16.3.2",
33
33
  "@types/react": "^19.2.14",
34
- "typescript": "^6.0.2",
35
- "vitest": "^4.1.2"
34
+ "typescript": "^7.0.2",
35
+ "vitest": "^4.1.4"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": "^19.0.0"
39
39
  },
40
40
  "scripts": {
41
- "build": "vite build",
41
+ "build": "vite build && tsc --composite false --emitDeclarationOnly",
42
42
  "test": "vitest run",
43
43
  "test:coverage": "vitest run --coverage"
44
44
  }
@@ -1,23 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.defineProperty, t = /* @__PURE__ */ ((t, n) => {
3
- let r = {};
4
- for (var i in t) e(r, i, {
5
- get: t[i],
6
- enumerable: !0
7
- });
8
- return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
- })({ ValidationError: () => n }), n = class extends Error {
10
- feedbackItems;
11
- status = 400;
12
- constructor(e) {
13
- let t = e.find((e) => e.level === "ERROR");
14
- super(t?.message ?? "Validation failed"), this.name = "ValidationError", this.feedbackItems = e;
15
- }
16
- toFieldErrors() {
17
- let e = {};
18
- for (let t of this.feedbackItems) t.level === "ERROR" && t.location && (e[t.location] = t.message ?? t.code);
19
- return e;
20
- }
21
- };
22
- //#endregion
23
- export { t as n, n as t };
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-BRqo2AHD.js","names":[],"sources":["../src/api/types.ts"],"sourcesContent":["/**\n * JUDO REST API types.\n * Based on REST_REQUEST_MAPPING_SPECIFICATION.md\n */\n\n// ============================================\n// HTTP/Response Types\n// ============================================\n\n/**\n * HTTP method types used in the REST layer.\n * GET is used for template retrieval, file downloads, metadata, principal.\n * POST is used for all other operations (CRUD, list, range, operations, validation).\n */\nexport type HttpMethod = \"GET\" | \"POST\";\n\n/**\n * Response type indicating how to handle the response body.\n */\nexport type ResponseType = \"json\" | \"blob\";\n\n/**\n * How to deserialize the response.\n * - single: Deserialize as a single transfer\n * - array: Deserialize as an array of transfers\n * - void: No deserialization needed (response is empty)\n * - nullable: Deserialize as single transfer or null\n */\nexport type DeserializationType = \"single\" | \"array\" | \"void\" | \"nullable\";\n\n/**\n * Service type categories.\n */\nexport type ServiceType = \"class\" | \"relation\" | \"access\";\n\n// ============================================\n// Serialization/Deserialization\n// ============================================\n\n/**\n * Configuration for deserializing the response.\n */\nexport interface ResponseDeserializerConfig {\n\t/** Type of deserialization to apply */\n\ttype: DeserializationType;\n\t/** Target class FQName for deserialization (if applicable) */\n\ttargetClassFqName?: string;\n\t/** Whether the target is a stored (persisted) transfer */\n\tisStored: boolean;\n}\n\n/**\n * Transfer serializer interface for transforming transfers before sending.\n * The input type is unknown to support any transfer type.\n */\nexport interface TransferSerializer {\n\t/** Serialize an transfer for sending in request body */\n\tserialize(transfer: unknown): unknown;\n}\n\n/**\n * Transfer deserializer interface for transforming responses.\n * The output type is unknown to support any transfer type.\n */\nexport interface TransferDeserializer {\n\t/** Deserialize a response into an transfer */\n\tdeserialize(data: unknown): unknown;\n}\n\n// ============================================\n// Temporal Field Types\n// ============================================\n\n/**\n * Classification of temporal (date/time) field types.\n *\n * - `date`: Date-only value (`YYYY-MM-DD`) — converted to `Date` at local midnight\n * - `time`: Time-only value (`HH:mm[:ss]`) — kept as `string` (no `Date` conversion)\n * - `timestamp`: Full datetime with timezone (`YYYY-MM-DDTHH:mm:ss[.SSS]Z`) — converted to `Date`\n */\nexport type TemporalFieldType = \"date\" | \"time\" | \"timestamp\";\n\n/**\n * Registry mapping transfer type FQNs to their temporal field declarations.\n *\n * Keys match `__entityType` values from API responses (e.g., `\"Demo::OrderDTO\"`).\n * Values map field names to their temporal type for serialization/deserialization.\n *\n * @example\n * ```typescript\n * const registry: TemporalFieldRegistry = {\n * \"Demo::OrderDTO\": { orderDate: \"date\", createdAt: \"timestamp\" },\n * \"Demo::MissionDTO\": { startDate: \"date\", endDate: \"date\" },\n * };\n * ```\n */\nexport type TemporalFieldRegistry = Record<string, Record<string, TemporalFieldType>>;\n\n// ============================================\n// API Configuration\n// ============================================\n\n/**\n * Configuration for JUDO REST API client.\n */\nexport interface JudoRestApiConfig {\n\t/** Base URL for the API (e.g., http://localhost:8080) */\n\tbaseUrl: string;\n\t/** Application base path (e.g., /api) */\n\tbasePath: string;\n\t/** Application model name (e.g., edemokracia) */\n\tmodelName: string;\n\t/** Actor path (e.g., admin/Admin) */\n\tactorPath: string;\n\t/** Request timeout in milliseconds */\n\ttimeout?: number;\n\t/** Default headers to include in all requests */\n\tdefaultHeaders?: Record<string, string>;\n\t/** Optional custom fetch implementation */\n\tfetch?: typeof fetch;\n\t/** Optional request interceptor */\n\tonRequest?: (request: RequestInit) => RequestInit | Promise<RequestInit>;\n\t/** Optional response interceptor */\n\tonResponse?: (response: Response) => Response | Promise<Response>;\n\t/** Optional error handler */\n\tonError?: (error: Error) => void;\n\t/**\n\t * Optional transfer serializer for transforming transfers before sending.\n\t * If not provided, transfers are sent as-is (JSON.stringify).\n\t */\n\ttransferSerializer?: TransferSerializer;\n\t/**\n\t * Optional transfer deserializer for transforming responses.\n\t * If not provided, responses are used as-is (JSON.parse result).\n\t */\n\ttransferDeserializer?: TransferDeserializer;\n}\n\n/**\n * Query customizer for list/get operations.\n */\nexport interface QueryCustomizer {\n\t_mask?: string;\n\t_orderBy?: Array<{ attribute: string; descending?: boolean }>;\n\t_seek?: { limit?: number; lastItem?: unknown };\n\t_filter?: unknown;\n\t_identifier?: string;\n}\n\n/**\n * Base transfer data interface.\n *\n */\nexport interface TransferData {\n\t[key: string]: unknown;\n}\n\n/**\n * Strict transfer data — a TransferData whose *own* properties conform to `T`.\n *\n * Use in generated code and userland APIs where the exact field set is known.\n *\n * @typeParam T - Strict field definitions (e.g. `{ name: string; age: number }`)\n */\nexport type StrictTransferData<T extends Record<string, unknown> = Record<string, unknown>> = TransferData & T;\n\n/**\n * Stored transfer with identifiers.\n */\nexport interface TransferStored extends TransferData {\n\t__identifier?: string;\n\t__signedIdentifier?: string;\n\t__typename?: string;\n\t__entityType?: string;\n}\n\n/**\n * Strict stored transfer — a TransferStored with compile-time field types from `T`.\n *\n * @typeParam T - Strict field definitions\n */\nexport type StrictTransferStored<T extends Record<string, unknown> = Record<string, unknown>> = TransferStored & T;\n\n/**\n * Response wrapper for JUDO REST responses.\n */\nexport interface JudoRestResponse<T> {\n\tdata: T;\n\tstatus: number;\n\theaders: Headers;\n}\n\n/**\n * Path context for building REST paths.\n */\nexport interface PathContext {\n\t/** Package name tokens (e.g., [\"admin\"]) */\n\tpackageNameTokens: string[];\n\t/** Simple name (e.g., \"Issue\") */\n\tsimpleName: string;\n}\n\n/**\n * Class type metadata for path building.\n */\nexport interface ClassTypeMetadata extends PathContext {\n\t/** Fully qualified name */\n\tfqName?: string;\n\t/** Whether the class is mapped */\n\tisMapped?: boolean;\n}\n\n/**\n * Relation type metadata for path building.\n */\nexport interface RelationMetadata {\n\t/** Relation name */\n\tname: string;\n\t/** Owner class metadata */\n\towner: ClassTypeMetadata;\n\t/** Target class metadata */\n\ttarget: ClassTypeMetadata;\n\t/** Whether this is an access relation */\n\tisAccess?: boolean;\n\t/** Whether this is a collection relation */\n\tisCollection?: boolean;\n}\n\n/**\n * Operation type metadata.\n */\nexport interface OperationMetadata {\n\t/** Operation name */\n\tname: string;\n\t/** Whether the operation is static */\n\tisStatic?: boolean;\n\t/** Whether the operation is mapped */\n\tisMapped?: boolean;\n\t/** Whether the operation has input */\n\thasInput?: boolean;\n\t/** Whether the operation has output */\n\thasOutput?: boolean;\n\t/** Input type metadata */\n\tinputType?: ClassTypeMetadata;\n\t/** Output type metadata */\n\toutputType?: ClassTypeMetadata;\n}\n\n/**\n * Range request body structure.\n */\nexport interface RangeRequestBody {\n\towner?: TransferStored;\n\tqueryCustomizer?: QueryCustomizer;\n}\n\n// ============================================\n// Validation & Error Types\n// ============================================\n\n/**\n * Validation feedback item from REST API.\n * Returned in response body for 400 validation errors.\n */\nexport interface FeedbackItem {\n\t/** Error code identifier */\n\tcode: string;\n\t/** Severity level of the feedback */\n\tlevel: \"ERROR\" | \"WARNING\" | \"INFO\";\n\t/**\n\t * Location of the error - typically the attribute path.\n\t * For nested properties, format is: \"relationName.attributeName\"\n\t * For simple attributes, format is: \"attributeName\"\n\t */\n\tlocation: string;\n\t/** Human-readable error message */\n\tmessage?: string;\n}\n\n/**\n * Validation error thrown when API returns 400 status.\n * Contains array of FeedbackItem with field-level error details.\n */\nexport class ValidationError extends Error {\n\treadonly feedbackItems: FeedbackItem[];\n\treadonly status: number = 400;\n\n\tconstructor(feedbackItems: FeedbackItem[]) {\n\t\tconst firstError = feedbackItems.find((f) => f.level === \"ERROR\");\n\t\tsuper(firstError?.message ?? \"Validation failed\");\n\t\tthis.name = \"ValidationError\";\n\t\tthis.feedbackItems = feedbackItems;\n\t}\n\n\t/**\n\t * Get errors as a map of field location to error message.\n\t * Useful for setting form field errors.\n\t */\n\ttoFieldErrors(): Record<string, string> {\n\t\tconst errors: Record<string, string> = {};\n\t\tfor (const item of this.feedbackItems) {\n\t\t\tif (item.level === \"ERROR\" && item.location) {\n\t\t\t\terrors[item.location] = item.message ?? item.code;\n\t\t\t}\n\t\t}\n\t\treturn errors;\n\t}\n}\n\n// ============================================\n// Dialog Response Types\n// ============================================\n\n/**\n * Result type for dialog submission.\n * Used for create dialogs opened from eager/lazy components.\n */\nexport type DialogResult<T = TransferData> = { outcome: \"cancel\" } | { outcome: \"submit\"; data: T };\n\n/**\n * Callback for dialog submission.\n * Called when user submits the create form.\n */\nexport type OnDialogSubmit<T = TransferData> = (data: T) => Promise<void>;\n\n/**\n * Callback for dialog validation.\n * Called before submission to validate form data.\n * Returns field errors or null if valid.\n */\nexport type OnDialogValidate<T = TransferData> = (data: T) => Promise<Record<string, string> | null>;\n"],"mappings":";;;;;;;;kCA2Ra,IAAb,cAAqC,MAAM;CAC1C;CACA,SAA0B;CAE1B,YAAY,GAA+B;EAC1C,IAAM,IAAa,EAAc,MAAM,MAAM,EAAE,UAAU,QAAQ;AAGjE,EAFA,MAAM,GAAY,WAAW,oBAAoB,EACjD,KAAK,OAAO,mBACZ,KAAK,gBAAgB;;CAOtB,gBAAwC;EACvC,IAAM,IAAiC,EAAE;AACzC,OAAK,IAAM,KAAQ,KAAK,cACvB,CAAI,EAAK,UAAU,WAAW,EAAK,aAClC,EAAO,EAAK,YAAY,EAAK,WAAW,EAAK;AAG/C,SAAO"}