@classytic/arc 2.18.4 → 2.19.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 (160) hide show
  1. package/dist/{BaseController-B-uXzf6I.mjs → BaseController-Dy6EQHjM.mjs} +7 -7
  2. package/dist/{QueryCache-Dsyv2mLS.d.mts → QueryCache-TRfXau3W.d.mts} +1 -1
  3. package/dist/{ResourceRegistry-CWmOggxS.mjs → ResourceRegistry-5fKZwhK_.mjs} +1 -1
  4. package/dist/{pipeline-D4sqiokR.mjs → actionPermissions-D7NGwcAR.mjs} +29 -5
  5. package/dist/audit/index.d.mts +1 -1
  6. package/dist/auth/index.d.mts +4 -4
  7. package/dist/auth/index.mjs +262 -6
  8. package/dist/auth/redis-session.d.mts +1 -1
  9. package/dist/betterAuthOpenApi-CV1lxpRX.mjs +2 -0
  10. package/dist/{buildHandler-Cvrc2p7r.mjs → buildHandler-B0qvAguf.mjs} +1 -1
  11. package/dist/cache/index.d.mts +3 -3
  12. package/dist/cache/index.mjs +3 -3
  13. package/dist/{caching-C0DdKiYB.mjs → caching-_NJeDd1_.mjs} +1 -1
  14. package/dist/cli/commands/describe.d.mts +1 -1
  15. package/dist/cli/commands/describe.mjs +2 -2
  16. package/dist/cli/commands/docs.mjs +2 -2
  17. package/dist/cli/commands/generate.d.mts +2 -2
  18. package/dist/cli/commands/generate.mjs +1 -1
  19. package/dist/cli/commands/init.d.mts +2 -2
  20. package/dist/cli/commands/init.mjs +1 -1
  21. package/dist/cli/commands/introspect.mjs +1 -1
  22. package/dist/cli/index.d.mts +2 -2
  23. package/dist/cli/index.mjs +2 -2
  24. package/dist/context/index.mjs +1 -1
  25. package/dist/core/index.d.mts +3 -3
  26. package/dist/core/index.mjs +4 -4
  27. package/dist/{core-C88uIwd3.mjs → core-Ba-6Sue6.mjs} +67 -63
  28. package/dist/{createActionRouter-DGCCp-kP.mjs → createActionRouter-B_WzBFyf.mjs} +10 -10
  29. package/dist/{createAggregationRouter-Ca77b8iK.mjs → createAggregationRouter-B_G_nIjm.mjs} +4 -4
  30. package/dist/{createApp-J1iPXY9p.mjs → createApp--703hQE1.mjs} +14 -14
  31. package/dist/docs/index.d.mts +2 -2
  32. package/dist/docs/index.mjs +2 -2
  33. package/dist/{elevation-BzhyVWfn.mjs → elevation-COpYKt2h.mjs} +2 -2
  34. package/dist/encryption/index.d.mts +222 -0
  35. package/dist/encryption/index.mjs +270 -0
  36. package/dist/{errorHandler-Bua97SEt.mjs → errorHandler-Dxf6P_kV.mjs} +2 -2
  37. package/dist/{eventPlugin-Bw4bUDEO.mjs → eventPlugin-DJG2D7sy.mjs} +106 -5
  38. package/dist/{eventPlugin-C1W1CRbf.d.mts → eventPlugin-DbBFd3x_.d.mts} +1 -1
  39. package/dist/events/index.d.mts +3 -3
  40. package/dist/events/index.mjs +189 -5
  41. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  42. package/dist/events/transports/redis.d.mts +1 -1
  43. package/dist/factory/index.d.mts +1 -1
  44. package/dist/factory/index.mjs +3 -3
  45. package/dist/{fastify-augmentation-BdCl_eNo.d.mts → fastify-augmentation-D-5_yQJi.d.mts} +2 -2
  46. package/dist/{fields-CKLrhyOb.d.mts → fields-C7ahdGYf.d.mts} +1 -1
  47. package/dist/{generate-BaxDdmJ8.mjs → generate-Brans3fW.mjs} +1 -1
  48. package/dist/hooks/index.d.mts +1 -1
  49. package/dist/hooks/index.mjs +1 -1
  50. package/dist/idempotency/index.d.mts +2 -2
  51. package/dist/idempotency/index.mjs +1 -1
  52. package/dist/idempotency/redis.d.mts +1 -1
  53. package/dist/{index-Cvo1u9n6.d.mts → index-CP6A1Ffj.d.mts} +9 -9
  54. package/dist/{index-vcWUGkwf.d.mts → index-CRKiiP5o.d.mts} +3 -3
  55. package/dist/{index-QYma8mdC.d.mts → index-CUTG2Cuo.d.mts} +88 -7
  56. package/dist/index.d.mts +5 -5
  57. package/dist/index.mjs +7 -7
  58. package/dist/{init-DSsdRfk9.mjs → init-Bqpt1Hxf.mjs} +274 -130
  59. package/dist/integrations/event-gateway.d.mts +2 -2
  60. package/dist/integrations/event-gateway.mjs +1 -1
  61. package/dist/integrations/index.d.mts +3 -3
  62. package/dist/integrations/mcp/index.d.mts +4 -4
  63. package/dist/integrations/mcp/index.mjs +1 -1
  64. package/dist/integrations/mcp/testing.d.mts +1 -1
  65. package/dist/integrations/mcp/testing.mjs +1 -1
  66. package/dist/integrations/streamline.mjs +7 -3
  67. package/dist/integrations/websocket-pushref-redis.d.mts +1 -1
  68. package/dist/integrations/websocket-redis.d.mts +1 -1
  69. package/dist/integrations/websocket.d.mts +3 -3
  70. package/dist/{loadResources-CwXt9MCh.mjs → loadResources-B8UmpITt.mjs} +1 -1
  71. package/dist/{loadResourcesFromEntry-XHNeUWpu.mjs → loadResourcesFromEntry-BTlFEx05.mjs} +1 -1
  72. package/dist/{mcpPlugin-CzKdt3B8.mjs → mcpPlugin-C088Nd-G.mjs} +10 -11
  73. package/dist/{memory-TdTHCS9-.mjs → memory-CLXA2VeJ.mjs} +1 -1
  74. package/dist/{metrics-Da2EUPi9.mjs → metrics-fdxI5mn_.mjs} +1 -1
  75. package/dist/middleware/index.d.mts +1 -1
  76. package/dist/middleware/index.mjs +2 -2
  77. package/dist/{openapi-ButnRyOM.mjs → openapi-DZ-5a5Op.mjs} +5 -5
  78. package/dist/permissions/index.d.mts +3 -3
  79. package/dist/permissions/index.mjs +2 -2
  80. package/dist/{permissions-3uzwkbQt.mjs → permissions-BPB1xqGf.mjs} +4 -4
  81. package/dist/{pipe-9Tl-OAus.mjs → pipe-BOLmGIxa.mjs} +1 -1
  82. package/dist/pipeline/index.d.mts +1 -1
  83. package/dist/pipeline/index.mjs +1 -1
  84. package/dist/plugins/index.d.mts +6 -7
  85. package/dist/plugins/index.mjs +12 -12
  86. package/dist/plugins/response-cache.mjs +1 -1
  87. package/dist/plugins/tracing-entry.d.mts +1 -1
  88. package/dist/plugins/tracing-entry.mjs +1 -1
  89. package/dist/presets/filesUpload.d.mts +4 -4
  90. package/dist/presets/filesUpload.mjs +4 -4
  91. package/dist/presets/index.d.mts +1 -1
  92. package/dist/presets/index.mjs +1 -1
  93. package/dist/presets/multiTenant.d.mts +1 -1
  94. package/dist/presets/multiTenant.mjs +2 -2
  95. package/dist/presets/search.d.mts +2 -2
  96. package/dist/presets/search.mjs +1 -1
  97. package/dist/{presets-CF79RHEo.mjs → presets-BtyFwTO4.mjs} +2 -2
  98. package/dist/{queryCachePlugin-CnAeFqju.mjs → queryCachePlugin-emHb0CuX.mjs} +4 -4
  99. package/dist/{queryCachePlugin-Bd2tYgh5.d.mts → queryCachePlugin-xzFyKAjT.d.mts} +2 -2
  100. package/dist/{redis-3hqH_Qk_.d.mts → redis-C3W0qbz8.d.mts} +1 -1
  101. package/dist/{redis-stream-BtEUtjxZ.d.mts → redis-stream-DsP1vqZB.d.mts} +1 -1
  102. package/dist/{rateLimit-yKvxWAky.mjs → registerRoute-BdV8DDwU.mjs} +127 -2
  103. package/dist/registry/index.d.mts +1 -1
  104. package/dist/registry/index.mjs +2 -2
  105. package/dist/{registry-Br15xdGM.mjs → registry-Bm9LjWKs.mjs} +1 -1
  106. package/dist/{replyHelpers-DXHVxrrj.mjs → replyHelpers-67tRawQZ.mjs} +1 -1
  107. package/dist/{schemaIR-CE6USIRi.mjs → schemaIR-D1MJwqmp.mjs} +1 -1
  108. package/dist/schemas/index.d.mts +64 -65
  109. package/dist/scope/index.d.mts +2 -2
  110. package/dist/scope/index.mjs +3 -3
  111. package/dist/{sse-BrY1W6U8.mjs → sse-CfUjwjDk.mjs} +7 -4
  112. package/dist/streaming-BQcW6_Kq.mjs +162 -0
  113. package/dist/testing/index.d.mts +7 -7
  114. package/dist/testing/index.mjs +3 -3
  115. package/dist/testing/storageContract.d.mts +1 -1
  116. package/dist/types/index.d.mts +5 -5
  117. package/dist/types/storage.d.mts +1 -1
  118. package/dist/{types-WVlAVp8T.d.mts → types-9_wtNPsI.d.mts} +10 -10
  119. package/dist/{types-BWBcb88c.d.mts → types-DpvSF5Hh.d.mts} +1 -1
  120. package/dist/{types-Bi0r0vjG.mjs → types-bHblZ9YN.mjs} +1 -1
  121. package/dist/utils/index.d.mts +42 -4
  122. package/dist/utils/index.mjs +6 -5
  123. package/dist/{utils-xAQeDyU_.mjs → utils-C6QQ9-hd.mjs} +1415 -1524
  124. package/dist/{validate-0__MuUsK.mjs → validate-CRcaWzp2.mjs} +1 -1
  125. package/dist/{versioning-BSEDGXKC.d.mts → versioning-D_eBCfNr.d.mts} +8 -1
  126. package/dist/{versioning-C0K8KQLx.mjs → versioning-Dk-71iIz.mjs} +1 -1
  127. package/dist/{websocket-BFBT5rH-.d.mts → websocket-MlYlrYq0.d.mts} +1 -1
  128. package/package.json +45 -30
  129. package/dist/EventTransport-7LPXLEUX.mjs +0 -103
  130. package/dist/actionPermissions-CX9QIMTd.mjs +0 -24
  131. package/dist/betterAuthOpenApi-DAAhMZff.mjs +0 -251
  132. package/dist/defineEvent-DC981g-o.mjs +0 -188
  133. package/dist/registerRoute-BEYn0ylk.mjs +0 -108
  134. /package/dist/{EventTransport-CaaXM5Y1.d.mts → EventTransport-IEn7Tn-Q.d.mts} +0 -0
  135. /package/dist/{HookSystem-BfCpWbwM.mjs → HookSystem-C1vB_Gc9.mjs} +0 -0
  136. /package/dist/{constants-TrJVIJl0.mjs → constants-gaEeMlz-.mjs} +0 -0
  137. /package/dist/{elevation-DW90z5bT.d.mts → elevation-xGUBq6p_.d.mts} +0 -0
  138. /package/dist/{errorHandler-_Lp2k9M3.d.mts → errorHandler-BtUUDPEa.d.mts} +0 -0
  139. /package/dist/{errors-DZOemeGa.d.mts → errors-DOHkjQlD.d.mts} +0 -0
  140. /package/dist/{errors-j4aJm1Wg.mjs → errors-DkO8Nk6-.mjs} +0 -0
  141. /package/dist/{externalPaths-DLle0R07.d.mts → externalPaths-BE6wFpYv.d.mts} +0 -0
  142. /package/dist/{generate-Dmk8cfvX.d.mts → generate-BnsL9GBm.d.mts} +0 -0
  143. /package/dist/{init-BS4Daqnv.d.mts → init-BPEu8cs-.d.mts} +0 -0
  144. /package/dist/{interface-DL7LlWS5.d.mts → interface-C1_WLTMK.d.mts} +0 -0
  145. /package/dist/{interface-CsrGR8LF.d.mts → interface-Uk8ONJv7.d.mts} +0 -0
  146. /package/dist/{keys-B3yyBEyH.mjs → keys-Cd316u_y.mjs} +0 -0
  147. /package/dist/{multipartBody-709YcXi1.mjs → multipartBody-CHEQSZ6G.mjs} +0 -0
  148. /package/dist/{pluralize-BxdUl2P4.mjs → pluralize-DccFV9R7.mjs} +0 -0
  149. /package/dist/{preloadResources-B-j-iqo-.mjs → preloadResources-CHw3_oA_.mjs} +0 -0
  150. /package/dist/{pushref-registry-Dqclzjy7.d.mts → pushref-registry-DnCqL3aa.d.mts} +0 -0
  151. /package/dist/{requestContext-DDLS3NVU.mjs → requestContext-BZKOr13H.mjs} +0 -0
  152. /package/dist/{chunk-BpYLSNr0.mjs → rolldown-runtime-8H4AJuhK.mjs} +0 -0
  153. /package/dist/{schemaConverter-DatAaVNj.mjs → schemaConverter-U0MnO9vd.mjs} +0 -0
  154. /package/dist/{sessionManager-CyHpYXoB.d.mts → sessionManager-BXG-HGwG.d.mts} +0 -0
  155. /package/dist/{storage-C5q8fuEt.d.mts → storage-Co_PQpeQ.d.mts} +0 -0
  156. /package/dist/{store-helpers-DjSYI2uP.mjs → store-helpers-DY6xq4sM.mjs} +0 -0
  157. /package/dist/{tracing-Bnb1-YVd.d.mts → tracing-D8jlGXP7.d.mts} +0 -0
  158. /package/dist/{typeGuards-CcFZXgU7.mjs → typeGuards-C9KXUly6.mjs} +0 -0
  159. /package/dist/{types-BJwJN2Pg.d.mts → types-LNebCoJx.d.mts} +0 -0
  160. /package/dist/{types-D57iXYb8.mjs → types-XTApa8b6.mjs} +0 -0
