@enonic-types/lib-auditlog 0.1.0 → 7.11.0-B1
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/auditlog.d.ts +92 -92
- package/package.json +1 -5
package/auditlog.d.ts
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface XpLibraries {
|
|
3
|
-
'/lib/xp/auditlog': typeof import('./auditlog');
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export interface AuditLogParams {
|
|
7
|
-
type: string;
|
|
8
|
-
time?: string;
|
|
9
|
-
source?: string;
|
|
10
|
-
user?: string;
|
|
11
|
-
objects?: string[];
|
|
12
|
-
data?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface AuditLog {
|
|
15
|
-
_id: string;
|
|
16
|
-
type: string;
|
|
17
|
-
time: string;
|
|
18
|
-
source: string;
|
|
19
|
-
user: string;
|
|
20
|
-
objects: string[];
|
|
21
|
-
data: Record<string, unknown>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* This function creates a single audit log entry.
|
|
25
|
-
*
|
|
26
|
-
* The parameter 'type' is required and all other parameters are optional.
|
|
27
|
-
*
|
|
28
|
-
* @example-ref examples/auditlog/log.js
|
|
29
|
-
*
|
|
30
|
-
* @param {object} params JSON with the parameters.
|
|
31
|
-
* @param {string} params.type Type of log entry.
|
|
32
|
-
* @param {string} [params.time] Log entry timestamp. Defaults to now.
|
|
33
|
-
* @param {string} [params.source] Log entry source. Defaults to the application ID.
|
|
34
|
-
* @param {string} [params.user] Log entry user. Defaults to the user of current context.
|
|
35
|
-
* @param {array} [params.objects] URIs to objects that relate to this log entry. Defaults to empty array.
|
|
36
|
-
* @param {object} [params.data] Custom extra data for the this log entry. Defaults to empty object.
|
|
37
|
-
*
|
|
38
|
-
* @returns {object} Audit log created as JSON.
|
|
39
|
-
*/
|
|
40
|
-
export declare function log(params: AuditLogParams): AuditLog;
|
|
41
|
-
export interface GetAuditLogParams {
|
|
42
|
-
id: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* This function fetches an audit log.
|
|
46
|
-
*
|
|
47
|
-
* @example-ref examples/auditlog/get.js
|
|
48
|
-
*
|
|
49
|
-
* @param {object} params JSON with the parameters.
|
|
50
|
-
* @param {string} params.id Id of the audit log.
|
|
51
|
-
*
|
|
52
|
-
* @returns {object} Audit log as JSON.
|
|
53
|
-
*/
|
|
54
|
-
export declare function get(params: GetAuditLogParams): AuditLog | null;
|
|
55
|
-
export interface FindAuditLogParams {
|
|
56
|
-
start?: number;
|
|
57
|
-
count?: number;
|
|
58
|
-
ids?: string[];
|
|
59
|
-
from?: string;
|
|
60
|
-
to?: string;
|
|
61
|
-
type?: string;
|
|
62
|
-
source?: string;
|
|
63
|
-
users?: string[];
|
|
64
|
-
objects?: string[];
|
|
65
|
-
}
|
|
66
|
-
export interface AuditLogs {
|
|
67
|
-
total: number;
|
|
68
|
-
count: number;
|
|
69
|
-
hits: AuditLog[];
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* This function searches for audit logs.
|
|
73
|
-
*
|
|
74
|
-
* All parameters are semi-optional, meaning that you should at least supply one
|
|
75
|
-
* of them. If no parameters are supplied you will get an empty result.
|
|
76
|
-
*
|
|
77
|
-
* @example-ref examples/auditlog/find.js
|
|
78
|
-
*
|
|
79
|
-
* @param {object} params JSON with the parameters.
|
|
80
|
-
* @param {number} [params.start=0] Start index (used for paging).
|
|
81
|
-
* @param {number} [params.count=10] Number of contents to fetch.
|
|
82
|
-
* @param {array} [params.ids] Filter by ids of audit logs.
|
|
83
|
-
* @param {string} [params.from] Filter by logs younger than from.
|
|
84
|
-
* @param {string} [params.to] Filter by logs older than to.
|
|
85
|
-
* @param {string} [params.type] Filter by type.
|
|
86
|
-
* @param {string} [params.source] Filter by source.
|
|
87
|
-
* @param {array} [params.users] Filter by user keys.
|
|
88
|
-
* @param {array} [params.objects] Filter by object URIs.
|
|
89
|
-
*
|
|
90
|
-
* @returns {object} Audit log search results.
|
|
91
|
-
*/
|
|
92
|
-
export declare function find(params: FindAuditLogParams): AuditLogs;
|
|
1
|
+
declare global {
|
|
2
|
+
interface XpLibraries {
|
|
3
|
+
'/lib/xp/auditlog': typeof import('./auditlog');
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export interface AuditLogParams {
|
|
7
|
+
type: string;
|
|
8
|
+
time?: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
user?: string;
|
|
11
|
+
objects?: string[];
|
|
12
|
+
data?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface AuditLog {
|
|
15
|
+
_id: string;
|
|
16
|
+
type: string;
|
|
17
|
+
time: string;
|
|
18
|
+
source: string;
|
|
19
|
+
user: string;
|
|
20
|
+
objects: string[];
|
|
21
|
+
data: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This function creates a single audit log entry.
|
|
25
|
+
*
|
|
26
|
+
* The parameter 'type' is required and all other parameters are optional.
|
|
27
|
+
*
|
|
28
|
+
* @example-ref examples/auditlog/log.js
|
|
29
|
+
*
|
|
30
|
+
* @param {object} params JSON with the parameters.
|
|
31
|
+
* @param {string} params.type Type of log entry.
|
|
32
|
+
* @param {string} [params.time] Log entry timestamp. Defaults to now.
|
|
33
|
+
* @param {string} [params.source] Log entry source. Defaults to the application ID.
|
|
34
|
+
* @param {string} [params.user] Log entry user. Defaults to the user of current context.
|
|
35
|
+
* @param {array} [params.objects] URIs to objects that relate to this log entry. Defaults to empty array.
|
|
36
|
+
* @param {object} [params.data] Custom extra data for the this log entry. Defaults to empty object.
|
|
37
|
+
*
|
|
38
|
+
* @returns {object} Audit log created as JSON.
|
|
39
|
+
*/
|
|
40
|
+
export declare function log(params: AuditLogParams): AuditLog;
|
|
41
|
+
export interface GetAuditLogParams {
|
|
42
|
+
id: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* This function fetches an audit log.
|
|
46
|
+
*
|
|
47
|
+
* @example-ref examples/auditlog/get.js
|
|
48
|
+
*
|
|
49
|
+
* @param {object} params JSON with the parameters.
|
|
50
|
+
* @param {string} params.id Id of the audit log.
|
|
51
|
+
*
|
|
52
|
+
* @returns {object} Audit log as JSON.
|
|
53
|
+
*/
|
|
54
|
+
export declare function get(params: GetAuditLogParams): AuditLog | null;
|
|
55
|
+
export interface FindAuditLogParams {
|
|
56
|
+
start?: number;
|
|
57
|
+
count?: number;
|
|
58
|
+
ids?: string[];
|
|
59
|
+
from?: string;
|
|
60
|
+
to?: string;
|
|
61
|
+
type?: string;
|
|
62
|
+
source?: string;
|
|
63
|
+
users?: string[];
|
|
64
|
+
objects?: string[];
|
|
65
|
+
}
|
|
66
|
+
export interface AuditLogs {
|
|
67
|
+
total: number;
|
|
68
|
+
count: number;
|
|
69
|
+
hits: AuditLog[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* This function searches for audit logs.
|
|
73
|
+
*
|
|
74
|
+
* All parameters are semi-optional, meaning that you should at least supply one
|
|
75
|
+
* of them. If no parameters are supplied you will get an empty result.
|
|
76
|
+
*
|
|
77
|
+
* @example-ref examples/auditlog/find.js
|
|
78
|
+
*
|
|
79
|
+
* @param {object} params JSON with the parameters.
|
|
80
|
+
* @param {number} [params.start=0] Start index (used for paging).
|
|
81
|
+
* @param {number} [params.count=10] Number of contents to fetch.
|
|
82
|
+
* @param {array} [params.ids] Filter by ids of audit logs.
|
|
83
|
+
* @param {string} [params.from] Filter by logs younger than from.
|
|
84
|
+
* @param {string} [params.to] Filter by logs older than to.
|
|
85
|
+
* @param {string} [params.type] Filter by type.
|
|
86
|
+
* @param {string} [params.source] Filter by source.
|
|
87
|
+
* @param {array} [params.users] Filter by user keys.
|
|
88
|
+
* @param {array} [params.objects] Filter by object URIs.
|
|
89
|
+
*
|
|
90
|
+
* @returns {object} Audit log search results.
|
|
91
|
+
*/
|
|
92
|
+
export declare function find(params: FindAuditLogParams): AuditLogs;
|
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-auditlog",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.11.0-B1",
|
|
4
4
|
"description": "Type definitions for lib-auditlog.",
|
|
5
5
|
"types": "auditlog.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"auditlog.d.ts"
|
|
8
8
|
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"pre": "npm run --prefix ../ pre",
|
|
11
|
-
"packlist": "npx npm-packlist"
|
|
12
|
-
},
|
|
13
9
|
"repository": {
|
|
14
10
|
"type": "git",
|
|
15
11
|
"url": "git+https://github.com/enonic/xp.git#master"
|