@trackunit/iris-app-api 0.0.98 → 0.0.99
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,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.99](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.98...iris-app-api/0.0.99) (2023-06-16)
|
|
6
|
+
|
|
5
7
|
## [0.0.98](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.97...iris-app-api/0.0.98) (2023-06-13)
|
|
6
8
|
|
|
7
9
|
## [0.0.97](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.96...iris-app-api/0.0.97) (2023-06-01)
|
package/package.json
CHANGED
|
@@ -102,11 +102,11 @@ export interface IrisAppManifest_1_0 {
|
|
|
102
102
|
}
|
|
103
103
|
export type PublicIrisAppManifest = Omit<IrisAppManifest, "dependencies" | "devDependencies" | "installation"> & {
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Relative path for this iris app.
|
|
106
106
|
*
|
|
107
|
-
* @returns {string} the
|
|
107
|
+
* @returns {string} the path to the iris app
|
|
108
108
|
*/
|
|
109
|
-
|
|
109
|
+
irisAppPath: string;
|
|
110
110
|
installation: Omit<InstallationConfig, "accountIds">;
|
|
111
111
|
};
|
|
112
112
|
export type ActivationMode = "FORCE_ENABLE" | "DEFAULT_ENABLE" | "ALWAYS_VISIBLE" | "CONTROLLED_MANUAL_INSTALLATION" | "CONTROLLED_AUTOMATIC_INSTALLATION";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":";;;AA+Ja,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;AAmHX,IAAY,MAgBX;AAhBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,2BAAc,CAAA;IACd,qBAAa,CAAA;IACb,2BAAc,CAAA;IACd,2BAAmB,CAAA;IACnB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;AACjB,CAAC,EAhBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAgBjB;AAED,IAAY,MAyBX;AAzBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,2BAAc,CAAA;IACd,yBAAY,CAAA;IACZ,yBAAY,CAAA;IACZ,6BAAgB,CAAA;IAChB,iBAAS,CAAA;AACX,CAAC,EAzBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAyBjB","sourcesContent":["export interface IrisAppManifest\n extends Omit<IrisAppManifest_1_0, \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\"> {\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\ninterface InstallationConfig {\n /**\n * Installation policy for the app.\n *\n * - `PERMANENT`: Always installed and cannot be removed by the end customer.\n * - `PREINSTALLED`: Initially installed and can be removed by the end customer.\n * - `ON_DEMAND`: Available to be installed and removed by the end customer.\n * - `ON_DEMAND_REQUIRES_APPROVAL`: Requires approval by the Trackunit billing team before the end customer can install it. Behaves like 'ON_DEMAND' after receiving approval.\n * - `PREINSTALLED_REQUIRES_APPROVAL`: Requires approval by the Trackunit billing team and installs automatically once approved. Behaves like 'PREINSTALLED' after receiving approval.\n *\n * All policies will take into consideration both `accountIds` and `subscriptionPlan`.\n */\n policy: InstallationPolicy;\n /**\n * List of account IDs that can install this Iris App or `\"ALL_ACCOUNTS\"` if available for all customers.\n */\n accountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * List of pricing plans the Iris App is available at or `\"ALL_PLANS\"` if available in all plans.\n */\n pricingPlans: \"ALL_PLANS\" | SubscriptionPackage[];\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 */\n moduleFederationName: string;\n /**\n * A configuration object for handling scoped token acquisition.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Activation mode means:\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 validForAccountIds and marketplace.allowForPackage\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the Tile needs to communicate with.\n */\n validDomains: string[];\n /**\n * A list of any account ids that can enable this Tile, or empty array if available for all customers.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the Tile.\n * Used for performance optimization and security scans.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the Tile.\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 */\n extensions: IrisAppExtension[];\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: CustomFieldDefinition[];\n}\n\nexport type PublicIrisAppManifest = Omit<IrisAppManifest, \"dependencies\" | \"devDependencies\" | \"installation\"> & {\n /**\n * Full url for this iris app.\n *\n * @returns {string} the url to the iris app\n */\n irisAppUrl: string;\n\n installation: Omit<InstallationConfig, \"accountIds\">;\n};\n\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n\nexport type InstallationPolicy =\n | \"PERMANENT\"\n | \"PREINSTALLED\"\n | \"ON_DEMAND\"\n | \"ON_DEMAND_REQUIRES_APPROVAL\"\n | \"PREINSTALLED_REQUIRES_APPROVAL\";\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}\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 declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\";\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * The human readable translation of the key. So what the end customer will see.\n */\n title: string;\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n defaultStringValue?: string;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n defaultStringValue?: string;\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n defaultStringValue?: string;\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n defaultStringValue?: string;\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n defaultBooleanValue?: boolean;\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n defaultDateValue?: string;\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n defaultStringArrayValue?: string[];\n multiSelect?: boolean;\n allValues?: string[];\n /**\n * Map from old values not in {@link allValues} to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport enum UnitUs {\n \"mi\" = \"mi\",\n \"yd\" = \"yd\",\n \"ft\" = \"ft\",\n \"in\" = \"in\",\n \"ac\" = \"ac\",\n \"ha\" = \"ha\",\n \"ft_2\" = \"ft²\",\n \"gal\" = \"gal\",\n \"ft_3\" = \"ft³\",\n \"ton_us\" = \"ton_us\",\n \"lb\" = \"lb\",\n \"oz\" = \"oz\",\n \"mph\" = \"mph\",\n \"lb_h\" = \"lb/h\",\n \"lb_s\" = \"lb/s\",\n}\n\nexport enum UnitSi {\n \"km\" = \"km\",\n \"m\" = \"m\",\n \"cm\" = \"cm\",\n \"mm\" = \"mm\",\n \"l\" = \"l\",\n \"kg\" = \"kg\",\n \"g\" = \"g\",\n \"ton\" = \"ton\",\n \"N\" = \"N\",\n \"kW\" = \"kW\",\n \"W\" = \"W\",\n \"kWh\" = \"kWh\",\n \"kPa\" = \"kPa\",\n \"Pa\" = \"Pa\",\n \"bar\" = \"bar\",\n \"m_s\" = \"m/s\",\n \"kg_h\" = \"kg/h\",\n \"kg_s\" = \"kg/s\",\n \"km_h\" = \"km/h\",\n \"km_2\" = \"km²\",\n \"m_2\" = \"m²\",\n \"m_3\" = \"m³\",\n \"m_s_2\" = \"m/s²\",\n \"h\" = \"h\",\n}\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n defaultNumberValue?: number;\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitSi;\n unitUs?: UnitUs;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n defaultNumberValue?: number;\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition;\n\nexport interface AssetHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"ASSET_HOME_EXTENSION\";\n /**\n * Conditions for the asset home app 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 * 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 */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n\nexport interface SiteHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"SITE_HOME_EXTENSION\";\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\nexport interface FleetExtensionManifest extends AbstractExtensionManifest {\n type: \"FLEET_EXTENSION\";\n\n /**\n * Conditions for the asset home app 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 * 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 */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n icon: string;\n };\n}\n\nexport interface AdminExtensionManifest extends AbstractExtensionManifest {\n type: \"ADMIN_EXTENSION\";\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n\nexport interface IrisAppSettingsExtensionManifest extends AbstractExtensionManifest {\n type: \"IRIS_APP_SETTINGS_EXTENSION\";\n}\n\nexport interface ReportExtensionManifest extends AbstractExtensionManifest {\n type: \"REPORT_EXTENSION\";\n\n menuItem: {\n /**\n * Title of the card in manager\n */\n name: string | Translations | TranslationKey;\n\n /**\n * Subtitle of the card in manager\n */\n description: string | Translations | TranslationKey;\n\n /**\n * Icon of the card in manager, must use icons from:\n * https://apps.dev.iris.trackunit.com/storybook/?path=/docs/components-icon--default\n */\n icon: string;\n };\n}\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | ReportExtensionManifest;\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\n/**\n * An image that should be shown in the marketplace for this app.\n */\nexport interface MarketplaceAssetImage {\n /**\n * The type of the Asset\n */\n type: \"IMAGE\";\n /**\n * A Path to an image in the assets folder of the app.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n path: string;\n}\n\n/**\n * A video that should be shown in the marketplace for this app.\n */\nexport interface MarketplaceAssetVideo {\n /**\n * The type of the Asset\n */\n type: \"VIDEO\";\n /**\n * An url for a youtube video.\n */\n url: string;\n}\n\n/**\n * A video or image that should be shown in the marketplace for this app.\n */\nexport type MarketplaceAsset = MarketplaceAssetImage | MarketplaceAssetVideo;\n\n/**\n * An object of data used when the app is displayed in the marketplace\n */\nexport interface Marketplace extends Omit<Marketplace_1_0, \"allowForPackage\"> {}\n\n/**\n * An object of data used when the app is displayed in the marketplace\n *\n * @deprecated\n */\nexport interface Marketplace_1_0 {\n /**\n * Name used for the marketplace.\n */\n name: string;\n\n /**\n * A short summary used for the card on marketplace.\n * For longer description add a description.md file in the /assets/ folder of the app, and set the fullDescriptionPath.\n */\n description: string;\n\n /**\n * The path to the markdown file for the description.\n */\n fullDescriptionPath: string;\n\n /**\n * Path to an image in the assets folder of the app.\n * The image will be shown in the marketplace.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n logoPath?: string;\n /**\n * Tags used for describing the marketplace.\n */\n tags?: string[];\n /**\n * Categories used for the app in the marketplace.\n */\n categories?: Category[];\n /**\n * Assets (images and videos) used for the marketplace.\n */\n assets?: MarketplaceAsset[];\n /**\n * Defines what subscription packages the Tile is available at.\n */\n allowForPackage: \"ALL_PACKAGES\" | SubscriptionPackage[];\n /**\n * Homepage of the company building the app for the marketplace.\n */\n homePageUrl?: string;\n /**\n * The direct support page for this app.\n */\n supportUrl?: string;\n}\n\nexport declare type Category =\n | \"ANALYTICS\"\n | \"DATA_FEEDS\"\n | \"ENGINES_AND_HYDRAULICS\"\n | \"SERVICE_AND_MAINTENANCE\"\n | \"CONSULTANTS\"\n | \"CONNECTIVITY_AND_NETWORK\"\n | \"REPORTS\"\n | \"FAULT_CODES_AND_REMOTE_DIAGNOSTICS\"\n | \"SAFETY_AND_QUALITY\";\n\nexport declare type SubscriptionPackage =\n | \"VIEW\"\n | \"COLLECT\"\n | \"INSIGHT\"\n | \"EXPLORE_FLEET_OWNER\"\n | \"EVOLVE_FLEET_OWNER\"\n | \"EXPAND_FLEET_OWNER\"\n | \"EXPLORE_OEM\"\n | \"EVOLVE_OEM\"\n | \"EXPAND_OEM\";\n\nexport 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\";\ninterface Dependencies {\n [packageName: string]: string;\n}\nexport {};\n"]}
|
|
1
|
+
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":";;;AA+Ja,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;AAmHX,IAAY,MAgBX;AAhBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,2BAAc,CAAA;IACd,qBAAa,CAAA;IACb,2BAAc,CAAA;IACd,2BAAmB,CAAA;IACnB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;AACjB,CAAC,EAhBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAgBjB;AAED,IAAY,MAyBX;AAzBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,2BAAc,CAAA;IACd,yBAAY,CAAA;IACZ,yBAAY,CAAA;IACZ,6BAAgB,CAAA;IAChB,iBAAS,CAAA;AACX,CAAC,EAzBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAyBjB","sourcesContent":["export interface IrisAppManifest\n extends Omit<IrisAppManifest_1_0, \"specVersion\" | \"activationMode\" | \"marketplace\" | \"validForAccountIds\"> {\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\ninterface InstallationConfig {\n /**\n * Installation policy for the app.\n *\n * - `PERMANENT`: Always installed and cannot be removed by the end customer.\n * - `PREINSTALLED`: Initially installed and can be removed by the end customer.\n * - `ON_DEMAND`: Available to be installed and removed by the end customer.\n * - `ON_DEMAND_REQUIRES_APPROVAL`: Requires approval by the Trackunit billing team before the end customer can install it. Behaves like 'ON_DEMAND' after receiving approval.\n * - `PREINSTALLED_REQUIRES_APPROVAL`: Requires approval by the Trackunit billing team and installs automatically once approved. Behaves like 'PREINSTALLED' after receiving approval.\n *\n * All policies will take into consideration both `accountIds` and `subscriptionPlan`.\n */\n policy: InstallationPolicy;\n /**\n * List of account IDs that can install this Iris App or `\"ALL_ACCOUNTS\"` if available for all customers.\n */\n accountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * List of pricing plans the Iris App is available at or `\"ALL_PLANS\"` if available in all plans.\n */\n pricingPlans: \"ALL_PLANS\" | SubscriptionPackage[];\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 */\n moduleFederationName: string;\n /**\n * A configuration object for handling scoped token acquisition.\n */\n consentConfig?: ConsentConfig | \"inherit\";\n\n /**\n * Activation mode means:\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 validForAccountIds and marketplace.allowForPackage\n */\n activationMode: ActivationMode;\n\n /**\n * A list of any external domains that the Tile needs to communicate with.\n */\n validDomains: string[];\n /**\n * A list of any account ids that can enable this Tile, or empty array if available for all customers.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace_1_0;\n /**\n * A full list of runtime dependencies for the Tile.\n * Used for performance optimization and security scans.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the Tile.\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 */\n extensions: IrisAppExtension[];\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: CustomFieldDefinition[];\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\nexport type ActivationMode =\n | \"FORCE_ENABLE\"\n | \"DEFAULT_ENABLE\"\n | \"ALWAYS_VISIBLE\"\n | \"CONTROLLED_MANUAL_INSTALLATION\"\n | \"CONTROLLED_AUTOMATIC_INSTALLATION\";\n\nexport type InstallationPolicy =\n | \"PERMANENT\"\n | \"PREINSTALLED\"\n | \"ON_DEMAND\"\n | \"ON_DEMAND_REQUIRES_APPROVAL\"\n | \"PREINSTALLED_REQUIRES_APPROVAL\";\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}\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 declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\";\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * The human readable translation of the key. So what the end customer will see.\n */\n title: string;\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n defaultStringValue?: string;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n defaultStringValue?: string;\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n defaultStringValue?: string;\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n defaultStringValue?: string;\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n defaultBooleanValue?: boolean;\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n defaultDateValue?: string;\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n defaultStringArrayValue?: string[];\n multiSelect?: boolean;\n allValues?: string[];\n /**\n * Map from old values not in {@link allValues} to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport enum UnitUs {\n \"mi\" = \"mi\",\n \"yd\" = \"yd\",\n \"ft\" = \"ft\",\n \"in\" = \"in\",\n \"ac\" = \"ac\",\n \"ha\" = \"ha\",\n \"ft_2\" = \"ft²\",\n \"gal\" = \"gal\",\n \"ft_3\" = \"ft³\",\n \"ton_us\" = \"ton_us\",\n \"lb\" = \"lb\",\n \"oz\" = \"oz\",\n \"mph\" = \"mph\",\n \"lb_h\" = \"lb/h\",\n \"lb_s\" = \"lb/s\",\n}\n\nexport enum UnitSi {\n \"km\" = \"km\",\n \"m\" = \"m\",\n \"cm\" = \"cm\",\n \"mm\" = \"mm\",\n \"l\" = \"l\",\n \"kg\" = \"kg\",\n \"g\" = \"g\",\n \"ton\" = \"ton\",\n \"N\" = \"N\",\n \"kW\" = \"kW\",\n \"W\" = \"W\",\n \"kWh\" = \"kWh\",\n \"kPa\" = \"kPa\",\n \"Pa\" = \"Pa\",\n \"bar\" = \"bar\",\n \"m_s\" = \"m/s\",\n \"kg_h\" = \"kg/h\",\n \"kg_s\" = \"kg/s\",\n \"km_h\" = \"km/h\",\n \"km_2\" = \"km²\",\n \"m_2\" = \"m²\",\n \"m_3\" = \"m³\",\n \"m_s_2\" = \"m/s²\",\n \"h\" = \"h\",\n}\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n defaultNumberValue?: number;\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitSi;\n unitUs?: UnitUs;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n defaultNumberValue?: number;\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | DecimalNumberFieldDefinition\n | IntegerNumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition;\n\nexport interface AssetHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"ASSET_HOME_EXTENSION\";\n /**\n * Conditions for the asset home app 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 * 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 */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n\nexport interface SiteHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"SITE_HOME_EXTENSION\";\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\nexport interface FleetExtensionManifest extends AbstractExtensionManifest {\n type: \"FLEET_EXTENSION\";\n\n /**\n * Conditions for the asset home app 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 * 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 */\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string | Translations | TranslationKey;\n icon: string;\n };\n}\n\nexport interface AdminExtensionManifest extends AbstractExtensionManifest {\n type: \"ADMIN_EXTENSION\";\n\n menuItem: {\n name: string | Translations | TranslationKey;\n };\n}\n\nexport interface IrisAppSettingsExtensionManifest extends AbstractExtensionManifest {\n type: \"IRIS_APP_SETTINGS_EXTENSION\";\n}\n\nexport interface ReportExtensionManifest extends AbstractExtensionManifest {\n type: \"REPORT_EXTENSION\";\n\n menuItem: {\n /**\n * Title of the card in manager\n */\n name: string | Translations | TranslationKey;\n\n /**\n * Subtitle of the card in manager\n */\n description: string | Translations | TranslationKey;\n\n /**\n * Icon of the card in manager, must use icons from:\n * https://apps.dev.iris.trackunit.com/storybook/?path=/docs/components-icon--default\n */\n icon: string;\n };\n}\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\n | ReportExtensionManifest;\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\n/**\n * An image that should be shown in the marketplace for this app.\n */\nexport interface MarketplaceAssetImage {\n /**\n * The type of the Asset\n */\n type: \"IMAGE\";\n /**\n * A Path to an image in the assets folder of the app.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n path: string;\n}\n\n/**\n * A video that should be shown in the marketplace for this app.\n */\nexport interface MarketplaceAssetVideo {\n /**\n * The type of the Asset\n */\n type: \"VIDEO\";\n /**\n * An url for a youtube video.\n */\n url: string;\n}\n\n/**\n * A video or image that should be shown in the marketplace for this app.\n */\nexport type MarketplaceAsset = MarketplaceAssetImage | MarketplaceAssetVideo;\n\n/**\n * An object of data used when the app is displayed in the marketplace\n */\nexport interface Marketplace extends Omit<Marketplace_1_0, \"allowForPackage\"> {}\n\n/**\n * An object of data used when the app is displayed in the marketplace\n *\n * @deprecated\n */\nexport interface Marketplace_1_0 {\n /**\n * Name used for the marketplace.\n */\n name: string;\n\n /**\n * A short summary used for the card on marketplace.\n * For longer description add a description.md file in the /assets/ folder of the app, and set the fullDescriptionPath.\n */\n description: string;\n\n /**\n * The path to the markdown file for the description.\n */\n fullDescriptionPath: string;\n\n /**\n * Path to an image in the assets folder of the app.\n * The image will be shown in the marketplace.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n logoPath?: string;\n /**\n * Tags used for describing the marketplace.\n */\n tags?: string[];\n /**\n * Categories used for the app in the marketplace.\n */\n categories?: Category[];\n /**\n * Assets (images and videos) used for the marketplace.\n */\n assets?: MarketplaceAsset[];\n /**\n * Defines what subscription packages the Tile is available at.\n */\n allowForPackage: \"ALL_PACKAGES\" | SubscriptionPackage[];\n /**\n * Homepage of the company building the app for the marketplace.\n */\n homePageUrl?: string;\n /**\n * The direct support page for this app.\n */\n supportUrl?: string;\n}\n\nexport declare type Category =\n | \"ANALYTICS\"\n | \"DATA_FEEDS\"\n | \"ENGINES_AND_HYDRAULICS\"\n | \"SERVICE_AND_MAINTENANCE\"\n | \"CONSULTANTS\"\n | \"CONNECTIVITY_AND_NETWORK\"\n | \"REPORTS\"\n | \"FAULT_CODES_AND_REMOTE_DIAGNOSTICS\"\n | \"SAFETY_AND_QUALITY\";\n\nexport declare type SubscriptionPackage =\n | \"VIEW\"\n | \"COLLECT\"\n | \"INSIGHT\"\n | \"EXPLORE_FLEET_OWNER\"\n | \"EVOLVE_FLEET_OWNER\"\n | \"EXPAND_FLEET_OWNER\"\n | \"EXPLORE_OEM\"\n | \"EVOLVE_OEM\"\n | \"EXPAND_OEM\";\n\nexport 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\";\ninterface Dependencies {\n [packageName: string]: string;\n}\nexport {};\n"]}
|