@classytic/arc 2.31.0 → 2.32.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 (151) hide show
  1. package/dist/{BaseController-De7GqHck.mjs → BaseController-Dk34dxhI.mjs} +16 -13
  2. package/dist/{EventTransport-9mlTgqzE.mjs → EventTransport-BV10D0oG.mjs} +1 -1
  3. package/dist/{HookSystem-BcmPyq5I.mjs → HookSystem-vimw5D7Z.mjs} +2 -2
  4. package/dist/{ResourceRegistry-qq0mn2s9.mjs → ResourceRegistry-BVr7PgA0.mjs} +17 -15
  5. package/dist/{actionPermissions-BE5NwaQk.mjs → actionPermissions-Dti7ebyv.mjs} +1 -1
  6. package/dist/audit/index.mjs +2 -2
  7. package/dist/auth/audit.mjs +1 -1
  8. package/dist/auth/index.mjs +11 -10
  9. package/dist/auth/redis-session.mjs +1 -1
  10. package/dist/{authorizationDecision-ChvUQGG1.mjs → authorizationDecision-__T3EJDA.mjs} +2 -2
  11. package/dist/{buildHandler-CDrCJzmB.mjs → buildHandler-Dn7rzUJo.mjs} +6 -5
  12. package/dist/cache/index.mjs +4 -4
  13. package/dist/{caching-BFHA6Scf.mjs → caching-DFJqHyFs.mjs} +2 -2
  14. package/dist/cleanup/index.d.mts +36 -14
  15. package/dist/cleanup/index.mjs +45 -29
  16. package/dist/cli/commands/describe.mjs +4 -6
  17. package/dist/cli/commands/docs.mjs +3 -3
  18. package/dist/cli/commands/doctor.mjs +1 -1
  19. package/dist/cli/commands/generate.mjs +2 -2
  20. package/dist/cli/commands/init.mjs +2 -2
  21. package/dist/cli/commands/introspect.mjs +2 -2
  22. package/dist/cli/index.mjs +3 -3
  23. package/dist/{constants-D3Dv4LAV.mjs → constants-J99LGTJI.mjs} +1 -1
  24. package/dist/context/index.mjs +3 -3
  25. package/dist/core/index.d.mts +1 -1
  26. package/dist/core/index.mjs +7 -7
  27. package/dist/{core-BGpIxINN.mjs → core-BwwmNSp7.mjs} +3 -3
  28. package/dist/{createActionRouter-CDXEdasl.mjs → createActionRouter-DkJZWo0m.mjs} +14 -11
  29. package/dist/{createAggregationRouter-KrQDzx-k.mjs → createAggregationRouter-B1exOVD8.mjs} +10 -8
  30. package/dist/{createApp-Df89BEni.mjs → createApp-Bv0m-Q6_.mjs} +182 -61
  31. package/dist/{defineAggregation-DbPPS8RI.mjs → defineAggregation-gX4No1gt.mjs} +1 -1
  32. package/dist/{defineResource-Bv6EtN1x.mjs → defineResource-XFPPUu2c.mjs} +41 -32
  33. package/dist/discovery/index.mjs +1 -1
  34. package/dist/docs/index.mjs +3 -3
  35. package/dist/{elevation-D2l1mh4g.mjs → elevation-DNXXxgjl.mjs} +4 -4
  36. package/dist/encryption/index.mjs +5 -4
  37. package/dist/{errorHandler-C5NeD6bT.mjs → errorHandler-B2AZUJUj.mjs} +3 -3
  38. package/dist/{errors-Cj42AntO.mjs → errors-Bh1KK5ps.mjs} +1 -1
  39. package/dist/{eventPlugin-CkffEihm.mjs → eventPlugin-Dk_TyXeE.mjs} +8 -7
  40. package/dist/events/index.d.mts +108 -41
  41. package/dist/events/index.mjs +166 -142
  42. package/dist/events/transports/redis-stream-entry.mjs +14 -10
  43. package/dist/events/transports/redis.mjs +1 -1
  44. package/dist/factory/index.d.mts +5 -5
  45. package/dist/factory/index.mjs +131 -8
  46. package/dist/fastify-augmentation-BppG5bMT.d.mts +179 -0
  47. package/dist/{fields-CB5Cuzk9.mjs → fields-DEi65pGj.mjs} +6 -11
  48. package/dist/{generate-EcA6ui4i.mjs → generate-CRSG0jTv.mjs} +2 -2
  49. package/dist/{headers-3zvE0rM3.mjs → headers-BXjQYbeC.mjs} +2 -2
  50. package/dist/{health-DjZYjM7H.mjs → health-5XnTa2uo.mjs} +1 -1
  51. package/dist/hooks/index.mjs +2 -2
  52. package/dist/idempotency/index.mjs +8 -6
  53. package/dist/idempotency/redis.mjs +1 -1
  54. package/dist/{index-Bc2ox8_U.d.mts → index-DXlHwvuE.d.mts} +1 -1
  55. package/dist/{index-CFThn1K9.d.mts → index-ZWhLTp_s.d.mts} +70 -4
  56. package/dist/{index-CEJNZFtX.d.mts → index-zq6VrjaB.d.mts} +70 -1
  57. package/dist/index.d.mts +3 -3
  58. package/dist/index.mjs +11 -11
  59. package/dist/{init-BEiNZBsJ.mjs → init-BbfP8aky.mjs} +7 -5
  60. package/dist/integrations/event-gateway.mjs +2 -2
  61. package/dist/integrations/index.mjs +1 -1
  62. package/dist/integrations/jobs/index.mjs +3 -3
  63. package/dist/integrations/mcp/index.mjs +2 -2
  64. package/dist/integrations/mcp/testing.mjs +2 -2
  65. package/dist/integrations/streamline.mjs +3 -3
  66. package/dist/integrations/webhooks.mjs +1 -1
  67. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  68. package/dist/integrations/websocket-redis.mjs +1 -1
  69. package/dist/integrations/websocket.mjs +38 -35
  70. package/dist/{interface-DYzM0q-u.mjs → interface-BP4IJCBO.mjs} +1 -1
  71. package/dist/{jsonBody-BYbLDi5D.mjs → jsonBody-DDSR2HFl.mjs} +2 -2
  72. package/dist/{keys-C0_pa1tY.mjs → keys-B-HBTGXl.mjs} +1 -1
  73. package/dist/{loadResources-yawi9tAE.mjs → loadResources-DisEAmkm.mjs} +4 -3
  74. package/dist/{loadResourcesFromEntry-BAjYZonx.mjs → loadResourcesFromEntry-D1MJp13f.mjs} +2 -2
  75. package/dist/logger/index.mjs +1 -1
  76. package/dist/{mcpPlugin-B_es0hiF.mjs → mcpPlugin-CpfVpKHE.mjs} +32 -31
  77. package/dist/{memory-DR6wpa9F.mjs → memory-DsuWnj4T.mjs} +5 -5
  78. package/dist/{metrics-CUdw_wLB.mjs → metrics-DdQL8syd.mjs} +2 -2
  79. package/dist/middleware/index.mjs +3 -3
  80. package/dist/migrations/index.mjs +3 -3
  81. package/dist/{module-0pFJA6YW.mjs → module-Br81am6m.mjs} +1 -1
  82. package/dist/{multipartBody-wOgj_fnj.mjs → multipartBody-BnkBLN7v.mjs} +3 -3
  83. package/dist/{openapi-B2L4js1v.mjs → openapi-DIRzvxC0.mjs} +6 -6
  84. package/dist/outbox-admin/index.d.mts +85 -0
  85. package/dist/outbox-admin/index.mjs +115 -0
  86. package/dist/permissions/index.d.mts +2 -2
  87. package/dist/permissions/index.mjs +6 -6
  88. package/dist/{permissions-L--QDAir.mjs → permissions-Dl_m0NCe.mjs} +101 -8
  89. package/dist/{pipe-DRDNsI2T.mjs → pipe-ELHCP3zj.mjs} +3 -5
  90. package/dist/pipeline/index.mjs +2 -2
  91. package/dist/{pipeline-UPQFatit.mjs → pipeline-CPA-jx0M.mjs} +17 -15
  92. package/dist/plugins/index.d.mts +2 -2
  93. package/dist/plugins/index.mjs +16 -16
  94. package/dist/plugins/response-cache.mjs +2 -2
  95. package/dist/plugins/tracing-entry.mjs +2 -2
  96. package/dist/{pluralize-O0FZgESl.mjs → pluralize-C2ZkKbsn.mjs} +1 -1
  97. package/dist/{preloadResources-Dz6BjzM6.mjs → preloadResources-CDs87fTw.mjs} +1 -1
  98. package/dist/{preloadResources-CyoJMSiO.d.mts → preloadResources-T1hmlTEZ.d.mts} +2 -2
  99. package/dist/presets/filesUpload.mjs +6 -6
  100. package/dist/presets/index.mjs +2 -2
  101. package/dist/presets/multiTenant.mjs +3 -3
  102. package/dist/presets/search.mjs +2 -2
  103. package/dist/{presets-C4-g4_4P.mjs → presets-Dntd_pUO.mjs} +6 -5
  104. package/dist/{projection-BHw6xlOQ.mjs → projection-CjHhM5W1.mjs} +2 -2
  105. package/dist/{queryCachePlugin-BZr8v46E.mjs → queryCachePlugin-Dhps-Ldt.mjs} +6 -6
  106. package/dist/{rateLimit-CMPY5Qms.mjs → rateLimit-C7mmAGs3.mjs} +2 -2
  107. package/dist/{rateLimitKey-Dn5JNmkj.mjs → rateLimitKey-CccEFBfk.mjs} +1 -1
  108. package/dist/{realtime-C5NoxWFY.mjs → realtime-DVvVZZFz.mjs} +10 -10
  109. package/dist/{registerRoute-CBN84fc7.mjs → registerRoute-B_QrjYZS.mjs} +10 -8
  110. package/dist/registry/index.d.mts +1 -1
  111. package/dist/registry/index.mjs +3 -3
  112. package/dist/{registry-4213U4zb.mjs → registry-DqUmzA9W.mjs} +2 -2
  113. package/dist/{renewingLease-Dll8mGgc.mjs → renewingLease-BpP9wwj7.mjs} +1 -1
  114. package/dist/{replyHelpers-DIiZKGUt.mjs → replyHelpers-DS-P0b32.mjs} +2 -2
  115. package/dist/{repositoryFilter-f9eAfq_l.mjs → repositoryFilter-DotlxG3L.mjs} +1 -1
  116. package/dist/{requestContext-2TxXOJ7T.mjs → requestContext-B6vQF-sy.mjs} +1 -1
  117. package/dist/{rolldown-runtime-CUsjNX9R.mjs → rolldown-runtime-BhflRrBs.mjs} +1 -1
  118. package/dist/{schedules-DdtlICTf.mjs → schedules-C2Q3uv2d.mjs} +3 -3
  119. package/dist/{schemaConverter-D--wdJM-.mjs → schemaConverter-Crjvczi_.mjs} +1 -1
  120. package/dist/{schemaIR-Bm2enbnh.mjs → schemaIR-CnyKK_1j.mjs} +2 -2
  121. package/dist/schemas/index.mjs +1 -1
  122. package/dist/scim/index.mjs +2 -2
  123. package/dist/scope/index.mjs +5 -5
  124. package/dist/{scope-DHx5Fous.mjs → scope-afz_Ieek.mjs} +4 -4
  125. package/dist/{simpleEqualityMatcher-DjQJ7FKA.mjs → simpleEqualityMatcher-C4KiMWUa.mjs} +1 -1
  126. package/dist/{sse-CUTo9y0X.mjs → sse-B9P4Y-UI.mjs} +7 -6
  127. package/dist/{sseStream-B_5XcVVd.mjs → sseStream-B3zb_d1h.mjs} +2 -2
  128. package/dist/{store-helpers-D1MP_gRG.mjs → store-helpers-DmEMHlPQ.mjs} +1 -1
  129. package/dist/{streaming-PSZwi8JV.mjs → streaming-DPZdQmDz.mjs} +1 -1
  130. package/dist/{subscribe-helpers-C0Tb2aUp.mjs → subscribe-helpers-sp5xTDVA.mjs} +2 -2
  131. package/dist/sync/changelog.mjs +1 -1
  132. package/dist/testing/cleanupStoreContract.mjs +10 -6
  133. package/dist/testing/index.d.mts +31 -4
  134. package/dist/testing/index.mjs +97 -39
  135. package/dist/testing/outboxStoreContract.d.mts +11 -2
  136. package/dist/testing/outboxStoreContract.mjs +110 -21
  137. package/dist/testing/storageContract.mjs +11 -6
  138. package/dist/{transactionContext-dAfBVUrk.mjs → transactionContext-BvLKvOIL.mjs} +1 -1
  139. package/dist/{typeGuards-B0ryPo3I.mjs → typeGuards-B_5-hKjJ.mjs} +1 -1
  140. package/dist/types/index.mjs +1 -1
  141. package/dist/types/storage.mjs +1 -1
  142. package/dist/{types-CBgvkp8O.d.mts → types-CT5vu6M0.d.mts} +87 -11
  143. package/dist/{types-Cys0ko9Z.mjs → types-DXYX7dIR.mjs} +4 -4
  144. package/dist/usage/index.mjs +0 -0
  145. package/dist/{userHelpers-ChYJ6CdK.mjs → userHelpers-BNsOXzOd.mjs} +1 -1
  146. package/dist/utils/index.mjs +10 -10
  147. package/dist/{utils-vL8BrDE2.mjs → utils-BtOha_Sp.mjs} +3 -3
  148. package/dist/{validate-_KbifpHF.mjs → validate-PMCPR9El.mjs} +2 -2
  149. package/dist/{versioning-CHDTor3P.mjs → versioning-CKv2jz_U.mjs} +4 -4
  150. package/package.json +23 -13
  151. package/dist/fastify-augmentation-zh0_AYHa.d.mts +0 -85
