@trackunit/iris-app-api 0.0.112-alpha-48d16c736e.0 → 0.0.113

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 CHANGED
@@ -2,7 +2,18 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
- ## [0.0.112-alpha-48d16c736e.0](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.111...iris-app-api/0.0.112-alpha-48d16c736e.0) (2023-09-12)
5
+ ## [0.0.113](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.112...iris-app-api/0.0.113) (2023-09-12)
6
+
7
+ ## [0.0.112](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.111...iris-app-api/0.0.112) (2023-09-11)
8
+
9
+ ## 0.0.1 (2023-09-11)
10
+
11
+
12
+ ### Reverts
13
+
14
+ * Revert "ci: bump iris-app-api to 0.0.72-alpha-45f19e6f76.0 [skip ci]" ([885b130](https://github.com/Trackunit/manager/commit/885b13032df38a59c824a3dd7fb8639426bebdde))
15
+ * Revert "ci: bump iris-app-api to 0.0.1-alpha-5a781097d3.0 [skip ci]" ([e2f4aaa](https://github.com/Trackunit/manager/commit/e2f4aaa6afd9be780c21b902ab2f7c4e9fb75621))
16
+ * Revert "ci: bump iris-app-api to 0.0.46-alpha-61732b8ce.0 [skip ci]" ([f5ae87d](https://github.com/Trackunit/manager/commit/f5ae87d93fe21d80bcaf6ed3c3dee4269ca3cbfe))
6
17
 
7
18
  ## [0.0.111](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.110...iris-app-api/0.0.111) (2023-09-08)
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-api",
3
- "version": "0.0.112-alpha-48d16c736e.0",
3
+ "version": "0.0.113",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -1,4 +1,4 @@
1
- import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
1
+ import { AbstractExtensionManifest, RequiredCustomField, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
2
2
  export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
3
3
  type: "ASSET_HOME_EXTENSION";
4
4
  /**
@@ -17,6 +17,10 @@ export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
17
17
  model?: string[] | string;
18
18
  brand?: string[] | string;
19
19
  requiredPermission?: RequiredPermission | RequiredPermission[];
20
+ /**
21
+ * Only entityType ASSET custom fields are supported here
22
+ */
23
+ requiredCustomField?: RequiredCustomField | RequiredCustomField[];
20
24
  };
21
25
  menuItem: {
22
26
  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 {\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
+ {"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 RequiredCustomField,\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 /**\n * Only entityType ASSET custom fields are supported here\n */\n requiredCustomField?: RequiredCustomField | RequiredCustomField[];\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { AbstractExtensionManifest, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
1
+ import { AbstractExtensionManifest, RequiredCustomField, RequiredPermission, TranslationKey, Translations } from "../irisAppExtensionManifest";
2
2
  export interface SiteHomeExtensionManifest extends AbstractExtensionManifest {
3
3
  type: "SITE_HOME_EXTENSION";
4
4
  /**
@@ -7,10 +7,16 @@ export interface SiteHomeExtensionManifest extends AbstractExtensionManifest {
7
7
  * Its doing AND between the conditions types and OR between the conditions of the same type:
8
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
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 only requiredCustomField is used/filled out then the site home extension will be shown for all sites that has the required custom field.
11
+ * - If more requiredCustomField are used/filled out then the site home extension will be shown for all sites that has all of the required custom field.
10
12
  * - If no conditions are used/filled out then the site home extension will be shown for all sites.
11
13
  */
12
14
  conditions?: {
13
15
  requiredPermission?: RequiredPermission | RequiredPermission[];
16
+ /**
17
+ * Only entityType SITE custom fields are supported here
18
+ */
19
+ requiredCustomField?: RequiredCustomField | RequiredCustomField[];
14
20
  };
15
21
  menuItem: {
16
22
  name: string | Translations | TranslationKey;
@@ -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 {\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
+ {"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 RequiredCustomField,\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 only requiredCustomField is used/filled out then the site home extension will be shown for all sites that has the required custom field.\n * - If more requiredCustomField are used/filled out then the site home extension will be shown for all sites that has all of the required custom field.\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 * Only entityType SITE custom fields are supported here\n */\n requiredCustomField?: RequiredCustomField | RequiredCustomField[];\n };\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n"]}
@@ -9,6 +9,19 @@ export interface RequiredPermission {
9
9
  */
10
10
  permission: string;
11
11
  }
12
+ /**
13
+ * Used to limit access to iris apps based on custom field value.
14
+ */
15
+ export interface RequiredCustomField {
16
+ /**
17
+ * The custom field key to check for, only dropdown, string or boolean is supported.
18
+ */
19
+ customFieldKey: string;
20
+ /**
21
+ * The requiredValue that is required for the app extension to be visible.
22
+ */
23
+ requiredValue: string | string[] | boolean;
24
+ }
12
25
  export interface AbstractExtensionManifest {
13
26
  /** The id of the app extension, will be part of the URL in the manager */
14
27
  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":";;;AA8Da,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 | \"WIDGET_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"]}
1
+ {"version":3,"file":"irisAppExtensionManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppExtensionManifest.ts"],"names":[],"mappings":";;;AA6Ea,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 | \"WIDGET_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\n/**\n * Used to limit access to iris apps based on custom field value.\n */\nexport interface RequiredCustomField {\n /**\n * The custom field key to check for, only dropdown, string or boolean is supported.\n */\n customFieldKey: string;\n\n /**\n * The requiredValue that is required for the app extension to be visible.\n */\n requiredValue: string | string[] | boolean;\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"]}