@trackunit/iris-app-api 0.0.133 → 0.0.136
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 +6 -0
- package/package.json +1 -1
- package/src/types/extensions/assetEventsActionsExtensionManifest.d.ts +32 -0
- package/src/types/extensions/assetEventsActionsExtensionManifest.js +3 -0
- package/src/types/extensions/assetEventsActionsExtensionManifest.js.map +1 -0
- package/src/types/extensions/cssColor.d.ts +4 -0
- package/src/types/extensions/cssColor.js +3 -0
- package/src/types/extensions/cssColor.js.map +1 -0
- package/src/types/extensions/index.d.ts +2 -0
- package/src/types/extensions/index.js +2 -0
- package/src/types/extensions/index.js.map +1 -1
- package/src/types/extensions/widgetExtensionManifest.d.ts +8 -1
- package/src/types/extensions/widgetExtensionManifest.js +2 -0
- package/src/types/extensions/widgetExtensionManifest.js.map +1 -1
- package/src/types/irisAppExtensionManifest.d.ts +1 -1
- package/src/types/irisAppExtensionManifest.js.map +1 -1
- package/src/types/irisAppManifest.d.ts +2 -2
- package/src/types/irisAppManifest.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.136](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.135...iris-app-api/0.0.136) (2023-11-23)
|
|
6
|
+
|
|
7
|
+
## [0.0.135](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.134...iris-app-api/0.0.135) (2023-11-20)
|
|
8
|
+
|
|
9
|
+
## [0.0.134](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.133...iris-app-api/0.0.134) (2023-11-20)
|
|
10
|
+
|
|
5
11
|
## [0.0.133](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.132...iris-app-api/0.0.133) (2023-11-15)
|
|
6
12
|
|
|
7
13
|
## [0.0.132](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.131...iris-app-api/0.0.132) (2023-11-15)
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbstractExtensionManifest, RequiredCustomField, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
|
+
import { AccountScope } from "../scopes";
|
|
3
|
+
/**
|
|
4
|
+
* BETA! DONT USE THIS YET - its under development
|
|
5
|
+
*/
|
|
6
|
+
export type EVENT_TYPE = "ALERT" | "CAN_ERROR" | "DAMAGE_REPORT" | "FLUCTUATING_CAN_ERROR" | "MACHINE_FAULT" | "SERVICE";
|
|
7
|
+
export interface AssetEventsActionsExtensionManifest extends AbstractExtensionManifest {
|
|
8
|
+
type: "ASSET_EVENTS_ACTIONS_EXTENSION";
|
|
9
|
+
/**
|
|
10
|
+
* Conditions for the asset events actions extension to be shown.
|
|
11
|
+
* Its doing AND between the conditions types and OR between the conditions of the same type:
|
|
12
|
+
* - If only failureModeIdentifier or suspectParameterNumber or eventType or SourceAddress is used/filled out then the event needs to match the filled out property.
|
|
13
|
+
* - If more failureModeIdentifier, suspectParameterNumber, SourceAddress, and eventType is used/filled out then asset events actions extension will be shown for all events that matches all FMI, SPN, and eventType.
|
|
14
|
+
* - If only scopes is used/filled out then the asset events actions extension will be shown for all assets that the user has the required scopes for.
|
|
15
|
+
* - If more scopes are used/filled out then the asset events actions extension will be shown for all assets that the user has one of the required scopes for.
|
|
16
|
+
* - If no conditions are used/filled out then the asset events actions extension will be shown for all assets and events.
|
|
17
|
+
*/
|
|
18
|
+
conditions?: {
|
|
19
|
+
eventType?: EVENT_TYPE | EVENT_TYPE[];
|
|
20
|
+
sourceAddress?: number | number[];
|
|
21
|
+
failureModeIdentifier?: number | number[];
|
|
22
|
+
suspectParameterNumber?: number | number[];
|
|
23
|
+
scopes?: AccountScope | AccountScope[];
|
|
24
|
+
/**
|
|
25
|
+
* Only entityType ASSET custom fields are supported here
|
|
26
|
+
*/
|
|
27
|
+
requiredCustomField?: RequiredCustomField | RequiredCustomField[];
|
|
28
|
+
};
|
|
29
|
+
menuItem: {
|
|
30
|
+
name: string | Translations | TranslationKey;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetEventsActionsExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/assetEventsActionsExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AbstractExtensionManifest,\n RequiredCustomField,\n TranslationKey,\n Translations,\n} from \"../irisAppExtensionManifest\";\nimport { AccountScope } from \"../scopes\";\n/**\n * BETA! DONT USE THIS YET - its under development\n */\n\nexport type EVENT_TYPE =\n | \"ALERT\"\n | \"CAN_ERROR\"\n | \"DAMAGE_REPORT\"\n | \"FLUCTUATING_CAN_ERROR\"\n | \"MACHINE_FAULT\"\n | \"SERVICE\";\n\nexport interface AssetEventsActionsExtensionManifest extends AbstractExtensionManifest {\n type: \"ASSET_EVENTS_ACTIONS_EXTENSION\";\n /**\n * Conditions for the asset events actions extension to be shown.\n * Its doing AND between the conditions types and OR between the conditions of the same type:\n * - If only failureModeIdentifier or suspectParameterNumber or eventType or SourceAddress is used/filled out then the event needs to match the filled out property.\n * - If more failureModeIdentifier, suspectParameterNumber, SourceAddress, and eventType is used/filled out then asset events actions extension will be shown for all events that matches all FMI, SPN, and eventType.\n * - If only scopes is used/filled out then the asset events actions extension will be shown for all assets that the user has the required scopes for.\n * - If more scopes are used/filled out then the asset events actions extension will be shown for all assets that the user has one of the required scopes for.\n * - If no conditions are used/filled out then the asset events actions extension will be shown for all assets and events.\n */\n conditions?: {\n eventType?: EVENT_TYPE | EVENT_TYPE[];\n sourceAddress?: number | number[];\n failureModeIdentifier?: number | number[];\n suspectParameterNumber?: number | number[];\n scopes?: AccountScope | AccountScope[];\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"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Color
|
|
3
|
+
*/
|
|
4
|
+
export type CSSColor = `#${string}` | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})` | `rgba(${number},${number},${number},${string})` | `hsl(${number},${string},${string})` | `hsla(${number},${string},${string},${number})` | `hsla(${number},${string},${string},${string})`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssColor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/cssColor.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * CSS Color\n */\nexport type CSSColor =\n | `#${string}`\n | `rgb(${number},${number},${number})`\n | `rgba(${number},${number},${number},${number})`\n | `rgba(${number},${number},${number},${string})`\n | `hsl(${number},${string},${string})`\n | `hsla(${number},${string},${string},${number})`\n | `hsla(${number},${string},${string},${string})`;\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./adminExtensionManifest";
|
|
2
|
+
export * from "./assetEventsActionsExtensionManifest";
|
|
2
3
|
export * from "./assetHomeExtensionManifest";
|
|
4
|
+
export * from "./cssColor";
|
|
3
5
|
export * from "./fleetExtensionManifest";
|
|
4
6
|
export * from "./irisAppSettingsExtensionManifest";
|
|
5
7
|
export * from "./reportExtensionManifest";
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./adminExtensionManifest"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./assetEventsActionsExtensionManifest"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./assetHomeExtensionManifest"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./cssColor"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./fleetExtensionManifest"), exports);
|
|
7
9
|
tslib_1.__exportStar(require("./irisAppSettingsExtensionManifest"), exports);
|
|
8
10
|
tslib_1.__exportStar(require("./reportExtensionManifest"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,uEAA6C;AAC7C,mEAAyC;AACzC,6EAAmD;AACnD,oEAA0C;AAC1C,sEAA4C;AAC5C,oEAA0C","sourcesContent":["export * from \"./adminExtensionManifest\";\nexport * from \"./assetHomeExtensionManifest\";\nexport * from \"./fleetExtensionManifest\";\nexport * from \"./irisAppSettingsExtensionManifest\";\nexport * from \"./reportExtensionManifest\";\nexport * from \"./siteHomeExtensionManifest\";\nexport * from \"./widgetExtensionManifest\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,gFAAsD;AACtD,uEAA6C;AAC7C,qDAA2B;AAC3B,mEAAyC;AACzC,6EAAmD;AACnD,oEAA0C;AAC1C,sEAA4C;AAC5C,oEAA0C","sourcesContent":["export * from \"./adminExtensionManifest\";\nexport * from \"./assetEventsActionsExtensionManifest\";\nexport * from \"./assetHomeExtensionManifest\";\nexport * from \"./cssColor\";\nexport * from \"./fleetExtensionManifest\";\nexport * from \"./irisAppSettingsExtensionManifest\";\nexport * from \"./reportExtensionManifest\";\nexport * from \"./siteHomeExtensionManifest\";\nexport * from \"./widgetExtensionManifest\";\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AbstractExtensionManifest, TranslationKey, Translations } from "../irisAppExtensionManifest";
|
|
2
|
-
|
|
2
|
+
import { CSSColor } from "./cssColor";
|
|
3
|
+
export type WidgetBreakpointTypes = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export declare const widgetBreakpointTypes: WidgetBreakpointTypes[];
|
|
3
5
|
export interface WidgetGridOptions {
|
|
4
6
|
/**
|
|
5
7
|
* Minimum width in grid units.
|
|
@@ -38,6 +40,11 @@ export interface WidgetExtensionManifest extends AbstractExtensionManifest {
|
|
|
38
40
|
*/
|
|
39
41
|
hasEditDialog?: boolean;
|
|
40
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* The widget will have this padding, default is "default" if not supplied
|
|
45
|
+
*/
|
|
46
|
+
padding?: "none" | "default";
|
|
47
|
+
brandingColor?: CSSColor;
|
|
41
48
|
supportedLocations: WidgetSupportedLocations[];
|
|
42
49
|
gridOptions?: WidgetGridOptions;
|
|
43
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/widgetExtensionManifest.ts"],"names":[],"mappings":"","sourcesContent":["import { AbstractExtensionManifest, TranslationKey, Translations } from \"../irisAppExtensionManifest\";\n\nexport type WidgetBreakpointTypes = \"lg\" | \"
|
|
1
|
+
{"version":3,"file":"widgetExtensionManifest.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/iris-app-api/src/types/extensions/widgetExtensionManifest.ts"],"names":[],"mappings":";;;AAIa,QAAA,qBAAqB,GAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","sourcesContent":["import { AbstractExtensionManifest, TranslationKey, Translations } from \"../irisAppExtensionManifest\";\nimport { CSSColor } from \"./cssColor\";\n\nexport type WidgetBreakpointTypes = \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport const widgetBreakpointTypes: WidgetBreakpointTypes[] = [\"sm\", \"md\", \"lg\", \"xl\"];\n\nexport interface WidgetGridOptions {\n /**\n * Minimum width in grid units.\n */\n minW?: number | undefined;\n\n /**\n * Maximum width in grid units.\n */\n maxW?: number | undefined;\n\n /**\n * Minimum height in grid units.\n */\n minH?: number | undefined;\n\n /**\n * Maximum height in grid units.\n */\n maxH?: number | undefined;\n}\n\nexport type WidgetSupportedLocations = \"MY_HOME\" | \"SITE_HOME\";\n\n/**\n * BETA! DONT USE THIS YET - its under development\n */\nexport interface WidgetExtensionManifest extends AbstractExtensionManifest {\n type: \"WIDGET_EXTENSION\";\n\n header: {\n /**\n * The name of the widget to display in the header\n */\n name: string | Translations | TranslationKey;\n\n /**\n * The icon of the widget to display in the header\n */\n icon?: string;\n\n /**\n * If true a button will be on the header and an editDialog from the src folder of this extension will be loaded\n */\n hasEditDialog?: boolean;\n };\n\n /**\n * The widget will have this padding, default is \"default\" if not supplied\n */\n padding?: \"none\" | \"default\";\n\n brandingColor?: CSSColor;\n\n supportedLocations: WidgetSupportedLocations[];\n gridOptions?: WidgetGridOptions;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "IRIS_APP_SETTINGS_EXTENSION" | "ADMIN_EXTENSION" | "FLEET_EXTENSION" | "WIDGET_EXTENSION" | "ASSET_HOME_EXTENSION" | "SITE_HOME_EXTENSION";
|
|
1
|
+
export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "IRIS_APP_SETTINGS_EXTENSION" | "ADMIN_EXTENSION" | "FLEET_EXTENSION" | "WIDGET_EXTENSION" | "ASSET_HOME_EXTENSION" | "ASSET_EVENTS_ACTIONS_EXTENSION" | "SITE_HOME_EXTENSION";
|
|
2
2
|
export type RegExpType = {
|
|
3
3
|
pattern: string | RegExp;
|
|
4
4
|
};
|
|
@@ -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":";;;AAsEa,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 | \"ASSET_EVENTS_ACTIONS_EXTENSION\"\n | \"SITE_HOME_EXTENSION\";\n\nexport type RegExpType = {\n pattern: string | RegExp;\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"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminExtensionManifest, AssetHomeExtensionManifest, FleetExtensionManifest, IrisAppSettingsExtensionManifest, ReportExtensionManifest, SiteHomeExtensionManifest } from "./extensions";
|
|
1
|
+
import { AdminExtensionManifest, AssetEventsActionsExtensionManifest, AssetHomeExtensionManifest, FleetExtensionManifest, IrisAppSettingsExtensionManifest, ReportExtensionManifest, SiteHomeExtensionManifest } from "./extensions";
|
|
2
2
|
import { WidgetExtensionManifest } from "./extensions/widgetExtensionManifest";
|
|
3
3
|
import { BooleanFieldDefinition, DateFieldDefinition, DecimalNumberFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, IntegerNumberFieldDefinition, JsonFieldDefinition, MonetaryFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, WebAddressFieldDefinition } from "./irisAppCustomFields";
|
|
4
4
|
import { InstallationConfig } from "./irisAppInstallationConfig";
|
|
@@ -36,7 +36,7 @@ export type RequiredOrOptionalScope = {
|
|
|
36
36
|
scope: Scope;
|
|
37
37
|
optional?: boolean;
|
|
38
38
|
};
|
|
39
|
-
export declare type IrisAppExtension = AssetHomeExtensionManifest | IrisAppSettingsExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | SiteHomeExtensionManifest | WidgetExtensionManifest | ReportExtensionManifest;
|
|
39
|
+
export declare type IrisAppExtension = AssetHomeExtensionManifest | IrisAppSettingsExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | SiteHomeExtensionManifest | WidgetExtensionManifest | ReportExtensionManifest | AssetEventsActionsExtensionManifest;
|
|
40
40
|
export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition | JsonFieldDefinition | MonetaryFieldDefinition;
|
|
41
41
|
/**
|
|
42
42
|
* @deprecated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AdminExtensionManifest,\n AssetHomeExtensionManifest,\n FleetExtensionManifest,\n IrisAppSettingsExtensionManifest,\n ReportExtensionManifest,\n SiteHomeExtensionManifest,\n} from \"./extensions\";\nimport { WidgetExtensionManifest } from \"./extensions/widgetExtensionManifest\";\nimport {\n BooleanFieldDefinition,\n DateFieldDefinition,\n DecimalNumberFieldDefinition,\n DropDownFieldDefinition,\n EmailFieldDefinition,\n IntegerNumberFieldDefinition,\n JsonFieldDefinition,\n MonetaryFieldDefinition,\n PhoneNumberFieldDefinition,\n StringFieldDefinition,\n WebAddressFieldDefinition,\n} from \"./irisAppCustomFields\";\nimport { InstallationConfig } from \"./irisAppInstallationConfig\";\nimport { Marketplace, Marketplace_1_0 } from \"./irisAppMarketplace\";\nimport { Scope } from \"./scopes\";\n\nexport interface IrisAppManifest\n extends Omit<\n IrisAppManifest_1_0,\n \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\" | \"consentConfig\"\n > {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.1\";\n\n /**\n * Configuration for the installation of the app.\n *\n * Each parameter can be combined to create rules to target specific customers.\n * Each parameter works as a filter to decide if an app is available to a specific customer.\n */\n installation: InstallationConfig;\n\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace;\n\n /**\n * Scopes needed in app tokens, these scopes are used from the token - when contacting Trackunits backend.\n */\n scopes?: RequiredOrOptionalScope | RequiredOrOptionalScope[];\n\n /**\n * Configuration of callback to get credentials to call the API after app installation.\n */\n tokenCallback?: {\n url: string;\n };\n}\n\nexport type RequiredOrOptionalScope = { scope: Scope; optional?: boolean };\n\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | WidgetExtensionManifest\n | ReportExtensionManifest;\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition\n | JsonFieldDefinition\n | MonetaryFieldDefinition;\n\n/**\n * @deprecated\n */\nexport interface ConsentConfig {\n /**\n * The application type. Should be one of WEB or BROWSER.\n */\n applicationType: \"WEB\" | \"BROWSER\";\n /**\n * List of scopes required by the application.\n */\n scopes: string[];\n /**\n * List of redirect URIs to be used when returning an authorization code.\n */\n redirectUris?: string[];\n}\n\nexport interface Dependencies {\n [packageName: string]: string;\n}\n\nexport type PublicIrisAppManifest = Omit<IrisAppManifest, \"dependencies\" | \"devDependencies\" | \"installation\"> & {\n /**\n * Relative path for this iris app.\n *\n * @returns {string} the path to the iris app\n */\n irisAppPath: string;\n\n installation: Omit<InstallationConfig, \"accountIds\">;\n};\n\n/**\n * @deprecated\n */\nexport interface IrisAppManifest_1_0 {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.0\";\n /**\n * The name of the exposed module from module federation build into the remoteEntry.js.\n * Basically the name of your app including workspace name, automatically parsed from your app-specific package.json.\n */\n moduleFederationName: string;\n\n /**\n * A configuration object for handling scoped token acquisition.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Controls the visibility of your app and how it is installed.\n * The different modes are:\n * - Enabled means its enabled on the subscription when this Iris app is approved.\n * - Visible means it will be visible to the customer to choose for them selves to enable/disable it.\n *\n * - FORCE_ENABLE then it can not be removed by the end customer, and will be installed based on the selected subscription package.\n * - DEFAULT_ENABLE means it will be enabled when a customer activates a new subscription package.\n * - ALWAYS_VISIBLE then it will always be visible for all customers.\n * - CONTROLLED_MANUAL_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, not activating the app.\n * - CONTROLLED_AUTOMATIC_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, also adding.\n *\n * All modes will take into consideration both {@link IrisAppManifest_1_0.validForAccountIds} and {@link IrisAppManifest_1_0.marketplace}.allowForPackage\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the app needs to communicate with.\n * The list is audited in the approval step of the app and every external API call\n * must be listed here to get through the verification process.\n * Even if it goes through without being listed, your app will fail to call the endpoint.\n */\n validDomains: string[];\n /**\n * Put `ALL_ACCOUNTS` in if your app is available to all users.\n * If you want to only make it available to certain users, provide a list of account ID's as strings.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * A configuration object for the Marketplace entry.\n * Holds all the settings associated with your apps listing on the marketplace.\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the App.\n * Used for performance optimization and security scans.\n * It is automatically parsed from the package.json in root.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the App.\n * Used for security scans.\n */\n devDependencies: Dependencies;\n\n /**\n * A list of extensions to the UI that this app manifest exposes.\n * Extensions are automatically added when a new extension is generated.\n * The array contains an import of the extension manifest within the extension.\n * If an extension is required in multiple apps, the you must manually add it to the arrays of those apps.\n */\n extensions: IrisAppExtension[];\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: CustomFieldDefinition[];\n}\n\n/**\n * @deprecated\n */\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n"]}
|
|
1
|
+
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AdminExtensionManifest,\n AssetEventsActionsExtensionManifest,\n AssetHomeExtensionManifest,\n FleetExtensionManifest,\n IrisAppSettingsExtensionManifest,\n ReportExtensionManifest,\n SiteHomeExtensionManifest,\n} from \"./extensions\";\nimport { WidgetExtensionManifest } from \"./extensions/widgetExtensionManifest\";\nimport {\n BooleanFieldDefinition,\n DateFieldDefinition,\n DecimalNumberFieldDefinition,\n DropDownFieldDefinition,\n EmailFieldDefinition,\n IntegerNumberFieldDefinition,\n JsonFieldDefinition,\n MonetaryFieldDefinition,\n PhoneNumberFieldDefinition,\n StringFieldDefinition,\n WebAddressFieldDefinition,\n} from \"./irisAppCustomFields\";\nimport { InstallationConfig } from \"./irisAppInstallationConfig\";\nimport { Marketplace, Marketplace_1_0 } from \"./irisAppMarketplace\";\nimport { Scope } from \"./scopes\";\n\nexport interface IrisAppManifest\n extends Omit<\n IrisAppManifest_1_0,\n \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\" | \"consentConfig\"\n > {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.1\";\n\n /**\n * Configuration for the installation of the app.\n *\n * Each parameter can be combined to create rules to target specific customers.\n * Each parameter works as a filter to decide if an app is available to a specific customer.\n */\n installation: InstallationConfig;\n\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace;\n\n /**\n * Scopes needed in app tokens, these scopes are used from the token - when contacting Trackunits backend.\n */\n scopes?: RequiredOrOptionalScope | RequiredOrOptionalScope[];\n\n /**\n * Configuration of callback to get credentials to call the API after app installation.\n */\n tokenCallback?: {\n url: string;\n };\n}\n\nexport type RequiredOrOptionalScope = { scope: Scope; optional?: boolean };\n\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | WidgetExtensionManifest\n | ReportExtensionManifest\n | AssetEventsActionsExtensionManifest;\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition\n | JsonFieldDefinition\n | MonetaryFieldDefinition;\n\n/**\n * @deprecated\n */\nexport interface ConsentConfig {\n /**\n * The application type. Should be one of WEB or BROWSER.\n */\n applicationType: \"WEB\" | \"BROWSER\";\n /**\n * List of scopes required by the application.\n */\n scopes: string[];\n /**\n * List of redirect URIs to be used when returning an authorization code.\n */\n redirectUris?: string[];\n}\n\nexport interface Dependencies {\n [packageName: string]: string;\n}\n\nexport type PublicIrisAppManifest = Omit<IrisAppManifest, \"dependencies\" | \"devDependencies\" | \"installation\"> & {\n /**\n * Relative path for this iris app.\n *\n * @returns {string} the path to the iris app\n */\n irisAppPath: string;\n\n installation: Omit<InstallationConfig, \"accountIds\">;\n};\n\n/**\n * @deprecated\n */\nexport interface IrisAppManifest_1_0 {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.0\";\n /**\n * The name of the exposed module from module federation build into the remoteEntry.js.\n * Basically the name of your app including workspace name, automatically parsed from your app-specific package.json.\n */\n moduleFederationName: string;\n\n /**\n * A configuration object for handling scoped token acquisition.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Controls the visibility of your app and how it is installed.\n * The different modes are:\n * - Enabled means its enabled on the subscription when this Iris app is approved.\n * - Visible means it will be visible to the customer to choose for them selves to enable/disable it.\n *\n * - FORCE_ENABLE then it can not be removed by the end customer, and will be installed based on the selected subscription package.\n * - DEFAULT_ENABLE means it will be enabled when a customer activates a new subscription package.\n * - ALWAYS_VISIBLE then it will always be visible for all customers.\n * - CONTROLLED_MANUAL_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, not activating the app.\n * - CONTROLLED_AUTOMATIC_INSTALLATION then it will be controlled by the team that activates the subscription package for the customer, also adding.\n *\n * All modes will take into consideration both {@link IrisAppManifest_1_0.validForAccountIds} and {@link IrisAppManifest_1_0.marketplace}.allowForPackage\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the app needs to communicate with.\n * The list is audited in the approval step of the app and every external API call\n * must be listed here to get through the verification process.\n * Even if it goes through without being listed, your app will fail to call the endpoint.\n */\n validDomains: string[];\n /**\n * Put `ALL_ACCOUNTS` in if your app is available to all users.\n * If you want to only make it available to certain users, provide a list of account ID's as strings.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * A configuration object for the Marketplace entry.\n * Holds all the settings associated with your apps listing on the marketplace.\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the App.\n * Used for performance optimization and security scans.\n * It is automatically parsed from the package.json in root.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the App.\n * Used for security scans.\n */\n devDependencies: Dependencies;\n\n /**\n * A list of extensions to the UI that this app manifest exposes.\n * Extensions are automatically added when a new extension is generated.\n * The array contains an import of the extension manifest within the extension.\n * If an extension is required in multiple apps, the you must manually add it to the arrays of those apps.\n */\n extensions: IrisAppExtension[];\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: CustomFieldDefinition[];\n}\n\n/**\n * @deprecated\n */\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n"]}
|