@classytic/arc 2.7.7 → 2.8.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 (109) hide show
  1. package/README.md +2 -2
  2. package/dist/adapters/index.d.mts +2 -2
  3. package/dist/audit/index.d.mts +1 -1
  4. package/dist/audit/index.mjs +1 -1
  5. package/dist/audit/mongodb.d.mts +1 -1
  6. package/dist/audit/mongodb.mjs +1 -1
  7. package/dist/auth/index.d.mts +4 -4
  8. package/dist/auth/index.mjs +2 -2
  9. package/dist/auth/redis-session.d.mts +1 -1
  10. package/dist/cache/index.d.mts +2 -2
  11. package/dist/cache/index.mjs +1 -1
  12. package/dist/cli/commands/docs.mjs +2 -2
  13. package/dist/cli/commands/generate.mjs +1 -1
  14. package/dist/cli/commands/introspect.mjs +1 -1
  15. package/dist/core/index.d.mts +2 -2
  16. package/dist/core/index.mjs +3 -2
  17. package/dist/core-BfrfxNqO.mjs +34 -0
  18. package/dist/{core-B_zEeA2b.mjs → createActionRouter-CbkIAaGh.mjs} +6 -36
  19. package/dist/{createApp-D7e77m8C.mjs → createApp-Cy8eUNKQ.mjs} +10 -10
  20. package/dist/{defineResource-BW2dMCu9.mjs → defineResource-CovBXvTB.mjs} +74 -3
  21. package/dist/docs/index.d.mts +2 -2
  22. package/dist/docs/index.mjs +1 -1
  23. package/dist/dynamic/index.d.mts +2 -2
  24. package/dist/dynamic/index.mjs +1 -1
  25. package/dist/{elevation-By_p2lnn.mjs → elevation-BBGFjzIP.mjs} +1 -1
  26. package/dist/{errorHandler-pCpEtNd7.d.mts → errorHandler-BeN-ERN7.d.mts} +1 -1
  27. package/dist/{eventPlugin-CdvUoUna.d.mts → eventPlugin-CAOWMQS8.d.mts} +1 -1
  28. package/dist/events/index.d.mts +3 -3
  29. package/dist/events/index.mjs +1 -1
  30. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  31. package/dist/events/transports/redis.d.mts +1 -1
  32. package/dist/factory/index.d.mts +1 -1
  33. package/dist/factory/index.mjs +1 -1
  34. package/dist/hooks/index.d.mts +1 -1
  35. package/dist/hooks/index.mjs +1 -1
  36. package/dist/idempotency/index.d.mts +3 -3
  37. package/dist/idempotency/mongodb.d.mts +1 -1
  38. package/dist/idempotency/redis.d.mts +1 -1
  39. package/dist/{index-C9eYNjGR.d.mts → index-BpMhrFgn.d.mts} +1 -1
  40. package/dist/{index-B0extFr4.d.mts → index-CBru2y5Y.d.mts} +3 -3
  41. package/dist/{index-BjShrzoj.d.mts → index-qct60lnl.d.mts} +14 -14
  42. package/dist/index.d.mts +7 -7
  43. package/dist/index.mjs +4 -4
  44. package/dist/integrations/event-gateway.d.mts +1 -1
  45. package/dist/integrations/event-gateway.mjs +1 -1
  46. package/dist/integrations/index.d.mts +1 -1
  47. package/dist/integrations/mcp/index.d.mts +2 -2
  48. package/dist/integrations/mcp/index.mjs +1 -1
  49. package/dist/integrations/mcp/testing.d.mts +1 -1
  50. package/dist/integrations/mcp/testing.mjs +1 -1
  51. package/dist/{interface-B91alUzq.d.mts → interface-IJqN3pXK.d.mts} +145 -4
  52. package/dist/{mongodb-Cgu9F1Nd.d.mts → mongodb-B1eVtFhw.d.mts} +1 -1
  53. package/dist/{mongodb-B7zupyck.d.mts → mongodb-NShVZDMr.d.mts} +1 -1
  54. package/dist/org/index.d.mts +2 -2
  55. package/dist/permissions/index.d.mts +3 -3
  56. package/dist/plugins/index.d.mts +4 -4
  57. package/dist/plugins/index.mjs +8 -8
  58. package/dist/plugins/tracing-entry.d.mts +1 -1
  59. package/dist/plugins/tracing-entry.mjs +1 -1
  60. package/dist/policies/index.d.mts +1 -1
  61. package/dist/presets/index.d.mts +1 -1
  62. package/dist/presets/multiTenant.d.mts +1 -1
  63. package/dist/{queryCachePlugin-Ckl71mkc.d.mts → queryCachePlugin-BCFVXnxK.d.mts} +1 -1
  64. package/dist/{redis-3TQxm2VZ.d.mts → redis-Bunu3qWg.d.mts} +1 -1
  65. package/dist/{redis-stream-Dag5LFa9.d.mts → redis-stream-CF1lrKVk.d.mts} +1 -1
  66. package/dist/registry/index.d.mts +1 -1
  67. package/dist/registry/index.mjs +2 -2
  68. package/dist/{resourceToTools-BJkoQoUP.mjs → resourceToTools-C_1SMiCz.mjs} +1 -1
  69. package/dist/rpc/index.d.mts +1 -1
  70. package/dist/scope/index.d.mts +2 -2
  71. package/dist/scope/index.mjs +1 -1
  72. package/dist/{sse-6W0hjVS_.mjs → sse-CD5Hghpu.mjs} +1 -1
  73. package/dist/testing/index.d.mts +2 -2
  74. package/dist/testing/index.mjs +1 -1
  75. package/dist/types/index.d.mts +5 -5
  76. package/dist/{types-B4BNthET.d.mts → types-BoaZHr-2.d.mts} +1 -1
  77. package/dist/{types-C5g2oRC7.d.mts → types-Ct0PUUSp.d.mts} +1 -1
  78. package/dist/{types-CKB47kiu.d.mts → types-gUxAIZHp.d.mts} +9 -9
  79. package/dist/utils/index.d.mts +3 -3
  80. package/package.json +3 -3
  81. package/skills/arc/SKILL.md +23 -4
  82. package/skills/arc/references/integrations.md +1 -1
  83. package/skills/arc/references/mcp.md +2 -0
  84. /package/dist/{EventTransport-C4VheKeC.d.mts → EventTransport-n1KBxC_N.d.mts} +0 -0
  85. /package/dist/{HookSystem-BNYKnrXF.mjs → HookSystem-BjFu7zf1.mjs} +0 -0
  86. /package/dist/{ResourceRegistry-DsHiG9cL.mjs → ResourceRegistry-BOtJuRCs.mjs} +0 -0
  87. /package/dist/{betterAuthOpenApi-EkPaMWNM.mjs → betterAuthOpenApi-CHCIuA-p.mjs} +0 -0
  88. /package/dist/{caching-5DtLwIqb.mjs → caching-CHH-iHs3.mjs} +0 -0
  89. /package/dist/{circuitBreaker-BBPDt-J_.d.mts → circuitBreaker-BGVoB1hD.d.mts} +0 -0
  90. /package/dist/{elevation-D7WK0RXq.d.mts → elevation-UJO3-NvX.d.mts} +0 -0
  91. /package/dist/{errorHandler-CH8wk1eD.mjs → errorHandler-BW08lEiy.mjs} +0 -0
  92. /package/dist/{errors-BS6lZvWy.d.mts → errors-BI8kEKsO.d.mts} +0 -0
  93. /package/dist/{eventPlugin-B6U_nCFU.mjs → eventPlugin-x4jo3sG0.mjs} +0 -0
  94. /package/dist/{externalPaths-iba7jD3d.d.mts → externalPaths-BQ8QijNH.d.mts} +0 -0
  95. /package/dist/{fields-D4nMDqnK.d.mts → fields-DoeDgh2b.d.mts} +0 -0
  96. /package/dist/{interface-CSbZdv_3.d.mts → interface-CkkWm5uR.d.mts} +0 -0
  97. /package/dist/{interface-CG7oRZjX.d.mts → interface-bpoLKKqx.d.mts} +0 -0
  98. /package/dist/{logger-DLg8-Ueg.mjs → logger-CDjpjySd.mjs} +0 -0
  99. /package/dist/{metrics-Qnvwc-LQ.mjs → metrics-DuhiSEZI.mjs} +0 -0
  100. /package/dist/{mongodb-B7X7P1P8.mjs → mongodb-5Ff3w8jy.mjs} +0 -0
  101. /package/dist/{openapi-D7Z7VODz.mjs → openapi-AYLVjqVe.mjs} +0 -0
  102. /package/dist/{pluralize-Dckfq6US.mjs → pluralize-BneOJkpi.mjs} +0 -0
  103. /package/dist/{queryCachePlugin-CwTpR04-.mjs → queryCachePlugin-D0iIVhW_.mjs} +0 -0
  104. /package/dist/{registry-B3lRFBWo.mjs → registry-B0Wl7uVV.mjs} +0 -0
  105. /package/dist/{replyHelpers-uDUIYh7u.mjs → replyHelpers-CXtJDAZ0.mjs} +0 -0
  106. /package/dist/{sessionManager-CEo9jwPI.d.mts → sessionManager-BkzVU8h2.d.mts} +0 -0
  107. /package/dist/{tracing-DEqdGkr-.d.mts → tracing-xqXzWeaf.d.mts} +0 -0
  108. /package/dist/{types--D3vvfdt.d.mts → types-CN6JvmYz.d.mts} +0 -0
  109. /package/dist/{versioning-CdBbFefk.mjs → versioning-CPU_5Xfs.mjs} +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Database-agnostic resource framework for Fastify. Define resources, get CRUD routes, permissions, presets, caching, events, OpenAPI, and MCP tools — without boilerplate.
