couchdb-web-node-plugin 1.0.804 → 1.0.805
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/databaseHelper.d.ts +5 -4
- package/databaseHelper.js +1 -1
- package/helper.d.ts +3 -3
- package/helper.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/type.d.ts +8 -8
package/databaseHelper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger, Mapping } from 'clientnode';
|
|
2
|
-
import {
|
|
2
|
+
import { ModelRolesMapping, Attachment, BaseModelConfiguration, Document, Models, PartialFullDocument, SecuritySettings, SpecialPropertyNames, UserContext } from './type';
|
|
3
3
|
/**
|
|
4
4
|
* WebNode plugin interface with all provided hooks.
|
|
5
5
|
*/
|
|
@@ -12,16 +12,17 @@ export declare const log: Logger;
|
|
|
12
12
|
* here.
|
|
13
13
|
* @param userContext - Contains meta information about currently acting user.
|
|
14
14
|
* @param securitySettings - Database security settings.
|
|
15
|
-
* @param
|
|
15
|
+
* @param modelRolesMapping - Allowed roles for given models.
|
|
16
16
|
* @param read - Indicates whether a read or write of given document should be
|
|
17
17
|
* authorized or not.
|
|
18
18
|
* @param specialNames - Special names configuration.
|
|
19
19
|
* @param contextPath - Path of properties leading to current document.
|
|
20
|
-
* @param
|
|
20
|
+
* @param toJSON - JSON stringifier.
|
|
21
|
+
* @param fromJSON - JSON parser.
|
|
21
22
|
* @returns Throws an exception if authorization is not accepted and "true"
|
|
22
23
|
* otherwise.
|
|
23
24
|
*/
|
|
24
|
-
export declare const authorize: (newDocument: Partial<Document>, oldDocument?: null | Partial<Document>, userContext?: Partial<UserContext>, securitySettings?: Partial<SecuritySettings>,
|
|
25
|
+
export declare const authorize: (newDocument: Partial<Document>, oldDocument?: null | Partial<Document>, userContext?: Partial<UserContext>, securitySettings?: Partial<SecuritySettings>, modelRolesMapping?: ModelRolesMapping, read?: boolean, specialNames?: SpecialPropertyNames, contextPath?: Array<string>, toJSON?: (value: unknown) => string, fromJSON?: (value: string) => unknown) => true;
|
|
25
26
|
/**
|
|
26
27
|
* Represents a design document validation function for given model
|
|
27
28
|
* specification.
|