couchdb-web-node-plugin 1.0.819 → 1.0.821

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.819",
3
+ "version": "1.0.821",
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",
@@ -372,7 +372,7 @@
372
372
  }
373
373
  },
374
374
  "_materializedView": {
375
- "_allowedRoles": []
375
+ "_roles": []
376
376
  },
377
377
  "_stringMapping": {
378
378
  "_additional": {
@@ -397,7 +397,7 @@
397
397
  "minimum": 0,
398
398
  "nullable": false,
399
399
  "updateExpression": {
400
- "__evaluate__": "`userContext.name === '${self.couchdb.admin.name}' && oldDocument ? oldDocument[name] : nowUTCTimestamp`"
400
+ "__evaluate__": "`userContext.name === '${self.couchdb.admin.name}' && oldDocument && oldDocument[name] ? oldDocument[name] : nowUTCTimestamp`"
401
401
  },
402
402
  "preventVersionCreation": true,
403
403
  "runUpdateHookAlways": true,
@@ -412,7 +412,7 @@
412
412
  "lastUser": {
413
413
  "nullable": false,
414
414
  "updateExpression": {
415
- "__evaluate__": "`userContext.name === '${self.couchdb.admin.name}' && oldDocument ? oldDocument[name] : (userContext.name || 'unknown')`"
415
+ "__evaluate__": "`((userContext.name === '${self.couchdb.admin.name}' && oldDocument) ? oldDocument[name] : userContext.name) || 'unknown'`"
416
416
  },
417
417
  "preventVersionCreation": true,
418
418
  "runUpdateHookAlways": true
@@ -438,7 +438,7 @@
438
438
  "reserved": [],
439
439
  "special": {
440
440
  "additional": "_additional",
441
- "allowedRole": "_allowedRoles",
441
+ "role": "_roles",
442
442
  "attachment": "_attachments",
443
443
  "conflict": "_conflicts",
444
444
  "constraint": {
package/type.d.ts CHANGED
@@ -84,7 +84,7 @@ export type NormalizedSelection = Array<SelectionOption>;
84
84
  export type Selection = Array<SelectionOption> | Array<Primitive> | Mapping;
85
85
  export type Pattern = Array<RegExp | string> | RegExp | string;
86
86
  export interface BasePropertySpecification<Type, AdditionalSpecifications extends object> {
87
- allowedRoles?: Roles;
87
+ roles?: Roles;
88
88
  updateStrategy?: UpdateStrategy;
89
89
  preventVersionCreation?: boolean;
90
90
  arrayConstraintExecution?: Constraint;
@@ -136,7 +136,7 @@ export interface FileSpecification<Type extends Attachment = Attachment, Additio
136
136
  }
137
137
  export interface BaseModel<AttachmentType extends Attachment = Attachment, AdditionalSpecifications extends object = object, AdditionalPropertiesType = unknown> {
138
138
  _additional?: PropertySpecification<AdditionalPropertiesType, AdditionalSpecifications>;
139
- _allowedRoles?: Roles;
139
+ _roles?: Roles;
140
140
  _attachments?: Mapping<FileSpecification<AttachmentType, AdditionalSpecifications>> | null;
141
141
  _constraintExecutions?: Array<Constraint> | Constraint;
142
142
  _constraintExpressions?: Array<Constraint> | Constraint;
@@ -172,7 +172,7 @@ export type FullDocument<Type extends object = object, AdditionalPropertyTypes =
172
172
  export type PartialFullDocument<Type extends object = object, AdditionalPropertyTypes = unknown> = Partial<BaseDocument> & Partial<Document<Type>> & Mapping<AdditionalPropertyTypes>;
173
173
  export interface SpecialPropertyNames {
174
174
  additional: '_additional';
175
- allowedRole: '_allowedRoles';
175
+ role: '_roles';
176
176
  attachment: '_attachments';
177
177
  conflict: '_conflicts';
178
178
  deleted: '_deleted';