4
4
 
5
- **v2.7.3** | Fastify 5+ | Node.js 22+ | ESM only | 260+ test files, 3523+ tests
5
+ **v2.8.0** | Fastify 5+ | Node.js 22+ | ESM only | 260+ test files, 3523+ tests
6
6
 
7
7
  ## Install
8
8
 
@@ -694,7 +694,7 @@ npx @classytic/arc doctor # Health check
694
694
  | `@classytic/arc/docs` | OpenAPI generation |
695
695
  | `@classytic/arc/cli` | CLI commands (programmatic) |
696
696
 
697
- ## v2.7.3 Highlights
697
+ ## v2.8.0 Highlights
698
698
 
699
699
  - **MCP Integration** — expose resources as AI agent tools (stateless by default, service scope, multi-tenancy)
700
700
  - **Reply Helpers** — `reply.ok()`, `reply.fail()`, `reply.paginated()`, `reply.stream()` (opt-in)
@@ -1,3 +1,3 @@
1
- import { a as RelationMetadata, c as ValidationResult, i as FieldMetadata, o as RepositoryLike, r as DataAdapter, s as SchemaMetadata, t as AdapterFactory } from "../interface-B91alUzq.mjs";
2
- import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../index-C9eYNjGR.mjs";
1
+ import { a as RelationMetadata, c as ValidationResult, i as FieldMetadata, o as RepositoryLike, r as DataAdapter, s as SchemaMetadata, t as AdapterFactory } from "../interface-IJqN3pXK.mjs";
2
+ import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../index-BpMhrFgn.mjs";
3
3
  export { AdapterFactory, DataAdapter, FieldMetadata, MongooseAdapter, MongooseAdapterOptions, PrismaAdapter, PrismaAdapterOptions, PrismaQueryOptions, PrismaQueryParser, PrismaQueryParserOptions, RelationMetadata, RepositoryLike, SchemaMetadata, ValidationResult, createMongooseAdapter, createPrismaAdapter };
@@ -1,4 +1,4 @@
1
- import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-Cgu9F1Nd.mjs";
1
+ import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-B1eVtFhw.mjs";
2
2
  import { FastifyPluginAsync } from "fastify";
3
3
 
4
4
  //#region src/audit/auditPlugin.d.ts
@@ -1,4 +1,4 @@
1
- import { t as MongoAuditStore } from "../mongodb-B7X7P1P8.mjs";
1
+ import { t as MongoAuditStore } from "../mongodb-5Ff3w8jy.mjs";
2
2
  import fp from "fastify-plugin";
3
3
  //#region src/audit/stores/interface.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-Cgu9F1Nd.mjs";
1
+ import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-B1eVtFhw.mjs";
2
2
  export { MongoAuditStore, type MongoAuditStoreOptions };
@@ -1,2 +1,2 @@
1
- import { t as MongoAuditStore } from "../mongodb-B7X7P1P8.mjs";
1
+ import { t as MongoAuditStore } from "../mongodb-5Ff3w8jy.mjs";
2
2
  export { MongoAuditStore };
@@ -1,7 +1,7 @@
1
- import { g as AuthPluginOptions, h as AuthHelpers } from "../interface-B91alUzq.mjs";
2
- import { t as PermissionCheck } from "../types-B4BNthET.mjs";
3
- import { t as ExternalOpenApiPaths } from "../externalPaths-iba7jD3d.mjs";
4
- import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-CEo9jwPI.mjs";
1
+ import { b as AuthPluginOptions, y as AuthHelpers } from "../interface-IJqN3pXK.mjs";
2
+ import { t as PermissionCheck } from "../types-BoaZHr-2.mjs";
3
+ import { t as ExternalOpenApiPaths } from "../externalPaths-BQ8QijNH.mjs";
4
+ import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-BkzVU8h2.mjs";
5
5
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest as FastifyRequest$1 } from "fastify";
6
6
 
7
7
  //#region src/auth/authPlugin.d.ts
@@ -1,7 +1,7 @@
1
1
  import { n as normalizeRoles, t as getUserRoles } from "../types-ZUu_h0jp.mjs";
2
2
  import { t as ArcError } from "../errors-Cg58SLNi.mjs";
3
3
  import { h as requireTeamMembership, l as requireOrgMembership, u as requireOrgRole } from "../permissions-CH4cNwJi.mjs";
4
- import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-EkPaMWNM.mjs";
4
+ import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-CHCIuA-p.mjs";
5
5
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
6
6
  import fp from "fastify-plugin";
7
7
  //#region src/auth/authPlugin.ts
