monsqlize 2.0.2 → 2.0.4

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.
@@ -34,6 +34,8 @@ export interface TotalsInfo {
34
34
  token?: string;
35
35
  /** Write timestamp (ms) if from cache */
36
36
  ts?: number;
37
+ /** True when an approximate totals strategy was used */
38
+ approx?: boolean;
37
39
  /** Error identifier for async mode failures */
38
40
  error?: string;
39
41
  }
@@ -98,9 +100,9 @@ export interface OffsetJumpOptions {
98
100
  export interface TotalsOptions {
99
101
  /** Counting strategy (default 'none') */
100
102
  mode?: 'none' | 'async' | 'approx' | 'sync';
101
- /** Timeout for countDocuments (sync/async modes, ms) */
103
+ /** Timeout for countDocuments / estimatedDocumentCount (ms) */
102
104
  maxTimeMS?: number;
103
- /** Cache TTL for totals (async/approx modes, ms; default 10 min) */
105
+ /** Cache TTL for totals (ms; default 10 min) */
104
106
  ttlMs?: number;
105
107
  /** Index hint for count query */
106
108
  hint?: unknown;
@@ -220,7 +222,7 @@ export interface FindPageOptions<TSchema = any> {
220
222
  hint?: Document | string;
221
223
  collation?: Document;
222
224
  batchSize?: number;
223
- /** Cache TTL in milliseconds */
225
+ /** Cache TTL in milliseconds for the non-stream/non-explain page result */
224
226
  cache?: number;
225
227
  /** Include timing/meta info in result — pass true or MetaOptions for sub-step detail */
226
228
  meta?: boolean | MetaOptions;