@classytic/mongokit 3.10.0 → 3.10.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.
- package/dist/actions/index.d.mts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/{index-C7WmYP6F.d.mts → index-miN5rFQm.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/{mongooseToJsonSchema-t-MoVleF.d.mts → mongooseToJsonSchema-DlTx-Or2.d.mts} +1 -1
- package/dist/pagination/PaginationEngine.d.mts +1 -1
- package/dist/plugins/index.d.mts +1 -1
- package/dist/{types-BUS0Zj8y.d.mts → types-Bbr54g--.d.mts} +18 -7
- package/dist/utils/index.d.mts +2 -2
- package/dist/{validation-chain.plugin-JkipjuOR.d.mts → validation-chain.plugin-DAvlX93q.d.mts} +1 -1
- package/package.json +1 -1
package/dist/actions/index.d.mts
CHANGED
|
@@ -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-
|
|
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-miN5rFQm.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 };
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as LookupOptions, E as GroupResult, H as OperationOptions, L as MinMaxResult, Q as ReadPreferenceType, T as FindOneAndUpdateOptions, Y as PopulateSpec, a as AnyDocument, at as SelectSpec, dt as SortSpec, g as CreateOptions, gt as UpdateWithValidationResult, ht as UpdateOptions, mt as UpdateManyResult, y as DeleteResult, z as ObjectId } from "./types-
|
|
1
|
+
import { Dt as LookupOptions, E as GroupResult, H as OperationOptions, L as MinMaxResult, Q as ReadPreferenceType, T as FindOneAndUpdateOptions, Y as PopulateSpec, a as AnyDocument, at as SelectSpec, dt as SortSpec, g as CreateOptions, gt as UpdateWithValidationResult, ht as UpdateOptions, mt as UpdateManyResult, y as DeleteResult, z as ObjectId } from "./types-Bbr54g--.mjs";
|
|
2
2
|
import { ClientSession, Model, PipelineStage } from "mongoose";
|
|
3
3
|
|
|
4
4
|
//#region src/actions/aggregate.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as RepositoryContext, A as InferRawDoc, B as OffsetPaginationOptions, C as EventPhase, Ct as IControllerResponse, D as HookMode, Dt as LookupOptions, E as GroupResult, Et as LookupBuilder, F as LookupPopulateOptions, G as PartialBy, H as OperationOptions, I as LookupPopulateResult, J as PluginType, K as Plugin, L as MinMaxResult, M as KeysetPaginationOptions, N as KeysetPaginationResult, O as HttpError, P as Logger, Q as ReadPreferenceType, R as NonNullableFields, S as EventPayload, St as IController, T as FindOneAndUpdateOptions, Tt as IResponseFormatter, U as PaginationConfig, V as OffsetPaginationResult, W as PaginationResult, X as PrioritizedHook, Y as PopulateSpec, Z as ReadOptions, _ as DecodedCursor, _t as UserContext, a as AnyDocument, at as SelectSpec, b as DocField, bt as WithPlugins, c as CacheOperationOptions, ct as SoftDeleteOptions, d as CacheableOptions, dt as SortSpec, et as RepositoryEvent, f as CascadeOptions, ft as Strict, g as CreateOptions, gt as UpdateWithValidationResult, h as CreateInput, ht as UpdateOptions, i as AllPluginMethods, it as RequiredBy, j as KeysOfType, k as InferDocument, l as CacheOptions, lt as SoftDeleteRepository, m as CollationOptions, mt as UpdateManyResult, n as AggregatePaginationOptions, nt as RepositoryOperation, o as AnyModel, ot as SessionOptions, p as CascadeRelation, pt as UpdateInput, q as PluginFunction, r as AggregatePaginationResult, rt as RepositoryOptions, s as CacheAdapter, st as SoftDeleteFilterMode, t as AggregateOptions, tt as RepositoryInstance, u as CacheStats, ut as SortDirection, v as DeepPartial, vt as ValidationChainOptions, w as FieldPreset, wt as IRequestContext, x as EventHandlers, xt as WithTransactionOptions, y as DeleteResult, yt as ValidatorDefinition, z as ObjectId } from "./types-
|
|
2
|
-
import { t as index_d_exports } from "./index-
|
|
1
|
+
import { $ as RepositoryContext, A as InferRawDoc, B as OffsetPaginationOptions, C as EventPhase, Ct as IControllerResponse, D as HookMode, Dt as LookupOptions, E as GroupResult, Et as LookupBuilder, F as LookupPopulateOptions, G as PartialBy, H as OperationOptions, I as LookupPopulateResult, J as PluginType, K as Plugin, L as MinMaxResult, M as KeysetPaginationOptions, N as KeysetPaginationResult, O as HttpError, P as Logger, Q as ReadPreferenceType, R as NonNullableFields, S as EventPayload, St as IController, T as FindOneAndUpdateOptions, Tt as IResponseFormatter, U as PaginationConfig, V as OffsetPaginationResult, W as PaginationResult, X as PrioritizedHook, Y as PopulateSpec, Z as ReadOptions, _ as DecodedCursor, _t as UserContext, a as AnyDocument, at as SelectSpec, b as DocField, bt as WithPlugins, c as CacheOperationOptions, ct as SoftDeleteOptions, d as CacheableOptions, dt as SortSpec, et as RepositoryEvent, f as CascadeOptions, ft as Strict, g as CreateOptions, gt as UpdateWithValidationResult, h as CreateInput, ht as UpdateOptions, i as AllPluginMethods, it as RequiredBy, j as KeysOfType, k as InferDocument, l as CacheOptions, lt as SoftDeleteRepository, m as CollationOptions, mt as UpdateManyResult, n as AggregatePaginationOptions, nt as RepositoryOperation, o as AnyModel, ot as SessionOptions, p as CascadeRelation, pt as UpdateInput, q as PluginFunction, r as AggregatePaginationResult, rt as RepositoryOptions, s as CacheAdapter, st as SoftDeleteFilterMode, t as AggregateOptions, tt as RepositoryInstance, u as CacheStats, ut as SortDirection, v as DeepPartial, vt as ValidationChainOptions, w as FieldPreset, wt as IRequestContext, x as EventHandlers, xt as WithTransactionOptions, y as DeleteResult, yt as ValidatorDefinition, z as ObjectId } from "./types-Bbr54g--.mjs";
|
|
2
|
+
import { t as index_d_exports } from "./index-miN5rFQm.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-
|
|
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-DAvlX93q.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-
|
|
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-DlTx-Or2.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";
|
|
@@ -1193,7 +1193,7 @@ declare class Repository<TDoc = unknown> extends RepositoryBase {
|
|
|
1193
1193
|
* });
|
|
1194
1194
|
* ```
|
|
1195
1195
|
*/
|
|
1196
|
-
lookupPopulate(options: LookupPopulateOptions): Promise<LookupPopulateResult<TDoc>>;
|
|
1196
|
+
lookupPopulate<TExtra extends Record<string, unknown> = Record<string, unknown>>(options: LookupPopulateOptions<TDoc>): Promise<LookupPopulateResult<TDoc, TExtra>>;
|
|
1197
1197
|
/**
|
|
1198
1198
|
* Create an aggregation builder for this model
|
|
1199
1199
|
* Useful for building complex custom aggregations
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as HttpError, _t as UserContext, s as CacheAdapter, w as FieldPreset } from "./types-
|
|
1
|
+
import { O as HttpError, _t as UserContext, s as CacheAdapter, w as FieldPreset } from "./types-Bbr54g--.mjs";
|
|
2
2
|
import mongoose, { Schema } from "mongoose";
|
|
3
3
|
import { CrudSchemas, SchemaBuilderOptions } from "@classytic/repo-core/schema";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as OffsetPaginationOptions, M as KeysetPaginationOptions, N as KeysetPaginationResult, U as PaginationConfig, V as OffsetPaginationResult, a as AnyDocument, n as AggregatePaginationOptions, r as AggregatePaginationResult } from "../types-
|
|
1
|
+
import { B as OffsetPaginationOptions, M as KeysetPaginationOptions, N as KeysetPaginationResult, U as PaginationConfig, V as OffsetPaginationResult, a as AnyDocument, n as AggregatePaginationOptions, r as AggregatePaginationResult } from "../types-Bbr54g--.mjs";
|
|
2
2
|
import { Model } from "mongoose";
|
|
3
3
|
|
|
4
4
|
//#region src/pagination/PaginationEngine.d.ts
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -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-
|
|
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-DAvlX93q.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,5 +1,6 @@
|
|
|
1
1
|
import * as _$mongoose from "mongoose";
|
|
2
2
|
import { ClientSession, Document, Model, PipelineStage, PopulateOptions, Types } from "mongoose";
|
|
3
|
+
import * as _$_classytic_repo_core_filter0 from "@classytic/repo-core/filter";
|
|
3
4
|
import * as _$_classytic_repo_core_repository0 from "@classytic/repo-core/repository";
|
|
4
5
|
import { DeleteResult, LookupPopulateResult, UpdateManyResult } from "@classytic/repo-core/repository";
|
|
5
6
|
import { ValidationResult } from "@classytic/repo-core/schema";
|
|
@@ -870,8 +871,12 @@ interface AggregateOptions extends ReadOptions {
|
|
|
870
871
|
/** Lookup populate options */
|
|
871
872
|
/**
|
|
872
873
|
* Mongokit's `lookupPopulate` options — kit-native superset of the
|
|
873
|
-
* portable `LookupPopulateOptions
|
|
874
|
+
* portable `LookupPopulateOptions<TBase>` from repo-core. Widens three
|
|
875
|
+
* slots so arc / mongoose consumers compose cleanly:
|
|
874
876
|
*
|
|
877
|
+
* - `filters`: accepts Filter IR, a `Partial<TBase> & Record<string,
|
|
878
|
+
* unknown>` literal (same shape repo-core's contract uses), or a
|
|
879
|
+
* plain `Record<string, unknown>` for legacy callers.
|
|
875
880
|
* - `lookups`: accepts either the portable `LookupSpec[]` (works on
|
|
876
881
|
* every kit) or mongokit's `LookupOptions[]` (adds `pipeline` /
|
|
877
882
|
* `let` / `sanitize` for mongo-correlated joins).
|
|
@@ -879,13 +884,19 @@ interface AggregateOptions extends ReadOptions {
|
|
|
879
884
|
* (`'name email'`) in addition to the portable array / inclusion
|
|
880
885
|
* map. Kept for arc + existing controller convenience.
|
|
881
886
|
*
|
|
882
|
-
*
|
|
883
|
-
* `
|
|
884
|
-
* —
|
|
887
|
+
* `TBase` defaults to `unknown` so legacy non-generic usage still
|
|
888
|
+
* compiles; pass the doc type for arc `RepositoryLike<TDoc>` structural
|
|
889
|
+
* assignment — `LookupPopulateOptions<TDoc>` is bit-compatible with
|
|
890
|
+
* `import('@classytic/repo-core/repository').LookupPopulateOptions<TDoc>`.
|
|
885
891
|
*/
|
|
886
|
-
interface LookupPopulateOptions extends ReadOptions {
|
|
887
|
-
/**
|
|
888
|
-
|
|
892
|
+
interface LookupPopulateOptions<TBase = unknown> extends ReadOptions {
|
|
893
|
+
/**
|
|
894
|
+
* Base-table filter. Accepts Filter IR from repo-core, a typed
|
|
895
|
+
* `Partial<TBase> & Record<string, unknown>` literal (what arc
|
|
896
|
+
* controllers produce when typed against `StandardRepo<TDoc>`), or
|
|
897
|
+
* a plain `Record<string, unknown>` for ad-hoc callers.
|
|
898
|
+
*/
|
|
899
|
+
filters?: _$_classytic_repo_core_filter0.Filter | (Partial<TBase> & Record<string, unknown>) | Record<string, unknown>;
|
|
889
900
|
/**
|
|
890
901
|
* Portable `LookupSpec[]` (cross-kit) or mongokit-native
|
|
891
902
|
* `LookupOptions[]` (with `pipeline` / `let` / `sanitize`). The
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Y as PopulateSpec, at as SelectSpec, dt as SortSpec } from "../types-
|
|
2
|
-
import { a as createFieldPreset, c as getMongooseProjection, i as configureLogger, l as createError, n as buildCrudSchemasFromMongooseSchema, o as filterResponseData, r as createMemoryCache, s as getFieldsForUser, t as buildCrudSchemasFromModel } from "../mongooseToJsonSchema-
|
|
1
|
+
import { Y as PopulateSpec, at as SelectSpec, dt as SortSpec } from "../types-Bbr54g--.mjs";
|
|
2
|
+
import { a as createFieldPreset, c as getMongooseProjection, i as configureLogger, l as createError, n as buildCrudSchemasFromMongooseSchema, o as filterResponseData, r as createMemoryCache, s as getFieldsForUser, t as buildCrudSchemasFromModel } from "../mongooseToJsonSchema-DlTx-Or2.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/cache-keys.d.ts
|
|
5
5
|
/**
|
package/dist/{validation-chain.plugin-JkipjuOR.d.mts → validation-chain.plugin-DAvlX93q.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RepositoryContext, K as Plugin, P as Logger, V as OffsetPaginationResult, Y as PopulateSpec, at as SelectSpec, ct as SoftDeleteOptions, dt as SortSpec, f as CascadeOptions, l as CacheOptions, tt as RepositoryInstance, u as CacheStats, vt as ValidationChainOptions, w as FieldPreset, yt as ValidatorDefinition, z as ObjectId } from "./types-
|
|
1
|
+
import { $ as RepositoryContext, K as Plugin, P as Logger, V as OffsetPaginationResult, Y as PopulateSpec, at as SelectSpec, ct as SoftDeleteOptions, dt as SortSpec, f as CascadeOptions, l as CacheOptions, tt as RepositoryInstance, u as CacheStats, vt as ValidationChainOptions, w as FieldPreset, yt as ValidatorDefinition, z as ObjectId } from "./types-Bbr54g--.mjs";
|
|
2
2
|
import mongoose, { ClientSession } from "mongoose";
|
|
3
3
|
import { BulkWriteResult } from "@classytic/repo-core/repository";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
package/package.json
CHANGED