@@ -1,15 +1,15 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-D3Dv4LAV.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-J99LGTJI.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { a as conjoinPolicyFilters } from "./authorizationDecision-ChvUQGG1.mjs";
5
- import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError } from "./errors-Cj42AntO.mjs";
6
- import { n as getUserRoles, t as getUserId } from "./userHelpers-ChYJ6CdK.mjs";
7
- import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-Cys0ko9Z.mjs";
8
- import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DjQJ7FKA.mjs";
9
- import { t as toRepositoryFilter } from "./repositoryFilter-f9eAfq_l.mjs";
10
- import { i as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-CB5Cuzk9.mjs";
11
- import { g as ArcQueryParser, n as scheduleBackground } from "./utils-vL8BrDE2.mjs";
12
- import { t as buildQueryKey } from "./keys-C0_pa1tY.mjs";
4
+ import { a as conjoinPolicyFilters } from "./authorizationDecision-__T3EJDA.mjs";
5
+ import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError } from "./errors-Bh1KK5ps.mjs";
6
+ import { n as getUserRoles, t as getUserId } from "./userHelpers-BNsOXzOd.mjs";
7
+ import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-DXYX7dIR.mjs";
8
+ import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-C4KiMWUa.mjs";
9
+ import { t as toRepositoryFilter } from "./repositoryFilter-DotlxG3L.mjs";
10
+ import { i as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-DEi65pGj.mjs";
11
+ import { g as ArcQueryParser, n as scheduleBackground } from "./utils-BtOha_Sp.mjs";
12
+ import { t as buildQueryKey } from "./keys-B-HBTGXl.mjs";
13
13
  //#region src/core/AccessControl.ts
14
14
  const log$1 = arcLog("access-control");
15
15
  var AccessControl = class {
@@ -287,7 +287,9 @@ var BodySanitizer = class {
287
287
  if (!isElevated(scope)) {
288
288
  const fieldPerms = arcContext?.arc?.fields;
289
289
  if (fieldPerms) {
290
- const effectiveRoles = resolveEffectiveRoles(getUserRoles(req.user), isMember(scope) ? scope.orgRoles : []);
290
+ const globalRoles = getUserRoles(req.user);
291
+ const orgRoles = isMember(scope) ? scope.orgRoles : [];
292
+ const effectiveRoles = resolveEffectiveRoles(globalRoles, orgRoles);
291
293
  const { body: filtered, deniedFields } = applyFieldWritePermissions(sanitized, fieldPerms, effectiveRoles);
292
294
  if (deniedFields.length > 0 && this.onFieldWriteDenied === "reject") throw new ForbiddenError(`Not permitted to write field${deniedFields.length === 1 ? "" : "s"}: ${deniedFields.join(", ")}`);
293
295
  sanitized = filtered;
@@ -1638,7 +1640,8 @@ function SlugMixin(Base) {
1638
1640
  } else throw createError(501, "Slug lookup not implemented — repository needs getBySlug() or getOne()");
1639
1641
  if (!this.accessControl.validateItemAccess(item, req)) {
1640
1642
  const code = item ? "POLICY_FILTERED" : "NOT_FOUND";
1641
- const err = new NotFoundError(this.resourceName ?? "Resource");
1643
+ const resource = this.resourceName ?? "Resource";
1644
+ const err = new NotFoundError(resource);
1642
1645
  err.details = {
1643
1646
  ...err.details ?? {},
1644
1647
  code
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  import { createEvent, matchEventPattern } from "@classytic/primitives/events";
3
3
  //#region src/events/EventTransport.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as buildRequestScopeProjection } from "./projection-BHw6xlOQ.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as buildRequestScopeProjection } from "./projection-CjHhM5W1.mjs";
3
3
  //#region src/hooks/HookSystem.ts
4
4
  /**
5
5
  * Hook System
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import "./constants-D3Dv4LAV.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import "./constants-J99LGTJI.mjs";
3
3
  //#region src/registry/ResourceRegistry.ts
4
4
  /**
5
5
  * Resource Registry
@@ -216,22 +216,24 @@ var ResourceRegistry = class {
216
216
  path: r.prefix,
217
217
  operation: "create"
218
218
  });
219
- if (!disabled.has("update")) if (updateMethod === "both") {
220
- routes.push({
221
- method: "PUT",
219
+ if (!disabled.has("update")) {
220
+ if (updateMethod === "both") {
221
+ routes.push({
222
+ method: "PUT",
223
+ path: `${r.prefix}/:id`,
224
+ operation: "update"
225
+ });
226
+ routes.push({
227
+ method: "PATCH",
228
+ path: `${r.prefix}/:id`,
229
+ operation: "update"
230
+ });
231
+ } else routes.push({
232
+ method: updateMethod,
222
233
  path: `${r.prefix}/:id`,
223
234
  operation: "update"
224
235
  });
225
- routes.push({
226
- method: "PATCH",
227
- path: `${r.prefix}/:id`,
228
- operation: "update"
229
- });
230
- } else routes.push({
231
- method: updateMethod,
232
- path: `${r.prefix}/:id`,
233
- operation: "update"
234
- });
236
+ }
235
237
  if (!disabled.has("delete")) routes.push({
236
238
  method: "DELETE",
237
239
  path: `${r.prefix}/:id`,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  //#region src/core/actionPermissions.ts
3
3
  /**
4
4
  * Return the effective `PermissionCheck` for a single action, or `undefined`
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as transactionContext } from "../transactionContext-dAfBVUrk.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as transactionContext } from "../transactionContext-BvLKvOIL.mjs";
3
3
  import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/audit/repository-audit-adapter.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  //#region src/auth/audit.ts
3
3
  function compileGlobs(patterns) {
4
4
  if (patterns.length === 0) return () => false;
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-Cj42AntO.mjs";
3
- import { n as requireSingleHeaderValue } from "../headers-3zvE0rM3.mjs";
4
- import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-ChYJ6CdK.mjs";
5
- import { o as toJsonSchema } from "../schemaConverter-D--wdJM-.mjs";
6
- import { S as requireOrgRole, T as requireTeamMembership, x as requireOrgMembership } from "../permissions-L--QDAir.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-Bh1KK5ps.mjs";
3
+ import { n as requireSingleHeaderValue } from "../headers-BXjQYbeC.mjs";
4
+ import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-BNsOXzOd.mjs";
5
+ import { o as toJsonSchema } from "../schemaConverter-Crjvczi_.mjs";
6
+ import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-Dl_m0NCe.mjs";
7
7
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
8
8
  import fp from "fastify-plugin";
9
9
  //#region src/auth/authPlugin.ts
@@ -346,9 +346,10 @@ function extractBetterAuthOpenApi(authApi, options = {}) {
346
346
  if (excludeServerOnly && endpointOpts.metadata?.SERVER_ONLY) continue;
347
347
  const fullPath = toOpenApiPath(`${normalizedBase}${endpointPath}`);
348
348
  const methods = [];
349
- if (endpointOpts.method) if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
350
- else methods.push(endpointOpts.method.toLowerCase());
351
- else methods.push(endpointOpts.body ? "post" : "get");
349
+ if (endpointOpts.method) {
350
+ if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
351
+ else methods.push(endpointOpts.method.toLowerCase());
352
+ } else methods.push(endpointOpts.body ? "post" : "get");
352
353
  const openApiMeta = endpointOpts.metadata?.openapi;
353
354
  for (const method of methods) {
354
355
  const operation = {
@@ -1149,7 +1150,7 @@ var MemorySessionStore = class {
1149
1150
  * ```
1150
1151
  */
1151
1152
  function createSessionManager(options) {
1152
- const { store, secret, maxAge: maxAgeSeconds = 10080 * 60, updateAge: updateAgeSeconds = 1440 * 60, freshAge: freshAgeSeconds = 600, cookieName = "arc.session", cookie: cookieOptions = {} } = options;
1153
+ const { store, secret, maxAge: maxAgeSeconds = 604800, updateAge: updateAgeSeconds = 86400, freshAge: freshAgeSeconds = 600, cookieName = "arc.session", cookie: cookieOptions = {} } = options;
1153
1154
  if (secret.length < 32) throw new Error(`Session secret must be at least 32 characters (current: ${secret.length}). Use a strong random secret for production.`);
1154
1155
  const maxAgeMs = maxAgeSeconds * 1e3;
1155
1156
  const updateAgeMs = updateAgeSeconds * 1e3;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/auth/redis-session.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  import { arcLog } from "./logger/index.mjs";
3
- import { t as ArcError } from "./errors-Cj42AntO.mjs";
3
+ import { t as ArcError } from "./errors-Bh1KK5ps.mjs";
4
4
  //#region src/permissions/filter-merge.ts
5
5
  /**
6
6
  * Policy-filter composition — logical AND, never last-writer-wins.
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { a as conjoinPolicyFilters } from "./authorizationDecision-ChvUQGG1.mjs";
3
- import { t as toRepositoryFilter } from "./repositoryFilter-f9eAfq_l.mjs";
4
- import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-_KbifpHF.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { a as conjoinPolicyFilters } from "./authorizationDecision-__T3EJDA.mjs";
3
+ import { t as toRepositoryFilter } from "./repositoryFilter-DotlxG3L.mjs";
4
+ import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-PMCPR9El.mjs";
5
5
  //#region src/core/aggregation/buildHandler.ts
6
6
  /**
7
7
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -27,7 +27,8 @@ async function executeAggregation(normalized, deps, ctx) {
27
27
  status: 400,
28
28
  body: guardError
29
29
  };
30
- const aggReq = compileAggRequest(normalized, conjoinPolicyFilters(extractCallerFilter(query), policyFilter), tenantOptions, query);
30
+ const callerFilter = conjoinPolicyFilters(extractCallerFilter(query), policyFilter);
31
+ const aggReq = compileAggRequest(normalized, callerFilter, tenantOptions, query);
31
32
  if (config.materialized) {
32
33
  const matCtx = {
33
34
  filter: aggReq.filter,
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-C0_pa1tY.mjs";
3
- import { t as MemoryCacheStore } from "../memory-DR6wpa9F.mjs";
4
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-BZr8v46E.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-B-HBTGXl.mjs";
3
+ import { t as MemoryCacheStore } from "../memory-DsuWnj4T.mjs";
4
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-Dhps-Ldt.mjs";
5
5
  //#region src/cache/redis.ts
6
6
  /**
7
7
  * Redis-backed cache store.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-CUsjNX9R.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BhflRrBs.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/caching.ts
5
5
  var caching_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { L as RequestWithExtras } from "../index-CpzxqePp.mjs";
3
3
  import { A as CleanupWriteFence, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeStrategyKind, I as PurgeVerificationSummary, L as VerificationCheck, M as PurgeActor, N as PurgeEvidence, O as CleanupRunTransitionPatch, P as PurgeResourceResult, R as VerificationResult, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as DEFAULT_CLEANUP_LIMITS, k as CleanupStepResult, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft } from "../types-C4QE8qnm.mjs";
4
- import { t as ArcModule } from "../types-CBgvkp8O.mjs";
4
+ import { t as ArcModule } from "../types-CT5vu6M0.mjs";
5
5
  import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
6
6
  import { canonicalJson } from "@classytic/primitives/canonical";
7
7
  import { CleanupStep } from "@classytic/repo-core/cleanup";
@@ -255,18 +255,44 @@ declare function createCleanupService(deps: CleanupServiceDeps): CleanupService;
255
255
  //#endregion
256
256
  //#region src/cleanup/module.d.ts
257
257
  interface DataCleanupModuleDeps {
258
- /** The recipes this deployment exposes. Ids must be unique (boot-checked). */
259
- recipes: readonly CleanupRecipe[];
260
- /** Durable run store — host-owned persistence (atomic create + CAS transitions). */
261
- runStore: CleanupRunStore;
258
+ /**
259
+ * The recipes this deployment exposes. Ids must be unique (boot-checked).
260
+ *
261
+ * May be a THUNK, and for any host whose recipes are built from live engines it
262
+ * should be. Resolved once, inside `bootstrap` — i.e. after arc has validated the
263
+ * module graph and run every module's bootstrap — instead of while this factory
264
+ * runs during composition.
265
+ *
266
+ * Why that matters beyond tidiness: a host assembles cleanup recipes by folding
267
+ * over its composed modules and calling their `preLivePurge()` / `cleanupSteps()`
268
+ * arms, and those arms read `engine.repositories`. An array forces that fold at
269
+ * composition time, which in turn forces every contributing domain to allocate its
270
+ * engine before arc owns the lifecycle — so a graph that then fails validation
271
+ * leaks every engine built up to that point. A thunk breaks that chain.
272
+ */
273
+ recipes: readonly CleanupRecipe[] | (() => readonly CleanupRecipe[] | Promise<readonly CleanupRecipe[]>);
274
+ /**
275
+ * Durable run store — host-owned persistence (atomic create + CAS transitions).
276
+ *
277
+ * Accepts a THUNK for the same reason `recipes` does. A store is backed by a
278
+ * model, and constructing it registers that model — so an eager value forces
279
+ * the host to register `CleanupRun` (and its siblings below) while the module
280
+ * graph is still being composed, before arc has validated it or opened the
281
+ * connection. Everything here is read inside `service()`, which is built on
282
+ * first use at `bootstrap`, so deferral costs nothing.
283
+ */
284
+ runStore: CleanupRunStore | (() => CleanupRunStore | Promise<CleanupRunStore>);
262
285
  /** Durable evidence + manifest store — host-owned, idempotent by operationId. */
263
- evidenceStore: CleanupEvidenceStore;
286
+ evidenceStore: CleanupEvidenceStore | (() => CleanupEvidenceStore | Promise<CleanupEvidenceStore>);
264
287
  /** Permission checks for view / execute / manage. */
265
288
  permissions: CleanupPermissions;
266
- /** Optional write fence (§8). */
267
- writeFence?: CleanupWriteFence | undefined;
268
- /** Optional durable job queue (§8) — defaults to microtask-deferred in-process. */
269
- jobQueue?: CleanupJobQueue | undefined;
289
+ /** Optional write fence (§8). Thunk-friendly — see {@link runStore}. */
290
+ writeFence?: CleanupWriteFence | (() => CleanupWriteFence | Promise<CleanupWriteFence>) | undefined;
291
+ /**
292
+ * Optional durable job queue (§8) — defaults to microtask-deferred in-process.
293
+ * Thunk-friendly — see {@link runStore}.
294
+ */
295
+ jobQueue?: CleanupJobQueue | (() => CleanupJobQueue | Promise<CleanupJobQueue>) | undefined;
270
296
  /** Framework size caps. */
271
297
  limits?: Partial<CleanupLimits> | undefined;
272
298
  /** Exclusive worker-lease duration (ms). Default 5 minutes. */
@@ -296,10 +322,6 @@ interface DataCleanupModuleDeps {
296
322
  /** Injected clock (tests). */
297
323
  now?: () => Date;
298
324
  }
299
- /**
300
- * Build the Data Cleanup Center Arc module. The module's public export is the
301
- * live {@link CleanupService} (so other modules / tests can drive it directly).
302
- */
303
325
  declare function createDataCleanupModule(deps: DataCleanupModuleDeps): ArcModule<CleanupService>;
304
326
  //#endregion
305
327
  //#region src/cleanup/plan-digest.d.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { g as getUserId } from "../types-Cys0ko9Z.mjs";
3
- import { t as defineResource } from "../defineResource-Bv6EtN1x.mjs";
4
- import { t as defineModule } from "../module-0pFJA6YW.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { g as getUserId } from "../types-DXYX7dIR.mjs";
3
+ import { t as defineResource } from "../defineResource-XFPPUu2c.mjs";
4
+ import { t as defineModule } from "../module-Br81am6m.mjs";
5
5
  import { createPurgeEvidence } from "@classytic/primitives/retention";
6
6
  import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
7
7
  //#region src/cleanup/errors.ts
@@ -563,7 +563,7 @@ function createCleanupService(deps) {
563
563
  ...DEFAULT_CLEANUP_LIMITS,
564
564
  ...deps.limits
565
565
  };
566
- const leaseMs = deps.leaseMs ?? 300 * 1e3;
566
+ const leaseMs = deps.leaseMs ?? 3e5;
567
567
  const progressThrottleMs = deps.progressThrottleMs ?? 0;
568
568
  const jobQueue = deps.jobQueue ?? { enqueue: async (job) => {
569
569
  queueMicrotask(() => {
@@ -1140,24 +1140,40 @@ const actionBodySchema = {
1140
1140
  }
1141
1141
  }
1142
1142
  };
1143
- /**
1144
- * Build the Data Cleanup Center Arc module. The module's public export is the
1145
- * live {@link CleanupService} (so other modules / tests can drive it directly).
1146
- */
1143
+ async function resolve(input) {
1144
+ return typeof input === "function" ? await input() : input;
1145
+ }
1147
1146
  function createDataCleanupModule(deps) {
1148
- const registry = createCleanupRegistry(deps.recipes);
1149
- const service = createCleanupService({
1150
- registry,
1151
- runStore: deps.runStore,
1152
- evidenceStore: deps.evidenceStore,
1153
- writeFence: deps.writeFence,
1154
- jobQueue: deps.jobQueue,
1155
- limits: deps.limits,
1156
- leaseMs: deps.leaseMs,
1157
- progressThrottleMs: deps.progressThrottleMs,
1158
- generateId: deps.generateId,
1159
- now: deps.now
1160
- });
1147
+ /**
1148
+ * Built on FIRST READ, which is `bootstrap` — never in this factory body.
1149
+ *
1150
+ * Memoized, so the recipe thunk runs exactly once and the id-uniqueness check
1151
+ * still happens at boot (arc calls bootstrap during startup); it simply happens
1152
+ * inside arc's lifecycle rather than ahead of it.
1153
+ */
1154
+ let cachedRegistry;
1155
+ const registry = async () => {
1156
+ cachedRegistry ??= createCleanupRegistry(typeof deps.recipes === "function" ? await deps.recipes() : deps.recipes);
1157
+ return cachedRegistry;
1158
+ };
1159
+ if (typeof deps.recipes !== "function") cachedRegistry = createCleanupRegistry(deps.recipes);
1160
+ let cached;
1161
+ const service = async () => {
1162
+ if (cached) return cached;
1163
+ cached = createCleanupService({
1164
+ registry: await registry(),
1165
+ runStore: await resolve(deps.runStore),
1166
+ evidenceStore: await resolve(deps.evidenceStore),
1167
+ writeFence: await resolve(deps.writeFence),
1168
+ jobQueue: await resolve(deps.jobQueue),
1169
+ limits: deps.limits,
1170
+ leaseMs: deps.leaseMs,
1171
+ progressThrottleMs: deps.progressThrottleMs,
1172
+ generateId: deps.generateId,
1173
+ now: deps.now
1174
+ });
1175
+ return cached;
1176
+ };
1161
1177
  const prefix = deps.prefix ?? "/governance/data-cleanup";
1162
1178
  const resolveActor = deps.resolveActor ?? defaultResolveActor;
1163
1179
  const resolveAmbient = deps.resolveAmbient;
@@ -1177,7 +1193,7 @@ function createDataCleanupModule(deps) {
1177
1193
  summary: "List available cleanup recipes",
1178
1194
  permissions: view,
1179
1195
  rawHandler: async (_req, reply) => {
1180
- return reply.send({ recipes: registry.introspect() });
1196
+ return reply.send({ recipes: (await registry()).introspect() });
1181
1197
  }
1182
1198
  },
1183
1199
  {
@@ -1189,7 +1205,7 @@ function createDataCleanupModule(deps) {
1189
1205
  rawHandler: async (req, reply) => {
1190
1206
  const r = req;
1191
1207
  const body = req.body;
1192
- const plan = await service.preview({
1208
+ const plan = await (await service()).preview({
1193
1209
  recipeId: body.recipe,
1194
1210
  parameters: body.parameters,
1195
1211
  actor: resolveActor(r),
@@ -1207,7 +1223,7 @@ function createDataCleanupModule(deps) {
1207
1223
  rawHandler: async (req, reply) => {
1208
1224
  const r = req;
1209
1225
  const body = req.body;
1210
- const run = await service.execute({
1226
+ const run = await (await service()).execute({
1211
1227
  recipeId: body.recipe,
1212
1228
  parameters: body.parameters,
1213
1229
  planDigest: body.planDigest,
@@ -1227,7 +1243,7 @@ function createDataCleanupModule(deps) {
1227
1243
  schema: { params: runIdParamsSchema },
1228
1244
  rawHandler: async (req, reply) => {
1229
1245
  const { id } = req.params;
1230
- return reply.send(await service.getRun(id));
1246
+ return reply.send(await (await service()).getRun(id));
1231
1247
  }
1232
1248
  },
1233
1249
  {
@@ -1243,11 +1259,11 @@ function createDataCleanupModule(deps) {
1243
1259
  const actionActor = resolveActor(req);
1244
1260
  const { id } = req.params;
1245
1261
  const { action, reason } = req.body;
1246
- if (action === "cancel") return reply.send(await service.cancel(id, {
1262
+ if (action === "cancel") return reply.send(await (await service()).cancel(id, {
1247
1263
  actor: actionActor,
1248
1264
  reason
1249
1265
  }));
1250
- return reply.send(await service.retry(id));
1266
+ return reply.send(await (await service()).retry(id));
1251
1267
  }
1252
1268
  }
1253
1269
  ]
@@ -1255,7 +1271,7 @@ function createDataCleanupModule(deps) {
1255
1271
  return defineModule({
1256
1272
  name: deps.moduleName ?? "data-cleanup",
1257
1273
  ...deps.owns ? { owns: deps.owns } : {},
1258
- bootstrap: () => service,
1274
+ bootstrap: () => service(),
1259
1275
  resources: () => [resource]
1260
1276
  });
1261
1277
  }
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../../constants-D3Dv4LAV.mjs";
3
- import { n as stringifyMeasureMap } from "../../ResourceRegistry-qq0mn2s9.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../../constants-J99LGTJI.mjs";
3
+ import { n as stringifyMeasureMap } from "../../ResourceRegistry-BVr7PgA0.mjs";
4
4
  import { resolve } from "node:path";
5
5
  import { pathToFileURL } from "node:url";
6
6
  //#region src/cli/commands/describe.ts
@@ -78,9 +78,7 @@ function describePipeline(pipe) {
78
78
  case "transform":
79
79
  transforms.push(desc);
80
80
  break;
81
- case "interceptor":
82
- interceptors.push(desc);
83
- break;
81
+ case "interceptor": interceptors.push(desc);
84
82
  }
85
83
  }
86
84
  return {
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as buildOpenApiSpec } from "../../openapi-B2L4js1v.mjs";
3
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BAjYZonx.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as buildOpenApiSpec } from "../../openapi-DIRzvxC0.mjs";
3
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-D1MJp13f.mjs";
4
4
  import { dirname, resolve } from "node:path";
5
5
  import { mkdirSync, writeFileSync } from "node:fs";
6
6
  //#region src/cli/commands/docs.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  import { dirname, join, parse, resolve } from "node:path";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  //#region src/cli/commands/doctor.ts
@@ -1,3 +1,3 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as generate } from "../../generate-EcA6ui4i.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as generate } from "../../generate-CRSG0jTv.mjs";
3
3
  export { generate };
@@ -1,3 +1,3 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as init } from "../../init-BEiNZBsJ.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as init } from "../../init-BbfP8aky.mjs";
3
3
  export { init };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BAjYZonx.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-D1MJp13f.mjs";
3
3
  //#region src/cli/commands/introspect.ts
4
4
  function describePermission(value) {
5
5
  if (!value) return "none";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  import { describe } from "./commands/describe.mjs";
3
3
  import { exportDocs } from "./commands/docs.mjs";
4
4
  import { doctor } from "./commands/doctor.mjs";
5
- import { t as generate } from "../generate-EcA6ui4i.mjs";
6
- import { t as init } from "../init-BEiNZBsJ.mjs";
5
+ import { t as generate } from "../generate-CRSG0jTv.mjs";
6
+ import { t as init } from "../init-BbfP8aky.mjs";
7
7
  import { introspect } from "./commands/introspect.mjs";
8
8
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
2
  //#region src/constants.ts
3
3
  /**
4
4
  * Arc Framework Constants — Single Source of Truth
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { n as requestContext, t as getTraceHeaders } from "../requestContext-2TxXOJ7T.mjs";
3
- import { t as transactionContext } from "../transactionContext-dAfBVUrk.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import { n as requestContext, t as getTraceHeaders } from "../requestContext-B6vQF-sy.mjs";
3
+ import { t as transactionContext } from "../transactionContext-BvLKvOIL.mjs";
4
4
  export { getTraceHeaders, requestContext, transactionContext };
@@ -1,4 +1,4 @@
1
1
 
2
2
  import { $t as TreeMixin, An as BaseControllerOptions, B as defineResource, Fn as BodySanitizerConfig, Mn as ControllerConstructionOptions, Nn as ListResult, Pn as BodySanitizer, Qt as TreeExt, V as ResourceDefinition, Xt as SoftDeleteExt, Yt as BaseController, Zt as SoftDeleteMixin, an as QueryResolver, cn as AccessControlConfig, ct as AggMeasureShorthand, dt as AggregationDateRangeRequirement, en as SlugExt, ft as AggregationIndexHint, gt as AggregationsMap, ht as AggregationRateLimit, in as BaseCrudController, jn as ControllerConfigurableOptions, lt as AggregationCacheConfig, mt as AggregationMaterializedResult, nn as BulkExt, on as QueryResolverConfig, pt as AggregationMaterializedContext, rn as BulkMixin, sn as AccessControl, st as AggMeasureInput, tn as SlugMixin, ut as AggregationConfig } from "../index-CpzxqePp.mjs";
3
- import { A as DEFAULT_ID_FIELD, B as MAX_FILTER_DEPTH, C as DefineActionConfig, D as defineAggregation, E as createPermissionMiddleware, F as DEFAULT_UPDATE_METHOD, G as RESERVED_QUERY_PARAMS, H as MAX_SEARCH_LENGTH, I as HOOK_OPERATIONS, K as SYSTEM_FIELDS, L as HOOK_PHASES, M as DEFAULT_MAX_LIMIT, N as DEFAULT_SORT, O as CRUD_OPERATIONS, P as DEFAULT_TENANT_FIELD, R as HookOperation, S as mergeResourceConfig, T as createCrudRouter, U as MUTATION_OPERATIONS, V as MAX_REGEX_LENGTH, W as MutationOperation, _ as getEntityQuery, a as formatValidationErrors, b as ResourceSeams, c as isFieldReadable, d as createRequestContext, f as getControllerContext, g as getEntityIdField, h as getEntityId, i as assertValidConfig, j as DEFAULT_LIMIT, k as CrudOperation, l as createCrudHandlers, m as sendControllerResponse, n as ValidateOptions, o as validateResourceConfig, p as getControllerScope, r as ValidationResult, s as collectReadBlockedFields, t as ConfigError, u as createFastifyHandler, v as defineResourceVariants, w as defineAction, x as SeamedResourceConfig, y as AdapterLike, z as HookPhase } from "../index-Bc2ox8_U.mjs";
3
+ import { A as DEFAULT_ID_FIELD, B as MAX_FILTER_DEPTH, C as DefineActionConfig, D as defineAggregation, E as createPermissionMiddleware, F as DEFAULT_UPDATE_METHOD, G as RESERVED_QUERY_PARAMS, H as MAX_SEARCH_LENGTH, I as HOOK_OPERATIONS, K as SYSTEM_FIELDS, L as HOOK_PHASES, M as DEFAULT_MAX_LIMIT, N as DEFAULT_SORT, O as CRUD_OPERATIONS, P as DEFAULT_TENANT_FIELD, R as HookOperation, S as mergeResourceConfig, T as createCrudRouter, U as MUTATION_OPERATIONS, V as MAX_REGEX_LENGTH, W as MutationOperation, _ as getEntityQuery, a as formatValidationErrors, b as ResourceSeams, c as isFieldReadable, d as createRequestContext, f as getControllerContext, g as getEntityIdField, h as getEntityId, i as assertValidConfig, j as DEFAULT_LIMIT, k as CrudOperation, l as createCrudHandlers, m as sendControllerResponse, n as ValidateOptions, o as validateResourceConfig, p as getControllerScope, r as ValidationResult, s as collectReadBlockedFields, t as ConfigError, u as createFastifyHandler, v as defineResourceVariants, w as defineAction, x as SeamedResourceConfig, y as AdapterLike, z as HookPhase } from "../index-DXlHwvuE.mjs";
4
4
  export { AccessControl, type AccessControlConfig, type AdapterLike, 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 ConfigError, 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, type ResourceSeams, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type ValidateOptions, type ValidationResult, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse, validateResourceConfig };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- 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-D3Dv4LAV.mjs";
3
- 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-De7GqHck.mjs";
4
- import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, o as createCrudRouter, r as formatValidationErrors, s as createPermissionMiddleware, t as defineResource } from "../defineResource-Bv6EtN1x.mjs";
5
- import { a as createFastifyHandler, c as getControllerScope, i as createCrudHandlers, l as sendControllerResponse, o as createRequestContext, s as getControllerContext } from "../pipeline-UPQFatit.mjs";
6
- import { t as defineAggregation } from "../defineAggregation-DbPPS8RI.mjs";
7
- import { a as mergeResourceConfig, i as defineResourceVariants, n as getEntityIdField, o as defineAction, r as getEntityQuery, t as getEntityId } from "../core-BGpIxINN.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ 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-J99LGTJI.mjs";
3
+ 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-Dk34dxhI.mjs";
4
+ import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, o as createCrudRouter, r as formatValidationErrors, s as createPermissionMiddleware, t as defineResource } from "../defineResource-XFPPUu2c.mjs";
5
+ import { a as createFastifyHandler, c as getControllerScope, i as createCrudHandlers, l as sendControllerResponse, o as createRequestContext, s as getControllerContext } from "../pipeline-CPA-jx0M.mjs";
6
+ import { t as defineAggregation } from "../defineAggregation-gX4No1gt.mjs";
7
+ import { a as mergeResourceConfig, i as defineResourceVariants, n as getEntityIdField, o as defineAction, r as getEntityQuery, t as getEntityId } from "../core-BwwmNSp7.mjs";
8
8
  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, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse, validateResourceConfig };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import "./constants-D3Dv4LAV.mjs";
3
- import { t as defineResource } from "./defineResource-Bv6EtN1x.mjs";
1
+ /*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
2
+ import "./constants-J99LGTJI.mjs";
3
+ import { t as defineResource } from "./defineResource-XFPPUu2c.mjs";
4
4
  //#region src/core/defineAction.ts
5
5
  /**
6
6
  * Build an `ActionDefinition` with a typed handler. The literal schema