@@ -1,11 +1,11 @@
1
- import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-TrJVIJl0.mjs";
1
+ import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-gaEeMlz-.mjs";
2
2
  import { arcLog } from "./logger/index.mjs";
3
- import { d as createDomainError, f as createError, i as NotFoundError, r as ForbiddenError } from "./errors-j4aJm1Wg.mjs";
4
- import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-Bi0r0vjG.mjs";
5
- import { I as simpleEqualityMatcher, b as ArcQueryParser, o as scheduleBackground, t as getUserId } from "./utils-xAQeDyU_.mjs";
6
- import { F as applyFieldWritePermissions, L as resolveEffectiveRoles } from "./permissions-3uzwkbQt.mjs";
7
- import { t as getUserRoles } from "./types-D57iXYb8.mjs";
8
- import { t as buildQueryKey } from "./keys-B3yyBEyH.mjs";
3
+ import { d as createDomainError, f as createError, i as NotFoundError, r as ForbiddenError } from "./errors-DkO8Nk6-.mjs";
4
+ import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-bHblZ9YN.mjs";
5
+ import { M as scheduleBackground, N as simpleEqualityMatcher, j as getUserId, k as ArcQueryParser } from "./utils-C6QQ9-hd.mjs";
6
+ import { t as buildQueryKey } from "./keys-Cd316u_y.mjs";
7
+ import { F as applyFieldWritePermissions, L as resolveEffectiveRoles } from "./permissions-BPB1xqGf.mjs";
8
+ import { t as getUserRoles } from "./types-XTApa8b6.mjs";
9
9
  //#region src/core/AccessControl.ts
