@classytic/arc 2.6.2 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +95 -1
  2. package/dist/{BaseController-AbbRx3e0.mjs → BaseController-CpMfCXdn.mjs} +214 -16
  3. package/dist/adapters/index.d.mts +2 -2
  4. package/dist/adapters/index.mjs +1 -1
  5. package/dist/{adapters-CTn28N4y.mjs → adapters-BxGgSHjj.mjs} +7 -13
  6. package/dist/applyPermissionResult-D6GPMsvh.mjs +37 -0
  7. package/dist/audit/index.d.mts +1 -1
  8. package/dist/audit/index.mjs +1 -1
  9. package/dist/audit/mongodb.d.mts +1 -1
  10. package/dist/audit/mongodb.mjs +1 -1
  11. package/dist/auth/index.d.mts +4 -4
  12. package/dist/auth/index.mjs +7 -6
  13. package/dist/auth/mongoose.d.mts +191 -0
  14. package/dist/auth/mongoose.mjs +73 -0
  15. package/dist/auth/redis-session.d.mts +1 -1
  16. package/dist/{betterAuthOpenApi-lz0IRbXJ.mjs → betterAuthOpenApi-CCw3YX0g.mjs} +1 -1
  17. package/dist/cache/index.d.mts +2 -2
  18. package/dist/cache/index.mjs +2 -2
  19. package/dist/cli/commands/docs.mjs +2 -2
  20. package/dist/cli/commands/generate.mjs +1 -1
  21. package/dist/cli/commands/init.mjs +7 -5
  22. package/dist/cli/commands/introspect.mjs +1 -1
  23. package/dist/core/index.d.mts +3 -3
  24. package/dist/core/index.mjs +4 -4
  25. package/dist/{core-C1XCMtqM.mjs → core-BWekSEju.mjs} +41 -13
  26. package/dist/{createApp-D2w0LdYJ.mjs → createApp-B_nvKNAQ.mjs} +11 -11
  27. package/dist/{defineResource-Ckxg6HrZ.mjs → defineResource-DZzyl4a4.mjs} +73 -56
  28. package/dist/docs/index.d.mts +2 -2
  29. package/dist/docs/index.mjs +1 -1
  30. package/dist/dynamic/index.d.mts +2 -2
  31. package/dist/dynamic/index.mjs +2 -2
  32. package/dist/{elevation-BEdACOLB.mjs → elevation-By_p2lnn.mjs} +1 -1
  33. package/dist/elevation-Dm-HTBCt.d.mts +23 -0
  34. package/dist/{errorHandler-Do4vVQ1f.d.mts → errorHandler-COa51ho_.d.mts} +1 -1
  35. package/dist/{errorHandler-r2595m8T.mjs → errorHandler-DXUttWEO.mjs} +1 -1
  36. package/dist/{eventPlugin-DW45v4V5.d.mts → eventPlugin-BgLxJkIB.d.mts} +1 -1
  37. package/dist/{eventPlugin-Ba00swHF.mjs → eventPlugin-DsaNNXzZ.mjs} +1 -1
  38. package/dist/events/index.d.mts +3 -3
  39. package/dist/events/index.mjs +1 -1
  40. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  41. package/dist/events/transports/redis.d.mts +1 -1
  42. package/dist/factory/index.d.mts +1 -1
  43. package/dist/factory/index.mjs +1 -1
  44. package/dist/hooks/index.d.mts +1 -1
  45. package/dist/hooks/index.mjs +1 -1
  46. package/dist/idempotency/index.d.mts +3 -3
  47. package/dist/idempotency/mongodb.d.mts +1 -1
  48. package/dist/idempotency/redis.d.mts +1 -1
  49. package/dist/index-BYpRGXif.d.mts +640 -0
  50. package/dist/{index-B4uZm82R.d.mts → index-KXM8_JmQ.d.mts} +47 -4
  51. package/dist/{index-DrCqa3Jq.d.mts → index-StgFaQKD.d.mts} +3 -3
  52. package/dist/index.d.mts +8 -8
  53. package/dist/index.mjs +10 -9
  54. package/dist/integrations/event-gateway.d.mts +1 -1
  55. package/dist/integrations/event-gateway.mjs +1 -1
  56. package/dist/integrations/index.d.mts +1 -1
  57. package/dist/integrations/mcp/index.d.mts +2 -2
  58. package/dist/integrations/mcp/index.mjs +1 -1
  59. package/dist/integrations/mcp/testing.d.mts +1 -1
  60. package/dist/integrations/mcp/testing.mjs +1 -1
  61. package/dist/{interface-CrN45qz1.d.mts → interface-Dwzqt4mn.d.mts} +204 -18
  62. package/dist/{mongodb-pMvOlR5_.d.mts → mongodb-Bq90j-Uj.d.mts} +1 -1
  63. package/dist/{mongodb-kltrBPa1.d.mts → mongodb-DdyYlIXg.d.mts} +1 -1
  64. package/dist/{openapi-CBmZ6EQN.mjs → openapi-C5UhIeWu.mjs} +1 -1
  65. package/dist/org/index.d.mts +2 -2
  66. package/dist/org/index.mjs +1 -1
  67. package/dist/permissions/index.d.mts +4 -4
  68. package/dist/permissions/index.mjs +3 -2
  69. package/dist/{permissions-C8ImI8gC.mjs → permissions-CH4cNwJi.mjs} +358 -64
  70. package/dist/plugins/index.d.mts +4 -4
  71. package/dist/plugins/index.mjs +10 -10
  72. package/dist/plugins/response-cache.mjs +1 -1
  73. package/dist/plugins/tracing-entry.d.mts +1 -1
  74. package/dist/plugins/tracing-entry.mjs +1 -1
  75. package/dist/policies/index.d.mts +1 -1
  76. package/dist/presets/index.d.mts +3 -3
  77. package/dist/presets/index.mjs +1 -1
  78. package/dist/presets/multiTenant.d.mts +53 -3
  79. package/dist/presets/multiTenant.mjs +89 -47
  80. package/dist/{presets-BMfdy34e.mjs → presets-BFrGvvjL.mjs} +2 -2
  81. package/dist/{queryCachePlugin-DcmETvcB.d.mts → queryCachePlugin-Bw8XyJpX.d.mts} +1 -1
  82. package/dist/{queryCachePlugin-XtFplYO9.mjs → queryCachePlugin-CwTpR04-.mjs} +2 -2
  83. package/dist/{redis-D0Qc-9EW.d.mts → redis-CyCntzTO.d.mts} +1 -1
  84. package/dist/{redis-stream-BW9UKLZM.d.mts → redis-stream-We_Ucl9-.d.mts} +1 -1
  85. package/dist/registry/index.d.mts +1 -1
  86. package/dist/registry/index.mjs +2 -2
  87. package/dist/{resourceToTools-DH3c3e-T.mjs → resourceToTools-CkVSSzKg.mjs} +313 -33
  88. package/dist/rpc/index.d.mts +1 -1
  89. package/dist/rpc/index.mjs +1 -1
  90. package/dist/scope/index.d.mts +3 -2
  91. package/dist/scope/index.mjs +4 -3
  92. package/dist/{sse-BF7GR7IB.mjs → sse-Bp3dabF1.mjs} +2 -2
  93. package/dist/testing/index.d.mts +2 -2
  94. package/dist/testing/index.mjs +1 -1
  95. package/dist/types/index.d.mts +4 -3
  96. package/dist/types/index.mjs +1 -1
  97. package/dist/types-AOD8fxIw.mjs +229 -0
  98. package/dist/types-CNEbix8T.d.mts +286 -0
  99. package/dist/{types-DurlBP2N.d.mts → types-ClmkMDK1.d.mts} +1 -1
  100. package/dist/{types-C1Z28coa.d.mts → types-D0qf0Mf4.d.mts} +9 -9
  101. package/dist/types-DPsC0taJ.d.mts +178 -0
  102. package/dist/utils/index.d.mts +3 -3
  103. package/dist/utils/index.mjs +5 -5
  104. package/package.json +34 -22
  105. package/skills/arc/SKILL.md +278 -6
  106. package/skills/arc/references/multi-tenancy.md +208 -0
  107. package/dist/elevation-C_taLQrM.d.mts +0 -147
  108. package/dist/index-NGZksqM5.d.mts +0 -398
  109. package/dist/types-BNUccdcf.d.mts +0 -101
  110. package/dist/types-BhtYdxZU.mjs +0 -91
  111. /package/dist/{EventTransport-wc5hSLik.d.mts → EventTransport-CUpRK_Lg.d.mts} +0 -0
  112. /package/dist/{HookSystem-COkyWztM.mjs → HookSystem-D7lfx--K.mjs} +0 -0
  113. /package/dist/{ResourceRegistry-C6ngvOnn.mjs → ResourceRegistry-DsHiG9cL.mjs} +0 -0
  114. /package/dist/{caching-BSXB-Xr7.mjs → caching-5DtLwIqb.mjs} +0 -0
  115. /package/dist/{circuitBreaker-JP2GdJ4b.d.mts → circuitBreaker-DwxrljLB.d.mts} +0 -0
  116. /package/dist/{circuitBreaker-BOBOpN2w.mjs → circuitBreaker-l18oRgL5.mjs} +0 -0
  117. /package/dist/{errors-CcVbl1-T.d.mts → errors-CCSsMpXE.d.mts} +0 -0
  118. /package/dist/{errors-NoQKsbAT.mjs → errors-Cg58SLNi.mjs} +0 -0
  119. /package/dist/{externalPaths-DpO-s7r8.d.mts → externalPaths-Dg7OLsKo.d.mts} +0 -0
  120. /package/dist/{fields-DFwdaWCq.d.mts → fields-CYuLMJPD.d.mts} +0 -0
  121. /package/dist/{interface-gr-7qo9j.d.mts → interface-B9rHWPxD.d.mts} +0 -0
  122. /package/dist/{interface-D_BWALyZ.d.mts → interface-CnluRL4_.d.mts} +0 -0
  123. /package/dist/{logger-Dz3j1ItV.mjs → logger-DLg8-Ueg.mjs} +0 -0
  124. /package/dist/{memory-BFAYkf8H.mjs → memory-Cp7_cAko.mjs} +0 -0
  125. /package/dist/{metrics-Csh4nsvv.mjs → metrics-Qnvwc-LQ.mjs} +0 -0
  126. /package/dist/{mongodb-BuQ7fNTg.mjs → mongodb-mlgxkYI3.mjs} +0 -0
  127. /package/dist/{pluralize-CcT6qF0a.mjs → pluralize-COpOVar8.mjs} +0 -0
  128. /package/dist/{registry-I-ogLgL9.mjs → registry-B3lRFBWo.mjs} +0 -0
  129. /package/dist/{requestContext-DYtmNpm5.mjs → requestContext-xHIKedG6.mjs} +0 -0
  130. /package/dist/{schemaConverter-DjzHpFam.mjs → schemaConverter-0TyONAwM.mjs} +0 -0
  131. /package/dist/{sessionManager-wbkYj2HL.d.mts → sessionManager-IW4sbIea.d.mts} +0 -0
  132. /package/dist/{tracing-bz_U4EM1.d.mts → tracing-65B51Dw3.d.mts} +0 -0
  133. /package/dist/{typeGuards-Cj5Rgvlg.mjs → typeGuards-CcFZXgU7.mjs} +0 -0
  134. /package/dist/{utils-Dc0WhlIl.mjs → utils-B-l6410F.mjs} +0 -0
  135. /package/dist/{versioning-BzfeHmhj.mjs → versioning-aUUVziBY.mjs} +0 -0
