@sitevision/api 1.0.14 → 1.0.15

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,26 +1,24 @@
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
1
  export declare namespace security {
23
- export { csrf };
2
+ export namespace csrf {
3
+ /**
4
+ * 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.
5
+ *
6
+ * @returns {string} the current token as string or null for anonymous users.
7
+ */
8
+ export function getToken(): string;
9
+ /**
10
+ * Used to acquire the parameter name that should be used when passing the token as a form field.
11
+ *
12
+ * @returns {string} the name that should be used when passing the token as form data.
13
+ */
14
+ export function getParameterName(): string;
15
+ /**
16
+ * Used to acquire the header name that should be used when passing the token as a request header.
17
+ *
18
+ * @returns {string} the name that should be used when passing the token as a header.
19
+ */
20
+ export function getHeaderName(): string;
21
+ }
24
22
  }
25
23
 
26
24
  export default security;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitevision/api",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
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": "2aec2fb831a591527fb55384dae5e32f3cc18cbd"
29
+ "gitHead": "d4640984b1059f1e43389dd511688ff0b75a6bd5"
30
30
  }