@classytic/arc 2.16.0 → 2.16.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 (117) hide show
  1. package/dist/{BaseController-DlCCTIxJ.mjs → BaseController-Vk8I7C0x.mjs} +1 -1
  2. package/dist/{QueryCache-SvmT_9ti.d.mts → QueryCache-8YmAQ-zW.d.mts} +1 -1
  3. package/dist/{ResourceRegistry-f48hFk3m.mjs → ResourceRegistry-CzSzVK1m.mjs} +3 -0
  4. package/dist/audit/index.d.mts +1 -1
  5. package/dist/auth/index.d.mts +4 -4
  6. package/dist/auth/redis-session.d.mts +1 -1
  7. package/dist/{buildHandler-BZX6zzDM.mjs → buildHandler-C_SkBNF3.mjs} +6 -4
  8. package/dist/cache/index.d.mts +3 -3
  9. package/dist/cli/commands/describe.d.mts +1 -1
  10. package/dist/cli/commands/describe.mjs +1 -1
  11. package/dist/cli/commands/docs.mjs +2 -2
  12. package/dist/cli/commands/generate.d.mts +1 -1
  13. package/dist/cli/commands/generate.mjs +1 -1
  14. package/dist/cli/commands/init.d.mts +1 -1
  15. package/dist/cli/commands/init.mjs +1 -1
  16. package/dist/cli/commands/introspect.mjs +1 -1
  17. package/dist/cli/index.d.mts +2 -2
  18. package/dist/cli/index.mjs +2 -2
  19. package/dist/core/index.d.mts +2 -2
  20. package/dist/core/index.mjs +3 -3
  21. package/dist/{core-DBJ_j6rX.mjs → core-wKeGXn38.mjs} +5 -5
  22. package/dist/{createActionRouter-DUpN3Dd1.mjs → createActionRouter-eiOFtnC3.mjs} +2 -2
  23. package/dist/{createAggregationRouter-Dq-TUCuY.mjs → createAggregationRouter-C4unhBnV.mjs} +3 -3
  24. package/dist/{createApp-DNccuhyI.mjs → createApp-DdPBtmzp.mjs} +8 -8
  25. package/dist/{defineEvent-DRwY0fYm.mjs → defineEvent-NPKUJRt8.mjs} +1 -1
  26. package/dist/docs/index.d.mts +2 -2
  27. package/dist/docs/index.mjs +1 -1
  28. package/dist/{eventPlugin-C2cGqtRO.mjs → eventPlugin-CnJCUyM0.mjs} +1 -1
  29. package/dist/{eventPlugin-CtHC_av1.d.mts → eventPlugin-DjEx_J3j.d.mts} +1 -1
  30. package/dist/events/index.d.mts +3 -3
  31. package/dist/events/index.mjs +5 -5
  32. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  33. package/dist/events/transports/redis.d.mts +1 -1
  34. package/dist/factory/index.d.mts +2 -2
  35. package/dist/factory/index.mjs +4 -3
  36. package/dist/fastify-augmentation-CJm0vh-l.d.mts +42 -0
  37. package/dist/{fields-Anj0xdih.d.mts → fields-DqZLp5d6.d.mts} +1 -1
  38. package/dist/hooks/index.d.mts +1 -1
  39. package/dist/idempotency/index.d.mts +2 -2
  40. package/dist/idempotency/index.mjs +1 -1
  41. package/dist/idempotency/redis.d.mts +1 -1
  42. package/dist/{index-3oIimXQn.d.mts → index-3L-adFJO.d.mts} +3 -3
  43. package/dist/{index-B-ulKx5P.d.mts → index-CC_pgZjY.d.mts} +36 -16
  44. package/dist/{index-CkW0flkU.d.mts → index-DBDgy6Hw.d.mts} +79 -7
  45. package/dist/index.d.mts +5 -5
  46. package/dist/index.mjs +4 -4
  47. package/dist/integrations/event-gateway.d.mts +2 -2
  48. package/dist/integrations/event-gateway.mjs +1 -1
  49. package/dist/integrations/index.d.mts +2 -2
  50. package/dist/integrations/mcp/index.d.mts +4 -4
  51. package/dist/integrations/mcp/index.mjs +1 -1
  52. package/dist/integrations/mcp/testing.d.mts +1 -1
  53. package/dist/integrations/mcp/testing.mjs +1 -1
  54. package/dist/integrations/websocket-redis.d.mts +1 -1
  55. package/dist/integrations/websocket.d.mts +1 -1
  56. package/dist/{loadResourcesFromEntry-BLMEI2Xa.mjs → loadResourcesFromEntry-DCjYMgfC.mjs} +1 -1
  57. package/dist/{mcpPlugin-7vGV51ED.mjs → mcpPlugin-Dbgz9_Rj.mjs} +5 -5
  58. package/dist/middleware/index.d.mts +1 -1
  59. package/dist/{openapi-34T9yNwd.mjs → openapi-BRnd3pT7.mjs} +36 -9
  60. package/dist/permissions/index.d.mts +2 -2
  61. package/dist/pipeline/index.d.mts +1 -1
  62. package/dist/plugins/index.d.mts +5 -59
  63. package/dist/plugins/index.mjs +7 -7
  64. package/dist/plugins/tracing-entry.d.mts +1 -1
  65. package/dist/plugins/tracing-entry.mjs +1 -1
  66. package/dist/preloadResources-BOXzPhKU.mjs +45 -0
  67. package/dist/presets/filesUpload.d.mts +4 -4
  68. package/dist/presets/index.d.mts +1 -1
  69. package/dist/presets/multiTenant.d.mts +1 -1
  70. package/dist/presets/search.d.mts +2 -2
  71. package/dist/{queryCachePlugin-Biqzfbi5.d.mts → queryCachePlugin-Do4P_WBC.d.mts} +2 -2
  72. package/dist/{redis-Cyzrz6SX.d.mts → redis-cpqVb85w.d.mts} +1 -1
  73. package/dist/{redis-stream-DT-YjzrB.d.mts → redis-stream-BuiAS3aE.d.mts} +1 -1
  74. package/dist/registry/index.d.mts +30 -8
  75. package/dist/registry/index.mjs +2 -2
  76. package/dist/{registry-BBE23CDj.mjs → registry-BrlHkrRS.mjs} +14 -8
  77. package/dist/{routerShared-CZV5aabX.mjs → routerShared-ClV4cCaa.mjs} +37 -13
  78. package/dist/scope/index.d.mts +2 -2
  79. package/dist/testing/index.d.mts +2 -25
  80. package/dist/testing/index.mjs +2 -45
  81. package/dist/testing/storageContract.d.mts +1 -1
  82. package/dist/types/index.d.mts +4 -4
  83. package/dist/types/storage.d.mts +1 -1
  84. package/dist/{types-BsJMEQ4D.d.mts → types-BD0BCdf6.d.mts} +1 -1
  85. package/dist/{types-D-fYtKjb.d.mts → types-Dw--SyTq.d.mts} +34 -11
  86. package/dist/utils/index.d.mts +5 -4
  87. package/dist/utils/index.mjs +1 -1
  88. package/dist/{utils-DC5ycPfr.mjs → utils-DPXZnZUx.mjs} +69 -1
  89. package/dist/{validate-By96rH0r.mjs → validate-DFIP2VrM.mjs} +65 -3
  90. package/dist/{versioning-ZwX9tmbS.d.mts → versioning-5H4930tj.d.mts} +1 -1
  91. package/package.json +3 -3
  92. /package/dist/{EventTransport-C-2oAHtw.d.mts → EventTransport-B1GFiYUy.d.mts} +0 -0
  93. /package/dist/{EventTransport-Hxvv5QQz.mjs → EventTransport-ClEDfiMS.mjs} +0 -0
  94. /package/dist/{caching-TeHE8G-v.mjs → caching-8MfrrUYU.mjs} +0 -0
  95. /package/dist/{elevation-0YBpa663.d.mts → elevation-DvwtjDwu.d.mts} +0 -0
  96. /package/dist/{errorHandler-DpoXQHZ9.mjs → errorHandler-DNPzqaTT.mjs} +0 -0
  97. /package/dist/{errorHandler-mHuyWzZE.d.mts → errorHandler-DuqTqeqn.d.mts} +0 -0
  98. /package/dist/{errors-C1lX_jlm.d.mts → errors-4ZloYFvm.d.mts} +0 -0
  99. /package/dist/{externalPaths-DFg-2KTp.d.mts → externalPaths-ClykOQqa.d.mts} +0 -0
  100. /package/dist/{generate-CYac-OLv.mjs → generate-CcM24hoq.mjs} +0 -0
  101. /package/dist/{generate-BWFwgcCM.d.mts → generate-cRnsafMS.d.mts} +0 -0
  102. /package/dist/{init-Dv71MsJr.d.mts → init-D-vrTZ1G.d.mts} +0 -0
  103. /package/dist/{init-HDvoO9L5.mjs → init-DYzfniuX.mjs} +0 -0
  104. /package/dist/{interface-CH0OQudo.d.mts → interface-BVkZsvEe.d.mts} +0 -0
  105. /package/dist/{interface-NwJ_qPlY.d.mts → interface-DoE6UoC2.d.mts} +0 -0
  106. /package/dist/{loadResources-ChQEj8ih.mjs → loadResources-fol6JuvW.mjs} +0 -0
  107. /package/dist/{metrics-TuOmguhi.mjs → metrics-B-PU4-Yu.mjs} +0 -0
  108. /package/dist/{replyHelpers-C-gD32oF.mjs → replyHelpers-boS5Rx26.mjs} +0 -0
  109. /package/dist/{schemaIR-Ctc89DSn.mjs → schemaIR-DAOvBWgT.mjs} +0 -0
  110. /package/dist/{sessionManager-BqFegc0W.d.mts → sessionManager-DlmaHUAl.d.mts} +0 -0
  111. /package/dist/{sse-BY6sTy4P.mjs → sse-jh5OqFjR.mjs} +0 -0
  112. /package/dist/{storage-D2KZJAmn.d.mts → storage-HcAgP5Ni.d.mts} +0 -0
  113. /package/dist/{store-helpers-B0sunfZZ.mjs → store-helpers-5JgaxieH.mjs} +0 -0
  114. /package/dist/{tracing-Dm8n7Cnn.d.mts → tracing-bRqqUxFO.d.mts} +0 -0
  115. /package/dist/{types-DVfpSfx2.d.mts → types-CfapW2t8.d.mts} +0 -0
  116. /package/dist/{versioning-B6mimogM.mjs → versioning-CuIwUQZ2.mjs} +0 -0
  117. /package/dist/{websocket-BkjeGZRn.d.mts → websocket-BJ0w-3Dt.d.mts} +0 -0
