@classytic/arc 2.8.0 → 2.8.1

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 (69) hide show
  1. package/README.md +10 -1
  2. package/dist/{BaseController-CpMfCXdn.mjs → BaseController-DAGGc5Xn.mjs} +76 -25
  3. package/dist/{EventTransport-n1KBxC_N.d.mts → EventTransport-CLXJUzyT.d.mts} +37 -1
  4. package/dist/{ResourceRegistry-BOtJuRCs.mjs → ResourceRegistry-Dtcojmu8.mjs} +14 -2
  5. package/dist/adapters/index.d.mts +2 -2
  6. package/dist/adapters/index.mjs +1 -1
  7. package/dist/{adapters-BxGgSHjj.mjs → adapters-BBqAVvPK.mjs} +11 -0
  8. package/dist/auth/index.d.mts +1 -1
  9. package/dist/auth/index.mjs +3 -3
  10. package/dist/{betterAuthOpenApi-CHCIuA-p.mjs → betterAuthOpenApi-C5lDyRH2.mjs} +1 -1
  11. package/dist/cli/commands/docs.mjs +2 -2
  12. package/dist/cli/commands/introspect.mjs +1 -1
  13. package/dist/core/index.d.mts +2 -2
  14. package/dist/core/index.mjs +4 -4
  15. package/dist/{core-BfrfxNqO.mjs → core-CrLDuqoT.mjs} +1 -1
  16. package/dist/{createActionRouter-CbkIAaGh.mjs → createActionRouter-Df1BuawX.mjs} +87 -21
  17. package/dist/{createApp-Cy8eUNKQ.mjs → createApp-p2OThysU.mjs} +2 -2
  18. package/dist/{defineResource-CovBXvTB.mjs → defineResource-CqeUltrW.mjs} +19 -7
  19. package/dist/docs/index.d.mts +1 -1
  20. package/dist/docs/index.mjs +1 -1
  21. package/dist/dynamic/index.d.mts +1 -1
  22. package/dist/dynamic/index.mjs +1 -1
  23. package/dist/{errorHandler-BW08lEiy.mjs → errorHandler-Cw34h_om.mjs} +1 -1
  24. package/dist/{errorHandler-BeN-ERN7.d.mts → errorHandler-DJ7OAB2V.d.mts} +1 -1
  25. package/dist/{eventPlugin-CAOWMQS8.d.mts → eventPlugin-Cdjwo0Gv.d.mts} +1 -1
  26. package/dist/{eventPlugin-x4jo3sG0.mjs → eventPlugin-XijlQmlL.mjs} +19 -1
  27. package/dist/events/index.d.mts +399 -28
  28. package/dist/events/index.mjs +345 -29
  29. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  30. package/dist/events/transports/redis.d.mts +1 -1
  31. package/dist/factory/index.d.mts +1 -1
  32. package/dist/factory/index.mjs +1 -1
  33. package/dist/hooks/index.d.mts +1 -1
  34. package/dist/{index-BpMhrFgn.d.mts → index-0zj73o2U.d.mts} +1 -1
  35. package/dist/{index-qct60lnl.d.mts → index-DadoLP51.d.mts} +35 -3
  36. package/dist/index.d.mts +4 -4
  37. package/dist/index.mjs +7 -7
  38. package/dist/integrations/event-gateway.d.mts +1 -1
  39. package/dist/integrations/index.d.mts +1 -1
  40. package/dist/integrations/mcp/index.d.mts +2 -2
  41. package/dist/integrations/mcp/index.mjs +1 -1
  42. package/dist/integrations/mcp/testing.d.mts +1 -1
  43. package/dist/integrations/mcp/testing.mjs +1 -1
  44. package/dist/{interface-IJqN3pXK.d.mts → interface-CS6d7HiB.d.mts} +549 -107
  45. package/dist/{openapi-AYLVjqVe.mjs → openapi-q6rNKfZy.mjs} +49 -2
  46. package/dist/org/index.d.mts +1 -1
  47. package/dist/plugins/index.d.mts +2 -2
  48. package/dist/plugins/index.mjs +3 -3
  49. package/dist/plugins/tracing-entry.mjs +1 -1
  50. package/dist/presets/index.d.mts +3 -3
  51. package/dist/presets/multiTenant.d.mts +1 -1
  52. package/dist/{redis-stream-CF1lrKVk.d.mts → redis-stream-BgrYzpeq.d.mts} +1 -1
  53. package/dist/registry/index.d.mts +1 -1
  54. package/dist/registry/index.mjs +1 -1
  55. package/dist/{resourceToTools-C_1SMiCz.mjs → resourceToTools-DNNWnZtx.mjs} +193 -63
  56. package/dist/rpc/index.mjs +1 -1
  57. package/dist/testing/index.d.mts +2 -2
  58. package/dist/testing/index.mjs +1 -1
  59. package/dist/types/index.d.mts +2 -2
  60. package/dist/{types-gUxAIZHp.d.mts → types-BlOuKTPw.d.mts} +4 -4
  61. package/dist/{types-Ct0PUUSp.d.mts → types-D3b7hA00.d.mts} +1 -1
  62. package/dist/utils/index.d.mts +2 -14
  63. package/dist/utils/index.mjs +5 -5
  64. package/dist/{utils-B-l6410F.mjs → utils-7sJ8X83I.mjs} +1 -13
  65. package/package.json +4 -3
  66. /package/dist/{circuitBreaker-l18oRgL5.mjs → circuitBreaker-cmi5XDv5.mjs} +0 -0
  67. /package/dist/{errors-Cg58SLNi.mjs → errors-BF2bIOIS.mjs} +0 -0
  68. /package/dist/{requestContext-xHIKedG6.mjs → requestContext-DYvHl113.mjs} +0 -0
  69. /package/dist/{schemaConverter-Y5EejTnJ.mjs → schemaConverter-OxfCshus.mjs} +0 -0
@@ -1,5 +1,6 @@
1
1
  import { t as getUserRoles } from "./types-ZUu_h0jp.mjs";
