@trackunit/iris-app-api 0.0.104 → 0.0.106
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/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/src/types/extensions/adminExtensionManifest.d.ts +11 -1
- package/src/types/extensions/adminExtensionManifest.js.map +1 -1
- package/src/types/extensions/assetHomeExtensionManifest.d.ts +10 -5
- package/src/types/extensions/assetHomeExtensionManifest.js.map +1 -1
- package/src/types/extensions/fleetExtensionManifest.d.ts +9 -4
- package/src/types/extensions/fleetExtensionManifest.js.map +1 -1
- package/src/types/extensions/siteHomeExtensionManifest.d.ts +12 -1
- package/src/types/extensions/siteHomeExtensionManifest.js.map +1 -1
- package/src/types/irisAppExtensionManifest.d.ts +10 -0
- package/src/types/irisAppExtensionManifest.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.106](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.105...iris-app-api/0.0.106) (2023-08-01)
|
|
6
|
+
|
|
7
|
+
## [0.0.105](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.104...iris-app-api/0.0.105) (2023-07-17)
|
|
8
|
+
|
|
5
9
|
## [0.0.104](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.103...iris-app-api/0.0.104) (2023-07-17)
|
|
6
10
|
|
|
7
11
|
## [0.0.103](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.2-alpha-mta.0...iris-app-api/0.0.103) (2023-07-03)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.106",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=18.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "1.10.0"
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { AbstractExtensionManifest, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
1
|
+
import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
2
|
export interface AdminExtensionManifest extends AbstractExtensionManifest {
|
|
3
3
|
type: "ADMIN_EXTENSION";
|
|
4
|
+
/**
|
|
5
|
+
* Conditions for the admin extension to be shown.
|
|
6
|
+
*
|
|
7
|
+
* Its doing OR between the conditions of the same type:
|
|
8
|
+
* - If only 1 requiredPermission is used/filled out then the admin home extension will be shown if user has the required permission.
|
|
9
|
+
* - If more requiredPermission are used/filled out then the admin home extension will be shown for all assets that the user has one of the required permission for.
|
|
10
|
+
*/
|
|
11
|
+
conditions?: {
|
|
12
|
+
requiredPermission?: RequiredPermission | RequiredPermission[];
|
|
13
|
+
};
|
|
4
14
|
menuItem: {
|
|
5
15
|
name: string | Translations | TranslationKey;
|
|
6
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adminExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/adminExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"adminExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/adminExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AbstractExtensionManifest,\n RequiredPermission,\n TranslationKey,\n Translations,\n} from \"../irisAppExtensionManifest\";\n\nexport interface AdminExtensionManifest extends AbstractExtensionManifest {\n type: \"ADMIN_EXTENSION\";\n\n /**\n * Conditions for the admin extension to be shown.\n *\n * Its doing OR between the conditions of the same type:\n * - If only 1 requiredPermission is used/filled out then the admin home extension will be shown if user has the required permission.\n * - If more requiredPermission are used/filled out then the admin home extension will be shown for all assets that the user has one of the required permission for.\n */\n conditions?: {\n requiredPermission?: RequiredPermission | RequiredPermission[];\n };\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n"]}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { AbstractExtensionManifest, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
1
|
+
import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
2
|
export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
|
|
3
3
|
type: "ASSET_HOME_EXTENSION";
|
|
4
4
|
/**
|
|
5
|
-
* Conditions for the asset home
|
|
6
|
-
*
|
|
5
|
+
* Conditions for the asset home extension to be shown.
|
|
6
|
+
* model and brand is case insensitive so does not matter how you write the brand.
|
|
7
7
|
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* If
|
|
9
|
+
* Its doing AND between the conditions types and OR between the conditions of the same type:
|
|
10
|
+
* - If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
11
|
+
* - If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
12
|
+
* - If only requiredPermissions is used/filled out then the asset home extension will be shown for all assets that the user has the required permission for.
|
|
13
|
+
* - If more requiredPermissions are used/filled out then the asset home extension will be shown for all assets that the user has one of the required permission for.
|
|
14
|
+
* - If no conditions are used/filled out then the asset home extension will be shown for all assets.
|
|
11
15
|
*/
|
|
12
16
|
conditions?: {
|
|
13
17
|
model?: string[] | string;
|
|
14
18
|
brand?: string[] | string;
|
|
19
|
+
requiredPermission?: RequiredPermission | RequiredPermission[];
|
|
15
20
|
};
|
|
16
21
|
menuItem: {
|
|
17
22
|
name: string | Translations | TranslationKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assetHomeExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/assetHomeExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"assetHomeExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/assetHomeExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AbstractExtensionManifest,\n RequiredPermission,\n TranslationKey,\n Translations,\n} from \"../irisAppExtensionManifest\";\n\nexport interface AssetHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"ASSET_HOME_EXTENSION\";\n /**\n * Conditions for the asset home extension to be shown.\n * model and brand is case insensitive so does not matter how you write the brand.\n * brand: \"trackunit\" and brand: \"Trackunit\" will be the same.\n *\n * Its doing AND between the conditions types and OR between the conditions of the same type:\n * - If both model and brand are used/filled out then asset needs to match both model and brand.\n * - If only brand or model is used/filled out then the asset needs to match the filled out property.\n * - If only requiredPermissions is used/filled out then the asset home extension will be shown for all assets that the user has the required permission for.\n * - If more requiredPermissions are used/filled out then the asset home extension will be shown for all assets that the user has one of the required permission for.\n * - If no conditions are used/filled out then the asset home extension will be shown for all assets.\n */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n requiredPermission?: RequiredPermission | RequiredPermission[];\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n"]}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { AbstractExtensionManifest, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
1
|
+
import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
2
|
export interface FleetExtensionManifest extends AbstractExtensionManifest {
|
|
3
3
|
type: "FLEET_EXTENSION";
|
|
4
4
|
/**
|
|
5
|
-
* Conditions for the
|
|
5
|
+
* Conditions for the fleet extension to be shown.
|
|
6
6
|
* It is case insensitive so does not matter how you write the brand.
|
|
7
7
|
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* If
|
|
9
|
+
* Its doing AND between the conditions types and OR between the conditions of the same type:
|
|
10
|
+
* - If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
11
|
+
* - If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
12
|
+
* - If only requiredPermission is used/filled out then the fleet extension will be shown if the user has the required permission.
|
|
13
|
+
* - If more requiredPermissions are used/filled out then the fleet extension will be shown if the user has one of the required permissions.
|
|
14
|
+
* - If no conditions are used/filled out then the asset home extension will be shown for all assets.
|
|
11
15
|
*/
|
|
12
16
|
conditions?: {
|
|
13
17
|
model?: string[] | string;
|
|
14
18
|
brand?: string[] | string;
|
|
19
|
+
requiredPermission?: RequiredPermission | RequiredPermission[];
|
|
15
20
|
};
|
|
16
21
|
menuItem: {
|
|
17
22
|
name: string | Translations | TranslationKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleetExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/fleetExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"fleetExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/fleetExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AbstractExtensionManifest,\n RequiredPermission,\n TranslationKey,\n Translations,\n} from \"../irisAppExtensionManifest\";\n\nexport interface FleetExtensionManifest extends AbstractExtensionManifest {\n type: \"FLEET_EXTENSION\";\n\n /**\n * Conditions for the fleet extension to be shown.\n * It is case insensitive so does not matter how you write the brand.\n * brand: \"trackunit\" and brand: \"Trackunit\" will be the same.\n *\n * Its doing AND between the conditions types and OR between the conditions of the same type:\n * - If both model and brand are used/filled out then asset needs to match both model and brand.\n * - If only brand or model is used/filled out then the asset needs to match the filled out property.\n * - If only requiredPermission is used/filled out then the fleet extension will be shown if the user has the required permission.\n * - If more requiredPermissions are used/filled out then the fleet extension will be shown if the user has one of the required permissions.\n * - If no conditions are used/filled out then the asset home extension will be shown for all assets.\n */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n requiredPermission?: RequiredPermission | RequiredPermission[];\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n icon: string;\n };\n}\n"]}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { AbstractExtensionManifest, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
1
|
+
import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
2
|
export interface SiteHomeExtensionManifest extends AbstractExtensionManifest {
|
|
3
3
|
type: "SITE_HOME_EXTENSION";
|
|
4
|
+
/**
|
|
5
|
+
* Conditions for the site home extension to be shown.
|
|
6
|
+
*
|
|
7
|
+
* Its doing AND between the conditions types and OR between the conditions of the same type:
|
|
8
|
+
* - If only requiredPermission is used/filled out then the site home extension will be shown for all sites that the user has the required permission for.
|
|
9
|
+
* - If more requiredPermission are used/filled out then the site home extension will be shown for all sites that the user has one of the required permission for.
|
|
10
|
+
* - If no conditions are used/filled out then the site home extension will be shown for all sites.
|
|
11
|
+
*/
|
|
12
|
+
conditions?: {
|
|
13
|
+
requiredPermission?: RequiredPermission | RequiredPermission[];
|
|
14
|
+
};
|
|
4
15
|
menuItem: {
|
|
5
16
|
name: string | Translations | TranslationKey;
|
|
6
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siteHomeExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/siteHomeExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"siteHomeExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/siteHomeExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AbstractExtensionManifest,\n RequiredPermission,\n TranslationKey,\n Translations,\n} from \"../irisAppExtensionManifest\";\n\nexport interface SiteHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"SITE_HOME_EXTENSION\";\n\n /**\n * Conditions for the site home extension to be shown.\n *\n * Its doing AND between the conditions types and OR between the conditions of the same type:\n * - If only requiredPermission is used/filled out then the site home extension will be shown for all sites that the user has the required permission for.\n * - If more requiredPermission are used/filled out then the site home extension will be shown for all sites that the user has one of the required permission for.\n * - If no conditions are used/filled out then the site home extension will be shown for all sites.\n */\n conditions?: {\n requiredPermission?: RequiredPermission | RequiredPermission[];\n };\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n"]}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "IRIS_APP_SETTINGS_EXTENSION" | "ADMIN_EXTENSION" | "FLEET_EXTENSION" | "ASSET_HOME_EXTENSION" | "SITE_HOME_EXTENSION";
|
|
2
|
+
export interface RequiredPermission {
|
|
3
|
+
/**
|
|
4
|
+
* The type of entity that the permission is required for.
|
|
5
|
+
*/
|
|
6
|
+
entityType: "ACCOUNT";
|
|
7
|
+
/**
|
|
8
|
+
* The permission that is required for the app extension to be visible.
|
|
9
|
+
*/
|
|
10
|
+
permission: string;
|
|
11
|
+
}
|
|
2
12
|
export interface AbstractExtensionManifest {
|
|
3
13
|
/** The id of the app extension, will be part of the URL in the manager */
|
|
4
14
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppExtensionManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppExtensionManifest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"irisAppExtensionManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppExtensionManifest.ts"],"names":[],"mappings":";;;AA6Da,QAAA,YAAY,GAAG;IAC1B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACI,CAAC","sourcesContent":["export declare type IrisAppExtensionType =\n | \"REPORT_EXTENSION\"\n | \"IRIS_APP_SETTINGS_EXTENSION\"\n | \"ADMIN_EXTENSION\"\n | \"FLEET_EXTENSION\"\n | \"ASSET_HOME_EXTENSION\"\n | \"SITE_HOME_EXTENSION\";\n\nexport interface RequiredPermission {\n /**\n * The type of entity that the permission is required for.\n */\n entityType: \"ACCOUNT\";\n\n /**\n * The permission that is required for the app extension to be visible.\n */\n permission: string;\n}\n\nexport interface AbstractExtensionManifest {\n /** The id of the app extension, will be part of the URL in the manager */\n id: string;\n\n /**\n * The path to the main entry point for the extension.\n *\n * @default \"index.tsx\"\n */\n main?: string;\n\n /**\n * The relative path from the NX workspace to this projects source Root.\n */\n sourceRoot: string;\n\n /** The type of the app extension */\n type: IrisAppExtensionType;\n}\n\nexport interface Translations {\n en: string;\n da?: string;\n de?: string;\n cs?: string;\n nl?: string;\n fr?: string;\n fi?: string;\n hu?: string;\n it?: string;\n nb?: string;\n pl?: string;\n pt?: string;\n ru?: string;\n ro?: string;\n es?: string;\n sv?: string;\n ja?: string;\n th?: string;\n}\n\nexport const languageKeys = [\n \"en\",\n \"da\",\n \"de\",\n \"cs\",\n \"nl\",\n \"fr\",\n \"fi\",\n \"hu\",\n \"it\",\n \"nb\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"ro\",\n \"es\",\n \"sv\",\n \"ja\",\n \"th\",\n] as const;\n\nexport type TranslationLanguageKeys = (typeof languageKeys)[number];\n\nexport interface TranslationKey {\n key: string;\n}\n"]}
|