@@ -1,14 +1,15 @@
1
1
  import { s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-Cxde4rpC.mjs";
2
- import { d as isElevated, f as isMember, n as PUBLIC_SCOPE } from "./types-BhtYdxZU.mjs";
3
- import { t as BaseController } from "./BaseController-AbbRx3e0.mjs";
2
+ import { _ as isElevated, n as PUBLIC_SCOPE, v as isMember } from "./types-AOD8fxIw.mjs";
3
+ import { t as BaseController } from "./BaseController-CpMfCXdn.mjs";
4
4
  import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-ipsbIRPK.mjs";
5
5
  import { t as getUserRoles } from "./types-ZUu_h0jp.mjs";
6
- import { t as requestContext } from "./requestContext-DYtmNpm5.mjs";
7
- import { i as getDefaultCrudSchemas } from "./utils-Dc0WhlIl.mjs";
8
- import { r as ForbiddenError } from "./errors-NoQKsbAT.mjs";
9
- import { n as convertRouteSchema, t as convertOpenApiSchemas } from "./schemaConverter-DjzHpFam.mjs";
10
- import { t as hasEvents } from "./typeGuards-Cj5Rgvlg.mjs";
11
- import { r as getAvailablePresets, t as applyPresets } from "./presets-BMfdy34e.mjs";
6
+ import { n as normalizePermissionResult, t as applyPermissionResult } from "./applyPermissionResult-D6GPMsvh.mjs";
7
+ import { t as requestContext } from "./requestContext-xHIKedG6.mjs";
8
+ import { i as getDefaultCrudSchemas } from "./utils-B-l6410F.mjs";
9
+ import { r as ForbiddenError } from "./errors-Cg58SLNi.mjs";
10
+ import { n as convertRouteSchema, t as convertOpenApiSchemas } from "./schemaConverter-0TyONAwM.mjs";
11
+ import { t as hasEvents } from "./typeGuards-CcFZXgU7.mjs";
12
+ import { r as getAvailablePresets, t as applyPresets } from "./presets-BFrGvvjL.mjs";
12
13
  //#region src/pipeline/pipe.ts
13
14
  /**
14
15
  * Compose pipeline steps into an ordered array.
@@ -372,17 +373,7 @@ function buildPermissionMiddleware(permissionCheck, resourceName, action) {
372
373
  });
373
374
  return;
374
375
  }
375
- if (typeof result === "boolean") {
376
- if (!result) {
377
- reply.code(context.user ? 403 : 401).send({
378
- success: false,
379
- error: context.user ? "Permission denied" : "Authentication required"
380
- });
381
- return;
382
- }
383
- return;
384
- }
385
- const permResult = result;
376
+ const permResult = normalizePermissionResult(result);
386
377
  if (!permResult.granted) {
387
378
  const defaultMsg = context.user ? "Permission denied" : "Authentication required";
388
379
  const reason = permResult.reason && permResult.reason.length <= 100 ? permResult.reason : defaultMsg;
@@ -392,10 +383,7 @@ function buildPermissionMiddleware(permissionCheck, resourceName, action) {
392
383
  });
393
384
  return;
394
385
  }
395
- if (permResult.filters) reqWithExtras._policyFilters = {
396
- ...reqWithExtras._policyFilters ?? {},
397
- ...permResult.filters
398
- };
386
+ applyPermissionResult(permResult, request);
399
387
  };
400
388
  }
401
389
  /**
@@ -907,6 +895,13 @@ function defineResource(config) {
907
895
  }
908
896
  }
909
897
  const repository = config.adapter?.repository;
898
+ if (config.idField === void 0 && repository) {
899
+ const repoIdField = repository.idField;
900
+ if (typeof repoIdField === "string" && repoIdField !== "_id") config = {
901
+ ...config,
902
+ idField: repoIdField
903
+ };
904
+ }
910
905
  const crudRoutes = CRUD_OPERATIONS;
911
906
  const disabledRoutes = new Set(config.disabledRoutes ?? []);
912
907
  const hasCrudRoutes = !config.disableDefaultRoutes && crudRoutes.some((route) => !disabledRoutes.has(route));
@@ -1015,9 +1010,38 @@ function defineResource(config) {
1015
1010
  if (!config.skipRegistry) try {
1016
1011
  let openApiSchemas;
1017
1012
  if (config.adapter?.generateSchemas) {
1018
- const generated = config.adapter.generateSchemas(config.schemaOptions);
1013
+ const adapterContext = {
1014
+ idField: config.idField,
1015
+ resourceName: config.name
1016
+ };
1017
+ const generated = config.adapter.generateSchemas(config.schemaOptions, adapterContext);
1019
1018
  if (generated) openApiSchemas = generated;
1020
1019
  }
1020
+ if (config.idField && config.idField !== "_id" && openApiSchemas?.params && typeof openApiSchemas.params === "object") {
1021
+ const params = openApiSchemas.params;
1022
+ const properties = params.properties;
1023
+ const idProp = properties?.id;
1024
+ if (idProp && typeof idProp === "object") {
1025
+ const pattern = idProp.pattern;
1026
+ if (typeof pattern === "string" && (pattern === "^[0-9a-fA-F]{24}$" || pattern === "^[a-f\\d]{24}$" || pattern === "^[a-fA-F0-9]{24}$" || /^\^\[[a-fA-F0-9\\d]+\]\{24\}\$$/.test(pattern))) {
1027
+ const cleanedId = { ...idProp };
1028
+ delete cleanedId.pattern;
1029
+ delete cleanedId.minLength;
1030
+ delete cleanedId.maxLength;
1031
+ if (!cleanedId.description) cleanedId.description = `${config.idField} (custom ID field)`;
1032
+ openApiSchemas = {
1033
+ ...openApiSchemas,
1034
+ params: {
1035
+ ...params,
1036
+ properties: {
1037
+ ...properties,
1038
+ id: cleanedId
1039
+ }
1040
+ }
1041
+ };
1042
+ }
1043
+ }
1044
+ }
1021
1045
  const queryParser = config.queryParser;
1022
1046
  if (queryParser?.getQuerySchema) {
1023
1047
  const querySchema = queryParser.getQuerySchema();
@@ -1156,7 +1180,7 @@ var ResourceDefinition = class {
1156
1180
  const openApi = self._registryMeta?.openApiSchemas;
1157
1181
  if (openApi && (!self.customSchemas || Object.keys(self.customSchemas).length === 0)) {
1158
1182
  const generated = {};
1159
- const { createBody, updateBody, params, response } = openApi;
1183
+ const { createBody, updateBody, params } = openApi;
1160
1184
  const safeBody = (schema) => {
1161
1185
  if (schema && typeof schema === "object" && schema.type === "object") return {
1162
1186
  additionalProperties: true,
@@ -1189,39 +1213,32 @@ var ResourceDefinition = class {
1189
1213
  }
1190
1214
  const listQuerySchema = self._registryMeta?.openApiSchemas?.listQuery;
1191
1215
  if (listQuerySchema) {
1192
- const KEEP_TYPE = new Set([
1193
- "page",
1194
- "limit",
1195
- "sort",
1196
- "search",
1197
- "select",
1198
- "after"
1199
- ]);
1200
- const TYPE_DEPENDENT = new Set([
1201
- "type",
1202
- "minimum",
1203
- "maximum",
1204
- "minLength",
1205
- "maxLength",
1206
- "pattern",
1207
- "format",
1208
- "exclusiveMinimum",
1209
- "exclusiveMaximum",
1210
- "multipleOf",
1211
- "minItems",
1212
- "maxItems",
1213
- "uniqueItems"
1214
- ]);
1216
+ const NORMALIZED_PROPS = {
1217
+ page: {
1218
+ type: "integer",
1219
+ minimum: 1
1220
+ },
1221
+ limit: {
1222
+ type: "integer",
1223
+ minimum: 1
1224
+ },
1225
+ sort: {},
1226
+ search: {},
1227
+ select: {},
1228
+ after: {},
1229
+ populate: {},
1230
+ lookup: {},
1231
+ aggregate: {}
1232
+ };
1215
1233
  const props = listQuerySchema.properties;
1216
1234
  const normalizedProps = props ? { ...props } : void 0;
1217
- if (normalizedProps) for (const key of Object.keys(normalizedProps)) {
1218
- if (KEEP_TYPE.has(key)) continue;
1219
- const prop = normalizedProps[key];
1220
- if (prop && typeof prop === "object" && "type" in prop) {
1221
- const cleaned = {};
1222
- for (const [k, v] of Object.entries(prop)) if (!TYPE_DEPENDENT.has(k)) cleaned[k] = v;
1223
- normalizedProps[key] = Object.keys(cleaned).length > 0 ? cleaned : {};
1224
- }
1235
+ if (normalizedProps) {
1236
+ const originalLimit = normalizedProps.limit;
1237
+ if (originalLimit?.maximum) NORMALIZED_PROPS.limit = {
1238
+ ...NORMALIZED_PROPS.limit,
1239
+ maximum: originalLimit.maximum
1240
+ };
1241
+ for (const key of Object.keys(normalizedProps)) normalizedProps[key] = NORMALIZED_PROPS[key] ?? {};
1225
1242
  }
1226
1243
  const normalizedSchema = {
1227
1244
  ...listQuerySchema,
@@ -1,5 +1,5 @@
1
- import { $ as RegistryEntry } from "../interface-CrN45qz1.mjs";
2
- import { t as ExternalOpenApiPaths } from "../externalPaths-DpO-s7r8.mjs";
1
+ import { et as RegistryEntry } from "../interface-Dwzqt4mn.mjs";
2
+ import { t as ExternalOpenApiPaths } from "../externalPaths-Dg7OLsKo.mjs";
3
3
  import { FastifyPluginAsync } from "fastify";
4
4
 
5
5
  //#region src/docs/openapi.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as getUserRoles } from "../types-ZUu_h0jp.mjs";
2
- import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-CBmZ6EQN.mjs";
2
+ import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-C5UhIeWu.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/docs/scalar.ts
5
5
  const scalarPlugin = async (fastify, opts = {}) => {
@@ -1,5 +1,5 @@
1
- import { Bt as ResourceDefinition, n as DataAdapter } from "../interface-CrN45qz1.mjs";
2
- import { t as PermissionCheck } from "../types-BNUccdcf.mjs";
1
+ import { Vt as ResourceDefinition, r as DataAdapter } from "../interface-Dwzqt4mn.mjs";
2
+ import { t as PermissionCheck } from "../types-DPsC0taJ.mjs";
3
3
 
4
4
  //#region src/dynamic/ArcDynamicLoader.d.ts
5
5
  interface ArcArchitectureSchema {
@@ -1,6 +1,6 @@
1
1
  import { t as ArcQueryParser } from "../queryParser-CgCtsjti.mjs";
2
- import { n as defineResource } from "../defineResource-Ckxg6HrZ.mjs";
3
- import { S as readOnly, _ as fullPublic, b as publicRead, g as authenticated, h as adminOnly, v as ownerWithAdminBypass, x as publicReadAdminWrite } from "../permissions-C8ImI8gC.mjs";
2
+ import { n as defineResource } from "../defineResource-DZzyl4a4.mjs";
3
+ import { C as publicRead, T as readOnly, b as fullPublic, v as adminOnly, w as publicReadAdminWrite, x as ownerWithAdminBypass, y as authenticated } from "../permissions-CH4cNwJi.mjs";
4
4
  //#region src/dynamic/ArcDynamicLoader.ts
5
5
  const VALID_FIELD_TYPES = new Set([
6
6
  "string",
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
2
  import { t as getUserRoles } from "./types-ZUu_h0jp.mjs";
3
- import { t as arcLog } from "./logger-Dz3j1ItV.mjs";
3
+ import { t as arcLog } from "./logger-DLg8-Ueg.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/scope/elevation.ts
6
6
  var elevation_exports = /* @__PURE__ */ __exportAll({
@@ -0,0 +1,23 @@
1
+ import { FastifyPluginAsync, FastifyRequest } from "fastify";
2
+
3
+ //#region src/scope/elevation.d.ts
4
+ interface ElevationOptions {
5
+ /** Roles that can use elevation (default: ['superadmin']) */
6
+ platformRoles?: string[];
7
+ /** Header name for scope declaration (default: 'x-arc-scope') */
8
+ scopeHeader?: string;
9
+ /** Header name for target organization (default: 'x-organization-id') */
10
+ orgHeader?: string;
11
+ /** Called when elevation happens — use for audit logging */
12
+ onElevation?: (event: ElevationEvent) => void | Promise<void>;
13
+ }
14
+ interface ElevationEvent {
15
+ userId: string;
16
+ organizationId?: string;
17
+ request: FastifyRequest;
18
+ timestamp: Date;
19
+ }
20
+ declare const elevationPlugin: FastifyPluginAsync<ElevationOptions>;
21
+ declare const _default: FastifyPluginAsync<ElevationOptions>;
22
+ //#endregion
23
+ export { elevationPlugin as i, ElevationOptions as n, _default as r, ElevationEvent as t };
@@ -1,4 +1,4 @@
1
- import { t as DomainEvent } from "./EventTransport-wc5hSLik.mjs";
1
+ import { t as DomainEvent } from "./EventTransport-CUpRK_Lg.mjs";
2
2
  import { FastifyInstance, FastifyPluginAsync, FastifyRequest } from "fastify";
3
3
 
4
4
  //#region src/plugins/caching.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
- import { p as isArcError } from "./errors-NoQKsbAT.mjs";
2
+ import { p as isArcError } from "./errors-Cg58SLNi.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/errorHandler.ts
5
5
  var errorHandler_exports = /* @__PURE__ */ __exportAll({ errorHandlerPlugin: () => errorHandlerPlugin });
@@ -1,4 +1,4 @@
1
- import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-wc5hSLik.mjs";
1
+ import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "./EventTransport-CUpRK_Lg.mjs";
2
2
  import { FastifyPluginAsync } from "fastify";
3
3
 
4
4
  //#region src/events/defineEvent.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
2
- import { t as requestContext } from "./requestContext-DYtmNpm5.mjs";
2
+ import { t as requestContext } from "./requestContext-xHIKedG6.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/events/EventTransport.ts
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { a as MemoryEventTransport, i as EventTransport, n as EventHandler, o as MemoryEventTransportOptions, r as EventLogger, s as createEvent, t as DomainEvent } from "../EventTransport-wc5hSLik.mjs";
2
- import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-DW45v4V5.mjs";
1
+ import { a as MemoryEventTransport, i as EventTransport, n as EventHandler, o as MemoryEventTransportOptions, r as EventLogger, s as createEvent, t as DomainEvent } from "../EventTransport-CUpRK_Lg.mjs";
2
+ import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-BgLxJkIB.mjs";
3
3
  import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
4
- import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-BW9UKLZM.mjs";
4
+ import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-We_Ucl9-.mjs";
5
5
 
6
6
  //#region src/events/eventTypes.d.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { a as MemoryEventTransport, i as withRetry, o as createEvent, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-Ba00swHF.mjs";
1
+ import { a as MemoryEventTransport, i as withRetry, o as createEvent, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-DsaNNXzZ.mjs";
2
2
  //#region src/events/defineEvent.ts
3
3
  /**
4
4
  * defineEvent — Typed Event Definitions with Optional Schema Validation
@@ -1,2 +1,2 @@
1
- import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-BW9UKLZM.mjs";
1
+ import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-We_Ucl9-.mjs";
2
2
  export { type RedisStreamLike, RedisStreamTransport, type RedisStreamTransportOptions };
@@ -1,4 +1,4 @@
1
- import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "../../EventTransport-wc5hSLik.mjs";
1
+ import { i as EventTransport, n as EventHandler, r as EventLogger, t as DomainEvent } from "../../EventTransport-CUpRK_Lg.mjs";
2
2
 
3
3
  //#region src/events/transports/redis.d.ts
4
4
  interface RedisLike {
@@ -1,4 +1,4 @@
1
- import { a as CustomPluginAuthOption, c as RawBodyOptions, d as ResourceLike, f as loadResources, i as CustomAuthenticatorOption, l as UnderPressureOptions, n as BetterAuthOption, o as JwtAuthOption, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as LoadResourcesOptions } from "../types-C1Z28coa.mjs";
1
+ import { a as CustomPluginAuthOption, c as RawBodyOptions, d as ResourceLike, f as loadResources, i as CustomAuthenticatorOption, l as UnderPressureOptions, n as BetterAuthOption, o as JwtAuthOption, r as CreateAppOptions, s as MultipartOptions, t as AuthOption, u as LoadResourcesOptions } from "../types-D0qf0Mf4.mjs";
2
2
  import { FastifyInstance } from "fastify";
3
3
 
4
4
  //#region src/factory/createApp.d.ts
@@ -1,4 +1,4 @@
1
- import { a as edgePreset, c as testingPreset, i as developmentPreset, n as createApp, o as getPreset, s as productionPreset, t as ArcFactory } from "../createApp-D2w0LdYJ.mjs";
1
+ import { a as edgePreset, c as testingPreset, i as developmentPreset, n as createApp, o as getPreset, s as productionPreset, t as ArcFactory } from "../createApp-B_nvKNAQ.mjs";
2
2
  import { readdir } from "node:fs/promises";
3
3
  import { dirname, join, resolve } from "node:path";
4
4
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -1,2 +1,2 @@
1
- import { an as HookPhase, cn as HookSystemOptions, dn as afterUpdate, fn as beforeCreate, gn as defineHook, hn as createHookSystem, in as HookOperation, ln as afterCreate, mn as beforeUpdate, nn as HookContext, on as HookRegistration, pn as beforeDelete, rn as HookHandler, sn as HookSystem, tn as DefineHookOptions, un as afterDelete } from "../interface-CrN45qz1.mjs";
1
+ import { _n as defineHook, an as HookOperation, cn as HookSystem, dn as afterDelete, fn as afterUpdate, gn as createHookSystem, hn as beforeUpdate, in as HookHandler, ln as HookSystemOptions, mn as beforeDelete, nn as DefineHookOptions, on as HookPhase, pn as beforeCreate, rn as HookContext, sn as HookRegistration, un as afterCreate } from "../interface-Dwzqt4mn.mjs";
2
2
  export { type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,2 +1,2 @@
1
- import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-COkyWztM.mjs";
1
+ import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-D7lfx--K.mjs";
2
2
  export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,6 +1,6 @@
1
- import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-gr-7qo9j.mjs";
2
- import { n as MongoIdempotencyStoreOptions } from "../mongodb-pMvOlR5_.mjs";
3
- import { r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-D0Qc-9EW.mjs";
1
+ import { i as createIdempotencyResult, n as IdempotencyResult, r as IdempotencyStore, t as IdempotencyLock } from "../interface-B9rHWPxD.mjs";
2
+ import { n as MongoIdempotencyStoreOptions } from "../mongodb-Bq90j-Uj.mjs";
3
+ import { r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-CyCntzTO.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
 
6
6
  //#region src/idempotency/idempotencyPlugin.d.ts
@@ -1,2 +1,2 @@
1
- import { n as MongoIdempotencyStoreOptions, t as MongoIdempotencyStore } from "../mongodb-pMvOlR5_.mjs";
1
+ import { n as MongoIdempotencyStoreOptions, t as MongoIdempotencyStore } from "../mongodb-Bq90j-Uj.mjs";
2
2
  export { MongoIdempotencyStore, type MongoIdempotencyStoreOptions };
@@ -1,2 +1,2 @@
1
- import { n as RedisIdempotencyStore, r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-D0Qc-9EW.mjs";
1
+ import { n as RedisIdempotencyStore, r as RedisIdempotencyStoreOptions, t as RedisClient } from "../redis-CyCntzTO.mjs";
2
2
  export { type RedisClient, RedisIdempotencyStore, type RedisIdempotencyStoreOptions };