2
- import { n as convertRouteSchema } from "./schemaConverter-Y5EejTnJ.mjs";
2
+ import { n as convertRouteSchema } from "./schemaConverter-OxfCshus.mjs";
3
+ import { t as buildActionBodySchema } from "./createActionRouter-Df1BuawX.mjs";
3
4
  import fp from "fastify-plugin";
4
5
  //#region src/docs/openapi.ts
5
6
  const openApiPlugin = async (fastify, opts = {}) => {
@@ -158,7 +159,7 @@ const DEFAULT_LIST_PARAMS = [
158
159
  function generateResourcePaths(resource, apiPrefix = "", additionalSecurity = []) {
159
160
  const paths = {};
160
161
  const basePath = `${apiPrefix}${resource.prefix}`;
161
- if (resource.disableDefaultRoutes && (!resource.additionalRoutes || resource.additionalRoutes.length === 0)) return paths;
162
+ if (resource.disableDefaultRoutes && (!resource.additionalRoutes || resource.additionalRoutes.length === 0) && (!resource.actions || resource.actions.length === 0)) return paths;
162
163
  if (!resource.disableDefaultRoutes) {
163
164
  const disabledSet = new Set(resource.disabledRoutes ?? []);
164
165
  const updateMethod = resource.updateMethod ?? "PATCH";
@@ -309,6 +310,52 @@ function generateResourcePaths(resource, apiPrefix = "", additionalSecurity = []
309
310
  }
310
311
  paths[fullPath][method] = createOperation(resource, handlerName, route.summary ?? handlerName, extras, requiresAuthForRoute, additionalSecurity);
311
312
  }
313
+ if (resource.actions && resource.actions.length > 0) {
314
+ const actionPath = toOpenApiPath(`${basePath}/:id/action`);
315
+ const actionEnum = resource.actions.map((a) => a.name);
316
+ const actionSchemas = {};
317
+ for (const a of resource.actions) if (a.schema) actionSchemas[a.name] = a.schema;
318
+ const bodySchema = buildActionBodySchema(actionEnum, actionSchemas);
319
+ const descLines = [
320
+ "Unified action endpoint for state transitions.",
321
+ "",
322
+ "**Available actions:**"
323
+ ];
324
+ for (const a of resource.actions) {
325
+ const roles = a.permissions?._roles;
326
+ const roleStr = roles?.length ? ` — requires: ${roles.join(" or ")}` : "";
327
+ const descStr = a.description ? ` — ${a.description}` : "";
328
+ descLines.push(`- \`${a.name}\`${roleStr}${descStr}`);
329
+ }
330
+ const fallbackPerm = resource.actionPermissions;
331
+ const fallbackRequiresAuth = typeof fallbackPerm === "function" && !fallbackPerm._isPublic;
332
+ const anyAuthRequired = resource.actions.some((a) => {
333
+ const p = a.permissions;
334
+ if (typeof p === "function") return !p._isPublic;
335
+ return fallbackRequiresAuth;
336
+ });
337
+ if (!paths[actionPath]) paths[actionPath] = {};
338
+ paths[actionPath].post = createOperation(resource, "action", `Perform action (${actionEnum.join(" / ")})`, {
339
+ parameters: [{
340
+ name: "id",
341
+ in: "path",
342
+ required: true,
343
+ schema: { type: "string" },
344
+ description: "Resource ID"
345
+ }],
346
+ description: descLines.join("\n"),
347
+ requestBody: {
348
+ required: true,
349
+ content: { "application/json": { schema: bodySchema } }
350
+ },
351
+ responses: {
352
+ "200": { description: "Action executed successfully" },
353
+ "400": { description: "Invalid action or missing required fields" },
354
+ "401": { description: "Authentication required" },
355
+ "403": { description: "Permission denied" }
356
+ }
357
+ }, anyAuthRequired, additionalSecurity);
358
+ }
312
359
  return paths;
313
360
  }
314
361
  /**
@@ -1,4 +1,4 @@
1
- import { Wt as RouteHandler } from "../interface-IJqN3pXK.mjs";
1
+ import { Wt as RouteHandler } from "../interface-CS6d7HiB.mjs";
2
2
  import { i as UserBase } from "../types-BoaZHr-2.mjs";
3
3
  import { InvitationAdapter, InvitationDoc, MemberDoc, OrgAdapter, OrgDoc, OrgPermissionStatement, OrgRole, OrganizationPluginOptions } from "./types.mjs";
4
4
  import { FastifyPluginAsync, RouteHandlerMethod } from "fastify";
@@ -1,6 +1,6 @@
1
- import { K as MiddlewareConfig, Kt as ResourceRegistry, et as PresetHook, m as AnyRecord, mn as HookSystem, p as AdditionalRoute, vt as RouteSchemaOptions } from "../interface-IJqN3pXK.mjs";
1
+ import { K as MiddlewareConfig, Kt as ResourceRegistry, Tn as HookSystem, et as PresetHook, m as AnyRecord, p as AdditionalRoute, vt as RouteSchemaOptions } from "../interface-CS6d7HiB.mjs";
2
2
  import { t as ExternalOpenApiPaths } from "../externalPaths-BQ8QijNH.mjs";
3
- import { _ as cachingPlugin, a as versioningPlugin, c as MetricsOptions, d as SSEOptions, f as _default$6, g as _default$1, h as CachingRule, i as _default$7, l as _default$4, m as CachingOptions, n as errorHandlerPlugin, o as MetricEntry, p as ssePlugin, r as VersioningOptions, s as MetricsCollector, t as ErrorHandlerOptions, u as metricsPlugin } from "../errorHandler-BeN-ERN7.mjs";
3
+ import { _ as cachingPlugin, a as versioningPlugin, c as MetricsOptions, d as SSEOptions, f as _default$6, g as _default$1, h as CachingRule, i as _default$7, l as _default$4, m as CachingOptions, n as errorHandlerPlugin, o as MetricEntry, p as ssePlugin, r as VersioningOptions, s as MetricsCollector, t as ErrorHandlerOptions, u as metricsPlugin } from "../errorHandler-DJ7OAB2V.mjs";
4
4
  import { t as TracingOptions } from "../tracing-xqXzWeaf.mjs";
5
5
  import { FastifyInstance, FastifyPluginAsync } from "fastify";
6
6
  import * as _$node_stream0 from "node:stream";
@@ -1,11 +1,11 @@
1
1
  import { p as MUTATION_OPERATIONS } from "../constants-Cxde4rpC.mjs";
2
2
  import { o as getOrgId } from "../types-AOD8fxIw.mjs";
3
- import { t as requestContext } from "../requestContext-xHIKedG6.mjs";
3
+ import { t as requestContext } from "../requestContext-DYvHl113.mjs";
4
4
  import { t as hasEvents } from "../typeGuards-CcFZXgU7.mjs";
5
5
  import { t as HookSystem } from "../HookSystem-BjFu7zf1.mjs";
6
- import { t as ResourceRegistry } from "../ResourceRegistry-BOtJuRCs.mjs";
6
+ import { t as ResourceRegistry } from "../ResourceRegistry-Dtcojmu8.mjs";
7
7
  import { n as caching_default, t as cachingPlugin } from "../caching-CHH-iHs3.mjs";
8
- import { t as errorHandlerPlugin } from "../errorHandler-BW08lEiy.mjs";
8
+ import { t as errorHandlerPlugin } from "../errorHandler-Cw34h_om.mjs";
9
9
  import { n as metrics_default, t as metricsPlugin } from "../metrics-DuhiSEZI.mjs";
10
10
  import { t as replyHelpersPlugin } from "../replyHelpers-CXtJDAZ0.mjs";
11
11
  import { n as sse_default, t as ssePlugin } from "../sse-CD5Hghpu.mjs";
@@ -44,7 +44,7 @@ try {
44
44
  function createTracerProvider(options) {
45
45
  if (!isAvailable) return null;
46
46
  const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
47
- const resolvedVersion = serviceVersion ?? "2.8.0";
47
+ const resolvedVersion = serviceVersion ?? "2.8.1";
48
48
  const exporter = new OTLPTraceExporter({ url: exporterUrl });
49
49
  const provider = new NodeTracerProvider({ resource: { attributes: {
50
50
  "service.name": serviceName,
@@ -1,4 +1,4 @@
1
- import { Ht as IControllerResponse, Ut as IRequestContext, Zt as PaginatedResult, m as AnyRecord, tt as PresetResult, ut as ResourceConfig } from "../interface-IJqN3pXK.mjs";
1
+ import { Ht as IControllerResponse, Ut as IRequestContext, m as AnyRecord, on as PaginationResult, tt as PresetResult, ut as ResourceConfig } from "../interface-CS6d7HiB.mjs";
2
2
  import { MultiTenantOptions, TenantFieldSpec, multiTenantPreset } from "./multiTenant.mjs";
3
3
 
4
4
  //#region src/presets/ownedByUser.d.ts
@@ -57,7 +57,7 @@ declare function treePreset(options?: TreeOptions): PresetResult;
57
57
  *
58
58
  * **Repository Requirements:**
59
59
  * Your repository must implement:
60
- * - `getDeleted(options): Promise<PaginatedResult<T> | T[]>`
60
+ * - `getDeleted(params?, options?): Promise<PaginationResult<T> | T[]>`
61
61
  * - `restore(id): Promise<T | null>`
62
62
  *
63
63
  * @example
@@ -77,7 +77,7 @@ interface ISoftDeleteController<TDoc = unknown> {
77
77
  * Get all soft-deleted items
78
78
  * Called by: GET /deleted
79
79
  */
80
- getDeleted(req: IRequestContext): Promise<IControllerResponse<PaginatedResult<TDoc>>>;
80
+ getDeleted(req: IRequestContext): Promise<IControllerResponse<PaginationResult<TDoc>>>;
81
81
  /**
82
82
  * Restore a soft-deleted item by ID
83
83
  * Called by: POST /:id/restore
@@ -1,4 +1,4 @@
1
- import { E as CrudRouteKey, tt as PresetResult } from "../interface-IJqN3pXK.mjs";
1
+ import { E as CrudRouteKey, tt as PresetResult } from "../interface-CS6d7HiB.mjs";
2
2
 
3
3
  //#region src/presets/multiTenant.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-n1KBxC_N.mjs";
1
+ import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-CLXJUzyT.mjs";
2
2
 
3
3
  //#region src/events/transports/redis-stream.d.ts
4
4
  interface RedisStreamLike {
@@ -1,4 +1,4 @@
1
- import { Gt as RegisterOptions, H as IntrospectionPluginOptions, Kt as ResourceRegistry } from "../interface-IJqN3pXK.mjs";
1
+ import { Gt as RegisterOptions, H as IntrospectionPluginOptions, Kt as ResourceRegistry } from "../interface-CS6d7HiB.mjs";
2
2
  import { FastifyPluginAsync } from "fastify";
3
3
 
4
4
  //#region src/registry/introspectionPlugin.d.ts
@@ -1,3 +1,3 @@
1
1
  import { n as introspectionPlugin_default, t as introspectionPlugin } from "../registry-B0Wl7uVV.mjs";
2
- import { t as ResourceRegistry } from "../ResourceRegistry-BOtJuRCs.mjs";
2
+ import { t as ResourceRegistry } from "../ResourceRegistry-Dtcojmu8.mjs";
3
3
  export { ResourceRegistry, introspectionPlugin_default as introspectionPlugin, introspectionPlugin as introspectionPluginFn };
@@ -1,4 +1,4 @@
1
- import { t as BaseController } from "./BaseController-CpMfCXdn.mjs";
1
+ import { t as BaseController } from "./BaseController-DAGGc5Xn.mjs";
2
2
  import { n as normalizePermissionResult } from "./applyPermissionResult-D6GPMsvh.mjs";
3
3
  import { t as pluralize } from "./pluralize-BneOJkpi.mjs";
4
4
  import { z } from "zod";
@@ -274,6 +274,15 @@ function buildRequestContext(input, auth, operation, policyFilters, scopeOverrid
274
274
  query: {},
275
275
  body: void 0
276
276
  };
277
+ case "action": {
278
+ const { id: _actionId, ...actionBody } = input;
279
+ return {
280
+ ...base,
281
+ params: { id: String(_actionId ?? "") },
282
+ query: {},
283
+ body: actionBody
284
+ };
285
+ }
277
286
  }
278
287
  }
279
288
  /**
@@ -548,7 +557,6 @@ const ANNOTATIONS = {
548
557
  */
549
558
  function resourceToTools(resource, config = {}) {
550
559
  const controller = resource.controller ?? (resource.adapter ? createMcpController(resource) : void 0);
551
- if (!controller) return [];
552
560
  const explicitFieldRules = resource.schemaOptions?.fieldRules;
553
561
  const hiddenFields = resource.schemaOptions?.hiddenFields;
554
562
  const readonlyFields = resource.schemaOptions?.readonlyFields;
@@ -558,72 +566,101 @@ function resourceToTools(resource, config = {}) {
558
566
  const sortableFields = resource.queryParser?.allowedSortFields;
559
567
  const allowedOperators = resource.queryParser?.allowedOperators;
560
568
  const hasSoftDelete = resource._appliedPresets?.includes("softDelete") ?? false;
561
- let ops = ALL_CRUD_OPS.filter((op) => {
562
- if (resource.disabledRoutes?.includes(op)) return false;
563
- return true;
564
- });
565
- if (config.operations) ops = ops.filter((op) => config.operations?.includes(op));
566
569
  const tools = [];
567
570
  const prefix = config.toolNamePrefix;
568
- for (const op of ops) {
569
- const name = config.names?.[op] ?? (op === "list" ? `${prefix ? `${prefix}_` : ""}list_${pluralize(resource.name)}` : `${prefix ? `${prefix}_` : ""}${op}_${resource.name}`);
570
- tools.push({
571
- name,
572
- description: config.descriptions?.[op] ?? defaultDescription(op, resource.displayName, hasSoftDelete, {
573
- filterableFields,
574
- allowedOperators,
575
- sortableFields
576
- }),
577
- annotations: ANNOTATIONS[op],
578
- inputSchema: buildInputSchema(op, fieldRules, {
579
- hiddenFields,
580
- readonlyFields,
581
- extraHideFields: config.hideFields,
582
- filterableFields,
583
- allowedOperators,
584
- adapterBodies
585
- }),
586
- handler: createHandler(op, controller, resource.name, resource.permissions)
571
+ if (!controller) {} else {
572
+ let ops = ALL_CRUD_OPS.filter((op) => {
573
+ if (resource.disabledRoutes?.includes(op)) return false;
574
+ return true;
587
575
  });
588
- }
589
- for (const route of resource.additionalRoutes ?? []) {
590
- const mcpHandler = route.mcpHandler;
591
- if (!route.wrapHandler && !mcpHandler) continue;
592
- if (!mcpHandler && ![
593
- "POST",
594
- "PUT",
595
- "PATCH",
596
- "DELETE"
597
- ].includes(route.method)) continue;
598
- const opName = route.operation ?? slugifyRoute(route.method, route.path);
599
- const hasId = route.path.includes(":id");
600
- const inputShape = {};
601
- if (hasId) inputShape.id = z.string().describe("Resource ID");
602
- if (mcpHandler) tools.push({
603
- name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
604
- description: route.summary ?? route.description ?? `${opName} on ${resource.displayName}`,
605
- annotations: { openWorldHint: true },
606
- inputSchema: inputShape,
607
- handler: async (input, _ctx) => {
608
- try {
609
- return await mcpHandler(input);
610
- } catch (err) {
611
- return {
612
- content: [{
613
- type: "text",
614
- text: `Error: ${err instanceof Error ? err.message : String(err)}`
615
- }],
616
- isError: true
617
- };
576
+ if (config.operations) ops = ops.filter((op) => config.operations?.includes(op));
577
+ for (const op of ops) {
578
+ const name = config.names?.[op] ?? (op === "list" ? `${prefix ? `${prefix}_` : ""}list_${pluralize(resource.name)}` : `${prefix ? `${prefix}_` : ""}${op}_${resource.name}`);
579
+ tools.push({
580
+ name,
581
+ description: config.descriptions?.[op] ?? defaultDescription(op, resource.displayName, hasSoftDelete, {
582
+ filterableFields,
583
+ allowedOperators,
584
+ sortableFields
585
+ }),
586
+ annotations: ANNOTATIONS[op],
587
+ inputSchema: buildInputSchema(op, fieldRules, {
588
+ hiddenFields,
589
+ readonlyFields,
590
+ extraHideFields: config.hideFields,
591
+ filterableFields,
592
+ allowedOperators,
593
+ adapterBodies
594
+ }),
595
+ handler: createHandler(op, controller, resource.name, resource.permissions)
596
+ });
597
+ }
598
+ for (const route of resource.additionalRoutes ?? []) {
599
+ if (route.mcp === false) continue;
600
+ const mcpHandler = route.mcpHandler;
601
+ if (!route.wrapHandler && !mcpHandler) continue;
602
+ if (!mcpHandler && ![
603
+ "POST",
604
+ "PUT",
605
+ "PATCH",
606
+ "DELETE"
607
+ ].includes(route.method)) continue;
608
+ const opName = route.operation ?? slugifyRoute(route.method, route.path);
609
+ const hasId = route.path.includes(":id");
610
+ const mcpConfig = typeof route.mcp === "object" && route.mcp !== null ? route.mcp : void 0;
611
+ const toolDescription = mcpConfig?.description ?? route.summary ?? route.description ?? `${opName} on ${resource.displayName}`;
612
+ const toolAnnotations = mcpConfig?.annotations ? { ...mcpConfig.annotations } : { openWorldHint: true };
613
+ const inputShape = {};
614
+ if (hasId) inputShape.id = z.string().describe("Resource ID");
615
+ if (mcpHandler) tools.push({
616
+ name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
617
+ description: toolDescription,
618
+ annotations: toolAnnotations,
619
+ inputSchema: inputShape,
620
+ handler: async (input, _ctx) => {
621
+ try {
622
+ return await mcpHandler(input);
623
+ } catch (err) {
624
+ return {
625
+ content: [{
626
+ type: "text",
627
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`
628
+ }],
629
+ isError: true
630
+ };
631
+ }
618
632
  }
619
- }
620
- });
621
- else tools.push({
622
- name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
623
- description: route.summary ?? route.description ?? `${opName} on ${resource.displayName}`,
624
- annotations: { openWorldHint: true },
633
+ });
634
+ else tools.push({
635
+ name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
636
+ description: toolDescription,
637
+ annotations: toolAnnotations,
638
+ inputSchema: inputShape,
639
+ handler: createAdditionalRouteHandler(route, controller, hasId)
640
+ });
641
+ }
642
+ }
643
+ if (resource.actions) for (const [actionName, entry] of Object.entries(resource.actions)) {
644
+ const def = typeof entry === "function" ? { handler: entry } : entry;
645
+ if (typeof def !== "function" && "mcp" in def && def.mcp === false) continue;
646
+ const mcpCfg = typeof def !== "function" && typeof def.mcp === "object" ? def.mcp : void 0;
647
+ const description = mcpCfg?.description ?? (typeof def !== "function" ? def.description : void 0) ?? `${actionName} action on ${resource.displayName}`;
648
+ const annotations = mcpCfg?.annotations ? { ...mcpCfg.annotations } : { destructiveHint: true };
649
+ const inputShape = { id: z.string().describe("Resource ID") };
650
+ const rawSchema = typeof def !== "function" ? def.schema : void 0;
651
+ if (rawSchema && typeof rawSchema === "object") {
652
+ const converted = convertActionSchemaToZod(rawSchema);
653
+ for (const [key, val] of Object.entries(converted)) inputShape[key] = val;
654
+ }
655
+ const toolName = prefix ? `${prefix}_${actionName}_${resource.name}` : `${actionName}_${resource.name}`;
656
+ const handler = typeof entry === "function" ? entry : def.handler;
657
+ const actionPerms = (typeof def !== "function" ? def.permissions : void 0) ?? resource.actionPermissions;
658
+ tools.push({
659
+ name: toolName,
660
+ description: String(description),
661
+ annotations,
625
662
  inputSchema: inputShape,
626
- handler: createAdditionalRouteHandler(route, controller, hasId)
663
+ handler: createActionToolHandler(actionName, handler, actionPerms, resource.name, resource.permissions)
627
664
  });
628
665
  }
629
666
  return tools;
@@ -889,5 +926,98 @@ function createMcpController(resource) {
889
926
  matchesFilter: resource.adapter?.matchesFilter
890
927
  });
891
928
  }
929
+ /**
930
+ * Convert an action schema (JSON Schema, Zod, or legacy field map) to a Zod
931
+ * shape for MCP tool input. This mirrors `normalizeActionSchema` in
932
+ * `createActionRouter.ts` but produces Zod types for the MCP SDK.
933
+ */
934
+ function convertActionSchemaToZod(raw) {
935
+ if ("_zod" in raw && typeof raw.shape === "object") return { ...raw.shape };
936
+ if ((raw.type === "object" || "properties" in raw) && typeof raw.properties === "object" && raw.properties !== null) {
937
+ const props = raw.properties;
938
+ return jsonSchemaPropsToZod(props, new Set(Array.isArray(raw.required) ? raw.required : []));
939
+ }
940
+ const result = {};
941
+ for (const [fieldName, fieldSchema] of Object.entries(raw)) {
942
+ if (fieldName === "type" || fieldName === "properties" || fieldName === "required") continue;
943
+ if (!fieldSchema || typeof fieldSchema !== "object") continue;
944
+ const fs = fieldSchema;
945
+ const desc = typeof fs.description === "string" ? fs.description : `${fieldName} field`;
946
+ const isOptional = fs.required === false;
947
+ const base = jsonSchemaTypeToZod(fs);
948
+ result[fieldName] = isOptional ? base.optional().describe(desc) : base.describe(desc);
949
+ }
950
+ return result;
951
+ }
952
+ function jsonSchemaPropsToZod(props, requiredSet) {
953
+ const result = {};
954
+ for (const [name, schema] of Object.entries(props)) {
955
+ const desc = typeof schema.description === "string" ? schema.description : name;
956
+ const base = jsonSchemaTypeToZod(schema);
957
+ result[name] = requiredSet.has(name) ? base.describe(desc) : base.optional().describe(desc);
958
+ }
959
+ return result;
960
+ }
961
+ function jsonSchemaTypeToZod(schema) {
962
+ const type = typeof schema.type === "string" ? schema.type : "string";
963
+ if (Array.isArray(schema.enum) && schema.enum.length > 0) return z.enum(schema.enum);
964
+ switch (type) {
965
+ case "number":
966
+ case "integer": return z.number();
967
+ case "boolean": return z.boolean();
968
+ case "array": return z.array(z.unknown());
969
+ case "object": return z.record(z.string(), z.unknown());
970
+ default: return z.string();
971
+ }
972
+ }
973
+ /**
974
+ * Create an MCP tool handler for a declarative action.
975
+ *
976
+ * Uses the SAME `evaluatePermission()` and `buildRequestContext()` as
977
+ * CRUD tools — single code path for permission side effects, scope
978
+ * construction, and request context assembly. This eliminates the
979
+ * DRY/drift risk flagged in the review: REST and MCP action tools now
980
+ * share identical context-building machinery.
981
+ */
982
+ function createActionToolHandler(actionName, handler, permissions, resourceName, _resourcePermissions) {
983
+ return async (input, ctx) => {
984
+ const session = ctx.session;
985
+ const permResult = await evaluatePermission(permissions, session, resourceName, actionName, input);
986
+ if (permResult && !permResult.granted) return {
987
+ content: [{
988
+ type: "text",
989
+ text: JSON.stringify({
990
+ success: false,
991
+ error: permResult.reason ?? `Permission denied for action '${actionName}'`
992
+ })
993
+ }],
994
+ isError: true
995
+ };
996
+ const reqCtx = buildRequestContext({
997
+ ...input,
998
+ action: actionName
999
+ }, session, "action", permResult?.filters, permResult?.scope);
1000
+ const id = typeof input.id === "string" ? input.id : "";
1001
+ const { id: _discardId, ...data } = input;
1002
+ try {
1003
+ const result = await handler(id, data, reqCtx);
1004
+ return { content: [{
1005
+ type: "text",
1006
+ text: JSON.stringify({
1007
+ success: true,
1008
+ data: result
1009
+ })
1010
+ }] };
1011
+ } catch (err) {
1012
+ return {
1013
+ content: [{
1014
+ type: "text",
1015
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`
1016
+ }],
1017
+ isError: true
1018
+ };
1019
+ }
1020
+ };
1021
+ }
892
1022
  //#endregion
893
1023
  export { fieldRulesToZod as n, createMcpServer as r, resourceToTools as t };
@@ -1,4 +1,4 @@
1
- import { t as CircuitBreaker } from "../circuitBreaker-l18oRgL5.mjs";
1
+ import { t as CircuitBreaker } from "../circuitBreaker-cmi5XDv5.mjs";
2
2
  //#region src/rpc/serviceClient.ts
3
3
  /**
4
4
  * Service Client — Resource-Oriented RPC
@@ -1,5 +1,5 @@
1
- import { Yt as CrudRepository, m as AnyRecord, qt as ResourceDefinition } from "../interface-IJqN3pXK.mjs";
2
- import { d as ResourceLike, r as CreateAppOptions } from "../types-gUxAIZHp.mjs";
1
+ import { Zt as CrudRepository, m as AnyRecord, qt as ResourceDefinition } from "../interface-CS6d7HiB.mjs";
2
+ import { d as ResourceLike, r as CreateAppOptions } from "../types-BlOuKTPw.mjs";
3
3
  import Fastify, { FastifyInstance, FastifyServerOptions } from "fastify";
4
4
  import { Connection } from "mongoose";
5
5
  import { Mock } from "vitest";
@@ -1796,7 +1796,7 @@ function runEventTests(resourceName, displayName, events) {
1796
1796
  * ```
1797
1797
  */
1798
1798
  async function createTestApp(options = {}) {
1799
- const { createApp } = await import("../createApp-Cy8eUNKQ.mjs").then((n) => n.r);
1799
+ const { createApp } = await import("../createApp-p2OThysU.mjs").then((n) => n.r);
1800
1800
  const { useInMemoryDb = true, mongoUri: providedMongoUri, ...appOptions } = options;
1801
1801
  const defaultAuth = {
1802
1802
  type: "jwt",
@@ -1,5 +1,5 @@
1
1
  import { _ as isAuthenticated, c as getOrgRoles, g as hasOrgAccess, n as PUBLIC_SCOPE, p as getTeamId, r as RequestScope, s as getOrgId, t as AUTHENTICATED_SCOPE, v as isElevated, y as isMember } from "../types-CN6JvmYz.mjs";
2
- import { $ as PresetFunction, $t as QueryOptions, A as EventsDecorator, B as InferResourceDoc, Bt as FastifyHandler, C as ConfigError, Ct as TypedResourceConfig, D as CrudRouterOptions, Dt as ValidationResult, E as CrudRouteKey, Et as ValidateOptions, F as GracefulShutdownOptions, G as LookupOption, H as IntrospectionPluginOptions, Ht as IControllerResponse, I as HealthCheck, J as ObjectId, K as MiddlewareConfig, L as HealthOptions, M as FastifyWithAuth, N as FastifyWithDecorators, O as CrudSchemas, Ot as envelope, P as FieldRule, Q as PopulateOption, Qt as PaginationParams, R as InferAdapterDoc, Rt as ControllerHandler, S as AuthenticatorContext, St as TypedRepository, T as CrudController, Tt as UserOrganization, U as JWTPayload, Ut as IRequestContext, V as IntrospectionData, Vt as IController, W as JwtContext, Wt as RouteHandler, X as OwnershipCheck, Xt as InferDoc, Y as OpenApiSchemas, Yt as CrudRepository, Z as ParsedQuery, Zt as PaginatedResult, _ as ArcInternalMetadata, _t as RouteMcpConfig, at as RegistryStats, b as AuthPluginOptions, bt as TokenPair, ct as RequestWithExtras, d as ActionHandlerFn, dt as ResourceHookContext, et as PresetHook, f as ActionsMap, ft as ResourceHooks, g as ArcDecorator, gt as RouteHandlerMethod, h as ApiResponse, ht as RouteDefinition, it as RegistryEntry, j as FastifyRequestExtras, jt as BaseControllerOptions, k as EventDefinition, kt as getUserId, l as ActionDefinition, lt as ResourceCacheConfig, m as AnyRecord, mt as ResourcePermissions, nt as QueryParserInterface, ot as RequestContext, p as AdditionalRoute, pt as ResourceMetadata, q as MiddlewareHandler, rt as RateLimitConfig, st as RequestIdOptions, tt as PresetResult, u as ActionEntry, ut as ResourceConfig, v as ArcRequest, vt as RouteSchemaOptions, w as ControllerQueryOptions, wt as UserLike, x as Authenticator, xt as TypedController, y as AuthHelpers, yt as ServiceContext, z as InferDocType, zt as ControllerLike } from "../interface-IJqN3pXK.mjs";
2
+ import { $ as PresetFunction, $t as DeleteOptions, A as EventsDecorator, B as InferResourceDoc, Bt as FastifyHandler, C as ConfigError, Ct as TypedResourceConfig, D as CrudRouterOptions, Dt as ValidationResult, E as CrudRouteKey, Et as ValidateOptions, F as GracefulShutdownOptions, G as LookupOption, H as IntrospectionPluginOptions, Ht as IControllerResponse, I as HealthCheck, J as ObjectId, K as MiddlewareConfig, L as HealthOptions, M as FastifyWithAuth, N as FastifyWithDecorators, O as CrudSchemas, Ot as envelope, P as FieldRule, Q as PopulateOption, Qt as DeleteManyResult, R as InferAdapterDoc, Rt as ControllerHandler, S as AuthenticatorContext, St as TypedRepository, T as CrudController, Tt as UserOrganization, U as JWTPayload, Ut as IRequestContext, V as IntrospectionData, Vt as IController, W as JwtContext, Wt as RouteHandler, X as OwnershipCheck, Xt as BulkWriteResult, Y as OpenApiSchemas, Yt as BulkWriteOperation, Z as ParsedQuery, Zt as CrudRepository, _ as ArcInternalMetadata, _t as RouteMcpConfig, an as PaginationParams, at as RegistryStats, b as AuthPluginOptions, bt as TokenPair, cn as RepositorySession, ct as RequestWithExtras, d as ActionHandlerFn, dt as ResourceHookContext, en as DeleteResult, et as PresetHook, f as ActionsMap, ft as ResourceHooks, g as ArcDecorator, gt as RouteHandlerMethod, h as ApiResponse, ht as RouteDefinition, in as PaginatedResult, it as RegistryEntry, j as FastifyRequestExtras, jt as BaseControllerOptions, k as EventDefinition, kt as getUserId, l as ActionDefinition, ln as UpdateManyResult, lt as ResourceCacheConfig, m as AnyRecord, mt as ResourcePermissions, nn as KeysetPaginatedResult, nt as QueryParserInterface, on as PaginationResult, ot as RequestContext, p as AdditionalRoute, pt as ResourceMetadata, q as MiddlewareHandler, rn as OffsetPaginatedResult, rt as RateLimitConfig, sn as QueryOptions, st as RequestIdOptions, tn as InferDoc, tt as PresetResult, u as ActionEntry, un as WriteOptions, ut as ResourceConfig, v as ArcRequest, vt as RouteSchemaOptions, w as ControllerQueryOptions, wt as UserLike, x as Authenticator, xt as TypedController, y as AuthHelpers, yt as ServiceContext, z as InferDocType, zt as ControllerLike } from "../interface-CS6d7HiB.mjs";
3
3
  import { i as UserBase, n as PermissionContext, r as PermissionResult, t as PermissionCheck } from "../types-BoaZHr-2.mjs";
4
4
  import { n as ElevationOptions, t as ElevationEvent } from "../elevation-UJO3-NvX.mjs";
5
- export { AUTHENTICATED_SCOPE, ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AdditionalRoute, AnyRecord, ApiResponse, ArcDecorator, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, BaseControllerOptions, ConfigError, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRepository, CrudRouteKey, CrudRouterOptions, CrudSchemas, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, LookupOption, MiddlewareConfig, MiddlewareHandler, ObjectId, OpenApiSchemas, OwnershipCheck, PUBLIC_SCOPE, PaginatedResult, PaginationParams, ParsedQuery, PermissionCheck, PermissionContext, PermissionResult, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryOptions, QueryParserInterface, RateLimitConfig, RegistryEntry, RegistryStats, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResourceCacheConfig, ResourceConfig, ResourceHookContext, ResourceHooks, ResourceMetadata, ResourcePermissions, RouteDefinition, RouteHandler, RouteHandlerMethod, RouteMcpConfig, RouteSchemaOptions, ServiceContext, TokenPair, TypedController, TypedRepository, TypedResourceConfig, UserBase, UserLike, UserOrganization, ValidateOptions, ValidationResult, envelope, getOrgId, getOrgRoles, getTeamId, getUserId, hasOrgAccess, isAuthenticated, isElevated, isMember };
5
+ export { AUTHENTICATED_SCOPE, ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AdditionalRoute, AnyRecord, ApiResponse, ArcDecorator, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, BaseControllerOptions, BulkWriteOperation, BulkWriteResult, ConfigError, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRepository, CrudRouteKey, CrudRouterOptions, CrudSchemas, DeleteManyResult, DeleteOptions, DeleteResult, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, KeysetPaginatedResult, LookupOption, MiddlewareConfig, MiddlewareHandler, ObjectId, OffsetPaginatedResult, OpenApiSchemas, OwnershipCheck, PUBLIC_SCOPE, PaginatedResult, PaginationParams, PaginationResult, ParsedQuery, PermissionCheck, PermissionContext, PermissionResult, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryOptions, QueryParserInterface, RateLimitConfig, RegistryEntry, RegistryStats, RepositorySession, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResourceCacheConfig, ResourceConfig, ResourceHookContext, ResourceHooks, ResourceMetadata, ResourcePermissions, RouteDefinition, RouteHandler, RouteHandlerMethod, RouteMcpConfig, RouteSchemaOptions, ServiceContext, TokenPair, TypedController, TypedRepository, TypedResourceConfig, UpdateManyResult, UserBase, UserLike, UserOrganization, ValidateOptions, ValidationResult, WriteOptions, envelope, getOrgId, getOrgRoles, getTeamId, getUserId, hasOrgAccess, isAuthenticated, isElevated, isMember };
@@ -1,11 +1,11 @@
1
- import { x as Authenticator } from "./interface-IJqN3pXK.mjs";
1
+ import { x as Authenticator } from "./interface-CS6d7HiB.mjs";
2
2
  import { n as ElevationOptions } from "./elevation-UJO3-NvX.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "./externalPaths-BQ8QijNH.mjs";
4
4
  import { i as CacheStore } from "./interface-bpoLKKqx.mjs";
5
5
  import { r as QueryCachePluginOptions } from "./queryCachePlugin-BCFVXnxK.mjs";
6
- import { i as EventTransport } from "./EventTransport-n1KBxC_N.mjs";
7
- import { t as EventPluginOptions } from "./eventPlugin-CAOWMQS8.mjs";
8
- import { c as MetricsOptions, d as SSEOptions, m as CachingOptions, r as VersioningOptions, t as ErrorHandlerOptions } from "./errorHandler-BeN-ERN7.mjs";
6
+ import { i as EventTransport } from "./EventTransport-CLXJUzyT.mjs";
7
+ import { t as EventPluginOptions } from "./eventPlugin-Cdjwo0Gv.mjs";
8
+ import { c as MetricsOptions, d as SSEOptions, m as CachingOptions, r as VersioningOptions, t as ErrorHandlerOptions } from "./errorHandler-DJ7OAB2V.mjs";
9
9
  import { r as IdempotencyStore } from "./interface-CkkWm5uR.mjs";
10
10
  import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, FastifyServerOptions } from "fastify";
11
11
 
@@ -1,4 +1,4 @@
1
- import { qt as ResourceDefinition } from "./interface-IJqN3pXK.mjs";
1
+ import { qt as ResourceDefinition } from "./interface-CS6d7HiB.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/integrations/mcp/types.d.ts
@@ -1,4 +1,4 @@
1
- import { Y as OpenApiSchemas, Z as ParsedQuery, m as AnyRecord, nt as QueryParserInterface } from "../interface-IJqN3pXK.mjs";
1
+ import { Y as OpenApiSchemas, Z as ParsedQuery, m as AnyRecord, nt as QueryParserInterface } from "../interface-CS6d7HiB.mjs";
2
2
  import { a as NotFoundError, c as RateLimitError, d as ValidationError, i as ForbiddenError, l as ServiceUnavailableError, m as isArcError, n as ConflictError, o as OrgAccessDeniedError, p as createError, r as ErrorDetails, s as OrgRequiredError, t as ArcError, u as UnauthorizedError } from "../errors-BI8kEKsO.mjs";
3
3
  import { a as CircuitBreakerStats, c as createCircuitBreakerRegistry, i as CircuitBreakerRegistry, n as CircuitBreakerError, o as CircuitState, r as CircuitBreakerOptions, s as createCircuitBreaker, t as CircuitBreaker } from "../circuitBreaker-BGVoB1hD.mjs";
4
4
  import { FastifyInstance } from "fastify";
@@ -235,20 +235,12 @@ declare function wrapResponse(dataSchema: JsonSchema): JsonSchema;
235
235
  * Note: Uses 'docs' array (not 'data') with flat pagination fields
236
236
  */
237
237
  declare function listResponse(itemSchema: JsonSchema): JsonSchema;
238
- /**
239
- * Alias for listResponse - matches local responseSchemas.js naming
240
- */
241
- declare const paginateWrapper: typeof listResponse;
242
238
  /**
243
239
  * Create a single item response schema
244
240
  *
245
241
  * Runtime format: { success, data: {...} }
246
242
  */
247
243
  declare function itemResponse(itemSchema: JsonSchema): JsonSchema;
248
- /**
249
- * Alias for itemResponse - matches local responseSchemas.js naming
250
- */
251
- declare const itemWrapper: typeof itemResponse;
252
244
  /**
253
245
  * Create a create/update response schema
254
246
  */
@@ -259,10 +251,6 @@ declare function mutationResponse(itemSchema: JsonSchema): JsonSchema;
259
251
  * Runtime format: { success, data: { message, id?, soft? } }
260
252
  */
261
253
  declare function deleteResponse(): JsonSchema;
262
- /**
263
- * Alias for deleteResponse - matches local responseSchemas.js naming
264
- */
265
- declare const messageWrapper: typeof deleteResponse;
266
254
  declare const responses: {
267
255
  200: (schema: JsonSchema) => {
268
256
  description: string;
@@ -647,4 +635,4 @@ declare function hasEvents(instance: FastifyInstance): instance is FastifyInstan
647
635
  events: EventsDecorator;
648
636
  };
649
637
  //#endregion
650
- export { ArcError, ArcQueryParser, type ArcQueryParserOptions, CircuitBreaker, CircuitBreakerError, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitState, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorDetails, type EventsDecorator, ForbiddenError, type JsonSchema, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, type StateMachine, type TransitionConfig, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, itemWrapper, listResponse, messageWrapper, mutationResponse, paginateWrapper, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
638
+ export { ArcError, ArcQueryParser, type ArcQueryParserOptions, CircuitBreaker, CircuitBreakerError, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitState, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorDetails, type EventsDecorator, ForbiddenError, type JsonSchema, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, type StateMachine, type TransitionConfig, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, listResponse, mutationResponse, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
@@ -1,7 +1,7 @@
1
1
  import { n as createQueryParser, t as ArcQueryParser } from "../queryParser-CgCtsjti.mjs";
2
- import { a as createCircuitBreaker, i as CircuitState, n as CircuitBreakerError, o as createCircuitBreakerRegistry, r as CircuitBreakerRegistry, t as CircuitBreaker } from "../circuitBreaker-l18oRgL5.mjs";
3
- import { _ as defineCompensation, a as getListQueryParams, c as listResponse, d as paginateWrapper, f as paginationSchema, g as wrapResponse, h as successResponseSchema, i as getDefaultCrudSchemas, l as messageWrapper, m as responses, n as deleteResponse, o as itemResponse, p as queryParams, r as errorResponseSchema, s as itemWrapper, t as createStateMachine, u as mutationResponse, v as withCompensation } from "../utils-B-l6410F.mjs";
4
- import { a as OrgAccessDeniedError, c as ServiceUnavailableError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-Cg58SLNi.mjs";
5
- import { a as toJsonSchema, i as isZodSchema, n as convertRouteSchema, r as isJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-Y5EejTnJ.mjs";
2
+ import { a as toJsonSchema, i as isZodSchema, n as convertRouteSchema, r as isJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-OxfCshus.mjs";
3
+ import { a as createCircuitBreaker, i as CircuitState, n as CircuitBreakerError, o as createCircuitBreakerRegistry, r as CircuitBreakerRegistry, t as CircuitBreaker } from "../circuitBreaker-cmi5XDv5.mjs";
4
+ import { a as getListQueryParams, c as mutationResponse, d as responses, f as successResponseSchema, h as withCompensation, i as getDefaultCrudSchemas, l as paginationSchema, m as defineCompensation, n as deleteResponse, o as itemResponse, p as wrapResponse, r as errorResponseSchema, s as listResponse, t as createStateMachine, u as queryParams } from "../utils-7sJ8X83I.mjs";
5
+ import { a as OrgAccessDeniedError, c as ServiceUnavailableError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-BF2bIOIS.mjs";
6
6
  import { t as hasEvents } from "../typeGuards-CcFZXgU7.mjs";
7
- export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, itemWrapper, listResponse, messageWrapper, mutationResponse, paginateWrapper, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
7
+ export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, listResponse, mutationResponse, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };