@classytic/mongokit 3.23.0 → 3.25.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 +11 -2
- package/dist/{PaginationEngine-BnZ24ehC.d.mts → PaginationEngine-CBS1XGzp.d.mts} +2 -1
- package/dist/{PaginationEngine-BT1ywu9k.mjs → PaginationEngine-CczbvCAq.mjs} +64 -3
- package/dist/{Repository-CLQA3sEz.mjs → Repository-KKR8jxfD.mjs} +74 -45
- package/dist/actions/index.d.mts +1 -1
- package/dist/adapter/index.d.mts +1 -1
- package/dist/adapter/index.mjs +1 -1
- package/dist/{adapter-BWgJ_Jdc.mjs → adapter-CLvUHiTW.mjs} +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/better-auth/index.mjs +2 -2
- package/dist/core-62oo3N1C.d.mts +50 -0
- package/dist/{create-repository-Bx1PpcdF.mjs → create-repository-DA5VJh-3.mjs} +2 -2
- package/dist/{create-repository-Cn1LkvL7.d.mts → create-repository-HjMD9h9_.d.mts} +18 -5
- package/dist/{id-resolution-P2OzcyRl.mjs → id-resolution-BqDrk0S2.mjs} +12 -1
- package/dist/{index-DLQ6pjal.d.mts → index-DceInCTX.d.mts} +3 -1
- package/dist/index.d.mts +53 -213
- package/dist/index.mjs +1072 -923
- package/dist/{mongooseToJsonSchema-CVnrKFDq.mjs → mongooseToJsonSchema-CByt1VhQ.mjs} +1 -1
- package/dist/{multi-tenant.plugin-BjXXuc_g.d.mts → multi-tenant.plugin-DVyVGREb.d.mts} +117 -18
- package/dist/operations-C8IcCHF9.d.mts +463 -0
- package/dist/pagination/PaginationEngine.d.mts +1 -1
- package/dist/pagination/PaginationEngine.mjs +1 -1
- package/dist/pagination-jSUdrACK.d.mts +158 -0
- package/dist/plugin-options-vFufQZMZ.d.mts +125 -0
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/query/primitives/coercion.mjs +1 -1
- package/dist/query/primitives/geo.d.mts +1 -1
- package/dist/repository-DCHRWRXw.d.mts +511 -0
- package/dist/testkit/index.d.mts +1 -1
- package/dist/testkit/index.mjs +1 -1
- package/dist/{timestamp.plugin-BnuuIDqJ.mjs → timestamp.plugin-B8252GuQ.mjs} +192 -46
- package/dist/{to-plain-g8-gsVxZ.d.mts → to-plain-DkF5px0R.d.mts} +12 -16
- package/dist/type-utils-CLzRFtIA.d.mts +163 -0
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +3 -3
- package/dist/{validation-chain.plugin-ZFDHxXLn.mjs → validation-chain.plugin-C3Vwp-Rk.mjs} +1 -1
- package/dist/{validation-chain.plugin-CFJbr964.d.mts → validation-chain.plugin-DxD15h-2.d.mts} +3 -1
- package/package.json +5 -3
- package/dist/types-BtMuhoX5.d.mts +0 -1830
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { a as PopulateSpec, i as ObjectId, l as SortSpec, o as ReadPreferenceType, r as FilterQuery, s as SelectSpec, t as AnyDocument } from "./core-62oo3N1C.mjs";
|
|
2
|
+
import { PipelineStage } from "mongoose";
|
|
3
|
+
//#region src/types/pagination.d.ts
|
|
4
|
+
/** Pagination configuration */
|
|
5
|
+
interface PaginationConfig {
|
|
6
|
+
/** Default number of documents per page (default: 10) */
|
|
7
|
+
defaultLimit?: number;
|
|
8
|
+
/** Maximum allowed limit (default: 100) */
|
|
9
|
+
maxLimit?: number;
|
|
10
|
+
/** Maximum allowed page number (default: 10000) */
|
|
11
|
+
maxPage?: number;
|
|
12
|
+
/** Page number that triggers performance warning (default: 100) */
|
|
13
|
+
deepPageThreshold?: number;
|
|
14
|
+
/** Cursor version for forward compatibility (default: 1) */
|
|
15
|
+
cursorVersion?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Minimum cursor version accepted. Bump alongside `cursorVersion` when a
|
|
18
|
+
* breaking format change ships so stale client cursors are rejected with a
|
|
19
|
+
* clear error instead of silently paginating from the wrong position.
|
|
20
|
+
* Default: 1 (accept any cursor <= cursorVersion).
|
|
21
|
+
*/
|
|
22
|
+
minCursorVersion?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Allowlist of primary sort fields for keyset pagination. When set, any
|
|
25
|
+
* `getAll({ sort })` whose primary (non-_id) field is not in this list
|
|
26
|
+
* throws at validation time.
|
|
27
|
+
*
|
|
28
|
+
* Use this to lock down keyset pagination to fields that are structurally
|
|
29
|
+
* guaranteed non-null in your schema — keyset sort across null/non-null
|
|
30
|
+
* boundaries is lossy (MongoDB's `$lt/$gt` semantics leave a gap at the
|
|
31
|
+
* type boundary, so not every doc is reachable).
|
|
32
|
+
*
|
|
33
|
+
* `_id` is always allowed regardless of this list.
|
|
34
|
+
* Undefined (default) = no allowlist, any sort field accepted.
|
|
35
|
+
*/
|
|
36
|
+
strictKeysetSortFields?: string[];
|
|
37
|
+
/** Use estimatedDocumentCount for faster counts on large collections */
|
|
38
|
+
useEstimatedCount?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** MongoDB collation options for locale-aware string comparison */
|
|
41
|
+
interface CollationOptions {
|
|
42
|
+
locale: string;
|
|
43
|
+
caseLevel?: boolean;
|
|
44
|
+
caseFirst?: 'upper' | 'lower' | 'off';
|
|
45
|
+
strength?: 1 | 2 | 3 | 4 | 5;
|
|
46
|
+
numericOrdering?: boolean;
|
|
47
|
+
alternate?: 'non-ignorable' | 'shifted';
|
|
48
|
+
maxVariable?: 'punct' | 'space';
|
|
49
|
+
backwards?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** Base pagination options */
|
|
52
|
+
interface BasePaginationOptions {
|
|
53
|
+
/** Pagination mode (explicit override) */
|
|
54
|
+
mode?: 'offset' | 'keyset';
|
|
55
|
+
/** MongoDB query filters */
|
|
56
|
+
filters?: FilterQuery<AnyDocument>;
|
|
57
|
+
/** Sort specification */
|
|
58
|
+
sort?: SortSpec;
|
|
59
|
+
/** Number of documents per page */
|
|
60
|
+
limit?: number;
|
|
61
|
+
/** Fields to select */
|
|
62
|
+
select?: SelectSpec;
|
|
63
|
+
/** Fields to populate */
|
|
64
|
+
populate?: PopulateSpec;
|
|
65
|
+
/** Return plain JavaScript objects */
|
|
66
|
+
lean?: boolean;
|
|
67
|
+
/** MongoDB session for transactions */
|
|
68
|
+
session?: unknown;
|
|
69
|
+
/** Query hint (index name or document) */
|
|
70
|
+
hint?: string | Record<string, 1 | -1>;
|
|
71
|
+
/** Maximum execution time in milliseconds */
|
|
72
|
+
maxTimeMS?: number;
|
|
73
|
+
/** Read preference for replica sets (e.g. 'secondaryPreferred') */
|
|
74
|
+
readPreference?: ReadPreferenceType;
|
|
75
|
+
/** Collation for locale-aware string comparison and case-insensitive sorting */
|
|
76
|
+
collation?: CollationOptions;
|
|
77
|
+
}
|
|
78
|
+
/** Offset pagination options */
|
|
79
|
+
interface OffsetPaginationOptions extends BasePaginationOptions {
|
|
80
|
+
/** Page number (1-indexed) */
|
|
81
|
+
page?: number;
|
|
82
|
+
/** Count strategy for filtered queries (default: 'exact') */
|
|
83
|
+
countStrategy?: 'exact' | 'estimated' | 'none';
|
|
84
|
+
/**
|
|
85
|
+
* Optional alternate filter used for the count query only. The primary
|
|
86
|
+
* `filters` is still used for `.find()`. Lets callers (Repository) run a
|
|
87
|
+
* sort-only query like `$near` for results while counting with a
|
|
88
|
+
* count-compatible rewrite (e.g. `$geoWithin: $centerSphere`) that
|
|
89
|
+
* returns the same document set but works with `countDocuments`.
|
|
90
|
+
*/
|
|
91
|
+
countFilters?: FilterQuery<AnyDocument>;
|
|
92
|
+
}
|
|
93
|
+
/** Keyset (cursor) pagination options */
|
|
94
|
+
interface KeysetPaginationOptions extends BasePaginationOptions {
|
|
95
|
+
/** Cursor token for next page */
|
|
96
|
+
after?: string;
|
|
97
|
+
/** Sort is required for keyset pagination */
|
|
98
|
+
sort: SortSpec;
|
|
99
|
+
}
|
|
100
|
+
/** Aggregate pagination options */
|
|
101
|
+
interface AggregatePaginationOptions {
|
|
102
|
+
/** Aggregation pipeline stages */
|
|
103
|
+
pipeline?: PipelineStage[];
|
|
104
|
+
/** Page number (1-indexed) */
|
|
105
|
+
page?: number;
|
|
106
|
+
/** Number of documents per page */
|
|
107
|
+
limit?: number;
|
|
108
|
+
/** MongoDB session for transactions */
|
|
109
|
+
session?: unknown;
|
|
110
|
+
/** Query hint (index name or document) for aggregation */
|
|
111
|
+
hint?: string | Record<string, 1 | -1>;
|
|
112
|
+
/** Maximum execution time in milliseconds */
|
|
113
|
+
maxTimeMS?: number;
|
|
114
|
+
/** Count strategy (default: 'exact' via $facet).
|
|
115
|
+
* 'estimated' is accepted but treated as 'exact' in aggregation context
|
|
116
|
+
* since estimatedDocumentCount is not available inside pipelines. */
|
|
117
|
+
countStrategy?: 'exact' | 'estimated' | 'none';
|
|
118
|
+
/** Pagination mode (reserved for API consistency) */
|
|
119
|
+
mode?: 'offset';
|
|
120
|
+
/** Read preference for replica sets (e.g. 'secondaryPreferred') */
|
|
121
|
+
readPreference?: ReadPreferenceType;
|
|
122
|
+
}
|
|
123
|
+
/** Value type identifier for cursor serialization */
|
|
124
|
+
type ValueType = 'date' | 'objectid' | 'boolean' | 'number' | 'string' | 'null' | 'unknown';
|
|
125
|
+
/** Cursor payload */
|
|
126
|
+
interface CursorPayload {
|
|
127
|
+
/** Primary sort field value (legacy single-field) */
|
|
128
|
+
v: string | number | boolean | null;
|
|
129
|
+
/** Value type identifier (legacy single-field) */
|
|
130
|
+
t: ValueType;
|
|
131
|
+
/** Document ID */
|
|
132
|
+
id: string;
|
|
133
|
+
/** ID type identifier */
|
|
134
|
+
idType: ValueType;
|
|
135
|
+
/** Sort specification */
|
|
136
|
+
sort: SortSpec;
|
|
137
|
+
/** Cursor version */
|
|
138
|
+
ver: number;
|
|
139
|
+
/** Compound sort field values (multi-field keyset) */
|
|
140
|
+
vals?: Record<string, string | number | boolean | null>;
|
|
141
|
+
/** Compound sort value types */
|
|
142
|
+
types?: Record<string, ValueType>;
|
|
143
|
+
}
|
|
144
|
+
/** Decoded cursor */
|
|
145
|
+
interface DecodedCursor {
|
|
146
|
+
/** Primary sort field value (rehydrated) — legacy compat */
|
|
147
|
+
value: unknown;
|
|
148
|
+
/** Document ID (rehydrated) */
|
|
149
|
+
id: ObjectId | string;
|
|
150
|
+
/** Sort specification */
|
|
151
|
+
sort: SortSpec;
|
|
152
|
+
/** Cursor version */
|
|
153
|
+
version: number;
|
|
154
|
+
/** All sort field values (rehydrated) — for compound sort */
|
|
155
|
+
values?: Record<string, unknown>;
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
export { DecodedCursor as a, PaginationConfig as c, CursorPayload as i, ValueType as l, BasePaginationOptions as n, KeysetPaginationOptions as o, CollationOptions as r, OffsetPaginationOptions as s, AggregatePaginationOptions as t };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { a as PopulateSpec, i as ObjectId, l as SortSpec, s as SelectSpec } from "./core-62oo3N1C.mjs";
|
|
2
|
+
import { h as RepositoryInstance, p as RepositoryContext } from "./repository-DCHRWRXw.mjs";
|
|
3
|
+
import { OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
4
|
+
//#region src/types/plugin-options.d.ts
|
|
5
|
+
/** Field preset configuration (field-filter plugin) */
|
|
6
|
+
interface FieldPreset {
|
|
7
|
+
/** Fields visible to everyone */
|
|
8
|
+
public: string[];
|
|
9
|
+
/** Additional fields for authenticated users */
|
|
10
|
+
authenticated?: string[];
|
|
11
|
+
/** Additional fields for admins */
|
|
12
|
+
admin?: string[];
|
|
13
|
+
}
|
|
14
|
+
/** Validator definition (validation-chain plugin) */
|
|
15
|
+
interface ValidatorDefinition {
|
|
16
|
+
/** Validator name */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Operations to apply validator to */
|
|
19
|
+
operations?: Array<'create' | 'createMany' | 'update' | 'findOneAndUpdate' | 'delete'>;
|
|
20
|
+
/** Validation function */
|
|
21
|
+
validate: (context: RepositoryContext, repo?: RepositoryInstance) => void | Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/** Validation chain options */
|
|
24
|
+
interface ValidationChainOptions {
|
|
25
|
+
/** Stop on first validation error (default: true) */
|
|
26
|
+
stopOnFirstError?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Logger interface for audit plugin */
|
|
29
|
+
interface Logger {
|
|
30
|
+
info?(message: string, meta?: Record<string, unknown>): void;
|
|
31
|
+
error?(message: string, meta?: Record<string, unknown>): void;
|
|
32
|
+
warn?(message: string, meta?: Record<string, unknown>): void;
|
|
33
|
+
debug?(message: string, meta?: Record<string, unknown>): void;
|
|
34
|
+
}
|
|
35
|
+
/** Filter mode for soft delete queries */
|
|
36
|
+
type SoftDeleteFilterMode = 'null' | 'exists';
|
|
37
|
+
/** Soft delete plugin options */
|
|
38
|
+
interface SoftDeleteOptions {
|
|
39
|
+
/** Field name for deletion timestamp (default: 'deletedAt') */
|
|
40
|
+
deletedField?: string;
|
|
41
|
+
/** Field name for deleting user (default: 'deletedBy') */
|
|
42
|
+
deletedByField?: string;
|
|
43
|
+
/** Enable soft delete (default: true) */
|
|
44
|
+
soft?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Filter mode for excluding deleted documents (default: 'null')
|
|
47
|
+
* - 'null': Filters where deletedField is null (works with `default: null` in schema)
|
|
48
|
+
* - 'exists': Filters where deletedField does not exist (legacy behavior)
|
|
49
|
+
*/
|
|
50
|
+
filterMode?: SoftDeleteFilterMode;
|
|
51
|
+
/** Add restore method to repository (default: true) */
|
|
52
|
+
addRestoreMethod?: boolean;
|
|
53
|
+
/** Add getDeleted method to repository (default: true) */
|
|
54
|
+
addGetDeletedMethod?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* TTL in days for auto-cleanup of deleted documents.
|
|
57
|
+
* When set, creates a TTL index on the deletedField.
|
|
58
|
+
* Documents will be automatically removed after the specified days.
|
|
59
|
+
*/
|
|
60
|
+
ttlDays?: number;
|
|
61
|
+
}
|
|
62
|
+
/** Repository with soft delete methods */
|
|
63
|
+
interface SoftDeleteRepository<TDoc = unknown> {
|
|
64
|
+
/**
|
|
65
|
+
* Restore a soft-deleted document by setting deletedAt to null
|
|
66
|
+
* @param id - Document ID to restore
|
|
67
|
+
* @param options - Optional session for transactions
|
|
68
|
+
* @returns The restored document
|
|
69
|
+
*/
|
|
70
|
+
restore(id: string | ObjectId, options?: {
|
|
71
|
+
session?: unknown;
|
|
72
|
+
}): Promise<TDoc>;
|
|
73
|
+
/**
|
|
74
|
+
* Get all soft-deleted documents
|
|
75
|
+
* @param params - Query parameters (filters, pagination, etc.)
|
|
76
|
+
* @param options - Query options (select, populate, etc.)
|
|
77
|
+
* @returns Paginated result of deleted documents
|
|
78
|
+
*/
|
|
79
|
+
getDeleted(params?: {
|
|
80
|
+
filters?: Record<string, unknown>;
|
|
81
|
+
sort?: SortSpec | string;
|
|
82
|
+
page?: number;
|
|
83
|
+
limit?: number;
|
|
84
|
+
}, options?: {
|
|
85
|
+
select?: SelectSpec;
|
|
86
|
+
populate?: PopulateSpec;
|
|
87
|
+
lean?: boolean;
|
|
88
|
+
session?: unknown;
|
|
89
|
+
}): Promise<OffsetPaginationResult<TDoc>>;
|
|
90
|
+
}
|
|
91
|
+
/** Cascade relation definition */
|
|
92
|
+
interface CascadeRelation {
|
|
93
|
+
/**
|
|
94
|
+
* Preferred: a Repository instance for the target collection. When present,
|
|
95
|
+
* cascade routes deletes through `repo.delete` / `repo.deleteMany`, so the
|
|
96
|
+
* target's `before:delete` / `before:deleteMany` hooks fire — meaning
|
|
97
|
+
* multi-tenant scoping, audit logging, cache invalidation, and the target's
|
|
98
|
+
* own soft-delete plugin (with its configured `deletedField`) all run
|
|
99
|
+
* correctly. Strongly recommended for any target that has policy plugins.
|
|
100
|
+
*/
|
|
101
|
+
repo?: RepositoryInstance;
|
|
102
|
+
/**
|
|
103
|
+
* Legacy: a Mongoose model name. When set without `repo`, cascade writes
|
|
104
|
+
* directly via `RelatedModel.updateMany` / `RelatedModel.deleteMany`. This
|
|
105
|
+
* path bypasses the target's hooks — it will NOT enforce tenant scoping,
|
|
106
|
+
* fire audit events, or honor a custom `deletedField`. Only safe for
|
|
107
|
+
* trivial targets with no policy plugins. Prefer `repo` for new code.
|
|
108
|
+
*/
|
|
109
|
+
model?: string;
|
|
110
|
+
/** Foreign key field in the related model that references the deleted document */
|
|
111
|
+
foreignKey: string;
|
|
112
|
+
/** Whether to use soft delete if available (default: follows parent behavior) */
|
|
113
|
+
softDelete?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/** Cascade delete plugin options */
|
|
116
|
+
interface CascadeOptions {
|
|
117
|
+
/** Relations to cascade delete */
|
|
118
|
+
relations: CascadeRelation[];
|
|
119
|
+
/** Run cascade deletes in parallel (default: true) */
|
|
120
|
+
parallel?: boolean;
|
|
121
|
+
/** Logger for cascade operations */
|
|
122
|
+
logger?: Logger;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { SoftDeleteFilterMode as a, ValidationChainOptions as c, Logger as i, ValidatorDefinition as l, CascadeRelation as n, SoftDeleteOptions as o, FieldPreset as r, SoftDeleteRepository as s, CascadeOptions as t };
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as AuditTrailMethods, E as
|
|
3
|
-
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, b as MethodRegistryRepository, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "../validation-chain.plugin-
|
|
1
|
+
import { S as RepositoryPluginName, b as MONGOKIT_PLUGIN_NAMES, l as Plugin, x as MongoKitPluginName } from "../repository-DCHRWRXw.mjs";
|
|
2
|
+
import { A as ensureAuditTrailReady, C as AuditTrailMethods, D as AuditTrailQueryOptions, E as AuditTrailQuery, O as EnsureAuditTrailReadyOptions, S as AuditQueryResult, T as AuditTrailOptions, _ as RepositoryCachePluginOptions, a as DateSequentialIdOptions, b as AuditOperation, c as SequentialIdOptions, d as getNextSequence, f as prefixedId, g as RepositoryCacheHandle, h as CacheOptions, i as CustomIdOptions, k as auditTrailPlugin, l as customIdPlugin, m as CacheAdapter, o as IdGenerator, p as sequentialId, r as multiTenantPlugin, s as PrefixedIdOptions, t as MultiTenantOptions, u as dateSequentialId, v as cachePlugin, w as AuditTrailMode, x as AuditQueryOptions, y as AuditEntry } from "../multi-tenant.plugin-DVyVGREb.mjs";
|
|
3
|
+
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, b as MethodRegistryRepository, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "../validation-chain.plugin-DxD15h-2.mjs";
|
|
4
4
|
import { ChangeLogStore } from "@classytic/repo-core/sync";
|
|
5
5
|
//#region src/plugins/change-log.plugin.d.ts
|
|
6
6
|
interface ChangeLogPluginOptions {
|
|
@@ -15,4 +15,4 @@ interface ChangeLogPluginOptions {
|
|
|
15
15
|
}
|
|
16
16
|
declare function changeLogPlugin(options: ChangeLogPluginOptions): Plugin;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { type AggregateHelpersMethods, type AppendOnlyPluginOptions, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BatchOperationsMethods, type CacheAdapter, type CacheOptions, type ChangeLogPluginOptions, type CustomIdOptions, type DateSequentialIdOptions, type ElasticSearchOptions, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type LeaseMethods, type LeasePluginOptions, MONGOKIT_PLUGIN_NAMES, type MethodRegistryRepository, type MongoKitPluginName, type MongoOperationsMethods, type MultiTenantOptions, type ObservabilityOptions, type OperationMetric, type PrefixedIdOptions, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type RepositoryPluginName, type SequentialIdOptions, type SoftDeleteMethods, type SubdocumentMethods, type TenantContext, type TenantStore, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
|
18
|
+
export { type AggregateHelpersMethods, type AppendOnlyPluginOptions, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailMode, type AuditTrailOptions, AuditTrailQuery, type AuditTrailQueryOptions, type BatchOperationsMethods, type CacheAdapter, type CacheOptions, type ChangeLogPluginOptions, type CustomIdOptions, type DateSequentialIdOptions, type ElasticSearchOptions, type EnsureAuditTrailReadyOptions, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type LeaseMethods, type LeasePluginOptions, MONGOKIT_PLUGIN_NAMES, type MethodRegistryRepository, type MongoKitPluginName, type MongoOperationsMethods, type MultiTenantOptions, type ObservabilityOptions, type OperationMetric, type PrefixedIdOptions, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type RepositoryPluginName, type SequentialIdOptions, type SoftDeleteMethods, type SubdocumentMethods, type TenantContext, type TenantStore, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, ensureAuditTrailReady, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin,
|
|
2
|
-
import { _ as appendOnlyPlugin, a as uniqueField, c as subdocumentPlugin, d as mongoOperationsPlugin, f as leasePlugin, g as cascadePlugin, h as elasticSearchPlugin, i as requireField, l as observabilityPlugin, m as fieldFilterPlugin, n as blockIf, o as validationChainPlugin, p as immutableStatesPlugin, r as immutableField, s as createTenantContext, t as autoInject, u as MONGOKIT_PLUGIN_NAMES, v as aggregateHelpersPlugin } from "../validation-chain.plugin-
|
|
1
|
+
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin, g as auditLogPlugin, h as ensureAuditTrailReady, i as multiTenantPlugin, l as prefixedId, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, p as AuditTrailQuery, s as dateSequentialId, t as timestampPlugin, u as sequentialId } from "../timestamp.plugin-B8252GuQ.mjs";
|
|
2
|
+
import { _ as appendOnlyPlugin, a as uniqueField, c as subdocumentPlugin, d as mongoOperationsPlugin, f as leasePlugin, g as cascadePlugin, h as elasticSearchPlugin, i as requireField, l as observabilityPlugin, m as fieldFilterPlugin, n as blockIf, o as validationChainPlugin, p as immutableStatesPlugin, r as immutableField, s as createTenantContext, t as autoInject, u as MONGOKIT_PLUGIN_NAMES, v as aggregateHelpersPlugin } from "../validation-chain.plugin-C3Vwp-Rk.mjs";
|
|
3
3
|
//#region src/plugins/change-log.plugin.ts
|
|
4
4
|
const PLUGIN_NAME = "changeLog";
|
|
5
5
|
function isSkipped(context) {
|
|
@@ -70,4 +70,4 @@ function changeLogPlugin(options) {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
|
-
export { AuditTrailQuery, MONGOKIT_PLUGIN_NAMES, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
|
73
|
+
export { AuditTrailQuery, MONGOKIT_PLUGIN_NAMES, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, ensureAuditTrailReady, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* `[nearSphere]`, or `[geoWithin]` operator on a field.
|
|
15
15
|
*/
|
|
16
16
|
/** Geo operators recognized by the parser */
|
|
17
|
-
declare const GEO_OPERATORS: readonly [
|
|
17
|
+
declare const GEO_OPERATORS: readonly ["near", "nearSphere", "geoWithin", "withinRadius"];
|
|
18
18
|
type GeoOperator = (typeof GEO_OPERATORS)[number];
|
|
19
19
|
/**
|
|
20
20
|
* True iff `operator` is one of the geo operators we handle.
|