@classytic/mongokit 3.11.0 → 3.12.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.
package/README.md CHANGED
@@ -9,7 +9,7 @@ Production-grade MongoDB repository pattern for Node.js. Zero runtime deps — M
9
9
  npm install @classytic/mongokit @classytic/repo-core mongoose
10
10
  ```
11
11
 
12
- Requires Mongoose `>=9.4.1`, `@classytic/repo-core` `>=0.1.0`, Node.js `>=22`.
12
+ Requires Mongoose `>=9.4.1`, `@classytic/repo-core` `>=0.3.0`, Node.js `>=22`.
13
13
 
14
14
  > **Swap-able with sqlitekit.** Mongokit implements the `StandardRepo<TDoc>` contract from `@classytic/repo-core/repository`. Controller code written against the contract runs unchanged on [@classytic/sqlitekit](https://www.npmjs.com/package/@classytic/sqlitekit) — both kits share an identical conformance suite.
15
15
 
@@ -180,7 +180,7 @@ Sketch:
180
180
  ```ts
181
181
  // host: src/outbox/wire.ts
182
182
  import { wireOutbox, MongoOutboxStore } from './outbox-recipe.js';
183
- import { RedisEventTransport } from '@classytic/arc/events';
183
+ import { RedisEventTransport } from '@classytic/arc/events/redis';
184
184
 
185
185
  const store = new MongoOutboxStore({ connection: mongoose.connection, name: 'outbox' });
186
186
  const transport = new RedisEventTransport({ url: process.env.REDIS_URL });
@@ -269,6 +269,16 @@ const result = await invoiceRepo.getAll({ filters, sort, page, limit, search });
269
269
 
270
270
  Supports URL operators: `_gt/_gte/_lt/_lte/_ne/_in/_nin/_regex`, geo (`[near]`, `[withinRadius]`, `[geoWithin]`), populate, and schema-aware coercion. ReDoS protection + allowlisted operators for hardening.
271
271
 
272
+ **Nested subdocument filters.** Dotted paths pass through to MongoDB directly — Mongoose's strict-mode casting handles the nested-schema lookup, no special config required:
273
+
274
+ ```
275
+ ?contact.email[contains]=foo → { 'contact.email': { $regex: /foo/i } }
276
+ ?name.given=sadman → { 'name.given': 'sadman' }
277
+ ?name.given[in]=a,b → { 'name.given': { $in: ['a', 'b'] } }
278
+ ```
279
+
280
+ Dot-in-key semantics follow `qs` parsing: `?name.given=x` produces `{ 'name.given': 'x' }` (NOT nested into `{ name: { given: 'x' } }`). For the nested-object form use bracket notation: `?name[given]=x`.
281
+
272
282
  ---
273
283
 
274
284
  ## TypeScript
@@ -1,5 +1,5 @@
1
- import { r as warn } from "./logger-DJ7egMnd.mjs";
2
- import { t as createError } from "./error-CzYwrfUP.mjs";
1
+ import { r as warn } from "./logger-8-VS1za6.mjs";
2
+ import { t as createError } from "./error-B00pI7dV.mjs";
3
3
  import { n as encodeCursor, r as resolveCursorFilter } from "./cursor-J84rR6wG.mjs";
4
4
  import { r as validateKeysetSort, t as getPrimaryField } from "./sort-CrZjTK25.mjs";
5
5
  //#region src/pagination/utils/index-hint.ts
@@ -1,2 +1,2 @@
1
- import { a as create_d_exports, i as delete_d_exports, n as update_d_exports, o as aggregate_d_exports, r as read_d_exports } from "../index-C1MzVFsT.mjs";
1
+ import { a as create_d_exports, i as delete_d_exports, n as update_d_exports, o as aggregate_d_exports, r as read_d_exports } from "../index-D9cORR-o.mjs";
2
2
  export { aggregate_d_exports as aggregate, create_d_exports as create, delete_d_exports as deleteActions, read_d_exports as read, update_d_exports as update };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-CfYAbeIz.mjs";
2
- import { g as create_exports, i as update_exports, p as delete_exports, u as read_exports, v as aggregate_exports } from "../update-CWXfFC6O.mjs";
2
+ import { g as create_exports, i as update_exports, p as delete_exports, u as read_exports, v as aggregate_exports } from "../update-CDxPtpsk.mjs";
3
3
  //#region src/actions/index.ts