@@ -2,7 +2,7 @@ import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-TrJVI
2
2
  import { arcLog } from "./logger/index.mjs";
3
3
  import { d as createDomainError, f as createError, i as NotFoundError, r as ForbiddenError } from "./errors-j4aJm1Wg.mjs";
4
4
  import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-Bi0r0vjG.mjs";
5
- import { N as simpleEqualityMatcher, _ as ArcQueryParser, r as scheduleBackground, t as getUserId } from "./utils-DC5ycPfr.mjs";
5
+ import { N as simpleEqualityMatcher, _ as ArcQueryParser, r as scheduleBackground, t as getUserId } from "./utils-DPXZnZUx.mjs";
6
6
  import { d as applyFieldWritePermissions, p as resolveEffectiveRoles } from "./permissions-CTxMrreC.mjs";
7
7
  import { t as getUserRoles } from "./types-D57iXYb8.mjs";
8
8
  import { t as buildQueryKey } from "./keys-DopsCuyQ.mjs";
@@ -1,4 +1,4 @@
1
- import { r as CacheStore } from "./interface-CH0OQudo.mjs";
1
+ import { r as CacheStore } from "./interface-BVkZsvEe.mjs";
2
2
 
3
3
  //#region src/cache/QueryCache.d.ts
4
4
  /** Metadata wrapper stored in CacheStore */
@@ -96,6 +96,9 @@ var ResourceRegistry = class {
96
96
  lookupAliases: (entry.lookups ?? []).map((l) => l.as ?? l.from),
97
97
  requireDateRange: entry.requireDateRange,
98
98
  requireFilters: entry.requireFilters,
99
+ limit: entry.limit,
100
+ defaultLimit: entry.defaultLimit,
101
+ maxLimit: entry.maxLimit,
99
102
  mcp: entry.mcp
100
103
  })) : void 0,
