@enonic-types/lib-admin 0.1.1 → 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.
Files changed (2) hide show
  1. package/admin.d.ts +79 -79
  2. package/package.json +32 -32
package/admin.d.ts CHANGED
@@ -1,79 +1,79 @@
1
- declare global {
2
- interface XpLibraries {
3
- '/lib/xp/admin': typeof import('./admin');
4
- }
5
- }
6
- /**
7
- * Returns the admin base uri.
8
- *
9
- * @returns {string} Admin base uri.
10
- */
11
- export declare function getBaseUri(): string;
12
- /**
13
- * Returns the admin assets uri.
14
- *
15
- * @returns {string} Assets uri.
16
- */
17
- export declare function getAssetsUri(): string;
18
- /**
19
- * Returns the preferred locale based on the current HTTP request, or the server default locale if none is specified.
20
- *
21
- * @returns {string} Current locale.
22
- */
23
- export declare function getLocale(): string;
24
- /**
25
- * Returns the list of preferred locales based on the current HTTP request, or the server default locale if none is specified.
26
- *
27
- * @returns {string[]} Current locales in order of preference.
28
- */
29
- export declare function getLocales(): string[];
30
- /**
31
- * Returns all i18n phrases.
32
- *
33
- * @returns {object} JSON object with phrases.
34
- */
35
- export declare function getPhrases(): string;
36
- /**
37
- * Returns the URL for launcher panel.
38
- *
39
- * @returns {string} URL.
40
- */
41
- export declare function getLauncherUrl(): string;
42
- /**
43
- * Returns the URL for launcher javascript.
44
- *
45
- * @returns {string} Path.
46
- */
47
- export declare function getLauncherPath(): string;
48
- /**
49
- * Returns the URL for an admin tool of specific application.
50
- * @param {string} application Full application name (f.ex, 'com.enonic.app')
51
- * @param {string} tool Name of the tool inside an app (f.ex, 'main')
52
- *
53
- * @returns {string} URL.
54
- */
55
- export declare function getToolUrl(application: string, tool: string): string;
56
- /**
57
- * Returns the URL for the Home admin tool.
58
- * @param {object} [params] Parameter object
59
- * @param {string} [params.type=server] URL type. Either `server` (server-relative URL) or `absolute`.
60
- *
61
- * @returns {string} URL.
62
- */
63
- export declare function getHomeToolUrl(params: GetHomeToolUrlParams): string;
64
- export interface GetHomeToolUrlParams {
65
- type: HomeToolUrlType;
66
- }
67
- export declare type HomeToolUrlType = 'server' | 'absolute';
68
- /**
69
- * Returns installation name.
70
- *
71
- * @returns {string} Installation name.
72
- */
73
- export declare function getInstallation(): string;
74
- /**
75
- * Returns version of XP installation.
76
- *
77
- * @returns {string} Version.
78
- */
79
- export declare function getVersion(): string;
1
+ declare global {
2
+ interface XpLibraries {
3
+ '/lib/xp/admin': typeof import('./admin');
4
+ }
5
+ }
6
+ /**
7
+ * Returns the admin base uri.
8
+ *
9
+ * @returns {string} Admin base uri.
10
+ */
11
+ export declare function getBaseUri(): string;
12
+ /**
13
+ * Returns the admin assets uri.
14
+ *
15
+ * @returns {string} Assets uri.
16
+ */
17
+ export declare function getAssetsUri(): string;
18
+ /**
19
+ * Returns the preferred locale based on the current HTTP request, or the server default locale if none is specified.
20
+ *
21
+ * @returns {string} Current locale.
22
+ */
23
+ export declare function getLocale(): string;
24
+ /**
25
+ * Returns the list of preferred locales based on the current HTTP request, or the server default locale if none is specified.
26
+ *
27
+ * @returns {string[]} Current locales in order of preference.
28
+ */
29
+ export declare function getLocales(): string[];
30
+ /**
31
+ * Returns all i18n phrases.
32
+ *
33
+ * @returns {object} JSON object with phrases.
34
+ */
35
+ export declare function getPhrases(): string;
36
+ /**
37
+ * Returns the URL for launcher panel.
38
+ *
39
+ * @returns {string} URL.
40
+ */
41
+ export declare function getLauncherUrl(): string;
42
+ /**
43
+ * Returns the URL for launcher javascript.
44
+ *
45
+ * @returns {string} Path.
46
+ */
47
+ export declare function getLauncherPath(): string;
48
+ /**
49
+ * Returns the URL for an admin tool of specific application.
50
+ * @param {string} application Full application name (f.ex, 'com.enonic.app')
51
+ * @param {string} tool Name of the tool inside an app (f.ex, 'main')
52
+ *
53
+ * @returns {string} URL.
54
+ */
55
+ export declare function getToolUrl(application: string, tool: string): string;
56
+ /**
57
+ * Returns the URL for the Home admin tool.
58
+ * @param {object} [params] Parameter object
59
+ * @param {string} [params.type=server] URL type. Either `server` (server-relative URL) or `absolute`.
60
+ *
61
+ * @returns {string} URL.
62
+ */
63
+ export declare function getHomeToolUrl(params: GetHomeToolUrlParams): string;
64
+ export interface GetHomeToolUrlParams {
65
+ type: HomeToolUrlType;
66
+ }
67
+ export declare type HomeToolUrlType = 'server' | 'absolute';
68
+ /**
69
+ * Returns installation name.
70
+ *
71
+ * @returns {string} Installation name.
72
+ */
73
+ export declare function getInstallation(): string;
74
+ /**
75
+ * Returns version of XP installation.
76
+ *
77
+ * @returns {string} Version.
78
+ */
79
+ export declare function getVersion(): string;
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
- {
2
- "name": "@enonic-types/lib-admin",
3
- "version": "0.1.1",
4
- "description": "Type definitions for lib-admin.",
5
- "types": "admin.d.ts",
6
- "files": [
7
- "admin.d.ts"
8
- ],
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/enonic/xp.git#master"
12
- },
13
- "keywords": [
14
- "enonic",
15
- "enonic-xp",
16
- "lib-admin",
17
- "admin",
18
- "types",
19
- "typescript"
20
- ],
21
- "contributors": [
22
- "Mikita Taukachou <edloidas@gmail.com> (https://edloidas.github.io/)"
23
- ],
24
- "license": "Apache-2.0",
25
- "bugs": {
26
- "url": "https://github.com/enonic/xp/issues"
27
- },
28
- "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
- "publishConfig": {
30
- "access": "public"
31
- }
32
- }
1
+ {
2
+ "name": "@enonic-types/lib-admin",
3
+ "version": "7.11.0-B1",
4
+ "description": "Type definitions for lib-admin.",
5
+ "types": "admin.d.ts",
6
+ "files": [
7
+ "admin.d.ts"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/enonic/xp.git#master"
12
+ },
13
+ "keywords": [
14
+ "enonic",
15
+ "enonic-xp",
16
+ "lib-admin",
17
+ "admin",
18
+ "types",
19
+ "typescript"
20
+ ],
21
+ "contributors": [
22
+ "Mikita Taukachou <edloidas@gmail.com> (https://edloidas.github.io/)"
23
+ ],
24
+ "license": "Apache-2.0",
25
+ "bugs": {
26
+ "url": "https://github.com/enonic/xp/issues"
27
+ },
28
+ "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
+ "publishConfig": {
30
+ "access": "public"
31
+ }
32
+ }