4
4
  var actions_exports = /* @__PURE__ */ __exportAll({
5
5
  aggregate: () => aggregate_exports,
@@ -1,4 +1,4 @@
1
- import { q as Plugin } from "../types-xOyTec4n.mjs";
1
+ import { W as Plugin } from "../types-DXscZnLu.mjs";
2
2
  import { PipelineStage } from "mongoose";
3
3
 
4
4
  //#region src/ai/types.d.ts
package/dist/ai/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as warn } from "../logger-DJ7egMnd.mjs";
1
+ import { r as warn } from "../logger-8-VS1za6.mjs";
2
2
  //#region src/ai/url-policy.ts
3
3
  /**
4
4
  * URL policy helpers for the vector plugin media pipeline.
@@ -45,7 +45,7 @@ function matchesOriginEntry(origin, entry, url) {
45
45
  if (wildcardMatch) {
46
46
  const [, entryProtocol, suffix] = wildcardMatch;
47
47
  if (url.protocol.toLowerCase() !== entryProtocol.toLowerCase()) return false;
48
- return url.hostname.toLowerCase().endsWith("." + suffix.toLowerCase());
48
+ return url.hostname.toLowerCase().endsWith(`.${suffix.toLowerCase()}`);
49
49
  }
50
50
  return false;
51
51
  }
@@ -137,7 +137,7 @@ async function withVectorErrorHints(op, ctx) {
137
137
  } catch (err) {
138
138
  const hint = classifyVectorSearchError(err, ctx);
139
139
  if (hint.code === "UNKNOWN") throw err;
140
- const message = `[mongokit:vector] ${hint.summary}\n` + hint.hints.map((h) => ` • ${h}`).join("\n");
140
+ const message = `[mongokit:vector] ${hint.summary}\n${hint.hints.map((h) => ` • ${h}`).join("\n")}`;
141
141
  const wrapped = new Error(message, { cause: err });
142
142
  wrapped.code = hint.code;
143
143
  throw wrapped;
@@ -1,19 +1,26 @@
1
1
  //#region src/utils/error.ts
2
2
  /**
3
- * Creates an error with HTTP status code
3
+ * Creates an error with HTTP status code, plus optional stable `code` /
4
+ * `meta` so callers can `catch` on the code instead of regex-matching the
5
+ * message string.
4
6
  *
5
7
  * @param status - HTTP status code
6
8
  * @param message - Error message
9
+ * @param options - Optional `code` / `meta` for structured handling
7
10
  * @returns Error with status property
8
11
  *
9
12
  * @example
10
13
  * throw createError(404, 'Document not found');
11
- * throw createError(400, 'Invalid input');
12
- * throw createError(403, 'Access denied');
14
+ * throw createError(400, 'Invalid input', {
15
+ * code: 'SEARCH_NOT_CONFIGURED',
16
+ * meta: { model: 'Customer', availableModes: ['text', 'regex', 'auto'] },
17
+ * });
13
18
  */
14
- function createError(status, message) {
19
+ function createError(status, message, options) {
15
20
  const error = new Error(message);
16
21
  error.status = status;
22
+ if (options?.code !== void 0) error.code = options.code;
23
+ if (options?.meta !== void 0) error.meta = options.meta;
17
24
  return error;
18
25
  }
19
26
  /**
@@ -1,4 +1,4 @@
1
- import { $ as ReadPreferenceType, B as ObjectId, D as GroupResult, E as FindOneAndUpdateOptions, R as MinMaxResult, U as OperationOptions, X as PopulateSpec, a as AnyDocument, b as DeleteResult, ft as SortSpec, g as CreateOptions, gt as UpdateOptions, ht as UpdateManyResult, kt as LookupOptions, ot as SelectSpec, vt as UpdateWithValidationResult } from "./types-xOyTec4n.mjs";
1
+ import { D as FindOneAndUpdateOptions, Dt as LookupOptions, L as MinMaxResult, O as GroupResult, V as OperationOptions, X as ReadPreferenceType, ft as UpdateManyResult, g as CreateOptions, ht as UpdateWithValidationResult, i as AnyDocument, lt as SortSpec, pt as UpdateOptions, q as PopulateSpec, rt as SelectSpec, x as DeleteResult, z as ObjectId } from "./types-DXscZnLu.mjs";
2
2
  import { Model, PipelineStage } from "mongoose";
3
3
 
4
4
  //#region src/actions/aggregate.d.ts
package/dist/index.d.mts CHANGED
@@ -1,15 +1,16 @@
1
- import { $ as ReadPreferenceType, A as InferDocument, B as ObjectId, C as EventPayload, Ct as WithTransactionOptions, D as GroupResult, Dt as IResponseFormatter, E as FindOneAndUpdateOptions, Et as IRequestContext, F as Logger, G as PaginationResult, H as OffsetPaginationResult, I as LookupPopulateOptions, J as PluginFunction, K as PartialBy, L as LookupPopulateResult, M as KeysOfType, N as KeysetPaginationOptions, O as HookMode, Ot as LookupBuilder, P as KeysetPaginationResult, Q as ReadOptions, R as MinMaxResult, S as EventHandlers, St as WithPlugins, T as FieldPreset, Tt as IControllerResponse, U as OperationOptions, V as OffsetPaginationOptions, W as PaginationConfig, X as PopulateSpec, Y as PluginType, Z as PrioritizedHook, _ as DecodedCursor, _t as UpdatePatch, a as AnyDocument, at as RequiredBy, b as DeleteResult, bt as ValidationChainOptions, c as CacheOperationOptions, ct as SoftDeleteFilterMode, d as CacheableOptions, dt as SortDirection, et as RepositoryContext, f as CascadeOptions, ft as SortSpec, g as CreateOptions, gt as UpdateOptions, h as CreateInput, ht as UpdateManyResult, i as AllPluginMethods, it as RepositoryOptions, j as InferRawDoc, k as HttpError, kt as LookupOptions, l as CacheOptions, lt as SoftDeleteOptions, m as CollationOptions, mt as UpdateInput, n as AggregatePaginationOptions, nt as RepositoryInstance, o as AnyModel, ot as SelectSpec, p as CascadeRelation, pt as Strict, q as Plugin, r as AggregatePaginationResult, rt as RepositoryOperation, s as CacheAdapter, st as SessionOptions, t as AggregateOptions, tt as RepositoryEvent, u as CacheStats, ut as SoftDeleteRepository, v as DeepPartial, vt as UpdateWithValidationResult, w as EventPhase, wt as IController, x as DocField, xt as ValidatorDefinition, y as DeleteManyResult, yt as UserContext, z as NonNullableFields } from "./types-xOyTec4n.mjs";
2
- import { t as index_d_exports } from "./index-C1MzVFsT.mjs";
1
+ import { $ as RepositoryInstance, A as InferDocument, B as OffsetPaginationOptions, C as EventHandlers, Ct as IControllerResponse, D as FindOneAndUpdateOptions, Dt as LookupOptions, E as FieldPreset, Et as LookupBuilder, F as LookupPopulateOptions, G as PluginFunction, H as PaginationConfig, I as LookupPopulateResult, J as PrioritizedHook, K as PluginType, L as MinMaxResult, M as KeysOfType, N as KeysetPaginationOptions, O as GroupResult, P as Logger, Q as RepositoryEvent, R as NonNullableFields, S as DocField, St as IController, T as EventPhase, Tt as IResponseFormatter, U as PartialBy, V as OperationOptions, W as Plugin, X as ReadPreferenceType, Y as ReadOptions, Z as RepositoryContext, _ as CursorPayload, _t as ValidationChainOptions, a as AnyModel, at as SoftDeleteFilterMode, b as DeleteManyResult, bt as WithPlugins, c as CacheOperationOptions, ct as SortDirection, d as CacheableOptions, dt as UpdateInput, et as RepositoryOperation, f as CascadeOptions, ft as UpdateManyResult, g as CreateOptions, gt as UserContext, h as CreateInput, ht as UpdateWithValidationResult, i as AnyDocument, it as SessionOptions, j as InferRawDoc, k as HookMode, l as CacheOptions, lt as SortSpec, m as CollationOptions, mt as UpdatePatch, n as AggregatePaginationOptions, nt as RequiredBy, o as BasePaginationOptions, ot as SoftDeleteOptions, p as CascadeRelation, pt as UpdateOptions, q as PopulateSpec, r as AllPluginMethods, rt as SelectSpec, s as CacheAdapter, st as SoftDeleteRepository, t as AggregateOptions, tt as RepositoryOptions, u as CacheStats, ut as Strict, v as DecodedCursor, vt as ValidatorDefinition, w as EventPayload, wt as IRequestContext, x as DeleteResult, xt as WithTransactionOptions, y as DeepPartial, yt as ValueType, z as ObjectId } from "./types-DXscZnLu.mjs";
2
+ import { t as index_d_exports } from "./index-D9cORR-o.mjs";
3
3
  import { PaginationEngine } from "./pagination/PaginationEngine.mjs";
4
- import { $ as aggregateHelpersPlugin, A as PrefixedIdOptions, B as BatchOperationsMethods, C as methodRegistryPlugin, D as CustomIdOptions, E as elasticSearchPlugin, F as prefixedId, G as AuditQueryOptions, H as batchOperationsPlugin, I as sequentialId, J as AuditTrailOptions, K as AuditQueryResult, L as cascadePlugin, M as customIdPlugin, N as dateSequentialId, O as DateSequentialIdOptions, P as getNextSequence, Q as AggregateHelpersMethods, R as CacheMethods, T as ElasticSearchOptions, U as AuditEntry, V as BulkWriteResult, W as AuditOperation, X as auditTrailPlugin, Y as AuditTrailQuery, Z as auditLogPlugin, _ as observabilityPlugin, a as uniqueField, b as MongoOperationsMethods, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as SequentialIdOptions, k as IdGenerator, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, q as AuditTrailMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MultiTenantOptions, w as fieldFilterPlugin, x as mongoOperationsPlugin, y as multiTenantPlugin, z as cachePlugin } from "./validation-chain.plugin-BGdr5KRw.mjs";
4
+ import { $ as aggregateHelpersPlugin, A as PrefixedIdOptions, B as BatchOperationsMethods, C as methodRegistryPlugin, D as CustomIdOptions, E as elasticSearchPlugin, F as prefixedId, G as AuditQueryOptions, H as batchOperationsPlugin, I as sequentialId, J as AuditTrailOptions, K as AuditQueryResult, L as cascadePlugin, M as customIdPlugin, N as dateSequentialId, O as DateSequentialIdOptions, P as getNextSequence, Q as AggregateHelpersMethods, R as CacheMethods, T as ElasticSearchOptions, U as AuditEntry, V as BulkWriteResult, W as AuditOperation, X as auditTrailPlugin, Y as AuditTrailQuery, Z as auditLogPlugin, _ as observabilityPlugin, a as uniqueField, b as MongoOperationsMethods, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as SequentialIdOptions, k as IdGenerator, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, q as AuditTrailMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MultiTenantOptions, w as fieldFilterPlugin, x as mongoOperationsPlugin, y as multiTenantPlugin, z as cachePlugin } from "./validation-chain.plugin-CH-xPoKM.mjs";
5
5
  import { n as SchemaPathsLike, t as FieldType$1 } from "./coercion-oM8G4b6m.mjs";
6
6
  import { n as SchemaIndexes } from "./indexes-C26GNZRU.mjs";
7
- import { a as createFieldPreset, c as getMongooseProjection, d as parseDuplicateKeyError, i as configureLogger, l as createError, n as buildCrudSchemasFromMongooseSchema, o as filterResponseData, r as createMemoryCache, s as getFieldsForUser, t as buildCrudSchemasFromModel, u as isDuplicateKeyError } from "./mongooseToJsonSchema-BH6OFec5.mjs";
7
+ import { a as createFieldPreset, c as getMongooseProjection, d as parseDuplicateKeyError, i as configureLogger, l as createError, n as buildCrudSchemasFromMongooseSchema, o as filterResponseData, r as createMemoryCache, s as getFieldsForUser, t as buildCrudSchemasFromModel, u as isDuplicateKeyError } from "./mongooseToJsonSchema-rtkdbBhf.mjs";
8
8
  import * as _$mongoose from "mongoose";
9
9
  import { ClientSession, Expression, Model, PipelineStage, PopulateOptions } from "mongoose";
10
10
  import { AggPaginationRequest, AggRequest, AggResult, RepositoryBase } from "@classytic/repo-core/repository";
11
11
  import { UpdateInput as UpdateInput$1 } from "@classytic/repo-core/update";
12
- import { OffsetPaginationResultCore } from "@classytic/repo-core/pagination";
12
+ import { AggregatePaginationResult, KeysetPaginationResult, OffsetPaginationResult, OffsetPaginationResultCore } from "@classytic/repo-core/pagination";
13
+ import { HttpError } from "@classytic/repo-core/errors";
13
14
 
14
15
  //#region src/operations.d.ts
15
16
  /**
@@ -1210,12 +1211,16 @@ declare class Repository<TDoc = unknown> extends RepositoryBase {
1210
1211
  * Merge policy-hook-injected filters (multi-tenant scope,
1211
1212
  * soft-delete) into the pre-aggregate `filter` slot of the request.
1212
1213
  * Plugins speak mongo-query shape (`context.query` / `context.filters`);
1213
- * we merge those with the portable `req.filter` using `$and`.
1214
+ * the caller's `req.filter` may be either Filter IR or a mongo query.
1214
1215
  *
1215
- * When the caller's filter is a Filter IR node we don't unwrap it —
1216
- * the pipeline compiler does Filter→mongo translation. Merging here
1217
- * as a mongo-shaped `$and` is safe because `compileFilterToMongo`
1218
- * passes through already-mongo queries unchanged.
1216
+ * Each part is compiled through `compileFilterToMongo` BEFORE the
1217
+ * `$and` merge — otherwise an IR node like `eq('status', 'paid')`
1218
+ * (`{ op, field, value }`) gets nested inside `$and` as a literal,
1219
+ * `compileFilterToMongo` of the merged value finds no top-level `op`
1220
+ * (so `isFilter` is false), and Mongo receives the IR object as a
1221
+ * raw query clause that matches no real document. Symptom: aggregates
1222
+ * silently return 0 rows whenever a callerpasses IR + a policy
1223
+ * plugin is installed.
1219
1224
  */
1220
1225
  private _injectPolicyScopeIntoAgg;
1221
1226
  /**
@@ -1472,4 +1477,4 @@ declare function isTransactionUnsupported(error: Error): boolean;
1472
1477
  */
1473
1478
  declare function createRepository<TDoc>(Model: _$mongoose.Model<TDoc, any, any, any>, plugins?: PluginType[], paginationConfig?: PaginationConfig, options?: RepositoryOptions): Repository<TDoc>;
1474
1479
  //#endregion
1475
- export { ALL_OPERATIONS, type AggregateHelpersMethods, type AggregateOptions, type AggregatePaginationOptions, type AggregatePaginationResult, AggregationBuilder, type AllPluginMethods, type AnyDocument, type AnyModel, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BatchOperationsMethods, type BulkWriteResult, type CacheAdapter, type CacheMethods, type CacheOperationOptions, type CacheOptions, type CacheStats, type CacheableOptions, type CascadeOptions, type CascadeRelation, type CollationOptions, type CreateInput, type CreateOptions, type CustomIdOptions, type DateSequentialIdOptions, type DecodedCursor, type DeepPartial, type DeleteResult, type DocField, type ElasticSearchOptions, type EventHandlers, type EventPayload, type EventPhase, type FieldPreset, type FieldType, type FilterQuery, type FindOneAndUpdateOptions, type GroupResult, HOOK_PRIORITY, type HookMode, type HttpError, type IController, type IControllerResponse, type IRequestContext, type IResponseFormatter, type IdGenerator, type InferDocument, type InferRawDoc, type KeysOfType, type KeysetPaginationOptions, type KeysetPaginationResult, type Logger, LookupBuilder, type LookupOptions, type LookupPopulateOptions, type LookupPopulateResult, MUTATING_OPERATIONS, type MinMaxResult, type MongoOperationsMethods, type MultiTenantOptions, type NonNullableFields, OP_REGISTRY, type ObjectId, type ObservabilityOptions, type OffsetPaginationOptions, type OffsetPaginationResult, type OperationDescriptor, type OperationMetric, type OperationOptions, type PaginationConfig, PaginationEngine, type PaginationResult, type ParsedQuery, type PartialBy, type Plugin, type PluginFunction, type PluginType, type PolicyKey, type PopulateOption, type PopulateSpec, type PrefixedIdOptions, QueryParser, type QueryParserOptions, READ_OPERATIONS, type ReadOptions, type ReadPreferenceType, Repository, Repository as default, type RepositoryContext, type RepositoryEvent, type RepositoryInstance, type RepositoryOperation, type RepositoryOptions, type RequiredBy, type SchemaLike, type SearchMode, type SelectSpec, type SequentialIdOptions, type SessionOptions, type SoftDeleteFilterMode, type SoftDeleteMethods, type SoftDeleteOptions, type SoftDeleteRepository, type SortDirection, type SortSpec, type Strict, type SubdocumentMethods, type TenantContext, type TenantStore, type UpdateInput, type UpdateManyResult, type UpdateOptions, type UpdatePatch, type UpdateWithValidationResult, type UserContext, type ValidationChainOptions, type ValidatorDefinition, type WithPlugins, type WithTransactionOptions, index_d_exports as actions, aggregateHelpersPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, configureLogger, createError, createFieldPreset, createMemoryCache, createRepository, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, immutableField, isDuplicateKeyError, isTransactionUnsupported, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin, withTransaction };
1480
+ export { ALL_OPERATIONS, type AggregateHelpersMethods, type AggregateOptions, type AggregatePaginationOptions, AggregationBuilder, type AllPluginMethods, type AnyDocument, type AnyModel, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BasePaginationOptions, type BatchOperationsMethods, type BulkWriteResult, type CacheAdapter, type CacheMethods, type CacheOperationOptions, type CacheOptions, type CacheStats, type CacheableOptions, type CascadeOptions, type CascadeRelation, type CollationOptions, type CreateInput, type CreateOptions, type CursorPayload, type CustomIdOptions, type DateSequentialIdOptions, type DecodedCursor, type DeepPartial, type DeleteResult, type DocField, type ElasticSearchOptions, type EventHandlers, type EventPayload, type EventPhase, type FieldPreset, type FieldType, type FilterQuery, type FindOneAndUpdateOptions, type GroupResult, HOOK_PRIORITY, type HookMode, type IController, type IControllerResponse, type IRequestContext, type IResponseFormatter, type IdGenerator, type InferDocument, type InferRawDoc, type KeysOfType, type KeysetPaginationOptions, type Logger, LookupBuilder, type LookupOptions, type LookupPopulateOptions, type LookupPopulateResult, MUTATING_OPERATIONS, type MinMaxResult, type MongoOperationsMethods, type MultiTenantOptions, type NonNullableFields, OP_REGISTRY, type ObjectId, type ObservabilityOptions, type OffsetPaginationOptions, type OperationDescriptor, type OperationMetric, type OperationOptions, type PaginationConfig, PaginationEngine, type ParsedQuery, type PartialBy, type Plugin, type PluginFunction, type PluginType, type PolicyKey, type PopulateOption, type PopulateSpec, type PrefixedIdOptions, type PrioritizedHook, QueryParser, type QueryParserOptions, READ_OPERATIONS, type ReadOptions, type ReadPreferenceType, Repository, Repository as default, type RepositoryContext, type RepositoryEvent, type RepositoryInstance, type RepositoryOperation, type RepositoryOptions, type RequiredBy, type SchemaLike, type SearchMode, type SelectSpec, type SequentialIdOptions, type SessionOptions, type SoftDeleteFilterMode, type SoftDeleteMethods, type SoftDeleteOptions, type SoftDeleteRepository, type SortDirection, type SortSpec, type Strict, type SubdocumentMethods, type TenantContext, type TenantStore, type UpdateInput, type UpdateManyResult, type UpdateOptions, type UpdatePatch, type UpdateWithValidationResult, type UserContext, type ValidationChainOptions, type ValidatorDefinition, type ValueType, type WithPlugins, type WithTransactionOptions, index_d_exports as actions, aggregateHelpersPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, configureLogger, createError, createFieldPreset, createMemoryCache, createRepository, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, immutableField, isDuplicateKeyError, isTransactionUnsupported, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin, withTransaction };
package/dist/index.mjs CHANGED
@@ -1,16 +1,30 @@
1
- import { r as warn, t as configureLogger } from "./logger-DJ7egMnd.mjs";
2
- import { b as LookupBuilder } from "./update-CWXfFC6O.mjs";
3
- import { n as isDuplicateKeyError, r as parseDuplicateKeyError, t as createError } from "./error-CzYwrfUP.mjs";
1
+ import { b as LookupBuilder } from "./update-CDxPtpsk.mjs";
2
+ import { r as warn, t as configureLogger } from "./logger-8-VS1za6.mjs";
3
+ import { n as isDuplicateKeyError, r as parseDuplicateKeyError, t as createError } from "./error-B00pI7dV.mjs";
4
4
  import { t as actions_exports } from "./actions/index.mjs";
5
- import { A as AuditTrailQuery, C as cachePlugin, D as withTransaction, E as isTransactionUnsupported, F as MUTATING_OPERATIONS, I as OP_REGISTRY, L as READ_OPERATIONS, M as auditLogPlugin, N as aggregateHelpersPlugin, O as AggregationBuilder, P as ALL_OPERATIONS, R as operationsByPolicyKey, S as cascadePlugin, T as Repository, _ as customIdPlugin, a as uniqueField, b as prefixedId, c as createTenantContext, d as observabilityPlugin, f as multiTenantPlugin, g as elasticSearchPlugin, h as fieldFilterPlugin, i as requireField, j as auditTrailPlugin, k as batchOperationsPlugin, l as subdocumentPlugin, m as methodRegistryPlugin, n as blockIf, o as validationChainPlugin, p as mongoOperationsPlugin, r as immutableField, s as timestampPlugin, t as autoInject, u as softDeletePlugin, v as dateSequentialId, w as HOOK_PRIORITY, x as sequentialId, y as getNextSequence } from "./validation-chain.plugin-CLjEFr0c.mjs";
6
- import { t as PaginationEngine } from "./PaginationEngine-B93fLCcO.mjs";
5
+ import { A as AuditTrailQuery, C as cachePlugin, D as withTransaction, E as isTransactionUnsupported, F as MUTATING_OPERATIONS, I as OP_REGISTRY, L as READ_OPERATIONS, M as auditLogPlugin, N as aggregateHelpersPlugin, O as AggregationBuilder, P as ALL_OPERATIONS, R as operationsByPolicyKey, S as cascadePlugin, T as Repository, _ as customIdPlugin, a as uniqueField, b as prefixedId, c as createTenantContext, d as observabilityPlugin, f as multiTenantPlugin, g as elasticSearchPlugin, h as fieldFilterPlugin, i as requireField, j as auditTrailPlugin, k as batchOperationsPlugin, l as subdocumentPlugin, m as methodRegistryPlugin, n as blockIf, o as validationChainPlugin, p as mongoOperationsPlugin, r as immutableField, s as timestampPlugin, t as autoInject, u as softDeletePlugin, v as dateSequentialId, w as HOOK_PRIORITY, x as sequentialId, y as getNextSequence } from "./validation-chain.plugin-BicIgzzt.mjs";
6
+ import { t as PaginationEngine } from "./PaginationEngine-BDaAsyPn.mjs";
7
7
  import { isGeoOperator, parseGeoFilter } from "./query/primitives/geo.mjs";
8
8
  import { i as getMongooseProjection, n as filterResponseData, r as getFieldsForUser, t as createFieldPreset } from "./field-selection-dI0m4RBs.mjs";
9
9
  import { buildFieldTypeMap, coerceFieldValue, coerceHeuristic } from "./query/primitives/coercion.mjs";
10
10
  import { extractSchemaIndexes } from "./query/primitives/indexes.mjs";
11
- import { n as buildCrudSchemasFromMongooseSchema, r as createMemoryCache, t as buildCrudSchemasFromModel } from "./mongooseToJsonSchema-D1sdCOmj.mjs";
11
+ import { n as buildCrudSchemasFromMongooseSchema, r as createMemoryCache, t as buildCrudSchemasFromModel } from "./mongooseToJsonSchema-B187ufOP.mjs";
12
12
  //#region src/query/QueryParser.ts
13
13
  /**
14
+ * Top-level query parameters that mongokit handles outside the filter
15
+ * pipeline. Used by `_handleBracketSyntax` to detect a common typo where a
16
+ * caller wrote `?filters[limit]=5` instead of `?limit=5` and the qs parser
17
+ * nested the key under a filter object — the value is silently dropped
18
+ * without this guard. Kept as a Set for O(1) lookup; values mirror the
19
+ * reserved-key list at the top of `_parseFilters`.
20
+ */
21
+ const RESERVED_PAGINATION_KEYS = new Set([
22
+ "page",
23
+ "limit",
24
+ "sort",
25
+ "select"
26
+ ]);
27
+ /**
14
28
  * Modern Query Parser
15
29
  * Converts URL parameters to MongoDB queries with $lookup support
16
30
  */
@@ -711,6 +725,7 @@ var QueryParser = class {
711
725
  warn(`[mongokit] Nested filter depth exceeds maximum, skipping field: ${field}`);
712
726
  return;
713
727
  }
728
+ for (const op of Object.keys(operators)) if (RESERVED_PAGINATION_KEYS.has(op)) warn(`[mongokit] Nested filter contains reserved key '${op}' at '${field}.${op}' — did you mean ?${op}=... at the top level? The nested value is ignored.`);
714
729
  if (!parsedFilters[field]) parsedFilters[field] = {};
715
730
  for (const [operator, value] of Object.entries(operators)) {
716
731
  if (value === "" || value === null || value === void 0) continue;
@@ -110,9 +110,11 @@ function isObjectIdType(t) {
110
110
  */
111
111
  function buildCrudSchemasFromMongooseSchema(mongooseSchema, options = {}) {
112
112
  const jsonCreate = buildJsonSchemaFromPaths(mongooseSchema, options);
113
+ const jsonUpdate = buildJsonSchemaForUpdate(jsonCreate, options);
114
+ const jsonResponse = buildJsonSchemaForResponse(mongooseSchema, options);
113
115
  return {
114
116
  createBody: jsonCreate,
115
- updateBody: buildJsonSchemaForUpdate(jsonCreate, options),
117
+ updateBody: jsonUpdate,
116
118
  params: {
117
119
  type: "object",
118
120
  properties: { id: {
@@ -121,11 +123,18 @@ function buildCrudSchemasFromMongooseSchema(mongooseSchema, options = {}) {
121
123
  } },
122
124
  required: ["id"]
123
125
  },
124
- listQuery: buildJsonSchemaForQuery(mongooseSchema?.obj || {}, options)
126
+ listQuery: buildJsonSchemaForQuery(mongooseSchema?.obj || {}, options),
127
+ response: jsonResponse
125
128
  };
126
129
  }
127
130
  /**
128
- * Build CRUD schemas from Mongoose model
131
+ * Build CRUD schemas from Mongoose model.
132
+ *
133
+ * Satisfies the canonical `SchemaGenerator<Model<unknown>>` contract from
134
+ * `@classytic/repo-core/schema`, so arc's `MongooseAdapter.schemaGenerator`
135
+ * field accepts this function directly with no glue. Future Mongo-shaped
136
+ * kits implementing the same contract are interchangeable at the adapter
137
+ * boundary.
129
138
  */
130
139
  function buildCrudSchemasFromModel(mongooseModel, options = {}) {
131
140
  if (!mongooseModel?.schema) throw new Error("Invalid mongoose model");
@@ -249,10 +258,7 @@ function introspectArrayItems(schemaType, options = {}) {
249
258
  const declaredType = schemaType?.options?.type;
250
259
  if (Array.isArray(declaredType) && declaredType.length > 0) {
251
260
  const inner = declaredType[0];
252
- if (inner === mongoose.Schema.Types.Mixed) return {
253
- type: "object",
254
- additionalProperties: true
255
- };
261
+ if (inner === mongoose.Schema.Types.Mixed) return { additionalProperties: true };
256
262
  return jsonTypeFor(inner, options, /* @__PURE__ */ new WeakSet());
257
263
  }
258
264
  return {
@@ -328,6 +334,7 @@ function schemaTypeToJsonSchema(schemaType, builderOptions = {}) {
328
334
  if (ofDef !== void 0 && ofDef !== null) result.additionalProperties = jsonTypeFor(ofDef, {}, /* @__PURE__ */ new WeakSet());
329
335
  else result.additionalProperties = true;
330
336
  } else if (hasInnerSchema(schemaType)) return subSchemaToJsonSchema(schemaType.schema, builderOptions);
337
+ else if (instance === "Mixed") result.additionalProperties = true;
331
338
  else {
332
339
  result.type = "object";
333
340
  result.additionalProperties = true;
@@ -335,6 +342,7 @@ function schemaTypeToJsonSchema(schemaType, builderOptions = {}) {
335
342
  if (options.default === null && typeof result.type === "string") {
336
343
  result.type = [result.type, "null"];
337
344
  result.default = null;
345
+ if (Array.isArray(result.enum) && !result.enum.includes(null)) result.enum = [...result.enum, null];
338
346
  }
339
347
  if (typeof options.description === "string" && options.description.length > 0) result.description = options.description;
340
348
  if (typeof options.title === "string" && options.title.length > 0) result.title = options.title;
@@ -348,10 +356,7 @@ function jsonTypeFor(def, options, seen) {
348
356
  if (Array.isArray(def)) {
349
357
  if (def[0] === mongoose.Schema.Types.Mixed) return {
350
358
  type: "array",
351
- items: {
352
- type: "object",
353
- additionalProperties: true
354
- }
359
+ items: { additionalProperties: true }
355
360
  };
356
361
  return {
357
362
  type: "array",
@@ -368,10 +373,7 @@ function jsonTypeFor(def, options, seen) {
368
373
  const inner = typedDef.type[0] !== void 0 ? typedDef.type[0] : String;
369
374
  if (inner === mongoose.Schema.Types.Mixed) return {
370
375
  type: "array",
371
- items: {
372
- type: "object",
373
- additionalProperties: true
374
- }
376
+ items: { additionalProperties: true }
375
377
  };
376
378
  return {
377
379
  type: "array",
@@ -407,10 +409,7 @@ function jsonTypeFor(def, options, seen) {
407
409
  type: "object",
408
410
  additionalProperties: jsonTypeFor(typedDef.of || String, options, seen)
409
411
  };
410
- if (typedDef.type === mongoose.Schema.Types.Mixed) return {
411
- type: "object",
412
- additionalProperties: true
413
- };
412
+ if (typedDef.type === mongoose.Schema.Types.Mixed) return { additionalProperties: true };
414
413
  if (typedDef.type === Object) {
415
414
  if (isPlainObject(typedDef) && Object.keys(typedDef).some((k) => k !== "type")) {
416
415
  const nested = {};
@@ -514,6 +513,55 @@ function buildJsonSchemaForUpdate(createJson, options) {
514
513
  if (options?.update?.requireAtLeastOne === true) clone.minProperties = 1;
515
514
  return clone;
516
515
  }
516
+ /**
517
+ * Build the response-shape JSON Schema.
518
+ *
519
+ * Walks every schema path INCLUDING server-set fields (`createdAt`,
520
+ * `updatedAt`, `_id`, immutable / readonly fields) because those ARE
521
+ * returned to clients. Only `fieldRules[field].hidden: true` fields are
522
+ * stripped — passwords, secrets, internal scoring.
523
+ *
524
+ * `additionalProperties: true` so virtuals, computed fields, and any
525
+ * non-schema-declared keys flow through. Strict response validation is
526
+ * opt-in via `options.strictAdditionalProperties` (rare; most hosts want
527
+ * lean responses but don't want to break virtuals).
528
+ *
529
+ * No `required` array — response schemas are *documentation* of what
530
+ * MAY be returned. Marking fields required would force every endpoint
531
+ * that occasionally returns sparse data (lookup-by-id with selected
532
+ * fields, partial projections) to fail validation.
533
+ */
534
+ function buildJsonSchemaForResponse(mongooseSchema, options) {
535
+ const fullSchema = buildJsonSchemaFromPaths(mongooseSchema, options);
536
+ const responseSchema = buildJsonSchemaFromPaths(mongooseSchema, {
537
+ ...options,
538
+ fieldRules: stripCreateOnlyFieldRulesForResponse(options.fieldRules),
539
+ create: void 0
540
+ });
541
+ applyFieldRules(responseSchema, collectFieldsToOmit(options, "response"), options);
542
+ responseSchema.required = void 0;
543
+ if (options?.strictAdditionalProperties !== true) responseSchema.additionalProperties = true;
544
+ if (fullSchema.title && !responseSchema.title) responseSchema.title = fullSchema.title;
545
+ return responseSchema;
546
+ }
547
+ /**
548
+ * Strip request-side-only field-rule flags (`systemManaged`, `immutable`,
549
+ * `immutableAfterCreate`, `optional`) from a fieldRules map so the
550
+ * response builder doesn't accidentally hide server-set fields.
551
+ *
552
+ * Keeps `hidden` (response-relevant), `nullable`, `description`,
553
+ * constraint flags (`minLength`/`maxLength`/`min`/`max`/`pattern`/`enum`)
554
+ * — they all describe response shape, not request acceptance.
555
+ */
556
+ function stripCreateOnlyFieldRulesForResponse(rules) {
557
+ if (!rules) return rules;
558
+ const result = {};
559
+ for (const [field, rule] of Object.entries(rules)) {
560
+ const { systemManaged: _sm, immutable: _i, immutableAfterCreate: _iac, optional: _o, ...rest } = rule;
561
+ result[field] = rest;
562
+ }
563
+ return result;
564
+ }
517
565
  function buildJsonSchemaForQuery(_tree, options) {
518
566
  const basePagination = {
519
567
  type: "object",
@@ -1,21 +1,34 @@
1
- import { T as FieldPreset, k as HttpError, s as CacheAdapter, yt as UserContext } from "./types-xOyTec4n.mjs";
1
+ import { E as FieldPreset, gt as UserContext, s as CacheAdapter } from "./types-DXscZnLu.mjs";
2
2
  import mongoose, { Schema } from "mongoose";
3
3
  import { CrudSchemas, SchemaBuilderOptions } from "@classytic/repo-core/schema";
4
+ import { HttpError } from "@classytic/repo-core/errors";
4
5
 
5
6
  //#region src/utils/error.d.ts
7
+ /** Optional structured fields for createError. */
8
+ interface CreateErrorOptions {
9
+ /** Stable machine-readable code (e.g. `SEARCH_NOT_CONFIGURED`). */
10
+ code?: string;
11
+ /** Diagnostic context — model name, configured modes, doc URL, etc. */
12
+ meta?: Record<string, unknown>;
13
+ }
6
14
  /**
7
- * Creates an error with HTTP status code
15
+ * Creates an error with HTTP status code, plus optional stable `code` /
16
+ * `meta` so callers can `catch` on the code instead of regex-matching the
17
+ * message string.
8
18
  *
9
19
  * @param status - HTTP status code
10
20
  * @param message - Error message
21
+ * @param options - Optional `code` / `meta` for structured handling
11
22
  * @returns Error with status property
12
23
  *
13
24
  * @example
14
25
  * throw createError(404, 'Document not found');
15
- * throw createError(400, 'Invalid input');
16
- * throw createError(403, 'Access denied');
26
+ * throw createError(400, 'Invalid input', {
27
+ * code: 'SEARCH_NOT_CONFIGURED',
28
+ * meta: { model: 'Customer', availableModes: ['text', 'regex', 'auto'] },
29
+ * });
17
30
  */
18
- declare function createError(status: number, message: string): HttpError;
31
+ declare function createError(status: number, message: string, options?: CreateErrorOptions): HttpError;
19
32
  /**
20
33
  * Boolean classifier: true when `err` is an authoritative MongoDB duplicate
21
34
  * key error — and ONLY then. Used by arc's outbox / idempotency adapters to
@@ -171,13 +184,36 @@ declare function configureLogger(config: Partial<LoggerConfig> | false): void;
171
184
  declare function createMemoryCache(maxEntries?: number): CacheAdapter;
172
185
  //#endregion
173
186
  //#region src/utils/mongooseToJsonSchema.d.ts
187
+ /**
188
+ * Return shape for the schema builders. Structurally a `CrudSchemas` plus
189
+ * an `[key: string]: unknown` index signature so the function reference
190
+ * plugs directly into HTTP-framework adapter callbacks typed as
191
+ * `OpenApiSchemas | Record<string, unknown>` (e.g. arc's
192
+ * `MongooseAdapterOptions.schemaGenerator`).
193
+ *
194
+ * `CrudSchemas` itself is intentionally a closed 4-field shape in
195
+ * `@classytic/repo-core/schema` — widening at the kit boundary keeps that
196
+ * contract intact while removing the `as unknown as Record<string, unknown>`
197
+ * cast every arc + mongokit host previously needed at the wiring site.
198
+ *
199
+ * The intersection has zero runtime cost: every `CrudSchemas` value
200
+ * already satisfies `Record<string, unknown>` structurally; TypeScript
201
+ * just refuses the assignment without an explicit declaration.
202
+ */
203
+ type CrudSchemasFramework = CrudSchemas & Record<string, unknown>;
174
204
  /**
175
205
  * Build CRUD schemas from Mongoose schema
176
206
  */
177
- declare function buildCrudSchemasFromMongooseSchema(mongooseSchema: Schema, options?: SchemaBuilderOptions): CrudSchemas;
207
+ declare function buildCrudSchemasFromMongooseSchema(mongooseSchema: Schema, options?: SchemaBuilderOptions): CrudSchemasFramework;
178
208
  /**
179
- * Build CRUD schemas from Mongoose model
209
+ * Build CRUD schemas from Mongoose model.
210
+ *
211
+ * Satisfies the canonical `SchemaGenerator<Model<unknown>>` contract from
212
+ * `@classytic/repo-core/schema`, so arc's `MongooseAdapter.schemaGenerator`
213
+ * field accepts this function directly with no glue. Future Mongo-shaped
214
+ * kits implementing the same contract are interchangeable at the adapter
215
+ * boundary.
180
216
  */
181
- declare function buildCrudSchemasFromModel(mongooseModel: mongoose.Model<unknown>, options?: SchemaBuilderOptions): CrudSchemas;
217
+ declare function buildCrudSchemasFromModel(mongooseModel: mongoose.Model<unknown>, options?: SchemaBuilderOptions): CrudSchemasFramework;
182
218
  //#endregion
183
219
  export { createFieldPreset as a, getMongooseProjection as c, parseDuplicateKeyError as d, configureLogger as i, createError as l, buildCrudSchemasFromMongooseSchema as n, filterResponseData as o, createMemoryCache as r, getFieldsForUser as s, buildCrudSchemasFromModel as t, isDuplicateKeyError as u };
@@ -1,5 +1,6 @@
1
- import { H as OffsetPaginationResult, N as KeysetPaginationOptions, P as KeysetPaginationResult, V as OffsetPaginationOptions, W as PaginationConfig, a as AnyDocument, n as AggregatePaginationOptions, r as AggregatePaginationResult } from "../types-xOyTec4n.mjs";
1
+ import { B as OffsetPaginationOptions, H as PaginationConfig, N as KeysetPaginationOptions, i as AnyDocument, n as AggregatePaginationOptions } from "../types-DXscZnLu.mjs";
2
2
  import { Model } from "mongoose";
3
+ import { AggregatePaginationResult, KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
3
4
 
4
5
  //#region src/pagination/PaginationEngine.d.ts
5
6
  /**
@@ -1,2 +1,2 @@
1
- import { t as PaginationEngine } from "../PaginationEngine-B93fLCcO.mjs";
1
+ import { t as PaginationEngine } from "../PaginationEngine-BDaAsyPn.mjs";
2
2
  export { PaginationEngine };
@@ -1,2 +1,2 @@
1
- import { $ as aggregateHelpersPlugin, A as PrefixedIdOptions, B as BatchOperationsMethods, C as methodRegistryPlugin, D as CustomIdOptions, E as elasticSearchPlugin, F as prefixedId, G as AuditQueryOptions, H as batchOperationsPlugin, I as sequentialId, J as AuditTrailOptions, K as AuditQueryResult, L as cascadePlugin, M as customIdPlugin, N as dateSequentialId, O as DateSequentialIdOptions, P as getNextSequence, Q as AggregateHelpersMethods, R as CacheMethods, S as MethodRegistryRepository, T as ElasticSearchOptions, U as AuditEntry, W as AuditOperation, X as auditTrailPlugin, Y as AuditTrailQuery, Z as auditLogPlugin, _ as observabilityPlugin, a as uniqueField, b as MongoOperationsMethods, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as SequentialIdOptions, k as IdGenerator, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, q as AuditTrailMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MultiTenantOptions, w as fieldFilterPlugin, x as mongoOperationsPlugin, y as multiTenantPlugin, z as cachePlugin } from "../validation-chain.plugin-BGdr5KRw.mjs";
1
+ import { $ as aggregateHelpersPlugin, A as PrefixedIdOptions, B as BatchOperationsMethods, C as methodRegistryPlugin, D as CustomIdOptions, E as elasticSearchPlugin, F as prefixedId, G as AuditQueryOptions, H as batchOperationsPlugin, I as sequentialId, J as AuditTrailOptions, K as AuditQueryResult, L as cascadePlugin, M as customIdPlugin, N as dateSequentialId, O as DateSequentialIdOptions, P as getNextSequence, Q as AggregateHelpersMethods, R as CacheMethods, S as MethodRegistryRepository, T as ElasticSearchOptions, U as AuditEntry, W as AuditOperation, X as auditTrailPlugin, Y as AuditTrailQuery, Z as auditLogPlugin, _ as observabilityPlugin, a as uniqueField, b as MongoOperationsMethods, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as SequentialIdOptions, k as IdGenerator, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, q as AuditTrailMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MultiTenantOptions, w as fieldFilterPlugin, x as mongoOperationsPlugin, y as multiTenantPlugin, z as cachePlugin } from "../validation-chain.plugin-CH-xPoKM.mjs";
2
2
  export { type AggregateHelpersMethods, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BatchOperationsMethods, type CacheMethods, type CustomIdOptions, type DateSequentialIdOptions, type ElasticSearchOptions, type IdGenerator, type MethodRegistryRepository, type MongoOperationsMethods, type MultiTenantOptions, type ObservabilityOptions, type OperationMetric, type PrefixedIdOptions, type SequentialIdOptions, type SoftDeleteMethods, type SubdocumentMethods, type TenantContext, type TenantStore, aggregateHelpersPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
@@ -1,2 +1,2 @@
1
- import { A as AuditTrailQuery, C as cachePlugin, M as auditLogPlugin, N as aggregateHelpersPlugin, S as cascadePlugin, _ as customIdPlugin, a as uniqueField, b as prefixedId, c as createTenantContext, d as observabilityPlugin, f as multiTenantPlugin, g as elasticSearchPlugin, h as fieldFilterPlugin, i as requireField, j as auditTrailPlugin, k as batchOperationsPlugin, l as subdocumentPlugin, m as methodRegistryPlugin, n as blockIf, o as validationChainPlugin, p as mongoOperationsPlugin, r as immutableField, s as timestampPlugin, t as autoInject, u as softDeletePlugin, v as dateSequentialId, x as sequentialId, y as getNextSequence } from "../validation-chain.plugin-CLjEFr0c.mjs";
1
+ import { A as AuditTrailQuery, C as cachePlugin, M as auditLogPlugin, N as aggregateHelpersPlugin, S as cascadePlugin, _ as customIdPlugin, a as uniqueField, b as prefixedId, c as createTenantContext, d as observabilityPlugin, f as multiTenantPlugin, g as elasticSearchPlugin, h as fieldFilterPlugin, i as requireField, j as auditTrailPlugin, k as batchOperationsPlugin, l as subdocumentPlugin, m as methodRegistryPlugin, n as blockIf, o as validationChainPlugin, p as mongoOperationsPlugin, r as immutableField, s as timestampPlugin, t as autoInject, u as softDeletePlugin, v as dateSequentialId, x as sequentialId, y as getNextSequence } from "../validation-chain.plugin-BicIgzzt.mjs";
2
2
  export { AuditTrailQuery, aggregateHelpersPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };