@classytic/arc 2.18.4 → 2.18.5

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 (158) 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-h7DYDNMg.mjs} +28 -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 +252 -5
  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-ZnQBa5rh.mjs} +55 -56
  28. package/dist/{createActionRouter-DGCCp-kP.mjs → createActionRouter-CagItpxI.mjs} +6 -7
  29. package/dist/{createAggregationRouter-Ca77b8iK.mjs → createAggregationRouter-DVKroXhC.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/{errorHandler-Bua97SEt.mjs → errorHandler-Dxf6P_kV.mjs} +2 -2
  35. package/dist/{eventPlugin-Bw4bUDEO.mjs → eventPlugin-DJG2D7sy.mjs} +106 -5
  36. package/dist/{eventPlugin-C1W1CRbf.d.mts → eventPlugin-DbBFd3x_.d.mts} +1 -1
  37. package/dist/events/index.d.mts +3 -3
  38. package/dist/events/index.mjs +189 -5
  39. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  40. package/dist/events/transports/redis.d.mts +1 -1
  41. package/dist/factory/index.d.mts +1 -1
  42. package/dist/factory/index.mjs +3 -3
  43. package/dist/{fastify-augmentation-BdCl_eNo.d.mts → fastify-augmentation-Cxb0ROIw.d.mts} +2 -2
  44. package/dist/{fields-CKLrhyOb.d.mts → fields-C7ahdGYf.d.mts} +1 -1
  45. package/dist/{generate-BaxDdmJ8.mjs → generate-Brans3fW.mjs} +1 -1
  46. package/dist/hooks/index.d.mts +1 -1
  47. package/dist/hooks/index.mjs +1 -1
  48. package/dist/idempotency/index.d.mts +2 -2
  49. package/dist/idempotency/index.mjs +1 -1
  50. package/dist/idempotency/redis.d.mts +1 -1
  51. package/dist/{index-QYma8mdC.d.mts → index-CHNQIhcb.d.mts} +5 -6
  52. package/dist/{index-vcWUGkwf.d.mts → index-CRKiiP5o.d.mts} +3 -3
  53. package/dist/{index-Cvo1u9n6.d.mts → index-Dh0_RSTd.d.mts} +3 -3
  54. package/dist/index.d.mts +5 -5
  55. package/dist/index.mjs +7 -7
  56. package/dist/{init-DSsdRfk9.mjs → init-Bqpt1Hxf.mjs} +274 -130
  57. package/dist/integrations/event-gateway.d.mts +2 -2
  58. package/dist/integrations/event-gateway.mjs +1 -1
  59. package/dist/integrations/index.d.mts +3 -3
  60. package/dist/integrations/mcp/index.d.mts +4 -4
  61. package/dist/integrations/mcp/index.mjs +1 -1
  62. package/dist/integrations/mcp/testing.d.mts +1 -1
  63. package/dist/integrations/mcp/testing.mjs +1 -1
  64. package/dist/integrations/streamline.mjs +7 -3
  65. package/dist/integrations/websocket-pushref-redis.d.mts +1 -1
  66. package/dist/integrations/websocket-redis.d.mts +1 -1
  67. package/dist/integrations/websocket.d.mts +3 -3
  68. package/dist/{loadResources-CwXt9MCh.mjs → loadResources-B8UmpITt.mjs} +1 -1
  69. package/dist/{loadResourcesFromEntry-XHNeUWpu.mjs → loadResourcesFromEntry-BTlFEx05.mjs} +1 -1
  70. package/dist/{mcpPlugin-CzKdt3B8.mjs → mcpPlugin-D1wuRD2c.mjs} +10 -11
  71. package/dist/{memory-TdTHCS9-.mjs → memory-CLXA2VeJ.mjs} +1 -1
  72. package/dist/{metrics-Da2EUPi9.mjs → metrics-fdxI5mn_.mjs} +1 -1
  73. package/dist/middleware/index.d.mts +1 -1
  74. package/dist/middleware/index.mjs +2 -2
  75. package/dist/{openapi-ButnRyOM.mjs → openapi-xVJibapr.mjs} +5 -5
  76. package/dist/permissions/index.d.mts +3 -3
  77. package/dist/permissions/index.mjs +2 -2
  78. package/dist/{permissions-3uzwkbQt.mjs → permissions-BPB1xqGf.mjs} +4 -4
  79. package/dist/{pipe-9Tl-OAus.mjs → pipe-BOLmGIxa.mjs} +1 -1
  80. package/dist/pipeline/index.d.mts +1 -1
  81. package/dist/pipeline/index.mjs +1 -1
  82. package/dist/plugins/index.d.mts +6 -7
  83. package/dist/plugins/index.mjs +12 -12
  84. package/dist/plugins/response-cache.mjs +1 -1
  85. package/dist/plugins/tracing-entry.d.mts +1 -1
  86. package/dist/plugins/tracing-entry.mjs +1 -1
  87. package/dist/presets/filesUpload.d.mts +4 -4
  88. package/dist/presets/filesUpload.mjs +4 -4
  89. package/dist/presets/index.d.mts +1 -1
  90. package/dist/presets/index.mjs +1 -1
  91. package/dist/presets/multiTenant.d.mts +1 -1
  92. package/dist/presets/multiTenant.mjs +2 -2
  93. package/dist/presets/search.d.mts +2 -2
  94. package/dist/presets/search.mjs +1 -1
  95. package/dist/{presets-CF79RHEo.mjs → presets-BtyFwTO4.mjs} +2 -2
  96. package/dist/{queryCachePlugin-CnAeFqju.mjs → queryCachePlugin-emHb0CuX.mjs} +4 -4
  97. package/dist/{queryCachePlugin-Bd2tYgh5.d.mts → queryCachePlugin-xzFyKAjT.d.mts} +2 -2
  98. package/dist/{redis-3hqH_Qk_.d.mts → redis-C3W0qbz8.d.mts} +1 -1
  99. package/dist/{redis-stream-BtEUtjxZ.d.mts → redis-stream-DsP1vqZB.d.mts} +1 -1
  100. package/dist/{rateLimit-yKvxWAky.mjs → registerRoute-CPmdkZGu.mjs} +109 -2
  101. package/dist/registry/index.d.mts +1 -1
  102. package/dist/registry/index.mjs +2 -2
  103. package/dist/{registry-Br15xdGM.mjs → registry-Bm9LjWKs.mjs} +1 -1
  104. package/dist/{replyHelpers-DXHVxrrj.mjs → replyHelpers-67tRawQZ.mjs} +1 -1
  105. package/dist/{schemaIR-CE6USIRi.mjs → schemaIR-D1MJwqmp.mjs} +1 -1
  106. package/dist/schemas/index.d.mts +64 -65
  107. package/dist/scope/index.d.mts +2 -2
  108. package/dist/scope/index.mjs +3 -3
  109. package/dist/{sse-BrY1W6U8.mjs → sse-CfUjwjDk.mjs} +7 -4
  110. package/dist/streaming-BQcW6_Kq.mjs +162 -0
  111. package/dist/testing/index.d.mts +7 -7
  112. package/dist/testing/index.mjs +3 -3
  113. package/dist/testing/storageContract.d.mts +1 -1
  114. package/dist/types/index.d.mts +5 -5
  115. package/dist/types/storage.d.mts +1 -1
  116. package/dist/{types-WVlAVp8T.d.mts → types-CmkknLzI.d.mts} +10 -10
  117. package/dist/{types-BWBcb88c.d.mts → types-D60PFwfG.d.mts} +1 -1
  118. package/dist/{types-Bi0r0vjG.mjs → types-bHblZ9YN.mjs} +1 -1
  119. package/dist/utils/index.d.mts +42 -4
  120. package/dist/utils/index.mjs +6 -5
  121. package/dist/{utils-xAQeDyU_.mjs → utils-C6QQ9-hd.mjs} +1415 -1524
  122. package/dist/{validate-0__MuUsK.mjs → validate-CRcaWzp2.mjs} +1 -1
  123. package/dist/{versioning-BSEDGXKC.d.mts → versioning-D_eBCfNr.d.mts} +8 -1
  124. package/dist/{versioning-C0K8KQLx.mjs → versioning-Dk-71iIz.mjs} +1 -1
  125. package/dist/{websocket-BFBT5rH-.d.mts → websocket-MlYlrYq0.d.mts} +1 -1
  126. package/package.json +36 -30
  127. package/dist/EventTransport-7LPXLEUX.mjs +0 -103
  128. package/dist/actionPermissions-CX9QIMTd.mjs +0 -24
  129. package/dist/betterAuthOpenApi-DAAhMZff.mjs +0 -251
  130. package/dist/defineEvent-DC981g-o.mjs +0 -188
  131. package/dist/registerRoute-BEYn0ylk.mjs +0 -108
  132. /package/dist/{EventTransport-CaaXM5Y1.d.mts → EventTransport-IEn7Tn-Q.d.mts} +0 -0
  133. /package/dist/{HookSystem-BfCpWbwM.mjs → HookSystem-C1vB_Gc9.mjs} +0 -0
  134. /package/dist/{constants-TrJVIJl0.mjs → constants-gaEeMlz-.mjs} +0 -0
  135. /package/dist/{elevation-DW90z5bT.d.mts → elevation-xGUBq6p_.d.mts} +0 -0
  136. /package/dist/{errorHandler-_Lp2k9M3.d.mts → errorHandler-BtUUDPEa.d.mts} +0 -0
  137. /package/dist/{errors-DZOemeGa.d.mts → errors-DOHkjQlD.d.mts} +0 -0
  138. /package/dist/{errors-j4aJm1Wg.mjs → errors-DkO8Nk6-.mjs} +0 -0
  139. /package/dist/{externalPaths-DLle0R07.d.mts → externalPaths-BE6wFpYv.d.mts} +0 -0
  140. /package/dist/{generate-Dmk8cfvX.d.mts → generate-BnsL9GBm.d.mts} +0 -0
  141. /package/dist/{init-BS4Daqnv.d.mts → init-BPEu8cs-.d.mts} +0 -0
  142. /package/dist/{interface-DL7LlWS5.d.mts → interface-C1_WLTMK.d.mts} +0 -0
  143. /package/dist/{interface-CsrGR8LF.d.mts → interface-Uk8ONJv7.d.mts} +0 -0
  144. /package/dist/{keys-B3yyBEyH.mjs → keys-Cd316u_y.mjs} +0 -0
  145. /package/dist/{multipartBody-709YcXi1.mjs → multipartBody-CHEQSZ6G.mjs} +0 -0
  146. /package/dist/{pluralize-BxdUl2P4.mjs → pluralize-DccFV9R7.mjs} +0 -0
  147. /package/dist/{preloadResources-B-j-iqo-.mjs → preloadResources-CHw3_oA_.mjs} +0 -0
  148. /package/dist/{pushref-registry-Dqclzjy7.d.mts → pushref-registry-DnCqL3aa.d.mts} +0 -0
  149. /package/dist/{requestContext-DDLS3NVU.mjs → requestContext-BZKOr13H.mjs} +0 -0
  150. /package/dist/{chunk-BpYLSNr0.mjs → rolldown-runtime-8H4AJuhK.mjs} +0 -0
  151. /package/dist/{schemaConverter-DatAaVNj.mjs → schemaConverter-U0MnO9vd.mjs} +0 -0
  152. /package/dist/{sessionManager-CyHpYXoB.d.mts → sessionManager-BXG-HGwG.d.mts} +0 -0
  153. /package/dist/{storage-C5q8fuEt.d.mts → storage-Co_PQpeQ.d.mts} +0 -0
  154. /package/dist/{store-helpers-DjSYI2uP.mjs → store-helpers-DY6xq4sM.mjs} +0 -0
  155. /package/dist/{tracing-Bnb1-YVd.d.mts → tracing-D8jlGXP7.d.mts} +0 -0
  156. /package/dist/{typeGuards-CcFZXgU7.mjs → typeGuards-C9KXUly6.mjs} +0 -0
  157. /package/dist/{types-BJwJN2Pg.d.mts → types-LNebCoJx.d.mts} +0 -0
  158. /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
  /**
@@ -333,4 +333,27 @@ function buildActionPipelineHandler(handler, steps, operation, resourceName) {
333
333
  };
334
334
  }
335
335
  //#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 };
336
+ //#region src/core/actionPermissions.ts
337
+ /**
338
+ * Return the effective `PermissionCheck` for a single action, or `undefined`
339
+ * when the resource declares no gate at any level.
340
+ *
341
+ * Callers decide what "no gate" means:
342
+ * - HTTP: boot-time throw in `normalizeActionsToRouterConfig`.
343
+ * - MCP: tool-generation throw in `resourceToTools` (mirrors HTTP — the
344
+ * two surfaces fail closed identically so MCP can't expose an
345
+ * unauthenticated mutating tool when the HTTP plugin lifecycle hasn't
346
+ * run).
347
+ * - OpenAPI: docs advertise the endpoint as unauthenticated.
348
+ */
349
+ function resolveActionPermission(input) {
350
+ const { action, resourcePermissions, resourceActionPermissions, globalAuth } = input;
351
+ const explicit = typeof action !== "function" && action.permissions ? action.permissions : void 0;
352
+ if (explicit) return explicit;
353
+ if (resourceActionPermissions) return resourceActionPermissions;
354
+ if (globalAuth) return globalAuth;
355
+ const updateFallback = resourcePermissions?.update;
356
+ if (updateFallback) return updateFallback;
357
+ }
358
+ //#endregion
359
+ 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 { Bt as AuthHelpers, Vt as AuthPluginOptions } from "../index-CHNQIhcb.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
@@ -611,7 +611,7 @@ function createBetterAuthAdapter(options) {
611
611
  if (!fastify.hasDecorator("authenticate")) fastify.decorate("authenticate", authenticate);
612
612
  if (!fastify.hasDecorator("optionalAuthenticate")) fastify.decorate("optionalAuthenticate", optionalAuthenticate);
613
613
  if (!extractedOpenApi && openapiOpt !== false && auth.api && typeof auth.api === "object") {
614
- const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-DAAhMZff.mjs").then((n) => n.t);
614
+ const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-CV1lxpRX.mjs");
615
615
  extractedOpenApi = extractBetterAuthOpenApi(auth.api, {
616
616
  basePath,
617
617
  userFields
@@ -639,6 +639,253 @@ function createBetterAuthAdapter(options) {
639
639
  };
640
640
  }
641
641
  //#endregion
642
+ //#region src/auth/betterAuthOpenApi.ts
643
+ /**
644
+ * Check if a value looks like a Better Auth endpoint (has .path and .options)
645
+ */
646
+ function isBetterAuthEndpoint(value) {
647
+ if (typeof value !== "function" && typeof value !== "object") return false;
648
+ if (!value) return false;
649
+ const v = value;
650
+ return typeof v.path === "string" && typeof v.options === "object" && v.options !== null;
651
+ }
652
+ /**
653
+ * Convert Fastify-style path params (/:id) to OpenAPI-style (/{id})
654
+ */
655
+ function toOpenApiPath(path) {
656
+ return path.replace(/:([^/]+)/g, "{$1}");
657
+ }
658
+ /**
659
+ * Extract path parameters from a path string
660
+ */
661
+ function extractPathParams(path) {
662
+ const params = [];
663
+ const matches = path.matchAll(/:(\w+)/g);
664
+ for (const match of matches) {
665
+ const name = match[1];
666
+ if (!name) continue;
667
+ params.push({
668
+ name,
669
+ in: "path",
670
+ required: true,
671
+ schema: { type: "string" }
672
+ });
673
+ }
674
+ return params;
675
+ }
676
+ /**
677
+ * Extract OpenAPI paths from a Better Auth instance's API object.
678
+ *
679
+ * Walks `authApi` (the `auth.api` object from Better Auth), discovers
680
+ * endpoints, converts their Zod schemas to JSON Schema via `z.toJSONSchema()`,
681
+ * and returns a complete `ExternalOpenApiPaths` object ready for Arc's spec builder.
682
+ */
683
+ function extractBetterAuthOpenApi(authApi, options = {}) {
684
+ const { basePath = "/api/auth", tagName = "Authentication", tagDescription = "Better Auth authentication endpoints", excludePaths = [], excludeServerOnly = true, userFields } = options;
685
+ const normalizedBase = basePath.replace(/\/+$/, "");
686
+ const paths = {};
687
+ const detectedPlugins = detectActivePlugins(authApi);
688
+ const securityOptions = [{ cookieAuth: [] }, { bearerAuth: [] }];
689
+ if (detectedPlugins.apiKey) securityOptions.push({ apiKeyAuth: [] });
690
+ for (const [key, value] of Object.entries(authApi)) {
691
+ if (!isBetterAuthEndpoint(value)) continue;
692
+ const { path: endpointPath, options: endpointOpts } = value;
693
+ if (excludePaths.includes(endpointPath)) continue;
694
+ if (excludeServerOnly && endpointOpts.metadata?.SERVER_ONLY) continue;
695
+ const fullPath = toOpenApiPath(`${normalizedBase}${endpointPath}`);
696
+ const methods = [];
697
+ if (endpointOpts.method) if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
698
+ else methods.push(endpointOpts.method.toLowerCase());
699
+ else methods.push(endpointOpts.body ? "post" : "get");
700
+ const openApiMeta = endpointOpts.metadata?.openapi;
701
+ for (const method of methods) {
702
+ const operation = {
703
+ tags: openApiMeta?.tags ?? [tagName],
704
+ operationId: openApiMeta?.operationId ?? key,
705
+ summary: openApiMeta?.summary ?? formatOperationSummary(key),
706
+ security: securityOptions
707
+ };
708
+ if (openApiMeta?.description) operation.description = openApiMeta.description;
709
+ const parameters = [...extractPathParams(endpointPath)];
710
+ if ((method === "get" || method === "delete") && endpointOpts.query) {
711
+ const querySchema = toJsonSchema(endpointOpts.query);
712
+ if (querySchema && querySchema.type === "object" && querySchema.properties) {
713
+ const props = querySchema.properties;
714
+ const required = querySchema.required ?? [];
715
+ for (const [name, prop] of Object.entries(props)) {
716
+ const paramEntry = {
717
+ name,
718
+ in: "query",
719
+ required: required.includes(name),
720
+ schema: prop
721
+ };
722
+ if (prop.description) paramEntry.description = prop.description;
723
+ parameters.push(paramEntry);
724
+ }
725
+ }
726
+ }
727
+ if (parameters.length > 0) operation.parameters = parameters;
728
+ if (method === "post" || method === "put" || method === "patch") {
729
+ if (openApiMeta?.requestBody) operation.requestBody = structuredClone(openApiMeta.requestBody);
730
+ else if (endpointOpts.body) {
731
+ const bodySchema = toJsonSchema(endpointOpts.body);
732
+ if (bodySchema) operation.requestBody = {
733
+ required: true,
734
+ content: { "application/json": { schema: bodySchema } }
735
+ };
736
+ }
737
+ if (userFields && isUserFieldEndpoint(endpointPath) && operation.requestBody) mergeUserFieldsIntoRequestBody(operation.requestBody, userFields, endpointPath);
738
+ }
739
+ if (openApiMeta?.responses) operation.responses = openApiMeta.responses;
740
+ else operation.responses = {
741
+ "200": { description: "Success" },
742
+ "400": { description: "Bad request" },
743
+ "401": { description: "Unauthorized" }
744
+ };
745
+ if (!paths[fullPath]) paths[fullPath] = {};
746
+ paths[fullPath][method] = operation;
747
+ }
748
+ }
749
+ const schemas = {
750
+ User: {
751
+ type: "object",
752
+ properties: {
753
+ id: { type: "string" },
754
+ name: { type: "string" },
755
+ email: {
756
+ type: "string",
757
+ format: "email"
758
+ },
759
+ emailVerified: { type: "boolean" },
760
+ image: {
761
+ type: "string",
762
+ nullable: true
763
+ },
764
+ createdAt: {
765
+ type: "string",
766
+ format: "date-time"
767
+ },
768
+ updatedAt: {
769
+ type: "string",
770
+ format: "date-time"
771
+ }
772
+ }
773
+ },
774
+ Session: {
775
+ type: "object",
776
+ properties: {
777
+ id: { type: "string" },
778
+ userId: { type: "string" },
779
+ token: { type: "string" },
780
+ expiresAt: {
781
+ type: "string",
782
+ format: "date-time"
783
+ },
784
+ ipAddress: {
785
+ type: "string",
786
+ nullable: true
787
+ },
788
+ userAgent: {
789
+ type: "string",
790
+ nullable: true
791
+ },
792
+ createdAt: {
793
+ type: "string",
794
+ format: "date-time"
795
+ },
796
+ updatedAt: {
797
+ type: "string",
798
+ format: "date-time"
799
+ }
800
+ }
801
+ }
802
+ };
803
+ if (userFields) {
804
+ const userProps = schemas.User?.properties;
805
+ for (const [name, field] of Object.entries(userFields)) {
806
+ const prop = { type: field.type };
807
+ if (field.description) prop.description = field.description;
808
+ userProps[name] = prop;
809
+ }
810
+ }
811
+ const securitySchemes = { cookieAuth: {
812
+ type: "apiKey",
813
+ in: "cookie",
814
+ name: "better-auth.session_token",
815
+ description: "Session cookie set by Better Auth after sign-in"
816
+ } };
817
+ if (detectedPlugins.apiKey) securitySchemes.apiKeyAuth = {
818
+ type: "apiKey",
819
+ in: "header",
820
+ name: "x-api-key",
821
+ description: "API key for programmatic access. Pass org context via x-organization-id header."
822
+ };
823
+ const resourceSecurity = [];
824
+ if (detectedPlugins.apiKey) resourceSecurity.push({
825
+ apiKeyAuth: [],
826
+ orgHeader: []
827
+ });
828
+ return {
829
+ paths,
830
+ schemas,
831
+ securitySchemes,
832
+ tags: [{
833
+ name: tagName,
834
+ description: tagDescription
835
+ }],
836
+ resourceSecurity: resourceSecurity.length > 0 ? resourceSecurity : void 0
837
+ };
838
+ }
839
+ /**
840
+ * Auto-detect active Better Auth plugins by inspecting the API object.
841
+ *
842
+ * Rather than hardcoding plugin-specific behavior, we check for known
843
+ * endpoint signatures that each plugin registers. This way the OpenAPI
844
+ * spec adapts automatically to whatever plugins the app has enabled —
845
+ * no Arc update needed when adding/removing plugins.
846
+ */
847
+ function detectActivePlugins(authApi) {
848
+ const endpointPaths = /* @__PURE__ */ new Set();
849
+ for (const value of Object.values(authApi)) if (isBetterAuthEndpoint(value)) endpointPaths.add(value.path);
850
+ return {
851
+ apiKey: endpointPaths.has("/api-key/create"),
852
+ organization: endpointPaths.has("/organization/create")
853
+ };
854
+ }
855
+ /**
856
+ * Convert a camelCase key like 'signInEmail' to a readable summary like 'Sign in email'
857
+ */
858
+ function formatOperationSummary(key) {
859
+ return key.replace(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase()).trim();
860
+ }
861
+ /**
862
+ * Check if an endpoint path should have userFields merged into its request body.
863
+ */
864
+ function isUserFieldEndpoint(path) {
865
+ return path === "/sign-up/email" || path === "/update-user";
866
+ }
867
+ /**
868
+ * Merge user-defined fields into an existing requestBody schema.
869
+ * For updateUser, all fields are treated as optional regardless of their `required` setting.
870
+ */
871
+ function mergeUserFieldsIntoRequestBody(requestBody, userFields, endpointPath) {
872
+ const content = requestBody?.content?.["application/json"];
873
+ if (!content?.schema) return;
874
+ const schema = content.schema;
875
+ if (!schema.properties) schema.properties = {};
876
+ if (!schema.required) schema.required = [];
877
+ const props = schema.properties;
878
+ const required = schema.required;
879
+ for (const [name, field] of Object.entries(userFields)) {
880
+ if (field.input === false) continue;
881
+ const isRequired = endpointPath === "/update-user" ? false : field.required ?? false;
882
+ const prop = { type: field.type };
883
+ if (field.description) prop.description = field.description;
884
+ props[name] = prop;
885
+ if (isRequired && !required.includes(name)) required.push(name);
886
+ }
887
+ }
888
+ //#endregion
642
889
  //#region src/auth/sessionManager.ts
643
890
  /**
644
891
  * 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, it as RateLimitConfig, mt as RouteSchemaOptions } from "../../index-CHNQIhcb.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-xVJibapr.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 { $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-CHNQIhcb.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-Dh0_RSTd.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-ZnQBa5rh.mjs";
4
+ import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-h7DYDNMg.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 };