10
10
  const log = arcLog("access-control");
11
11
  var AccessControl = class {
@@ -1,4 +1,4 @@
1
- import { r as CacheStore } from "./interface-DL7LlWS5.mjs";
1
+ import { r as CacheStore } from "./interface-C1_WLTMK.mjs";
2
2
 
3
3
  //#region src/cache/QueryCache.d.ts
4
4
  /** Metadata wrapper stored in CacheStore */
@@ -1,4 +1,4 @@
1
- import "./constants-TrJVIJl0.mjs";
1
+ import "./constants-gaEeMlz-.mjs";
2
2
  //#region src/registry/ResourceRegistry.ts
3
3
  /**
4
4
  * Resource Registry
@@ -1,7 +1,7 @@
1
- import { b as isElevated, c as getOrgId, g as getUserId, n as PUBLIC_SCOPE, x as isMember } from "./types-Bi0r0vjG.mjs";
2
- import { L as resolveEffectiveRoles, P as applyFieldReadPermissions } from "./permissions-3uzwkbQt.mjs";
3
- import { t as getUserRoles } from "./types-D57iXYb8.mjs";
4
- import { t as executePipeline } from "./pipe-9Tl-OAus.mjs";
1
+ import { b as isElevated, c as getOrgId, g as getUserId, n as PUBLIC_SCOPE, x as isMember } from "./types-bHblZ9YN.mjs";
2
+ import { L as resolveEffectiveRoles, P as applyFieldReadPermissions } from "./permissions-BPB1xqGf.mjs";
3
+ import { t as getUserRoles } from "./types-XTApa8b6.mjs";
4
+ import { t as executePipeline } from "./pipe-BOLmGIxa.mjs";
5
5
  import { isPaginatedResult, toCanonicalList } from "@classytic/repo-core/pagination";
6
6
  //#region src/scope/projection.ts
7
7
  /**
@@ -247,6 +247,7 @@ function sendControllerResponse(reply, response, request) {
247
247
  function createFastifyHandler(controllerMethod) {
248
248
  return async (req, reply) => {
249
249
  sendControllerResponse(reply, await controllerMethod(createRequestContext(req)), req);
250
+ return reply;
250
251
  };
251
252
  }
252
253
  /**
@@ -333,4 +334,27 @@ function buildActionPipelineHandler(handler, steps, operation, resourceName) {
333
334
  };
334
335
  }
335
336
  //#endregion
336
- export { createFastifyHandler as a, getControllerScope as c, createCrudHandlers as i, sendControllerResponse as l, buildPipelineHandler as n, createRequestContext as o, resolvePipelineSteps as r, getControllerContext as s, buildActionPipelineHandler as t, buildRequestScopeProjection as u };
337
+ //#region src/core/actionPermissions.ts
338
+ /**
339
+ * Return the effective `PermissionCheck` for a single action, or `undefined`
340
+ * when the resource declares no gate at any level.
341
+ *
342
+ * Callers decide what "no gate" means:
343
+ * - HTTP: boot-time throw in `normalizeActionsToRouterConfig`.
344
+ * - MCP: tool-generation throw in `resourceToTools` (mirrors HTTP — the
345
+ * two surfaces fail closed identically so MCP can't expose an
346
+ * unauthenticated mutating tool when the HTTP plugin lifecycle hasn't
347
+ * run).
348
+ * - OpenAPI: docs advertise the endpoint as unauthenticated.
349
+ */
350
+ function resolveActionPermission(input) {
351
+ const { action, resourcePermissions, resourceActionPermissions, globalAuth } = input;
352
+ const explicit = typeof action !== "function" && action.permissions ? action.permissions : void 0;
353
+ if (explicit) return explicit;
354
+ if (resourceActionPermissions) return resourceActionPermissions;
355
+ if (globalAuth) return globalAuth;
356
+ const updateFallback = resourcePermissions?.update;
357
+ if (updateFallback) return updateFallback;
358
+ }
359
+ //#endregion
360
+ export { createCrudHandlers as a, getControllerContext as c, buildRequestScopeProjection as d, resolvePipelineSteps as i, getControllerScope as l, buildActionPipelineHandler as n, createFastifyHandler as o, buildPipelineHandler as r, createRequestContext as s, resolveActionPermission as t, sendControllerResponse as u };
@@ -1,4 +1,4 @@
1
- import { d as UserBase } from "../fields-CKLrhyOb.mjs";
1
+ import { d as UserBase } from "../fields-C7ahdGYf.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-QYma8mdC.mjs";
2
- import { c as PermissionCheck } from "../fields-CKLrhyOb.mjs";
3
- import { t as ExternalOpenApiPaths } from "../externalPaths-DLle0R07.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-CyHpYXoB.mjs";
1
+ import { Ht as AuthPluginOptions, Vt as AuthHelpers } from "../index-CUTG2Cuo.mjs";
2
+ import { c as PermissionCheck } from "../fields-C7ahdGYf.mjs";
3
+ import { t as ExternalOpenApiPaths } from "../externalPaths-BE6wFpYv.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-BXG-HGwG.mjs";
5
5
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
6
6
 
7
7
  //#region src/auth/authPlugin.d.ts
@@ -1,7 +1,7 @@
1
- import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-j4aJm1Wg.mjs";
2
- import { _ as requireTeamMembership, m as requireOrgRole, p as requireOrgMembership } from "../permissions-3uzwkbQt.mjs";
3
- import { n as normalizeRoles, t as getUserRoles } from "../types-D57iXYb8.mjs";
4
- import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-DAAhMZff.mjs";
1
+ import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-DkO8Nk6-.mjs";
2
+ import { _ as requireTeamMembership, m as requireOrgRole, p as requireOrgMembership } from "../permissions-BPB1xqGf.mjs";
3
+ import { n as normalizeRoles, t as getUserRoles } from "../types-XTApa8b6.mjs";
4
+ import { a as toJsonSchema } from "../schemaConverter-U0MnO9vd.mjs";
5
5
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
6
6
  import fp from "fastify-plugin";
7
7
  //#region src/auth/authPlugin.ts
@@ -317,11 +317,20 @@ function toFetchRequest(request) {
317
317
  else if (contentType.includes("application/json") || contentType.includes("text/") || !contentType) body = JSON.stringify(request.body);
318
318
  else request.log?.warn?.("toFetchRequest: cannot reconstruct %s body without rawBody plugin", contentType);
319
319
  }
320
- return new Request(url, {
320
+ const init = {
321
321
  method: request.method,
322
322
  headers,
323
323
  body
324
+ };
325
+ const fetchRequest = new Request(url, init);
326
+ Object.defineProperty(fetchRequest, "clone", {
327
+ configurable: true,
328
+ writable: true,
329
+ value() {
330
+ return new Request(url, init);
331
+ }
324
332
  });
333
+ return fetchRequest;
325
334
  }
326
335
  /**
327
336
  * Pipe a Fetch API Response back into Fastify's reply.
@@ -611,7 +620,7 @@ function createBetterAuthAdapter(options) {
611
620
  if (!fastify.hasDecorator("authenticate")) fastify.decorate("authenticate", authenticate);
612
621
  if (!fastify.hasDecorator("optionalAuthenticate")) fastify.decorate("optionalAuthenticate", optionalAuthenticate);
613
622
  if (!extractedOpenApi && openapiOpt !== false && auth.api && typeof auth.api === "object") {
614
- const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-DAAhMZff.mjs").then((n) => n.t);
623
+ const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-CV1lxpRX.mjs");
615
624
  extractedOpenApi = extractBetterAuthOpenApi(auth.api, {
616
625
  basePath,
617
626
  userFields
@@ -639,6 +648,253 @@ function createBetterAuthAdapter(options) {
639
648
  };
640
649
  }
641
650
  //#endregion
651
+ //#region src/auth/betterAuthOpenApi.ts
652
+ /**
653
+ * Check if a value looks like a Better Auth endpoint (has .path and .options)
654
+ */
655
+ function isBetterAuthEndpoint(value) {
656
+ if (typeof value !== "function" && typeof value !== "object") return false;
657
+ if (!value) return false;
658
+ const v = value;
659
+ return typeof v.path === "string" && typeof v.options === "object" && v.options !== null;
660
+ }
661
+ /**
662
+ * Convert Fastify-style path params (/:id) to OpenAPI-style (/{id})
663
+ */
664
+ function toOpenApiPath(path) {
665
+ return path.replace(/:([^/]+)/g, "{$1}");
666
+ }
667
+ /**
668
+ * Extract path parameters from a path string
669
+ */
670
+ function extractPathParams(path) {
671
+ const params = [];
672
+ const matches = path.matchAll(/:(\w+)/g);
673
+ for (const match of matches) {
674
+ const name = match[1];
675
+ if (!name) continue;
676
+ params.push({
677
+ name,
678
+ in: "path",
679
+ required: true,
680
+ schema: { type: "string" }
681
+ });
682
+ }
683
+ return params;
684
+ }
685
+ /**
686
+ * Extract OpenAPI paths from a Better Auth instance's API object.
687
+ *
688
+ * Walks `authApi` (the `auth.api` object from Better Auth), discovers
689
+ * endpoints, converts their Zod schemas to JSON Schema via `z.toJSONSchema()`,
690
+ * and returns a complete `ExternalOpenApiPaths` object ready for Arc's spec builder.
691
+ */
692
+ function extractBetterAuthOpenApi(authApi, options = {}) {
693
+ const { basePath = "/api/auth", tagName = "Authentication", tagDescription = "Better Auth authentication endpoints", excludePaths = [], excludeServerOnly = true, userFields } = options;
694
+ const normalizedBase = basePath.replace(/\/+$/, "");
695
+ const paths = {};
696
+ const detectedPlugins = detectActivePlugins(authApi);
697
+ const securityOptions = [{ cookieAuth: [] }, { bearerAuth: [] }];
698
+ if (detectedPlugins.apiKey) securityOptions.push({ apiKeyAuth: [] });
699
+ for (const [key, value] of Object.entries(authApi)) {
700
+ if (!isBetterAuthEndpoint(value)) continue;
701
+ const { path: endpointPath, options: endpointOpts } = value;
702
+ if (excludePaths.includes(endpointPath)) continue;
703
+ if (excludeServerOnly && endpointOpts.metadata?.SERVER_ONLY) continue;
704
+ const fullPath = toOpenApiPath(`${normalizedBase}${endpointPath}`);
705
+ const methods = [];
706
+ if (endpointOpts.method) if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
707
+ else methods.push(endpointOpts.method.toLowerCase());
708
+ else methods.push(endpointOpts.body ? "post" : "get");
709
+ const openApiMeta = endpointOpts.metadata?.openapi;
710
+ for (const method of methods) {
711
+ const operation = {
712
+ tags: openApiMeta?.tags ?? [tagName],
713
+ operationId: openApiMeta?.operationId ?? key,
714
+ summary: openApiMeta?.summary ?? formatOperationSummary(key),
715
+ security: securityOptions
716
+ };
717
+ if (openApiMeta?.description) operation.description = openApiMeta.description;
718
+ const parameters = [...extractPathParams(endpointPath)];
719
+ if ((method === "get" || method === "delete") && endpointOpts.query) {
720
+ const querySchema = toJsonSchema(endpointOpts.query);
721
+ if (querySchema && querySchema.type === "object" && querySchema.properties) {
722
+ const props = querySchema.properties;
723
+ const required = querySchema.required ?? [];
724
+ for (const [name, prop] of Object.entries(props)) {
725
+ const paramEntry = {
726
+ name,
727
+ in: "query",
728
+ required: required.includes(name),
729
+ schema: prop
730
+ };
731
+ if (prop.description) paramEntry.description = prop.description;
732
+ parameters.push(paramEntry);
733
+ }
734
+ }
735
+ }
736
+ if (parameters.length > 0) operation.parameters = parameters;
737
+ if (method === "post" || method === "put" || method === "patch") {
738
+ if (openApiMeta?.requestBody) operation.requestBody = structuredClone(openApiMeta.requestBody);
739
+ else if (endpointOpts.body) {
740
+ const bodySchema = toJsonSchema(endpointOpts.body);
741
+ if (bodySchema) operation.requestBody = {
742
+ required: true,
743
+ content: { "application/json": { schema: bodySchema } }
744
+ };
745
+ }
746
+ if (userFields && isUserFieldEndpoint(endpointPath) && operation.requestBody) mergeUserFieldsIntoRequestBody(operation.requestBody, userFields, endpointPath);
747
+ }
748
+ if (openApiMeta?.responses) operation.responses = openApiMeta.responses;
749
+ else operation.responses = {
750
+ "200": { description: "Success" },
751
+ "400": { description: "Bad request" },
752
+ "401": { description: "Unauthorized" }
753
+ };
754
+ if (!paths[fullPath]) paths[fullPath] = {};
755
+ paths[fullPath][method] = operation;
756
+ }
757
+ }
758
+ const schemas = {
759
+ User: {
760
+ type: "object",
761
+ properties: {
762
+ id: { type: "string" },
763
+ name: { type: "string" },
764
+ email: {
765
+ type: "string",
766
+ format: "email"
767
+ },
768
+ emailVerified: { type: "boolean" },
769
+ image: {
770
+ type: "string",
771
+ nullable: true
772
+ },
773
+ createdAt: {
774
+ type: "string",
775
+ format: "date-time"
776
+ },
777
+ updatedAt: {
778
+ type: "string",
779
+ format: "date-time"
780
+ }
781
+ }
782
+ },
783
+ Session: {
784
+ type: "object",
785
+ properties: {
786
+ id: { type: "string" },
787
+ userId: { type: "string" },
788
+ token: { type: "string" },
789
+ expiresAt: {
790
+ type: "string",
791
+ format: "date-time"
792
+ },
793
+ ipAddress: {
794
+ type: "string",
795
+ nullable: true
796
+ },
797
+ userAgent: {
798
+ type: "string",
799
+ nullable: true
800
+ },
801
+ createdAt: {
802
+ type: "string",
803
+ format: "date-time"
804
+ },
805
+ updatedAt: {
806
+ type: "string",
807
+ format: "date-time"
808
+ }
809
+ }
810
+ }
811
+ };
812
+ if (userFields) {
813
+ const userProps = schemas.User?.properties;
814
+ for (const [name, field] of Object.entries(userFields)) {
815
+ const prop = { type: field.type };
816
+ if (field.description) prop.description = field.description;
817
+ userProps[name] = prop;
818
+ }
819
+ }
820
+ const securitySchemes = { cookieAuth: {
821
+ type: "apiKey",
822
+ in: "cookie",
823
+ name: "better-auth.session_token",
824
+ description: "Session cookie set by Better Auth after sign-in"
825
+ } };
826
+ if (detectedPlugins.apiKey) securitySchemes.apiKeyAuth = {
827
+ type: "apiKey",
828
+ in: "header",
829
+ name: "x-api-key",
830
+ description: "API key for programmatic access. Pass org context via x-organization-id header."
831
+ };
832
+ const resourceSecurity = [];
833
+ if (detectedPlugins.apiKey) resourceSecurity.push({
834
+ apiKeyAuth: [],
835
+ orgHeader: []
836
+ });
837
+ return {
838
+ paths,
839
+ schemas,
840
+ securitySchemes,
841
+ tags: [{
842
+ name: tagName,
843
+ description: tagDescription
844
+ }],
845
+ resourceSecurity: resourceSecurity.length > 0 ? resourceSecurity : void 0
846
+ };
847
+ }
848
+ /**
849
+ * Auto-detect active Better Auth plugins by inspecting the API object.
850
+ *
851
+ * Rather than hardcoding plugin-specific behavior, we check for known
852
+ * endpoint signatures that each plugin registers. This way the OpenAPI
853
+ * spec adapts automatically to whatever plugins the app has enabled —
854
+ * no Arc update needed when adding/removing plugins.
855
+ */
856
+ function detectActivePlugins(authApi) {
857
+ const endpointPaths = /* @__PURE__ */ new Set();
858
+ for (const value of Object.values(authApi)) if (isBetterAuthEndpoint(value)) endpointPaths.add(value.path);
859
+ return {
860
+ apiKey: endpointPaths.has("/api-key/create"),
861
+ organization: endpointPaths.has("/organization/create")
862
+ };
863
+ }
864
+ /**
865
+ * Convert a camelCase key like 'signInEmail' to a readable summary like 'Sign in email'
866
+ */
867
+ function formatOperationSummary(key) {
868
+ return key.replace(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase()).trim();
869
+ }
870
+ /**
871
+ * Check if an endpoint path should have userFields merged into its request body.
872
+ */
873
+ function isUserFieldEndpoint(path) {
874
+ return path === "/sign-up/email" || path === "/update-user";
875
+ }
876
+ /**
877
+ * Merge user-defined fields into an existing requestBody schema.
878
+ * For updateUser, all fields are treated as optional regardless of their `required` setting.
879
+ */
880
+ function mergeUserFieldsIntoRequestBody(requestBody, userFields, endpointPath) {
881
+ const content = requestBody?.content?.["application/json"];
882
+ if (!content?.schema) return;
883
+ const schema = content.schema;
884
+ if (!schema.properties) schema.properties = {};
885
+ if (!schema.required) schema.required = [];
886
+ const props = schema.properties;
887
+ const required = schema.required;
888
+ for (const [name, field] of Object.entries(userFields)) {
889
+ if (field.input === false) continue;
890
+ const isRequired = endpointPath === "/update-user" ? false : field.required ?? false;
891
+ const prop = { type: field.type };
892
+ if (field.description) prop.description = field.description;
893
+ props[name] = prop;
894
+ if (isRequired && !required.includes(name)) required.push(name);
895
+ }
896
+ }
897
+ //#endregion
642
898
  //#region src/auth/sessionManager.ts
643
899
  /**
644
900
  * Session Management for Arc
@@ -1,4 +1,4 @@
1
- import { i as SessionData, s as SessionStore } from "../sessionManager-CyHpYXoB.mjs";
1
+ import { i as SessionData, s as SessionStore } from "../sessionManager-BXG-HGwG.mjs";
2
2
 
3
3
  //#region src/auth/redis-session.d.ts
4
4
  /** Minimal Redis client interface — compatible with ioredis */
@@ -0,0 +1,2 @@
1
+ import { extractBetterAuthOpenApi } from "./auth/index.mjs";
2
+ export { extractBetterAuthOpenApi };
@@ -1,4 +1,4 @@
1
- import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-0__MuUsK.mjs";
1
+ import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-CRcaWzp2.mjs";
2
2
  //#region src/core/aggregation/buildHandler.ts
3
3
  /**
4
4
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -1,6 +1,6 @@
1
- import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-DL7LlWS5.mjs";
2
- import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-Dsyv2mLS.mjs";
3
- import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-Bd2tYgh5.mjs";
1
+ import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-C1_WLTMK.mjs";
2
+ import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-TRfXau3W.mjs";
3
+ import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-xzFyKAjT.mjs";
4
4
 
5
5
  //#region src/cache/keys.d.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { t as MemoryCacheStore } from "../memory-TdTHCS9-.mjs";
2
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-B3yyBEyH.mjs";
3
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-CnAeFqju.mjs";
1
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-Cd316u_y.mjs";
2
+ import { t as MemoryCacheStore } from "../memory-CLXA2VeJ.mjs";
3
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-emHb0CuX.mjs";
4
4
  //#region src/cache/redis.ts
5
5
  /**
6
6
  * Redis-backed cache store.
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
2
  import fp from "fastify-plugin";
3
3
  //#region src/plugins/caching.ts
4
4
  var caching_exports = /* @__PURE__ */ __exportAll({
@@ -1,4 +1,4 @@
1
- import { V as ResourceDefinition, it as RateLimitConfig, mt as RouteSchemaOptions } from "../../index-QYma8mdC.mjs";
1
+ import { V as ResourceDefinition, ht as RouteSchemaOptions, it as RateLimitConfig } from "../../index-CUTG2Cuo.mjs";
2
2
 
3
3
  //#region src/cli/commands/describe.d.ts
4
4
  interface DescribedResource {
@@ -1,5 +1,5 @@
1
- import { t as CRUD_OPERATIONS } from "../../constants-TrJVIJl0.mjs";
2
- import { n as stringifyMeasureMap } from "../../ResourceRegistry-CWmOggxS.mjs";
1
+ import { t as CRUD_OPERATIONS } from "../../constants-gaEeMlz-.mjs";
2
+ import { n as stringifyMeasureMap } from "../../ResourceRegistry-5fKZwhK_.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-ButnRyOM.mjs";
2
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-XHNeUWpu.mjs";
1
+ import { t as buildOpenApiSpec } from "../../openapi-DZ-5a5Op.mjs";
2
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BTlFEx05.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-Dmk8cfvX.mjs";
2
- export { ArcProjectConfig, generate };
1
+ import { n as generate, t as ArcProjectConfig } from "../../generate-BnsL9GBm.mjs";
2
+ export { type ArcProjectConfig, generate };
@@ -1,2 +1,2 @@
1
- import { t as generate } from "../../generate-BaxDdmJ8.mjs";
1
+ import { t as generate } from "../../generate-Brans3fW.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-BS4Daqnv.mjs";
2
- export { DependencyManifest, InitOptions, PackageManager, ProjectConfig, init };
1
+ import { a as ProjectConfig, i as PackageManager, n as DependencyManifest, r as InitOptions, t as init } from "../../init-BPEu8cs-.mjs";
2
+ export { type DependencyManifest, type InitOptions, type PackageManager, type ProjectConfig, init };
@@ -1,2 +1,2 @@
1
- import { t as init } from "../../init-DSsdRfk9.mjs";
1
+ import { t as init } from "../../init-Bqpt1Hxf.mjs";
2
2
  export { init };
@@ -1,4 +1,4 @@
1
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-XHNeUWpu.mjs";
1
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BTlFEx05.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-Dmk8cfvX.mjs";
5
- import { t as init } from "../init-BS4Daqnv.mjs";
4
+ import { n as generate } from "../generate-BnsL9GBm.mjs";
5
+ import { t as init } from "../init-BPEu8cs-.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-BaxDdmJ8.mjs";
5
- import { t as init } from "../init-DSsdRfk9.mjs";
4
+ import { t as generate } from "../generate-Brans3fW.mjs";
5
+ import { t as init } from "../init-Bqpt1Hxf.mjs";
6
6
  import { introspect } from "./commands/introspect.mjs";
7
7
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -1,4 +1,4 @@
1
- import { n as requestContext, t as getTraceHeaders } from "../requestContext-DDLS3NVU.mjs";
1
+ import { n as requestContext, t as getTraceHeaders } from "../requestContext-BZKOr13H.mjs";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/context/transactionContext.ts
4
4
  /**
@@ -1,3 +1,3 @@
1
- import { $t as BaseController, At as AggregationRateLimit, B as defineResource, Ct as AggMeasureShorthand, Dt as AggregationIndexHint, Et as AggregationDateRangeRequirement, Fn as ControllerConfigurableOptions, In as ControllerConstructionOptions, Ln as ListResult, Ot as AggregationMaterializedContext, Pn as BaseControllerOptions, Rn as BodySanitizer, St as AggMeasureInput, Tt as AggregationConfig, V as ResourceDefinition, an as SlugMixin, cn as BaseCrudController, dn as AccessControl, en as SoftDeleteExt, fn as AccessControlConfig, in as SlugExt, jt as AggregationsMap, kt as AggregationMaterializedResult, ln as QueryResolver, nn as TreeExt, on as BulkExt, rn as TreeMixin, sn as BulkMixin, tn as SoftDeleteMixin, un as QueryResolverConfig, wt as AggregationCacheConfig, zn as BodySanitizerConfig } from "../index-QYma8mdC.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-Cvo1u9n6.mjs";
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
+ import { At as AggregationMaterializedResult, B as defineResource, Bn as BodySanitizerConfig, Ct as AggMeasureInput, Dt as AggregationDateRangeRequirement, Et as AggregationConfig, Fn as BaseControllerOptions, In as ControllerConfigurableOptions, Ln as ControllerConstructionOptions, Mt as AggregationsMap, Ot as AggregationIndexHint, Rn as ListResult, Tt as AggregationCacheConfig, V as ResourceDefinition, an as SlugExt, cn as BulkMixin, dn as QueryResolverConfig, en as BaseController, fn as AccessControl, in as TreeMixin, jt as AggregationRateLimit, kt as AggregationMaterializedContext, ln as BaseCrudController, nn as SoftDeleteMixin, on as SlugMixin, pn as AccessControlConfig, rn as TreeExt, sn as BulkExt, tn as SoftDeleteExt, un as QueryResolver, wt as AggMeasureShorthand, zn as BodySanitizer } from "../index-CUTG2Cuo.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-CP6A1Ffj.mjs";
3
+ export { AccessControl, type AccessControlConfig, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ControllerConfigurableOptions, type ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DefineActionConfig, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, sendControllerResponse };
@@ -1,5 +1,5 @@
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, f 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-B-uXzf6I.mjs";
3
- 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-C88uIwd3.mjs";
4
- import { a as createFastifyHandler, c as getControllerScope, i as createCrudHandlers, l as sendControllerResponse, o as createRequestContext, s as getControllerContext } from "../pipeline-D4sqiokR.mjs";
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-gaEeMlz-.mjs";
2
+ import { a as BulkMixin, c as collectReadBlockedFields, f 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-Dy6EQHjM.mjs";
3
+ 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-Ba-6Sue6.mjs";
4
+ import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-D7NGwcAR.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 };