@enonic-types/lib-app 8.0.0-B4 → 8.0.0-RC1
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/README.md +2 -4
- package/app.d.ts +11 -22
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -50,8 +50,7 @@ const {
|
|
|
50
50
|
get,
|
|
51
51
|
list,
|
|
52
52
|
getDescriptor,
|
|
53
|
-
|
|
54
|
-
hasReal
|
|
53
|
+
getApplicationMode
|
|
55
54
|
} = require('/lib/xp/app');
|
|
56
55
|
```
|
|
57
56
|
|
|
@@ -85,8 +84,7 @@ import {
|
|
|
85
84
|
get,
|
|
86
85
|
list,
|
|
87
86
|
getDescriptor,
|
|
88
|
-
|
|
89
|
-
hasReal
|
|
87
|
+
getApplicationMode
|
|
90
88
|
} from '/lib/xp/app';
|
|
91
89
|
```
|
|
92
90
|
|
package/app.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export interface Application {
|
|
|
23
23
|
minSystemVersion: string | null;
|
|
24
24
|
maxSystemVersion: string | null;
|
|
25
25
|
modifiedTime: string | null;
|
|
26
|
-
started: boolean
|
|
27
|
-
system: boolean
|
|
26
|
+
started: boolean;
|
|
27
|
+
system: boolean;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Creates virtual application.
|
|
@@ -32,7 +32,7 @@ export interface Application {
|
|
|
32
32
|
* @param {object} params JSON with the parameters.
|
|
33
33
|
* @param {string} params.key Application key.
|
|
34
34
|
*
|
|
35
|
-
* @returns {
|
|
35
|
+
* @returns {Application} created application.
|
|
36
36
|
*/
|
|
37
37
|
export declare function createVirtualApplication(params: CreateVirtualApplicationParams): Application;
|
|
38
38
|
export interface DeleteVirtualApplicationParams {
|
|
@@ -56,13 +56,13 @@ export interface GetApplicationParams {
|
|
|
56
56
|
* @param {object} params JSON with the parameters.
|
|
57
57
|
* @param {string} params.key Application key.
|
|
58
58
|
*
|
|
59
|
-
* @returns {Application} fetched application.
|
|
59
|
+
* @returns {Application | null} fetched application, or null if not found.
|
|
60
60
|
*/
|
|
61
|
-
export declare function get(params: GetApplicationParams): Application;
|
|
61
|
+
export declare function get(params: GetApplicationParams): Application | null;
|
|
62
62
|
/**
|
|
63
63
|
* Fetches both static and virtual applications.
|
|
64
64
|
*
|
|
65
|
-
* @returns {
|
|
65
|
+
* @returns {Application[]} applications list.
|
|
66
66
|
*/
|
|
67
67
|
export declare function list(): Application[];
|
|
68
68
|
export interface GetApplicationDescriptorParams {
|
|
@@ -75,7 +75,8 @@ export interface Icon {
|
|
|
75
75
|
}
|
|
76
76
|
export interface ApplicationDescriptor {
|
|
77
77
|
key: string;
|
|
78
|
-
description: string
|
|
78
|
+
description: string;
|
|
79
|
+
descriptionI18nKey: string | null;
|
|
79
80
|
title: string | null;
|
|
80
81
|
titleI18nKey: string | null;
|
|
81
82
|
vendorName: string | null;
|
|
@@ -89,21 +90,9 @@ export interface ApplicationDescriptor {
|
|
|
89
90
|
* @param {object} params JSON with the parameters.
|
|
90
91
|
* @param {string} params.key Application key.
|
|
91
92
|
*
|
|
92
|
-
* @returns {
|
|
93
|
+
* @returns {ApplicationDescriptor | null} fetched application descriptor, or null if not found.
|
|
93
94
|
*/
|
|
94
|
-
export declare function getDescriptor(params: GetApplicationDescriptorParams): ApplicationDescriptor;
|
|
95
|
-
export interface HasVirtualApplicationParams {
|
|
96
|
-
key: string;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Checks if there is a virtual app with the app key.
|
|
100
|
-
*
|
|
101
|
-
* @param {object} params JSON with the parameters.
|
|
102
|
-
* @param {string} params.key Application key.
|
|
103
|
-
*
|
|
104
|
-
* @returns {boolean} result.
|
|
105
|
-
*/
|
|
106
|
-
export declare function hasVirtual(params: HasVirtualApplicationParams): boolean;
|
|
95
|
+
export declare function getDescriptor(params: GetApplicationDescriptorParams): ApplicationDescriptor | null;
|
|
107
96
|
export interface GetApplicationModeParams {
|
|
108
97
|
key: string;
|
|
109
98
|
}
|
|
@@ -113,6 +102,6 @@ export interface GetApplicationModeParams {
|
|
|
113
102
|
* @param {object} params JSON with the parameters.
|
|
114
103
|
* @param {string} params.key Application key.
|
|
115
104
|
*
|
|
116
|
-
* @returns {string} application mode.
|
|
105
|
+
* @returns {string | null} application mode, or null if the application is not installed.
|
|
117
106
|
*/
|
|
118
107
|
export declare function getApplicationMode(params: GetApplicationModeParams): string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-app",
|
|
3
|
-
"version": "8.0.0-
|
|
3
|
+
"version": "8.0.0-RC1",
|
|
4
4
|
"description": "Type definitions for lib-app.",
|
|
5
5
|
"types": "app.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/enonic/xp/tree/master#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@enonic-types/core": "8.0.0-
|
|
30
|
+
"@enonic-types/core": "8.0.0-RC1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|