101
104
  plugin: resource.toPlugin()
@@ -1,4 +1,4 @@
1
- import { d as UserBase } from "../fields-Anj0xdih.mjs";
1
+ import { d as UserBase } from "../fields-DqZLp5d6.mjs";
2
2
  import { FastifyPluginAsync } from "fastify";
3
3
  import { RepositoryLike } from "@classytic/repo-core/adapter";
4
4
 
@@ -1,7 +1,7 @@
1
- import { Bt as AuthHelpers, Vt as AuthPluginOptions } from "../index-CkW0flkU.mjs";
2
- import { c as PermissionCheck } from "../fields-Anj0xdih.mjs";
3
- import { t as ExternalOpenApiPaths } from "../externalPaths-DFg-2KTp.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-BqFegc0W.mjs";
1
+ import { Bt as AuthHelpers, Vt as AuthPluginOptions } from "../index-DBDgy6Hw.mjs";
2
+ import { c as PermissionCheck } from "../fields-DqZLp5d6.mjs";
3
+ import { t as ExternalOpenApiPaths } from "../externalPaths-ClykOQqa.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-DlmaHUAl.mjs";
5
5
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
6
6
 
7
7
  //#region src/auth/authPlugin.d.ts
@@ -1,4 +1,4 @@
1
- import { i as SessionData, s as SessionStore } from "../sessionManager-BqFegc0W.mjs";
1
+ import { i as SessionData, s as SessionStore } from "../sessionManager-DlmaHUAl.mjs";
2
2
 
3
3
  //#region src/auth/redis-session.d.ts
4
4
  /** Minimal Redis client interface — compatible with ioredis */
@@ -1,4 +1,4 @@
1
- import { n as compileAggRequest, t as adapterSupportsAggregate } from "./validate-By96rH0r.mjs";
1
+ import { n as compileAggRequest, t as adapterSupportsAggregate } from "./validate-DFIP2VrM.mjs";
2
2
  //#region src/core/aggregation/buildHandler.ts
