@sitevision/api 1.0.11 → 1.0.14
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/common/events/index.d.ts +31 -0
- package/{server → common}/events/index.js +2 -1
- package/common/security/index.d.ts +26 -0
- package/common/security/index.js +14 -0
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/server/CollaborationGroupWrapper/index.d.ts +1 -1
- package/server/events/index.d.ts +0 -8
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Listen to a given event
|
|
3
|
+
*
|
|
4
|
+
* @param eventName The name of the event
|
|
5
|
+
* @param callback The callback to trigger for the given event
|
|
6
|
+
*/
|
|
7
|
+
export function on(eventName: string, callback: (options: any) => void): void;
|
|
8
|
+
/**
|
|
9
|
+
* Emit a server side event
|
|
10
|
+
*
|
|
11
|
+
* Note! Server side only
|
|
12
|
+
*
|
|
13
|
+
* @param eventName The name of the event to emit
|
|
14
|
+
* @param options The options for the event
|
|
15
|
+
*/
|
|
16
|
+
export function emit(eventName: string, options: any): void;
|
|
17
|
+
/**
|
|
18
|
+
* Trigger a client side event
|
|
19
|
+
*
|
|
20
|
+
* Note! Client side only
|
|
21
|
+
*
|
|
22
|
+
* @param eventName The name of the event to trigger
|
|
23
|
+
* @param options The options for the event
|
|
24
|
+
*/
|
|
25
|
+
export function trigger(eventName: string, options: any): void;
|
|
26
|
+
|
|
27
|
+
declare namespace events {
|
|
28
|
+
export { on, emit, trigger };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default events;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface csrf {
|
|
2
|
+
/**
|
|
3
|
+
* Used to acquire the current csrf-token. If the user is anonymous or if csrf-protection is disabled on the server this will return null.
|
|
4
|
+
*
|
|
5
|
+
* @returns {string} the current token as string or null for anonymous users.
|
|
6
|
+
*/
|
|
7
|
+
getToken(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Used to acquire the parameter name that should be used when passing the token as a form field.
|
|
10
|
+
*
|
|
11
|
+
* @returns {string} the name that should be used when passing the token as form data.
|
|
12
|
+
*/
|
|
13
|
+
getParameterName(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Used to acquire the header name that should be used when passing the token as a request header.
|
|
16
|
+
*
|
|
17
|
+
* @returns {string} the name that should be used when passing the token as a header.
|
|
18
|
+
*/
|
|
19
|
+
getHeaderName(): string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare namespace security {
|
|
23
|
+
export { csrf };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default security;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
csrf: {
|
|
9
|
+
getToken: function getToken() {},
|
|
10
|
+
getParameterName: function getParameterName() {},
|
|
11
|
+
getHeaderName: function getHeaderName() {}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports["default"] = _default;
|
package/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import './client/toasts';
|
|
|
4
4
|
import './common/app';
|
|
5
5
|
import './common/i18n';
|
|
6
6
|
import './common/router';
|
|
7
|
+
import './common/events';
|
|
7
8
|
|
|
8
9
|
import './server/appData';
|
|
9
10
|
import './server/appResource';
|
|
@@ -17,7 +18,6 @@ import './server/CollaborationGroupType';
|
|
|
17
18
|
import './server/CollaborationGroupUtil';
|
|
18
19
|
import './server/CollaborationGroupWrapper';
|
|
19
20
|
import './server/DateUtil';
|
|
20
|
-
import './server/events';
|
|
21
21
|
import './server/globalAppData';
|
|
22
22
|
import './server/hooks';
|
|
23
23
|
import './server/LandingPageUtil';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitevision/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"author": "Sitevision AB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "2aec2fb831a591527fb55384dae5e32f3cc18cbd"
|
|
30
30
|
}
|
|
@@ -30,7 +30,7 @@ export interface ICollaborationGroupWrapper {
|
|
|
30
30
|
* Gets the followers/eavesdroppers of the wrapped collaboration group.
|
|
31
31
|
* @returns {Set<Node>} the followers of the wrapped collaboration group. Never null.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
getFollowers(): Set<Node>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Gets the group description of the wrapped collaboration group.
|
package/server/events/index.d.ts
DELETED