couchdb-web-node-plugin 1.0.742 → 1.0.744

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "couchdb-web-node-plugin",
3
- "version": "1.0.742",
3
+ "version": "1.0.744",
4
4
  "description": "A couchdb server, model instance conflict handler, rest api, authentication, session management, schema validator and model relation guarantee for webNode.",
5
5
  "keywords": [
6
6
  "api",
@@ -218,16 +218,25 @@
218
218
  "express",
219
219
  "express-pouchdb"
220
220
  ],
221
- "name": "express-pouchdb"
221
+ "names": "express-pouchdb"
222
222
  }
223
223
  ]
224
224
  },
225
225
  "changesStream": {
226
226
  "include_docs": false,
227
227
  "live": true,
228
+ "return_docs": false,
228
229
  "since": "now",
229
230
  "timeout": false
230
231
  },
232
+ "updateViewsChangesStream": {
233
+ "include_docs": true,
234
+ "live": true,
235
+ "return_docs": false,
236
+ "since": "now",
237
+ "style": "all_docs",
238
+ "timeout": false
239
+ },
231
240
  "changesStreamReinitializer": {
232
241
  "retries": 5,
233
242
  "retryWaitingFactorInSeconds": 3,
@@ -372,6 +381,13 @@
372
381
  "__evaluate__": "`userContext.name || '${self.couchdb.admin.name}'`"
373
382
  }
374
383
  }
384
+ },
385
+ "View": {
386
+ "_additional": {
387
+ "declaration": "Data",
388
+ "description": "Computed data.",
389
+ "type": "any"
390
+ }
375
391
  }
376
392
  },
377
393
  "property": {
@@ -476,7 +492,8 @@
476
492
  "name": "admin",
477
493
  "password": "admin"
478
494
  },
479
- "users": {}
495
+ "users": {},
496
+ "views": {}
480
497
  }
481
498
  },
482
499
  "webOptimizer": {
package/type.d.ts CHANGED
@@ -269,6 +269,7 @@ export interface CoreConfiguration<Type extends object = Mapping<unknown>, Attac
269
269
  maximumRetryWaitingTimeInSeconds: number;
270
270
  };
271
271
  numberOfParallelChangesRunner: number;
272
+ updateViewsChangesStream: ChangesStreamOptions;
272
273
  connector: ConnectorConfiguration;
273
274
  security: {
274
275
  _default: SecuritySettings;
@@ -299,6 +300,11 @@ export interface CoreConfiguration<Type extends object = Mapping<unknown>, Attac
299
300
  password: string;
300
301
  roles: Array<string>;
301
302
  }>;
303
+ views: Mapping<Mapping<{
304
+ query: PouchDB.Find.FindRequest<object>;
305
+ initialMapperExpression?: string;
306
+ updateExpression?: string;
307
+ }>>;
302
308
  }
303
309
  export type Configuration<ConfigurationType = Mapping<unknown>> = BaseConfiguration<{
304
310
  couchdb: CoreConfiguration;
@@ -306,6 +312,8 @@ export type Configuration<ConfigurationType = Mapping<unknown>> = BaseConfigurat
306
312
  export interface CouchDB<Type extends object = Mapping<unknown>> {
307
313
  changesStream: ChangesStream;
308
314
  lastChangesSequenceIdentifier?: number | string;
315
+ updateViewsChangesStream?: ChangesStream;
316
+ lastUpdateViewsChangesSequenceIdentifier?: number | string;
309
317
  connection: Connection<Type>;
310
318
  connector: Connector;
311
319
  server: {
@@ -437,6 +445,7 @@ export type User = BaseDocument & {
437
445
  password: string;
438
446
  roles: Array<string>;
439
447
  };
448
+ export type ViewDocument = BaseDocument & Record<string, unknown>;
440
449
  export interface Interval {
441
450
  end: number | string;
442
451
  start: number | string;