@@ -677,7 +677,7 @@ function createBetterAuthAdapter(options) {
677
677
  if (!fastify.hasDecorator("authenticate")) fastify.decorate("authenticate", authenticate);
678
678
  if (!fastify.hasDecorator("optionalAuthenticate")) fastify.decorate("optionalAuthenticate", optionalAuthenticate);
679
679
  if (!extractedOpenApi && openapiOpt !== false && auth.api && typeof auth.api === "object") {
680
- const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-EkPaMWNM.mjs").then((n) => n.t);
680
+ const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-CHCIuA-p.mjs").then((n) => n.t);
681
681
  extractedOpenApi = extractBetterAuthOpenApi(auth.api, {
682
682
  basePath,
683
683
  userFields
@@ -1,4 +1,4 @@
1
- import { i as SessionData, s as SessionStore } from "../sessionManager-CEo9jwPI.mjs";
1
+ import { i as SessionData, s as SessionStore } from "../sessionManager-BkzVU8h2.mjs";
2
2
 
3
3
  //#region src/auth/redis-session.d.ts
4
4
  /** Minimal Redis client interface — compatible with ioredis */
@@ -1,5 +1,5 @@
1
- import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-CG7oRZjX.mjs";
2
- import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-Ckl71mkc.mjs";
1
+ import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-bpoLKKqx.mjs";
2
+ import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-BCFVXnxK.mjs";
3
3
 
4
4
  //#region src/cache/keys.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-qcD-TVJl.mjs";
2
2
  import { t as MemoryCacheStore } from "../memory-Cp7_cAko.mjs";
3
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-CwTpR04-.mjs";
3
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-D0iIVhW_.mjs";
4
4
  //#region src/cache/redis.ts
5
5
  /**
6
6
  * Redis-backed cache store.
@@ -1,5 +1,5 @@
1
- import { t as ResourceRegistry } from "../../ResourceRegistry-DsHiG9cL.mjs";
2
- import { t as buildOpenApiSpec } from "../../openapi-D7Z7VODz.mjs";
1
+ import { t as ResourceRegistry } from "../../ResourceRegistry-BOtJuRCs.mjs";
2
+ import { t as buildOpenApiSpec } from "../../openapi-AYLVjqVe.mjs";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  import { mkdirSync, writeFileSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { t as pluralize } from "../../pluralize-Dckfq6US.mjs";
1
+ import { t as pluralize } from "../../pluralize-BneOJkpi.mjs";
2
2
  import { join } from "node:path";
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  //#region src/cli/commands/generate.ts
@@ -1,4 +1,4 @@
1
- import { t as ResourceRegistry } from "../../ResourceRegistry-DsHiG9cL.mjs";
1
+ import { t as ResourceRegistry } from "../../ResourceRegistry-BOtJuRCs.mjs";
2
2
  import { resolve } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  //#region src/cli/commands/introspect.ts
@@ -1,3 +1,3 @@
1
- import { At as AccessControl, Dt as QueryResolverConfig, Et as QueryResolver, Ht as defineResource, Ot as BodySanitizer, Tt as BaseControllerOptions, Vt as ResourceDefinition, jt as AccessControlConfig, kt as BodySanitizerConfig, wt as BaseController } from "../interface-B91alUzq.mjs";
2
- import { A as MutationOperation, C as HOOK_PHASES, D as MAX_REGEX_LENGTH, E as MAX_FILTER_DEPTH, M as SYSTEM_FIELDS, O as MAX_SEARCH_LENGTH, S as HOOK_OPERATIONS, T as HookPhase, _ as DEFAULT_LIMIT, a as getControllerScope, b as DEFAULT_TENANT_FIELD, c as createCrudRouter, d as ActionRouterConfig, f as IdempotencyService, g as DEFAULT_ID_FIELD, h as CrudOperation, i as getControllerContext, j as RESERVED_QUERY_PARAMS, k as MUTATION_OPERATIONS, l as createPermissionMiddleware, m as CRUD_OPERATIONS, n as createFastifyHandler, o as sendControllerResponse, p as createActionRouter, r as createRequestContext, s as defineResourceVariants, t as createCrudHandlers, u as ActionHandler, v as DEFAULT_MAX_LIMIT, w as HookOperation, x as DEFAULT_UPDATE_METHOD, y as DEFAULT_SORT } from "../index-BjShrzoj.mjs";
1
+ import { At as BaseController, Ft as BodySanitizerConfig, It as AccessControl, Jt as defineResource, Lt as AccessControlConfig, Mt as QueryResolver, Nt as QueryResolverConfig, Pt as BodySanitizer, jt as BaseControllerOptions, qt as ResourceDefinition } from "../interface-IJqN3pXK.mjs";
2
+ import { A as MutationOperation, C as HOOK_PHASES, D as MAX_REGEX_LENGTH, E as MAX_FILTER_DEPTH, M as SYSTEM_FIELDS, O as MAX_SEARCH_LENGTH, S as HOOK_OPERATIONS, T as HookPhase, _ as DEFAULT_LIMIT, a as getControllerScope, b as DEFAULT_TENANT_FIELD, c as createCrudRouter, d as ActionRouterConfig, f as IdempotencyService, g as DEFAULT_ID_FIELD, h as CrudOperation, i as getControllerContext, j as RESERVED_QUERY_PARAMS, k as MUTATION_OPERATIONS, l as createPermissionMiddleware, m as CRUD_OPERATIONS, n as createFastifyHandler, o as sendControllerResponse, p as createActionRouter, r as createRequestContext, s as defineResourceVariants, t as createCrudHandlers, u as ActionHandler, v as DEFAULT_MAX_LIMIT, w as HookOperation, x as DEFAULT_UPDATE_METHOD, y as DEFAULT_SORT } from "../index-qct60lnl.mjs";
3
3
  export { AccessControl, AccessControlConfig, ActionHandler, ActionRouterConfig, BaseController, BaseControllerOptions, BodySanitizer, BodySanitizerConfig, CRUD_OPERATIONS, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, IdempotencyService, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, createActionRouter, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineResource, defineResourceVariants, getControllerContext, getControllerScope, sendControllerResponse };
@@ -1,5 +1,6 @@
1
1
  import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-Cxde4rpC.mjs";
2
2
  import { i as AccessControl, n as QueryResolver, r as BodySanitizer, t as BaseController } from "../BaseController-CpMfCXdn.mjs";
3
- import { n as createActionRouter, t as defineResourceVariants } from "../core-B_zEeA2b.mjs";
4
- import { c as createCrudHandlers, d as getControllerContext, f as getControllerScope, l as createFastifyHandler, n as defineResource, o as createCrudRouter, p as sendControllerResponse, s as createPermissionMiddleware, t as ResourceDefinition, u as createRequestContext } from "../defineResource-BW2dMCu9.mjs";
3
+ import { t as createActionRouter } from "../createActionRouter-CbkIAaGh.mjs";
4
+ import { c as createCrudHandlers, d as getControllerContext, f as getControllerScope, l as createFastifyHandler, n as defineResource, o as createCrudRouter, p as sendControllerResponse, s as createPermissionMiddleware, t as ResourceDefinition, u as createRequestContext } from "../defineResource-CovBXvTB.mjs";
5
+ import { t as defineResourceVariants } from "../core-BfrfxNqO.mjs";
5
6
  export { AccessControl, BaseController, BodySanitizer, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, createActionRouter, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineResource, defineResourceVariants, getControllerContext, getControllerScope, sendControllerResponse };
@@ -0,0 +1,34 @@
1
+ import { n as defineResource } from "./defineResource-CovBXvTB.mjs";
2
+ //#region src/core/defineResourceVariants.ts
3
+ /**
4
+ * Define multiple resources from a shared base config and per-variant overrides.
5
+ *
6
+ * Each variant is independently passed through `defineResource()` — the
7
+ * returned `ResourceDefinition`s are real, fully-registered resources.
8
+ * Register each one's plugin in your app:
9
+ *
10
+ * ```typescript
11
+ * await app.register(articlePublic.toPlugin());
12
+ * await app.register(articleAdmin.toPlugin());
13
+ * ```
14
+ *
15
+ * @param base Shared config — adapter, queryParser, schemaOptions, hooks, etc.
16
+ * Must NOT include `name` or `prefix` (those are per-variant).
17
+ * @param variants Map of variant key → override. Each variant must declare
18
+ * its own `name` and `prefix`. Other fields override the base.
19
+ * @returns A record where each key from `variants` maps to a real
20
+ * `ResourceDefinition` ready for `.toPlugin()` registration.
21
+ */
22
+ function defineResourceVariants(base, variants) {
23
+ const out = {};
24
+ for (const key of Object.keys(variants)) {
25
+ const override = variants[key];
26
+ out[key] = defineResource({
27
+ ...base,
28
+ ...override
29
+ });
30
+ }
31
+ return out;
32
+ }
33
+ //#endregion
34
+ export { defineResourceVariants as t };
@@ -1,6 +1,7 @@
1
+ import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
1
2
  import { n as normalizePermissionResult, t as applyPermissionResult } from "./applyPermissionResult-D6GPMsvh.mjs";
2
- import { n as defineResource } from "./defineResource-BW2dMCu9.mjs";
3
3
  //#region src/core/createActionRouter.ts
4
+ var createActionRouter_exports = /* @__PURE__ */ __exportAll({ createActionRouter: () => createActionRouter });
4
5
  /**
5
6
  * Create action-based state transition endpoint
6
7
  *
@@ -24,9 +25,10 @@ function createActionRouter(fastify, config) {
24
25
  } };
25
26
  Object.entries(actionSchemas).forEach(([actionName, schema]) => {
26
27
  if (schema && typeof schema === "object") Object.entries(schema).forEach(([propName, propSchema]) => {
28
+ const schemaObj = propSchema;
27
29
  bodyProperties[propName] = {
28
- ...propSchema,
29
- description: `${propSchema.description || ""} (for ${actionName} action)`.trim()
30
+ ...schemaObj,
31
+ description: `${schemaObj.description || ""} (for ${actionName} action)`.trim()
30
32
  };
31
33
  });
32
34
  });
@@ -178,36 +180,4 @@ function buildActionDescription(actions, actionPermissions) {
178
180
  return lines.join("\n");
179
181
  }
180
182
  //#endregion
181
- //#region src/core/defineResourceVariants.ts
182
- /**
183
- * Define multiple resources from a shared base config and per-variant overrides.
184
- *
185
- * Each variant is independently passed through `defineResource()` — the
186
- * returned `ResourceDefinition`s are real, fully-registered resources.
187
- * Register each one's plugin in your app:
188
- *
189
- * ```typescript
190
- * await app.register(articlePublic.toPlugin());
191
- * await app.register(articleAdmin.toPlugin());
192
- * ```
193
- *
194
- * @param base Shared config — adapter, queryParser, schemaOptions, hooks, etc.
195
- * Must NOT include `name` or `prefix` (those are per-variant).
196
- * @param variants Map of variant key → override. Each variant must declare
197
- * its own `name` and `prefix`. Other fields override the base.
198
- * @returns A record where each key from `variants` maps to a real
199
- * `ResourceDefinition` ready for `.toPlugin()` registration.
200
- */
201
- function defineResourceVariants(base, variants) {
202
- const out = {};
203
- for (const key of Object.keys(variants)) {
204
- const override = variants[key];
205
- out[key] = defineResource({
206
- ...base,
207
- ...override
208
- });
209
- }
210
- return out;
211
- }
212
- //#endregion
213
- export { createActionRouter as n, defineResourceVariants as t };
183
+ export { createActionRouter_exports as n, createActionRouter as t };
@@ -207,7 +207,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
207
207
  await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
208
208
  trackPlugin("arc-core");
209
209
  if (config.arcPlugins?.events !== false) {
210
- const { default: eventPlugin } = await import("./eventPlugin-B6U_nCFU.mjs").then((n) => n.n);
210
+ const { default: eventPlugin } = await import("./eventPlugin-x4jo3sG0.mjs").then((n) => n.n);
211
211
  const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
212
212
  await fastify.register(eventPlugin, {
213
213
  ...eventOpts,
@@ -243,13 +243,13 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules) {
243
243
  trackPlugin("arc-graceful-shutdown");
244
244
  }
245
245
  if (config.arcPlugins?.caching) {
246
- const { default: cachingPlugin } = await import("./caching-5DtLwIqb.mjs").then((n) => n.r);
246
+ const { default: cachingPlugin } = await import("./caching-CHH-iHs3.mjs").then((n) => n.r);
247
247
  const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
248
248
  await fastify.register(cachingPlugin, opts);
249
249
  trackPlugin("arc-caching", opts);
250
250
  }
251
251
  if (config.arcPlugins?.queryCache) {
252
- const { queryCachePlugin } = await import("./queryCachePlugin-CwTpR04-.mjs").then((n) => n.n);
252
+ const { queryCachePlugin } = await import("./queryCachePlugin-D0iIVhW_.mjs").then((n) => n.n);
253
253
  const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
254
254
  const store = config.stores?.queryCache ?? new (await (import("./memory-Cp7_cAko.mjs").then((n) => n.n))).MemoryCacheStore();
255
255
  await fastify.register(queryCachePlugin, {
@@ -260,19 +260,19 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules) {
260
260
  }
261
261
  if (config.arcPlugins?.sse) if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
262
262
  else {
263
- const { default: ssePlugin } = await import("./sse-6W0hjVS_.mjs").then((n) => n.r);
263
+ const { default: ssePlugin } = await import("./sse-CD5Hghpu.mjs").then((n) => n.r);
264
264
  const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
265
265
  await fastify.register(ssePlugin, opts);
266
266
  trackPlugin("arc-sse", opts);
267
267
  }
268
268
  if (config.arcPlugins?.metrics) {
269
- const { default: metricsPlugin } = await import("./metrics-Qnvwc-LQ.mjs").then((n) => n.r);
269
+ const { default: metricsPlugin } = await import("./metrics-DuhiSEZI.mjs").then((n) => n.r);
270
270
  const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
271
271
  await fastify.register(metricsPlugin, opts);
272
272
  trackPlugin("arc-metrics", opts);
273
273
  }
274
274
  if (config.arcPlugins?.versioning) {
275
- const { default: versioningPlugin } = await import("./versioning-CdBbFefk.mjs").then((n) => n.r);
275
+ const { default: versioningPlugin } = await import("./versioning-CPU_5Xfs.mjs").then((n) => n.r);
276
276
  await fastify.register(versioningPlugin, config.arcPlugins.versioning);
277
277
  trackPlugin("arc-versioning", config.arcPlugins.versioning);
278
278
  }
@@ -340,7 +340,7 @@ async function registerAuth(fastify, config, trackPlugin) {
340
340
  */
341
341
  async function registerElevation(fastify, config, trackPlugin) {
342
342
  if (!config.elevation) return;
343
- const { elevationPlugin } = await import("./elevation-By_p2lnn.mjs").then((n) => n.r);
343
+ const { elevationPlugin } = await import("./elevation-BBGFjzIP.mjs").then((n) => n.r);
344
344
  await fastify.register(elevationPlugin, config.elevation);
345
345
  trackPlugin("arc-elevation", config.elevation);
346
346
  fastify.log.debug("Elevation plugin enabled");
@@ -350,7 +350,7 @@ async function registerElevation(fastify, config, trackPlugin) {
350
350
  */
351
351
  async function registerErrorHandler(fastify, config, trackPlugin) {
352
352
  if (config.errorHandler === false) return;
353
- const { errorHandlerPlugin } = await import("./errorHandler-CH8wk1eD.mjs").then((n) => n.n);
353
+ const { errorHandlerPlugin } = await import("./errorHandler-BW08lEiy.mjs").then((n) => n.n);
354
354
  const errorOpts = typeof config.errorHandler === "object" ? config.errorHandler : { includeStack: config.preset !== "production" };
355
355
  await fastify.register(errorHandlerPlugin, errorOpts);
356
356
  trackPlugin("arc-error-handler", errorOpts);
@@ -667,7 +667,7 @@ function validateDistributedRuntime(options) {
667
667
  */
668
668
  async function createApp(options) {
669
669
  if (options.debug !== void 0 && options.debug !== false) {
670
- const { configureArcLogger } = await import("./logger-DLg8-Ueg.mjs").then((n) => n.r);
670
+ const { configureArcLogger } = await import("./logger-CDjpjySd.mjs").then((n) => n.r);
671
671
  configureArcLogger({ debug: options.debug });
672
672
  }
673
673
  validateAuthOptions(options);
@@ -720,7 +720,7 @@ async function createApp(options) {
720
720
  await registerErrorHandler(fastify, config, trackPlugin);
721
721
  await registerResources(fastify, config);
722
722
  if (config.replyHelpers) {
723
- const { replyHelpersPlugin } = await import("./replyHelpers-uDUIYh7u.mjs").then((n) => n.n);
723
+ const { replyHelpersPlugin } = await import("./replyHelpers-CXtJDAZ0.mjs").then((n) => n.n);
724
724
  await fastify.register(replyHelpersPlugin);
725
725
  }
726
726
  if (config.serializeBigInt) fastify.addHook("preSerialization", async (_request, _reply, payload) => {
@@ -888,6 +888,25 @@ function defineResource(config) {
888
888
  if (typeof route.permissions !== "function") throw new Error(`[Arc] Resource '${config.name}' route ${route.method} ${route.path}: permissions is required and must be a PermissionCheck function.\nUse allowPublic() or requireAuth() from @classytic/arc/permissions.`);
889
889
  if (typeof route.wrapHandler !== "boolean") throw new Error(`[Arc] Resource '${config.name}' route ${route.method} ${route.path}: wrapHandler is required.\nSet true for ControllerHandler (context object) or false for FastifyHandler (req, reply).`);
890
890
  }
891
+ if (config.routes && config.additionalRoutes) throw new Error(`[Arc] Resource '${config.name}': Cannot use both 'routes' and 'additionalRoutes'.\nUse 'routes' (v2.8) — it replaces 'additionalRoutes'.`);
892
+ for (const route of config.routes ?? []) if (typeof route.permissions !== "function") throw new Error(`[Arc] Resource '${config.name}' route ${route.method} ${route.path}: permissions is required and must be a PermissionCheck function.`);
893
+ if (config.actions) {
894
+ const CRUD_OPS = new Set([
895
+ "create",
896
+ "update",
897
+ "delete",
898
+ "list",
899
+ "get"
900
+ ]);
901
+ for (const [name, entry] of Object.entries(config.actions)) {
902
+ if (CRUD_OPS.has(name)) throw new Error(`[Arc] Resource '${config.name}': action '${name}' conflicts with CRUD operation.\nUse a different name (e.g., '${name}_item', 'do_${name}').`);
903
+ if (typeof entry !== "function") {
904
+ const def = entry;
905
+ if (typeof def.handler !== "function") throw new Error(`[Arc] Resource '${config.name}': actions.${name}.handler must be a function.`);
906
+ if (def.permissions !== void 0 && typeof def.permissions !== "function") throw new Error(`[Arc] Resource '${config.name}': actions.${name}.permissions must be a PermissionCheck function.`);
907
+ }
908
+ }
909
+ }
891
910
  }
892
911
  const repository = config.adapter?.repository;
893
912
  if (config.idField === void 0 && repository) {
@@ -1071,6 +1090,8 @@ var ResourceDefinition = class {
1071
1090
  middlewares;
1072
1091
  disableDefaultRoutes;
1073
1092
  disabledRoutes;
1093
+ actions;
1094
+ actionPermissions;
1074
1095
  events;
1075
1096
  rateLimit;
1076
1097
  audit;
@@ -1096,10 +1117,12 @@ var ResourceDefinition = class {
1096
1117
  this.schemaOptions = config.schemaOptions ?? {};
1097
1118
  this.customSchemas = config.customSchemas ?? {};
1098
1119
  this.permissions = config.permissions ?? {};
1099
- this.additionalRoutes = config.additionalRoutes ?? [];
1120
+ this.additionalRoutes = config.routes ? convertRoutesToAdditionalRoutes(config.routes) : config.additionalRoutes ?? [];
1100
1121
  this.middlewares = config.middlewares ?? {};
1101
1122
  this.disableDefaultRoutes = config.disableDefaultRoutes ?? false;
1102
1123
  this.disabledRoutes = config.disabledRoutes ?? [];
1124
+ this.actions = config.actions;
1125
+ this.actionPermissions = config.actionPermissions;
1103
1126
  this.events = config.events ?? {};
1104
1127
  this.rateLimit = config.rateLimit;
1105
1128
  this.audit = config.audit;
@@ -1167,10 +1190,10 @@ var ResourceDefinition = class {
1167
1190
  pattern,
1168
1191
  tags
1169
1192
  });
1170
- const onRegister = self._onRegister;
1171
- if (onRegister) await onRegister(fastify);
1172
1193
  await fastify.register(async (instance) => {
1173
1194
  const typedInstance = instance;
1195
+ const onRegister = self._onRegister;
1196
+ if (onRegister) await onRegister(instance);
1174
1197
  let schemas = null;
1175
1198
  const openApi = self._registryMeta?.openApiSchemas;
1176
1199
  if (openApi && (!self.customSchemas || Object.keys(self.customSchemas).length === 0)) {
@@ -1259,6 +1282,10 @@ var ResourceDefinition = class {
1259
1282
  pipe: self.pipe,
1260
1283
  fields: self.fields
1261
1284
  });
1285
+ if (self.actions && Object.keys(self.actions).length > 0) {
1286
+ const { createActionRouter } = await import("./createActionRouter-CbkIAaGh.mjs").then((n) => n.n);
1287
+ createActionRouter(instance, normalizeActionsToRouterConfig(self.actions, self.actionPermissions, self.tag));
1288
+ }
1262
1289
  if (self.events && Object.keys(self.events).length > 0) typedInstance.log?.debug?.(`Resource '${self.name}' defined ${Object.keys(self.events).length} events`);
1263
1290
  }, { prefix: self.prefix });
1264
1291
  if (hasEvents(fastify)) try {
@@ -1312,5 +1339,49 @@ function capitalize(str) {
1312
1339
  if (!str) return "";
1313
1340
  return str.charAt(0).toUpperCase() + str.slice(1);
1314
1341
  }
1342
+ /**
1343
+ * Convert v2.8 RouteDefinition[] to internal AdditionalRoute[] format.
1344
+ * The internal format is what createCrudRouter understands.
1345
+ */
1346
+ function convertRoutesToAdditionalRoutes(routes) {
1347
+ return routes.map((route) => ({
1348
+ method: route.method,
1349
+ path: route.path,
1350
+ handler: route.handler,
1351
+ permissions: route.permissions,
1352
+ wrapHandler: !route.raw,
1353
+ operation: route.operation,
1354
+ summary: route.summary,
1355
+ description: route.description,
1356
+ tags: route.tags,
1357
+ preHandler: route.preHandler,
1358
+ preAuth: route.preAuth,
1359
+ streamResponse: route.streamResponse,
1360
+ schema: route.schema,
1361
+ mcpHandler: route.mcpHandler
1362
+ }));
1363
+ }
1364
+ /**
1365
+ * Normalize ActionsMap into the ActionRouterConfig shape that createActionRouter expects.
1366
+ */
1367
+ function normalizeActionsToRouterConfig(actions, globalAuth, tag) {
1368
+ const handlers = {};
1369
+ const permissions = {};
1370
+ const schemas = {};
1371
+ for (const [name, entry] of Object.entries(actions)) if (typeof entry === "function") handlers[name] = entry;
1372
+ else {
1373
+ const def = entry;
1374
+ handlers[name] = def.handler;
1375
+ if (def.permissions) permissions[name] = def.permissions;
1376
+ if (def.schema) schemas[name] = def.schema;
1377
+ }
1378
+ return {
1379
+ tag,
1380
+ actions: handlers,
1381
+ actionPermissions: permissions,
1382
+ actionSchemas: schemas,
1383
+ globalAuth
1384
+ };
1385
+ }
1315
1386
  //#endregion
1316
1387
  export { validateResourceConfig as a, createCrudHandlers as c, getControllerContext as d, getControllerScope as f, formatValidationErrors as i, createFastifyHandler as l, pipe as m, defineResource as n, createCrudRouter as o, sendControllerResponse as p, assertValidConfig as r, createPermissionMiddleware as s, ResourceDefinition as t, createRequestContext as u };
@@ -1,5 +1,5 @@
1
- import { et as RegistryEntry } from "../interface-B91alUzq.mjs";
2
- import { t as ExternalOpenApiPaths } from "../externalPaths-iba7jD3d.mjs";
1
+ import { it as RegistryEntry } from "../interface-IJqN3pXK.mjs";
2
+ import { t as ExternalOpenApiPaths } from "../externalPaths-BQ8QijNH.mjs";
3
3
  import { FastifyPluginAsync } from "fastify";
4
4
 
5
5
  //#region src/docs/openapi.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as getUserRoles } from "../types-ZUu_h0jp.mjs";
2
- import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-D7Z7VODz.mjs";
2
+ import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-AYLVjqVe.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/docs/scalar.ts
5
5
  const scalarPlugin = async (fastify, opts = {}) => {
@@ -1,5 +1,5 @@
1
- import { Vt as ResourceDefinition, r as DataAdapter } from "../interface-B91alUzq.mjs";
2
- import { t as PermissionCheck } from "../types-B4BNthET.mjs";
1
+ import { qt as ResourceDefinition, r as DataAdapter } from "../interface-IJqN3pXK.mjs";
2
+ import { t as PermissionCheck } from "../types-BoaZHr-2.mjs";
3
3
 
4
4
  //#region src/dynamic/ArcDynamicLoader.d.ts
5
5
  interface ArcArchitectureSchema {
@@ -1,5 +1,5 @@
1
1
  import { t as ArcQueryParser } from "../queryParser-CgCtsjti.mjs";
2
- import { n as defineResource } from "../defineResource-BW2dMCu9.mjs";
2
+ import { n as defineResource } from "../defineResource-CovBXvTB.mjs";
3
3
  import { C as publicRead, T as readOnly, b as fullPublic, v as adminOnly, w as publicReadAdminWrite, x as ownerWithAdminBypass, y as authenticated } from "../permissions-CH4cNwJi.mjs";
4
4
  //#region src/dynamic/ArcDynamicLoader.ts
5
5
  const VALID_FIELD_TYPES = new Set([
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
2
  import { t as getUserRoles } from "./types-ZUu_h0jp.mjs";
3
- import { t as arcLog } from "./logger-DLg8-Ueg.mjs";
3
+ import { t as arcLog } from "./logger-CDjpjySd.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/scope/elevation.ts
6
6
  var elevation_exports = /* @__PURE__ */ __exportAll({
@@ -1,4 +1,4 @@
1
- import { t as DomainEvent } from "./EventTransport-C4VheKeC.mjs";
1
+ import { t as DomainEvent } from "./EventTransport-n1KBxC_N.mjs";
2
2
  import { FastifyInstance, FastifyPluginAsync, FastifyRequest } from "fastify";
3
3
 
4
4
  //#region src/plugins/caching.d.ts
@@ -1,4 +1,4 @@
1
- import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-C4VheKeC.mjs";
1
+ import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-n1KBxC_N.mjs";
2
2
  import { FastifyPluginAsync } from "fastify";
3
3
 
4
4
  //#region src/events/defineEvent.d.ts
@@ -1,7 +1,7 @@
1
- import { a as MemoryEventTransport, i as EventTransport, n as EventHandler, o as MemoryEventTransportOptions, r as EventLogger, s as createEvent, t as DomainEvent } from "../EventTransport-C4VheKeC.mjs";
2
- import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-CdvUoUna.mjs";
1
+ import { a as MemoryEventTransport, i as EventTransport, n as EventHandler, o as MemoryEventTransportOptions, r as EventLogger, s as createEvent, t as DomainEvent } from "../EventTransport-n1KBxC_N.mjs";
2
+ import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-CAOWMQS8.mjs";
3
3
  import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
4
- import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-Dag5LFa9.mjs";
4
+ import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-CF1lrKVk.mjs";
5
5
 
6
6
  //#region src/events/eventTypes.d.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { a as MemoryEventTransport, i as withRetry, o as createEvent, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-B6U_nCFU.mjs";
1
+ import { a as MemoryEventTransport, i as withRetry, o as createEvent, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-x4jo3sG0.mjs";
2
2
  //#region src/events/defineEvent.ts
3
3
  /**
4
4
  * defineEvent — Typed Event Definitions with Optional Schema Validation
@@ -1,2 +1,2 @@
1
- import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-Dag5LFa9.mjs";
1
+ import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-CF1lrKVk.mjs";
2
2
  export { type RedisStreamLike, RedisStreamTransport, type RedisStreamTransportOptions };
@@ -1,4 +1,4 @@
1
- import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "../../EventTransport-C4VheKeC.mjs";
1
+ import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "../../EventTransport-n1KBxC_N.mjs";
2
2
 
3
3
  //#region src/events/transports/redis.d.ts
4
4
  interface RedisLike {
@@ -1,4 +1,4 @@
1
- import { a as CustomPluginAuthOption, c as RawBodyOptions, d as ResourceLike, f as loadResources, i as CustomAuthenticatorOption, l as UnderPressureOptions, n as BetterAuthOption, o as JwtAuthOption, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as LoadResourcesOptions } from "../types-CKB47kiu.mjs";
1
+ import { a as CustomPluginAuthOption, c as RawBodyOptions, d as ResourceLike, f as loadResources, i as CustomAuthenticatorOption, l as UnderPressureOptions, n as BetterAuthOption, o as JwtAuthOption, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as LoadResourcesOptions } from "../types-gUxAIZHp.mjs";
2
2
  import { FastifyInstance } from "fastify";
3
3
 
4
4
  //#region src/factory/createApp.d.ts
@@ -1,4 +1,4 @@
1
- import { a as edgePreset, c as testingPreset, i as developmentPreset, n as createApp, o as getPreset, s as productionPreset, t as ArcFactory } from "../createApp-D7e77m8C.mjs";
1
+ import { a as edgePreset, c as testingPreset, i as developmentPreset, n as createApp, o as getPreset, s as productionPreset, t as ArcFactory } from "../createApp-Cy8eUNKQ.mjs";
2
2
  import { readdir } from "node:fs/promises";
3
3
  import { dirname, join, resolve } from "node:path";
4
4
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -1,2 +1,2 @@
1
- import { _n as defineHook, an as HookOperation, cn as HookSystem, dn as afterDelete, fn as afterUpdate, gn as createHookSystem, hn as beforeUpdate, in as HookHandler, ln as HookSystemOptions, mn as beforeDelete, nn as DefineHookOptions, on as HookPhase, pn as beforeCreate, rn as HookContext, sn as HookRegistration, un as afterCreate } from "../interface-B91alUzq.mjs";
1
+ import { Cn as defineHook, Sn as createHookSystem, _n as afterDelete, bn as beforeDelete, cn as DefineHookOptions, dn as HookOperation, fn as HookPhase, gn as afterCreate, hn as HookSystemOptions, ln as HookContext, mn as HookSystem, pn as HookRegistration, un as HookHandler, vn as afterUpdate, xn as beforeUpdate, yn as beforeCreate } from "../interface-IJqN3pXK.mjs";
2
2
  export { type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,2 +1,2 @@
1
- import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-BNYKnrXF.mjs";
1
+ import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-BjFu7zf1.mjs";
2
2
  export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,6 +1,6 @@
1
- import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-CSbZdv_3.mjs";
2
- import { n as MongoIdempotencyStoreOptions } from "../mongodb-B7zupyck.mjs";
3
- import { r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-3TQxm2VZ.mjs";
1
+ import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-CkkWm5uR.mjs";
2
+ import { n as MongoIdempotencyStoreOptions } from "../mongodb-NShVZDMr.mjs";
3
+ import { r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-Bunu3qWg.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
 
6
6
  //#region src/idempotency/idempotencyPlugin.d.ts
@@ -1,2 +1,2 @@
1
- import { n as MongoIdempotencyStoreOptions, t as MongoIdempotencyStore } from "../mongodb-B7zupyck.mjs";
1
+ import { n as MongoIdempotencyStoreOptions, t as MongoIdempotencyStore } from "../mongodb-NShVZDMr.mjs";
2
2
  export { MongoIdempotencyStore, type MongoIdempotencyStoreOptions };
@@ -1,2 +1,2 @@
1
- import { n as RedisIdempotencyStore, r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-3TQxm2VZ.mjs";
1
+ import { n as RedisIdempotencyStore, r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-Bunu3qWg.mjs";
2
2
  export { type RedisClient, RedisIdempotencyStore, type RedisIdempotencyStoreOptions };
@@ -1,4 +1,4 @@
1
- import { G as OpenApiSchemas, Q as QueryParserInterface, Ut as CrudRepository, c as ValidationResult, ft as RouteSchemaOptions, n as AdapterSchemaContext, o as RepositoryLike, q as ParsedQuery, r as DataAdapter, s as SchemaMetadata } from "./interface-B91alUzq.mjs";
1
+ import { Y as OpenApiSchemas, Yt as CrudRepository, Z as ParsedQuery, c as ValidationResult, n as AdapterSchemaContext, nt as QueryParserInterface, o as RepositoryLike, r as DataAdapter, s as SchemaMetadata, vt as RouteSchemaOptions } from "./interface-IJqN3pXK.mjs";
2
2
  import { Model } from "mongoose";
3
3
 
4
4
  //#region src/adapters/mongoose.d.ts