3
3
  /**
4
4
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -24,7 +24,7 @@ async function executeAggregation(normalized, deps, ctx) {
24
24
  status: 400,
25
25
  body: guardError
26
26
  };
27
- const aggReq = compileAggRequest(normalized, extractCallerFilter(query), tenantOptions);
27
+ const aggReq = compileAggRequest(normalized, extractCallerFilter(query), tenantOptions, query);
28
28
  if (config.materialized) {
29
29
  const matCtx = {
30
30
  filter: aggReq.filter,
@@ -259,8 +259,10 @@ function extractCallerFilter(query) {
259
259
  return out;
260
260
  }
261
261
  /**
262
- * Map a kit-thrown error to the framework-agnostic execute response.
263
- * Detects two well-known signals:
262
+ * Map a kit-thrown error to the canonical `AggregationExecuteResponse`
263
+ * shape so the aggregation router can surface a structured failure
264
+ * (status + code + message) instead of leaking raw kit errors.
265
+ * Detects three signals:
264
266
  * - "unsupported" / "not implemented" → 501 with upgrade hint
265
267
  * - timeout markers → 504
266
268
  * - everything else → 500
@@ -1,6 +1,6 @@
1
- import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-CH0OQudo.mjs";
2
- import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-SvmT_9ti.mjs";
3
- import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-Biqzfbi5.mjs";
1
+ import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-BVkZsvEe.mjs";
2
+ import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-8YmAQ-zW.mjs";
3
+ import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-Do4P_WBC.mjs";
4
4
 
5
5
  //#region src/cache/keys.d.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { V as ResourceDefinition, it as RateLimitConfig, mt as RouteSchemaOptions } from "../../index-CkW0flkU.mjs";
1
+ import { V as ResourceDefinition, it as RateLimitConfig, mt as RouteSchemaOptions } from "../../index-DBDgy6Hw.mjs";
2
2
 
3
3
  //#region src/cli/commands/describe.d.ts
4
4
  interface DescribedResource {
@@ -1,5 +1,5 @@
1
1
  import { t as CRUD_OPERATIONS } from "../../constants-TrJVIJl0.mjs";
2
- import { n as stringifyMeasureMap } from "../../ResourceRegistry-f48hFk3m.mjs";
2
+ import { n as stringifyMeasureMap } from "../../ResourceRegistry-CzSzVK1m.mjs";
3
3
  import { resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  //#region src/cli/commands/describe.ts
@@ -1,5 +1,5 @@
1
- import { t as buildOpenApiSpec } from "../../openapi-34T9yNwd.mjs";
2
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BLMEI2Xa.mjs";
1
+ import { t as buildOpenApiSpec } from "../../openapi-BRnd3pT7.mjs";
2
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DCjYMgfC.mjs";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { mkdirSync, writeFileSync } from "node:fs";
5
5
  //#region src/cli/commands/docs.ts
@@ -1,2 +1,2 @@
1
- import { n as generate, t as ArcProjectConfig } from "../../generate-BWFwgcCM.mjs";
1
+ import { n as generate, t as ArcProjectConfig } from "../../generate-cRnsafMS.mjs";
2
2
  export { ArcProjectConfig, generate };
@@ -1,2 +1,2 @@
1
- import { t as generate } from "../../generate-CYac-OLv.mjs";
1
+ import { t as generate } from "../../generate-CcM24hoq.mjs";
2
2
  export { generate };
@@ -1,2 +1,2 @@
1
- import { a as ProjectConfig, i as PackageManager, n as DependencyManifest, r as InitOptions, t as init } from "../../init-Dv71MsJr.mjs";
1
+ import { a as ProjectConfig, i as PackageManager, n as DependencyManifest, r as InitOptions, t as init } from "../../init-D-vrTZ1G.mjs";
2
2
  export { DependencyManifest, InitOptions, PackageManager, ProjectConfig, init };
@@ -1,2 +1,2 @@
1
- import { t as init } from "../../init-HDvoO9L5.mjs";
1
+ import { t as init } from "../../init-DYzfniuX.mjs";
2
2
  export { init };
@@ -1,4 +1,4 @@
1
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BLMEI2Xa.mjs";
1
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DCjYMgfC.mjs";
2
2
  //#region src/cli/commands/introspect.ts
3
3
  function describePermission(value) {
4
4
  if (!value) return "none";
@@ -1,7 +1,7 @@
1
1
  import { describe } from "./commands/describe.mjs";
2
2
  import { exportDocs } from "./commands/docs.mjs";
3
3
  import { doctor } from "./commands/doctor.mjs";
4
- import { n as generate } from "../generate-BWFwgcCM.mjs";
5
- import { t as init } from "../init-Dv71MsJr.mjs";
4
+ import { n as generate } from "../generate-cRnsafMS.mjs";
5
+ import { t as init } from "../init-D-vrTZ1G.mjs";
6
6
  import { introspect } from "./commands/introspect.mjs";
7
7
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -1,7 +1,7 @@
1
1
  import { describe } from "./commands/describe.mjs";
2
2
  import { exportDocs } from "./commands/docs.mjs";
3
3
  import { doctor } from "./commands/doctor.mjs";
4
- import { t as generate } from "../generate-CYac-OLv.mjs";
5
- import { t as init } from "../init-HDvoO9L5.mjs";
4
+ import { t as generate } from "../generate-CcM24hoq.mjs";
5
+ import { t as init } from "../init-DYzfniuX.mjs";
6
6
  import { introspect } from "./commands/introspect.mjs";
7
7
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -1,3 +1,3 @@
1
- import { $t as BaseController, At as AggregationRateLimit, B as defineResource, Cn as AccessControlConfig, Ct as AggMeasureShorthand, Dt as AggregationIndexHint, Et as AggregationDateRangeRequirement, Ot as AggregationMaterializedContext, Sn as AccessControl, St as AggMeasureInput, Tt as AggregationConfig, V as ResourceDefinition, an as SlugMixin, bn as BodySanitizer, cn as BaseControllerOptions, dn as ControllerConstructionOptions, en as SoftDeleteExt, fn as QueryResolver, in as SlugExt, jt as AggregationsMap, kt as AggregationMaterializedResult, ln as BaseCrudController, nn as TreeExt, on as BulkExt, pn as QueryResolverConfig, rn as TreeMixin, sn as BulkMixin, tn as SoftDeleteMixin, un as ControllerConfigurableOptions, wt as AggregationCacheConfig, xn as BodySanitizerConfig, yn as ListResult } from "../index-CkW0flkU.mjs";
2
- import { A as MAX_FILTER_DEPTH, C as DEFAULT_SORT, D as HOOK_PHASES, E as HOOK_OPERATIONS, F as RESERVED_QUERY_PARAMS, I as SYSTEM_FIELDS, M as MAX_SEARCH_LENGTH, N as MUTATION_OPERATIONS, O as HookOperation, P as MutationOperation, S as DEFAULT_MAX_LIMIT, T as DEFAULT_UPDATE_METHOD, _ as defineAggregation, a as createRequestContext, b as DEFAULT_ID_FIELD, c as sendControllerResponse, d as getEntityQuery, f as defineResourceVariants, g as createPermissionMiddleware, h as createCrudRouter, i as createFastifyHandler, j as MAX_REGEX_LENGTH, k as HookPhase, l as getEntityId, m as defineAction, n as isFieldReadable, o as getControllerContext, p as DefineActionConfig, r as createCrudHandlers, s as getControllerScope, t as collectReadBlockedFields, u as getEntityIdField, v as CRUD_OPERATIONS, w as DEFAULT_TENANT_FIELD, x as DEFAULT_LIMIT, y as CrudOperation } from "../index-B-ulKx5P.mjs";
1
+ import { $t as BaseController, At as AggregationRateLimit, B as defineResource, Cn as AccessControlConfig, Ct as AggMeasureShorthand, Dt as AggregationIndexHint, Et as AggregationDateRangeRequirement, Ot as AggregationMaterializedContext, Sn as AccessControl, St as AggMeasureInput, Tt as AggregationConfig, V as ResourceDefinition, an as SlugMixin, bn as BodySanitizer, cn as BaseControllerOptions, dn as ControllerConstructionOptions, en as SoftDeleteExt, fn as QueryResolver, in as SlugExt, jt as AggregationsMap, kt as AggregationMaterializedResult, ln as BaseCrudController, nn as TreeExt, on as BulkExt, pn as QueryResolverConfig, rn as TreeMixin, sn as BulkMixin, tn as SoftDeleteMixin, un as ControllerConfigurableOptions, wt as AggregationCacheConfig, xn as BodySanitizerConfig, yn as ListResult } from "../index-DBDgy6Hw.mjs";
2
+ import { A as MAX_FILTER_DEPTH, C as DEFAULT_SORT, D as HOOK_PHASES, E as HOOK_OPERATIONS, F as RESERVED_QUERY_PARAMS, I as SYSTEM_FIELDS, M as MAX_SEARCH_LENGTH, N as MUTATION_OPERATIONS, O as HookOperation, P as MutationOperation, S as DEFAULT_MAX_LIMIT, T as DEFAULT_UPDATE_METHOD, _ as defineAggregation, a as createRequestContext, b as DEFAULT_ID_FIELD, c as sendControllerResponse, d as getEntityQuery, f as defineResourceVariants, g as createPermissionMiddleware, h as createCrudRouter, i as createFastifyHandler, j as MAX_REGEX_LENGTH, k as HookPhase, l as getEntityId, m as defineAction, n as isFieldReadable, o as getControllerContext, p as DefineActionConfig, r as createCrudHandlers, s as getControllerScope, t as collectReadBlockedFields, u as getEntityIdField, v as CRUD_OPERATIONS, w as DEFAULT_TENANT_FIELD, x as DEFAULT_LIMIT, y as CrudOperation } from "../index-CC_pgZjY.mjs";
3
3
  export { AccessControl, AccessControlConfig, AggMeasureInput, AggMeasureShorthand, AggregationCacheConfig, AggregationConfig, AggregationDateRangeRequirement, AggregationIndexHint, AggregationMaterializedContext, AggregationMaterializedResult, AggregationRateLimit, AggregationsMap, BaseController, BaseControllerOptions, BaseCrudController, BodySanitizer, BodySanitizerConfig, BulkExt, BulkMixin, CRUD_OPERATIONS, ControllerConfigurableOptions, ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, DefineActionConfig, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugExt, SlugMixin, SoftDeleteExt, SoftDeleteMixin, TreeExt, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, sendControllerResponse };
@@ -1,5 +1,5 @@
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-TrJVIJl0.mjs";
2
- import { a as BulkMixin, c as collectReadBlockedFields, d as AccessControl, i as SlugMixin, l as isFieldReadable, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController, u as BodySanitizer } from "../BaseController-DlCCTIxJ.mjs";
3
- import { _ as getControllerContext, g as createRequestContext, h as createFastifyHandler, m as createCrudHandlers, v as getControllerScope, y as sendControllerResponse } from "../routerShared-CZV5aabX.mjs";
4
- import { a as defineResource, c as createCrudRouter, i as defineResourceVariants, l as createPermissionMiddleware, n as getEntityIdField, o as ResourceDefinition, r as getEntityQuery, s as defineAction, t as getEntityId, u as defineAggregation } from "../core-DBJ_j6rX.mjs";
2
+ import { a as BulkMixin, c as collectReadBlockedFields, d as AccessControl, i as SlugMixin, l as isFieldReadable, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController, u as BodySanitizer } from "../BaseController-Vk8I7C0x.mjs";
3
+ import { _ as getControllerContext, g as createRequestContext, h as createFastifyHandler, m as createCrudHandlers, v as getControllerScope, y as sendControllerResponse } from "../routerShared-ClV4cCaa.mjs";
4
+ import { a as defineResource, c as createCrudRouter, i as defineResourceVariants, l as createPermissionMiddleware, n as getEntityIdField, o as ResourceDefinition, r as getEntityQuery, s as defineAction, t as getEntityId, u as defineAggregation } from "../core-wKeGXn38.mjs";
5
5
  export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, 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, SlugMixin, SoftDeleteMixin, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, sendControllerResponse };
@@ -1,11 +1,11 @@
1
1
  import { s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-TrJVIJl0.mjs";
2
2
  import { arcLog } from "./logger/index.mjs";
3
- import { A as assertValidConfig, l as getDefaultCrudSchemas } from "./utils-DC5ycPfr.mjs";
4
- import { t as BaseController } from "./BaseController-DlCCTIxJ.mjs";
3
+ import { A as assertValidConfig, l as getDefaultCrudSchemas } from "./utils-DPXZnZUx.mjs";
4
+ import { t as BaseController } from "./BaseController-Vk8I7C0x.mjs";
5
5
  import { t as applyPresets } from "./presets-C9BE6WaZ.mjs";
6
6
  import { n as convertRouteSchema, t as convertOpenApiSchemas } from "./schemaConverter-De34B1ZG.mjs";
7
7
  import { t as hasEvents } from "./typeGuards-BzkXkvVv.mjs";
8
- import { b as buildRequestScopeProjection, c as buildPreHandlerChain, d as resolveRoutePreHandlers, f as resolveRouterPluginMw, g as createRequestContext, h as createFastifyHandler, i as buildAuthMiddleware, l as buildRateLimitConfig, m as createCrudHandlers, o as buildCrudPermissionMw, p as selectPluginMw, r as buildArcDecorator, s as buildPipelineHandler, u as resolvePipelineSteps } from "./routerShared-CZV5aabX.mjs";
8
+ import { b as buildRequestScopeProjection, c as buildPreHandlerChain, d as resolveRoutePreHandlers, f as resolveRouterPluginMw, g as createRequestContext, h as createFastifyHandler, i as buildAuthMiddleware, l as buildRateLimitConfig, m as createCrudHandlers, o as buildCrudPermissionMw, p as selectPluginMw, r as buildArcDecorator, s as buildPipelineHandler, u as resolvePipelineSteps } from "./routerShared-ClV4cCaa.mjs";
9
9
  import { t as pluralize } from "./pluralize-B9M8xvy-.mjs";
10
10
  import { t as resolveActionPermission } from "./actionPermissions-Bjmvn7Eb.mjs";
11
11
  //#region src/core/aggregation/defineAggregation.ts
@@ -1064,7 +1064,7 @@ function buildResourcePlugin(resource) {
1064
1064
  idField: resource.idField
1065
1065
  });
1066
1066
  if (resource.actions && Object.keys(resource.actions).length > 0) {
1067
- const { createActionRouter } = await import("./createActionRouter-DUpN3Dd1.mjs").then((n) => n.n);
1067
+ const { createActionRouter } = await import("./createActionRouter-eiOFtnC3.mjs").then((n) => n.n);
1068
1068
  createActionRouter(typedInstance, {
1069
1069
  ...normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log),
1070
1070
  resourceName: resource.name,
@@ -1078,7 +1078,7 @@ function buildResourcePlugin(resource) {
1078
1078
  });
1079
1079
  }
1080
1080
  if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
1081
- const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-Dq-TUCuY.mjs"), import("./validate-By96rH0r.mjs").then((n) => n.i)]);
1081
+ const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-C4unhBnV.mjs"), import("./validate-DFIP2VrM.mjs").then((n) => n.i)]);
1082
1082
  const repoForAgg = resource.controller?.repository ?? resource.repository;
1083
1083
  if (!adapterSupportsAggregate(repoForAgg)) {
1084
1084
  const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
2
  import "./constants-TrJVIJl0.mjs";
3
3
  import { f as createError } from "./errors-j4aJm1Wg.mjs";
4
- import { a as buildAuthMiddlewareForPermissions, c as buildPreHandlerChain, f as resolveRouterPluginMw, l as buildRateLimitConfig, n as buildActionPipelineHandler, p as selectPluginMw, r as buildArcDecorator, t as buildActionPermissionMw, u as resolvePipelineSteps, y as sendControllerResponse } from "./routerShared-CZV5aabX.mjs";
5
- import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-Ctc89DSn.mjs";
4
+ import { a as buildAuthMiddlewareForPermissions, c as buildPreHandlerChain, f as resolveRouterPluginMw, l as buildRateLimitConfig, n as buildActionPipelineHandler, p as selectPluginMw, r as buildArcDecorator, t as buildActionPermissionMw, u as resolvePipelineSteps, y as sendControllerResponse } from "./routerShared-ClV4cCaa.mjs";
5
+ import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-DAOvBWgT.mjs";
6
6
  //#region src/core/createActionRouter.ts
7
7
  var createActionRouter_exports = /* @__PURE__ */ __exportAll({
8
8
  buildActionBodySchema: () => buildActionBodySchema,
@@ -1,7 +1,7 @@
1
1
  import { f as createError, l as UnauthorizedError, r as ForbiddenError } from "./errors-j4aJm1Wg.mjs";
2
- import { c as buildPreHandlerChain, f as resolveRouterPluginMw, i as buildAuthMiddleware, l as buildRateLimitConfig, p as selectPluginMw, r as buildArcDecorator } from "./routerShared-CZV5aabX.mjs";
3
- import { r as validateAggregations } from "./validate-By96rH0r.mjs";
4
- import { t as buildAggregationHandler } from "./buildHandler-BZX6zzDM.mjs";
2
+ import { c as buildPreHandlerChain, f as resolveRouterPluginMw, i as buildAuthMiddleware, l as buildRateLimitConfig, p as selectPluginMw, r as buildArcDecorator } from "./routerShared-ClV4cCaa.mjs";
3
+ import { r as validateAggregations } from "./validate-DFIP2VrM.mjs";
4
+ import { t as buildAggregationHandler } from "./buildHandler-C_SkBNF3.mjs";
5
5
  //#region src/core/aggregation/createAggregationRouter.ts
6
6
  /**
7
7
  * Register one Fastify route per aggregation. No-op when the map is
@@ -202,7 +202,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
202
202
  await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
203
203
  trackPlugin("arc-core");
204
204
  if (config.arcPlugins?.events !== false) {
205
- const { default: eventPlugin } = await import("./eventPlugin-C2cGqtRO.mjs").then((n) => n.n);
205
+ const { default: eventPlugin } = await import("./eventPlugin-CnJCUyM0.mjs").then((n) => n.n);
206
206
  const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
207
207
  await fastify.register(eventPlugin, {
208
208
  ...eventOpts,
@@ -239,7 +239,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules) {
239
239
  trackPlugin("arc-graceful-shutdown");
240
240
  }
241
241
  if (config.arcPlugins?.caching) {
242
- const { default: cachingPlugin } = await import("./caching-TeHE8G-v.mjs").then((n) => n.r);
242
+ const { default: cachingPlugin } = await import("./caching-8MfrrUYU.mjs").then((n) => n.r);
243
243
  const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
244
244
  await fastify.register(cachingPlugin, opts);
245
245
  trackPlugin("arc-caching", opts);
@@ -256,19 +256,19 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules) {
256
256
  }
257
257
  if (config.arcPlugins?.sse) if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
258
258
  else {
259
- const { default: ssePlugin } = await import("./sse-BY6sTy4P.mjs").then((n) => n.r);
259
+ const { default: ssePlugin } = await import("./sse-jh5OqFjR.mjs").then((n) => n.r);
260
260
  const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
261
261
  await fastify.register(ssePlugin, opts);
262
262
  trackPlugin("arc-sse", opts);
263
263
  }
264
264
  if (config.arcPlugins?.metrics) {
265
- const { default: metricsPlugin } = await import("./metrics-TuOmguhi.mjs").then((n) => n.r);
265
+ const { default: metricsPlugin } = await import("./metrics-B-PU4-Yu.mjs").then((n) => n.r);
266
266
  const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
267
267
  await fastify.register(metricsPlugin, opts);
268
268
  trackPlugin("arc-metrics", opts);
269
269
  }
270
270
  if (config.arcPlugins?.versioning) {
271
- const { default: versioningPlugin } = await import("./versioning-B6mimogM.mjs").then((n) => n.r);
271
+ const { default: versioningPlugin } = await import("./versioning-CuIwUQZ2.mjs").then((n) => n.r);
272
272
  await fastify.register(versioningPlugin, config.arcPlugins.versioning);
273
273
  trackPlugin("arc-versioning", config.arcPlugins.versioning);
274
274
  }
@@ -347,7 +347,7 @@ async function registerElevation(fastify, config, trackPlugin) {
347
347
  */
348
348
  async function registerErrorHandler(fastify, config, trackPlugin) {
349
349
  if (config.errorHandler === false) return;
350
- const { errorHandlerPlugin } = await import("./errorHandler-DpoXQHZ9.mjs").then((n) => n.r);
350
+ const { errorHandlerPlugin } = await import("./errorHandler-DNPzqaTT.mjs").then((n) => n.r);
351
351
  const errorOpts = typeof config.errorHandler === "object" ? config.errorHandler : { includeStack: config.preset !== "production" };
352
352
  await fastify.register(errorHandlerPlugin, errorOpts);
353
353
  trackPlugin("arc-error-handler", errorOpts);
@@ -448,7 +448,7 @@ async function registerResources(fastify, config) {
448
448
  let discoveryPath;
449
449
  let discoveryYieldedZero = false;
450
450
  if (resolvedResources === void 0 && config.resourceDir) {
451
- const { loadResources } = await import("./loadResources-ChQEj8ih.mjs").then((n) => n.n);
451
+ const { loadResources } = await import("./loadResources-fol6JuvW.mjs").then((n) => n.n);
452
452
  const { resolve, dirname } = await import("node:path");
453
453
  const { fileURLToPath } = await import("node:url");
454
454
  const rawDir = config.resourceDir;
@@ -874,7 +874,7 @@ async function createApp(options) {
874
874
  await registerErrorHandler(fastify, config, trackPlugin);
875
875
  await registerResources(fastify, config);
876
876
  if (config.replyHelpers) {
877
- const { replyHelpersPlugin } = await import("./replyHelpers-C-gD32oF.mjs").then((n) => n.n);
877
+ const { replyHelpersPlugin } = await import("./replyHelpers-boS5Rx26.mjs").then((n) => n.n);
878
878
  await fastify.register(replyHelpersPlugin);
879
879
  }
880
880
  if (config.serializeBigInt) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
- import { n as createEvent } from "./EventTransport-Hxvv5QQz.mjs";
2
+ import { n as createEvent } from "./EventTransport-ClEDfiMS.mjs";
3
3
  //#region src/events/defineEvent.ts
4
4
  /**
5
5
  * defineEvent — Typed Event Definitions with Optional Schema Validation
@@ -1,5 +1,5 @@
1
- import { p as RegistryEntry } from "../index-CkW0flkU.mjs";
2
- import { t as ExternalOpenApiPaths } from "../externalPaths-DFg-2KTp.mjs";
1
+ import { p as RegistryEntry } from "../index-DBDgy6Hw.mjs";
2
+ import { t as ExternalOpenApiPaths } from "../externalPaths-ClykOQqa.mjs";
3
3
  import { FastifyPluginAsync } from "fastify";
4
4
 
5
5
  //#region src/docs/openapi/types.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as getUserRoles } from "../types-D57iXYb8.mjs";
2
- import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-34T9yNwd.mjs";
2
+ import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-BRnd3pT7.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/docs/scalar.ts
5
5
  const scalarPlugin = async (fastify, opts = {}) => {
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
2
  import { arcLog } from "./logger/index.mjs";
3
3
  import { d as createDomainError } from "./errors-j4aJm1Wg.mjs";
4
4
  import { t as requestContext } from "./requestContext-SSaaTgW8.mjs";
5
- import { n as createEvent, t as MemoryEventTransport } from "./EventTransport-Hxvv5QQz.mjs";
5
+ import { n as createEvent, t as MemoryEventTransport } from "./EventTransport-ClEDfiMS.mjs";
6
6
  import fp from "fastify-plugin";
7
7
  //#region src/events/retry.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-C-2oAHtw.mjs";
1
+ import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-B1GFiYUy.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 EventTransport, i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions, t as DeadLetteredEvent } from "../EventTransport-C-2oAHtw.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-CtHC_av1.mjs";
1
+ import { a as EventTransport, i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions, t as DeadLetteredEvent } from "../EventTransport-B1GFiYUy.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-DjEx_J3j.mjs";
3
3
  import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
4
- import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-DT-YjzrB.mjs";
4
+ import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-BuiAS3aE.mjs";
5
5
  import { RepositoryLike } from "@classytic/repo-core/adapter";
6
6
 
7
7
  //#region src/events/eventTypes.d.ts
@@ -1,7 +1,7 @@
1
- import { t as MemoryEventTransport } from "../EventTransport-Hxvv5QQz.mjs";
2
- import { n as defineEvent, t as createEventRegistry } from "../defineEvent-DRwY0fYm.mjs";
3
- import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-C2cGqtRO.mjs";
4
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-B0sunfZZ.mjs";
1
+ import { t as MemoryEventTransport } from "../EventTransport-ClEDfiMS.mjs";
2
+ import { n as defineEvent, t as createEventRegistry } from "../defineEvent-NPKUJRt8.mjs";
3
+ import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-CnJCUyM0.mjs";
4
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-5JgaxieH.mjs";
5
5
  import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
6
6
  import { update } from "@classytic/repo-core/update";
7
7
  //#region src/events/eventTypes.ts
@@ -716,7 +716,7 @@ function wrapWithSchema(definition, handler, options = {}) {
716
716
  if (validate && definition.schema) result = validate(definition.schema, event.payload);
717
717
  else if (registry) result = registry.validate(definition.name, event.payload, eventVersion);
718
718
  else if (definition.schema) {
719
- const { createEventRegistry } = await import("../defineEvent-DRwY0fYm.mjs").then((n) => n.r);
719
+ const { createEventRegistry } = await import("../defineEvent-NPKUJRt8.mjs").then((n) => n.r);
720
720
  const adhoc = createEventRegistry();
721
721
  adhoc.register(definition);
722
722
  result = adhoc.validate(definition.name, event.payload);
@@ -1,2 +1,2 @@
1
- import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-DT-YjzrB.mjs";
1
+ import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-BuiAS3aE.mjs";
2
2
  export { type RedisStreamLike, RedisStreamTransport, type RedisStreamTransportOptions };
@@ -1,4 +1,4 @@
1
- import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "../../EventTransport-C-2oAHtw.mjs";
1
+ import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "../../EventTransport-B1GFiYUy.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 ResourceModule, i as CustomAuthenticatorOption, l as UnderPressureOptions, n as BetterAuthOption, o as JwtAuthOption, p as loadResources, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as LoadResourcesOptions } from "../types-D-fYtKjb.mjs";
1
+ import { a as CustomPluginAuthOption, c as RawBodyOptions, d as preloadResourcesAsync, f as LoadResourcesOptions, h as loadResources, i as CustomAuthenticatorOption, l as UnderPressureOptions, m as ResourceModule, n as BetterAuthOption, o as JwtAuthOption, p as ResourceLike, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as preloadResources } from "../types-Dw--SyTq.mjs";
2
2
  import { FastifyInstance, FastifyServerOptions } from "fastify";
3
3
 
4
4
  //#region src/factory/createApp.d.ts
@@ -95,4 +95,4 @@ declare const edgePreset: Partial<CreateAppOptions>;
95
95
  */
96
96
  declare function getPreset(name: "production" | "development" | "testing" | "edge"): Partial<CreateAppOptions>;
97
97
  //#endregion
98
- export { ArcFactory, type AuthOption, type BetterAuthOption, type CreateAppOptions, type CustomAuthenticatorOption, type CustomPluginAuthOption, type FetchHandlerOptions, type JwtAuthOption, type LoadResourcesOptions, type MultipartOptions, type RawBodyOptions, type ResourceLike, type ResourceModule, type UnderPressureOptions, createApp, developmentPreset, edgePreset, getPreset, loadResources, productionPreset, testingPreset, toFetchHandler };
98
+ export { ArcFactory, type AuthOption, type BetterAuthOption, type CreateAppOptions, type CustomAuthenticatorOption, type CustomPluginAuthOption, type FetchHandlerOptions, type JwtAuthOption, type LoadResourcesOptions, type MultipartOptions, type RawBodyOptions, type ResourceLike, type ResourceModule, type UnderPressureOptions, createApp, developmentPreset, edgePreset, getPreset, loadResources, preloadResources, preloadResourcesAsync, productionPreset, testingPreset, toFetchHandler };
@@ -1,5 +1,6 @@
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-DNccuhyI.mjs";
2
- import { t as loadResources } from "../loadResources-ChQEj8ih.mjs";
1
+ import { n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-BOXzPhKU.mjs";
2
+ import { a as edgePreset, c as testingPreset, i as developmentPreset, n as createApp, o as getPreset, s as productionPreset, t as ArcFactory } from "../createApp-DdPBtmzp.mjs";
3
+ import { t as loadResources } from "../loadResources-fol6JuvW.mjs";
3
4
  //#region src/factory/edge.ts
4
5
  /**
5
6
  * Convert a Fastify app into a Web Standards fetch handler.
@@ -46,4 +47,4 @@ function toFetchHandler(app, options = {}) {
46
47
  };
47
48
  }
48
49
  //#endregion
49
- export { ArcFactory, createApp, developmentPreset, edgePreset, getPreset, loadResources, productionPreset, testingPreset, toFetchHandler };
50
+ export { ArcFactory, createApp, developmentPreset, edgePreset, getPreset, loadResources, preloadResources, preloadResourcesAsync, productionPreset, testingPreset, toFetchHandler };
@@ -0,0 +1,42 @@
1
+ import { An as HookSystem, z as ResourceRegistry } from "./index-DBDgy6Hw.mjs";
2
+ import { t as ExternalOpenApiPaths } from "./externalPaths-ClykOQqa.mjs";
3
+ import { FastifyPluginAsync } from "fastify";
4
+
5
+ //#region src/core/arcCorePlugin.d.ts
6
+ interface ArcCorePluginOptions {
7
+ /** Enable event emission for CRUD operations (requires eventPlugin) */
8
+ emitEvents?: boolean;
9
+ /** Hook system instance (for testing/custom setup) */
10
+ hookSystem?: HookSystem;
11
+ /** Resource registry instance (for testing/custom setup) */
12
+ registry?: ResourceRegistry;
13
+ }
14
+ interface PluginMeta {
15
+ name: string;
16
+ version?: string;
17
+ options?: Record<string, unknown>;
18
+ registeredAt: string;
19
+ }
20
+ interface ArcCore {
21
+ /** Instance-scoped hook system */
22
+ hooks: HookSystem;
23
+ /** Instance-scoped resource registry */
24
+ registry: ResourceRegistry;
25
+ /** Whether event emission is enabled */
26
+ emitEvents: boolean;
27
+ /** External OpenAPI paths contributed by auth adapters or third-party integrations */
28
+ externalOpenApiPaths: ExternalOpenApiPaths[];
29
+ /** Registered plugins for introspection */
30
+ plugins: Map<string, PluginMeta>;
31
+ }
32
+ declare const arcCorePlugin: FastifyPluginAsync<ArcCorePluginOptions>;
33
+ declare const _default: FastifyPluginAsync<ArcCorePluginOptions>;
34
+ //#endregion
35
+ //#region src/types/fastify-augmentation.d.ts
36
+ declare module "fastify" {
37
+ interface FastifyInstance {
38
+ arc?: ArcCore;
39
+ }
40
+ }
41
+ //#endregion
42
+ export { arcCorePlugin as a, _default as i, ArcCorePluginOptions as n, PluginMeta as r, ArcCore as t };
@@ -1,4 +1,4 @@
1
- import { i as RequestScope } from "./types-DVfpSfx2.mjs";
1
+ import { i as RequestScope } from "./types-CfapW2t8.mjs";
2
2
  import { FastifyRequest } from "fastify";
3
3
 
4
4
  //#region src/permissions/types.d.ts
@@ -1,2 +1,2 @@
1
- import { An as HookSystem, Dn as HookOperation, En as HookHandler, Fn as beforeCreate, In as beforeDelete, Ln as beforeUpdate, Mn as afterCreate, Nn as afterDelete, On as HookPhase, Pn as afterUpdate, Rn as createHookSystem, Tn as HookContext, jn as HookSystemOptions, kn as HookRegistration, wn as DefineHookOptions, zn as defineHook } from "../index-CkW0flkU.mjs";
1
+ import { An as HookSystem, Dn as HookOperation, En as HookHandler, Fn as beforeCreate, In as beforeDelete, Ln as beforeUpdate, Mn as afterCreate, Nn as afterDelete, On as HookPhase, Pn as afterUpdate, Rn as createHookSystem, Tn as HookContext, jn as HookSystemOptions, kn as HookRegistration, wn as DefineHookOptions, zn as defineHook } from "../index-DBDgy6Hw.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,5 +1,5 @@
1
- import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-NwJ_qPlY.mjs";
2
- import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-Cyzrz6SX.mjs";
1
+ import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-DoE6UoC2.mjs";
2
+ import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-cpqVb85w.mjs";
3
3
  import { FastifyPluginAsync } from "fastify";
4
4
  import { RepositoryLike } from "@classytic/repo-core/adapter";
5
5
 
@@ -1,4 +1,4 @@
1
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-B0sunfZZ.mjs";
1
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-5JgaxieH.mjs";
2
2
  import { createHash } from "node:crypto";
3
3
  import fp from "fastify-plugin";
4
4
  import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
@@ -1,2 +1,2 @@
1
- import { a as UpstashRedisLike, i as RedisIdempotencyStoreOptions, n as RedisClient, o as ioredisAsIdempotencyClient, r as RedisIdempotencyStore, s as upstashAsIdempotencyClient, t as IoredisLike } from "../redis-Cyzrz6SX.mjs";
1
+ import { a as UpstashRedisLike, i as RedisIdempotencyStoreOptions, n as RedisClient, o as ioredisAsIdempotencyClient, r as RedisIdempotencyStore, s as upstashAsIdempotencyClient, t as IoredisLike } from "../redis-cpqVb85w.mjs";
2
2
  export { type IoredisLike, type RedisClient, RedisIdempotencyStore, type RedisIdempotencyStoreOptions, type UpstashRedisLike, ioredisAsIdempotencyClient, upstashAsIdempotencyClient };
@@ -1,6 +1,6 @@
1
- import { r as CacheStore, t as CacheLogger } from "./interface-CH0OQudo.mjs";
2
- import { i as RequestScope, n as Mandate } from "./types-DVfpSfx2.mjs";
3
- import { c as PermissionCheck, l as PermissionContext, u as PermissionResult } from "./fields-Anj0xdih.mjs";
1
+ import { r as CacheStore, t as CacheLogger } from "./interface-BVkZsvEe.mjs";
2
+ import { i as RequestScope, n as Mandate } from "./types-CfapW2t8.mjs";
3
+ import { c as PermissionCheck, l as PermissionContext, u as PermissionResult } from "./fields-DqZLp5d6.mjs";
4
4
  import { FastifyReply, FastifyRequest } from "fastify";
5
5
 
6
6
  //#region src/permissions/agent.d.ts