couchdb-web-node-plugin 2.0.839 → 2.0.840

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.
@@ -1,5 +1,6 @@
1
- import { Logger, Mapping } from 'clientnode';
2
- import { ModelRolesMapping, Attachment, BaseModelConfiguration, Document, Models, PartialFullDocument, SecuritySettings, SpecialPropertyNames, UserContext } from './type';
1
+ import type { Mapping } from 'clientnode';
2
+ import type { ModelRolesMapping, Attachment, BaseModelConfiguration, Document, Models, PartialFullDocument, SecuritySettings, SpecialPropertyNames, UserContext } from './type';
3
+ import { Logger } from 'clientnode';
3
4
  /**
4
5
  * WebNode plugin interface with all provided hooks.
5
6
  */
@@ -40,5 +41,8 @@ export declare const authorize: (newDocument: Partial<Document>, oldDocument?: n
40
41
  * @returns Modified given new document.
41
42
  */
42
43
  export declare const validateDocumentUpdate: <ObjectType extends object = object, AttachmentType extends Attachment = Attachment, AdditionalDefinition extends object = Mapping<unknown>, AdditionalPropertiesType = unknown>(newDocument: PartialFullDocument<ObjectType, AdditionalPropertiesType>, oldDocument: (null | PartialFullDocument<ObjectType, AdditionalPropertiesType>), userContext: Partial<UserContext>, securitySettings: Partial<SecuritySettings>, modelConfiguration: BaseModelConfiguration<ObjectType, AdditionalDefinition>, models?: Models<ObjectType, AttachmentType, AdditionalDefinition, AdditionalPropertiesType>, checkPublicModelType?: boolean, toJSON?: (value: unknown) => string, fromJSON?: (value: string) => unknown) => PartialFullDocument<ObjectType, AdditionalPropertiesType>;
43
- export declare const databaseHelper: any;
44
+ export declare const databaseHelper: {
45
+ authorize: (newDocument: Partial<Document>, oldDocument?: null | Partial<Document>, userContext?: Partial<UserContext>, securitySettings?: Partial<SecuritySettings>, modelRolesMapping?: ModelRolesMapping, read?: boolean, specialNames?: SpecialPropertyNames, contextPath?: Array<string>, parentRoles?: Array<string>, toJSON?: (value: unknown) => string, fromJSON?: (value: string) => unknown) => true;
46
+ validateDocumentUpdate: <ObjectType extends object = object, AttachmentType extends Attachment = Attachment, AdditionalDefinition extends object = Mapping<unknown>, AdditionalPropertiesType = unknown>(newDocument: PartialFullDocument<ObjectType, AdditionalPropertiesType>, oldDocument: (null | PartialFullDocument<ObjectType, AdditionalPropertiesType>), userContext: Partial<UserContext>, securitySettings: Partial<SecuritySettings>, modelConfiguration: BaseModelConfiguration<ObjectType, AdditionalDefinition>, models?: Models<ObjectType, AttachmentType, AdditionalDefinition, AdditionalPropertiesType>, checkPublicModelType?: boolean, toJSON?: (value: unknown) => string, fromJSON?: (value: string) => unknown) => PartialFullDocument<ObjectType, AdditionalPropertiesType>;
47
+ };
44
48
  export default databaseHelper;