@trackunit/iris-app-api 0.0.1-alpha-afcc978985.0

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 ADDED
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
+
5
+ ### [0.0.1-alpha-afcc978985.0](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.55...iris-app-api/0.0.1-alpha-afcc978985.0) (2022-11-04)
6
+
7
+ ### [0.0.55](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.54...iris-app-api/0.0.55) (2022-11-01)
8
+
9
+ ### [0.0.54](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.53...iris-app-api/0.0.54) (2022-10-27)
10
+
11
+ ### [0.0.53](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.52...iris-app-api/0.0.53) (2022-10-13)
12
+
13
+ ### [0.0.52](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.51...iris-app-api/0.0.52) (2022-10-06)
14
+
15
+ ### [0.0.51](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.50...iris-app-api/0.0.51) (2022-10-03)
16
+
17
+ ### [0.0.50](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.49...iris-app-api/0.0.50) (2022-09-26)
18
+
19
+ ### [0.0.49](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.48...iris-app-api/0.0.49) (2022-09-16)
20
+
21
+ ### [0.0.48](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.47...iris-app-api/0.0.48) (2022-09-15)
22
+
23
+ ### [0.0.47](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.46...iris-app-api/0.0.47) (2022-09-12)
24
+
25
+ ### [0.0.46](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.45...iris-app-api/0.0.46) (2022-09-12)
26
+
27
+
28
+ ### Reverts
29
+
30
+ * Revert "ci: bump iris-app-api to 0.0.46-alpha-61732b8ce.0 [skip ci]" ([f5ae87d](https://github.com/Trackunit/manager/commit/f5ae87d93fe21d80bcaf6ed3c3dee4269ca3cbfe))
31
+
32
+ ### [0.0.45](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.44...iris-app-api/0.0.45) (2022-08-25)
33
+
34
+ ### [0.0.44](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.43...iris-app-api/0.0.44) (2022-08-17)
35
+
36
+ ### [0.0.43](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.42...iris-app-api/0.0.43) (2022-08-12)
37
+
38
+ ### [0.0.42](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.41...iris-app-api/0.0.42) (2022-08-05)
39
+
40
+ ### [0.0.41](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.40...iris-app-api/0.0.41) (2022-07-29)
41
+
42
+ ### [0.0.40](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.39...iris-app-api/0.0.40) (2022-07-29)
43
+
44
+ ### [0.0.39](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.38...iris-app-api/0.0.39) (2022-07-05)
45
+
46
+ ### [0.0.38](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.37...iris-app-api/0.0.38) (2022-06-28)
47
+
48
+ ### [0.0.37](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.36...iris-app-api/0.0.37) (2022-06-27)
49
+
50
+ ### [0.0.36](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.35...iris-app-api/0.0.36) (2022-06-26)
51
+
52
+ ### [0.0.35](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.34...iris-app-api/0.0.35) (2022-06-23)
53
+
54
+ ### [0.0.34](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.33...iris-app-api/0.0.34) (2022-06-20)
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ > **⚠️ Beta**
2
+ >
3
+ > This is a beta version and subject to change without notice.
4
+
5
+ # Trackunit Iris App API
6
+ The `@trackunit/iris-app-api` package is a small package containing reusable types for the Trackunit Iris App SDK.
7
+
8
+ Trackunit Iris Apps are used by external developers to integrate custom functionality into [the Trackunit Manager platform](https://www.trackunit.com/services/manager/).
9
+
10
+ For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
11
+
12
+ ## Basic Usage
13
+ This package is not meant for isolated usage but is a part of the [`@trackunit/iris-app`](https://www.npmjs.com/package/@trackunit/iris-app) package.
14
+
15
+ ## Trackunit
16
+ This package was developed by Trackunit ApS.
17
+ Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
18
+
19
+ ![The Trackunit logo](https://trackunit.com/wp-content/uploads/2022/03/top-logo.svg)
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@trackunit/iris-app-api",
3
+ "version": "0.0.1-alpha-afcc978985.0",
4
+ "license": "SEE LICENSE IN LICENSE.txt",
5
+ "repository": "https://github.com/Trackunit/manager",
6
+ "main": "./src/index.js",
7
+ "types": "./src/index.d.ts",
8
+ "dependencies": {
9
+ "tslib": "^2.4.0"
10
+ },
11
+ "peerDependencies": {}
12
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./types";
package/src/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./types"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-api/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB","sourcesContent":["export * from \"./types\";\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./irisAppManifest";
2
+ export * from "./modulefederation";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./irisAppManifest"), exports);
5
+ tslib_1.__exportStar(require("./modulefederation"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,6DAAmC","sourcesContent":["export * from \"./irisAppManifest\";\nexport * from \"./modulefederation\";\n"]}
@@ -0,0 +1,377 @@
1
+ export interface IrisAppManifest {
2
+ /**
3
+ * A spec version for the manifest.
4
+ * This should not be changed manually.
5
+ */
6
+ specVersion: "1.0";
7
+ /**
8
+ * The name of the exposed module from module federation build into the remoteEntry.js.
9
+ */
10
+ moduleFederationName: string;
11
+ /**
12
+ * A configuration object for handling scoped token acquisition.
13
+ */
14
+ consentConfig?: ConsentConfig;
15
+ /**
16
+ * Activation mode means:
17
+ * - Enabled means its enabled on the subscription when this Iris app is approved.
18
+ * - Visible means it will be visible to the customer to choose for them selves to enable/disable it.
19
+ *
20
+ * - FORCE_ENABLE then it can not be removed by the end customer, and will be installed based on the selected subscription package.
21
+ * - DEFAULT_ENABLE means it will be enabled when a customer activates a new subscription package.
22
+ * - ALWAYS_VISIBLE then it will always be visible for all customers.
23
+ * - CONTROLLED_VISIBILITY then it will be controlled by the team that activates the subscription package for the customer.
24
+ *
25
+ * - All modes will take into consideration both validForAccountIds and marketplace.allowForPackage
26
+ */
27
+ activationMode: "FORCE_ENABLE" | "DEFAULT_ENABLE" | "ALWAYS_VISIBLE" | "CONTROLLED_VISIBILITY";
28
+ /**
29
+ * A list of any external domains that the Tile needs to communicate with.
30
+ */
31
+ validDomains: string[];
32
+ /**
33
+ * A list of any account ids that can enable this Tile, or empty array if available for all customers.
34
+ */
35
+ validForAccountIds: "ALL_ACCOUNTS" | string[];
36
+ /**
37
+ * A configuration object for the Marketplace entry
38
+ */
39
+ marketplace: Marketplace;
40
+ /**
41
+ * A full list of runtime dependencies for the Tile.
42
+ * Used for performance optimization and security scans.
43
+ */
44
+ dependencies: Dependencies;
45
+ /**
46
+ * A full list of dev dependencies for the Tile.
47
+ * Used for security scans.
48
+ */
49
+ devDependencies: Dependencies;
50
+ /**
51
+ * A list of extensions to the UI that this app manifest exposes
52
+ */
53
+ extensions: IrisAppExtension[];
54
+ /**
55
+ * A list of custom field definitions.
56
+ */
57
+ customFieldDefinitions?: CustomFieldDefinition[];
58
+ }
59
+ export interface Translations {
60
+ en: string;
61
+ da?: string;
62
+ de?: string;
63
+ cs?: string;
64
+ nl?: string;
65
+ fr?: string;
66
+ fi?: string;
67
+ hu?: string;
68
+ it?: string;
69
+ nb?: string;
70
+ pl?: string;
71
+ pt?: string;
72
+ ru?: string;
73
+ ro?: string;
74
+ es?: string;
75
+ sv?: string;
76
+ ja?: string;
77
+ th?: string;
78
+ }
79
+ export declare const translationKeys: string[];
80
+ export interface TranslationKey {
81
+ key: string;
82
+ }
83
+ export interface AbstractExtensionManifest {
84
+ /** The id of the app extension, will be part of the URL in the manager */
85
+ id: string;
86
+ /**
87
+ * The path to the main entry point for the extension.
88
+ * @default "index.tsx"
89
+ */
90
+ main?: string;
91
+ /**
92
+ * The relative path from the NX workspace to this projects source Root.
93
+ */
94
+ sourceRoot: string;
95
+ /** The type of the app extension */
96
+ type: IrisAppExtensionType;
97
+ }
98
+ export declare type CustomFieldDefinitionType = "STRING" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS";
99
+ export declare type EntityType = "ASSET" | "ACCOUNT";
100
+ export interface AbstractCustomFieldDefinition {
101
+ /**
102
+ * The key is the name you use to get the custom field.
103
+ */
104
+ key: string;
105
+ /**
106
+ * The type of the entity to attach this custom field on.
107
+ */
108
+ entityType: EntityType;
109
+ /**
110
+ * The human readable translation of the key. So what the end customer will see.
111
+ */
112
+ title: string;
113
+ /**
114
+ * Should this be visible in the generic UI in Manager.
115
+ */
116
+ uiVisible: boolean;
117
+ /**
118
+ * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.
119
+ */
120
+ uiEditable: boolean;
121
+ /**
122
+ * The type of this custom field definition
123
+ */
124
+ type: CustomFieldDefinitionType;
125
+ }
126
+ export interface StringFieldDefinition extends AbstractCustomFieldDefinition {
127
+ type: "STRING";
128
+ minimumLength?: number;
129
+ maximumLength?: number;
130
+ pattern?: string;
131
+ defaultStringValue?: string;
132
+ }
133
+ export interface EmailFieldDefinition extends AbstractCustomFieldDefinition {
134
+ type: "EMAIL";
135
+ defaultStringValue?: string;
136
+ }
137
+ export interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {
138
+ type: "WEB_ADDRESS";
139
+ defaultStringValue?: string;
140
+ }
141
+ export interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {
142
+ type: "PHONE_NUMBER";
143
+ defaultStringValue?: string;
144
+ }
145
+ export interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {
146
+ type: "BOOLEAN";
147
+ defaultBooleanValue?: boolean;
148
+ }
149
+ export interface DateFieldDefinition extends AbstractCustomFieldDefinition {
150
+ type: "DATE";
151
+ defaultDateValue?: string;
152
+ }
153
+ export interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {
154
+ type: "DROPDOWN";
155
+ defaultStringArrayValue?: string[];
156
+ multiSelect?: boolean;
157
+ allValues?: string[];
158
+ dropDownValueReplacements: Record<string, string>;
159
+ }
160
+ export declare enum UnitUs {
161
+ "mi" = "mi",
162
+ "yd" = "yd",
163
+ "ft" = "ft",
164
+ "in" = "in",
165
+ "ac" = "ac",
166
+ "ha" = "ha",
167
+ "ft_2" = "ft\u00B2",
168
+ "gal" = "gal",
169
+ "ft_3" = "ft\u00B3",
170
+ "ton_us" = "ton_us",
171
+ "lb" = "lb",
172
+ "oz" = "oz",
173
+ "mph" = "mph",
174
+ "lb_h" = "lb/h",
175
+ "lb_s" = "lb/s"
176
+ }
177
+ export declare enum UnitSi {
178
+ "km" = "km",
179
+ "m" = "m",
180
+ "cm" = "cm",
181
+ "mm" = "mm",
182
+ "l" = "l",
183
+ "kg" = "kg",
184
+ "g" = "g",
185
+ "ton" = "ton",
186
+ "N" = "N",
187
+ "kW" = "kW",
188
+ "W" = "W",
189
+ "kWh" = "kWh",
190
+ "kPa" = "kPa",
191
+ "Pa" = "Pa",
192
+ "bar" = "bar",
193
+ "m_s" = "m/s",
194
+ "kg_h" = "kg/h",
195
+ "kg_s" = "kg/s",
196
+ "km_h" = "km/h",
197
+ "km_2" = "km\u00B2",
198
+ "m_2" = "m\u00B2",
199
+ "m_3" = "m\u00B3",
200
+ "m_s_2" = "m/s\u00B2"
201
+ }
202
+ export interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {
203
+ type: "NUMBER";
204
+ defaultNumberValue?: number;
205
+ minimum?: number;
206
+ maximum?: number;
207
+ unitSi?: UnitSi;
208
+ unitUs?: UnitUs;
209
+ isInteger: false;
210
+ }
211
+ export interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {
212
+ type: "NUMBER";
213
+ defaultNumberValue?: number;
214
+ minimum?: number;
215
+ maximum?: number;
216
+ isInteger: true;
217
+ unitSi: never;
218
+ unitUs: never;
219
+ }
220
+ export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition;
221
+ export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
222
+ type: "ASSET_HOME_EXTENSION";
223
+ /**
224
+ * Conditions for the asset home app to be shown.
225
+ * It is case insensitive so does not matter how you write the brand.
226
+ * brand: "trackunit" and brand: "Trackunit" will be the same.
227
+ *
228
+ * If both model and brand are used/filled out then asset needs to match both model and brand.
229
+ * If only brand or model is used/filled out then the asset needs to match the filled out property.
230
+ **/
231
+ conditions?: {
232
+ model?: string[] | string;
233
+ brand?: string[] | string;
234
+ };
235
+ menuItem: {
236
+ name: string | Translations | TranslationKey;
237
+ };
238
+ }
239
+ export interface FleetExtensionManifest extends AbstractExtensionManifest {
240
+ type: "FLEET_EXTENSION";
241
+ /**
242
+ * Conditions for the asset home app to be shown.
243
+ * It is case insensitive so does not matter how you write the brand.
244
+ * brand: "trackunit" and brand: "Trackunit" will be the same.
245
+ *
246
+ * If both model and brand are used/filled out then asset needs to match both model and brand.
247
+ * If only brand or model is used/filled out then the asset needs to match the filled out property.
248
+ **/
249
+ conditions?: {
250
+ model?: string[] | string;
251
+ brand?: string[] | string;
252
+ };
253
+ menuItem: {
254
+ name: string | Translations | TranslationKey;
255
+ icon: string;
256
+ };
257
+ }
258
+ export interface AdminExtensionManifest extends AbstractExtensionManifest {
259
+ type: "ADMIN_EXTENSION";
260
+ menuItem: {
261
+ name: string | Translations | TranslationKey;
262
+ };
263
+ }
264
+ export interface ReportExtensionManifest extends AbstractExtensionManifest {
265
+ type: "REPORT_EXTENSION";
266
+ menuItem: {
267
+ /**
268
+ * Title of the card in manager
269
+ */
270
+ name: string | Translations | TranslationKey;
271
+ /**
272
+ * Subtitle of the card in manager
273
+ */
274
+ description: string | Translations | TranslationKey;
275
+ /**
276
+ * Icon of the card in manager, must use icons from:
277
+ * https://apps.dev.iris.trackunit.com/storybook/?path=/docs/components-icon--default
278
+ */
279
+ icon: string;
280
+ };
281
+ }
282
+ export declare type IrisAppExtension = AssetHomeExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | ReportExtensionManifest;
283
+ export interface ConsentConfig {
284
+ /**
285
+ * The application type. Should be one of WEB or BROWSER.
286
+ */
287
+ applicationType: string;
288
+ /**
289
+ * List of scopes required by the application.
290
+ */
291
+ scopes: string[];
292
+ /**
293
+ * List of redirect URIs to be used when returning an authorization code.
294
+ */
295
+ redirectUris?: string[];
296
+ }
297
+ /**
298
+ * An image that should be shown in the marketplace for this app.
299
+ */
300
+ export interface MarketplaceAssetImage {
301
+ /**
302
+ * The type of the Asset
303
+ */
304
+ type: "IMAGE";
305
+ /**
306
+ * A Path to an image in the assets folder of the app.
307
+ * Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
308
+ */
309
+ path: string;
310
+ }
311
+ /**
312
+ * A video that should be shown in the marketplace for this app.
313
+ */
314
+ export interface MarketplaceAssetVideo {
315
+ /**
316
+ * The type of the Asset
317
+ */
318
+ type: "VIDEO";
319
+ /**
320
+ * An url for a youtube video.
321
+ */
322
+ url: string;
323
+ }
324
+ /**
325
+ * A video or image that should be shown in the marketplace for this app.
326
+ */
327
+ export declare type MarketplaceAsset = MarketplaceAssetImage | MarketplaceAssetVideo;
328
+ /**
329
+ * An object of data used when the app is displayed in the marketplace
330
+ */
331
+ export interface Marketplace {
332
+ /**
333
+ * Name used for the marketplace.
334
+ */
335
+ name: string;
336
+ /**
337
+ * A short summary used for the card on marketplace.
338
+ * For longer description add a description.md file in the /assets/ folder of the app, and set the fullDescriptionPath.
339
+ */
340
+ description: string;
341
+ /**
342
+ * The path to the markdown file for the description.
343
+ */
344
+ fullDescriptionPath: string;
345
+ /**
346
+ * Path to an image in the assets folder of the app.
347
+ * The image will be shown in the marketplace.
348
+ * Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
349
+ */
350
+ logoPath?: string;
351
+ /**
352
+ * Tags used for describing the marketplace.
353
+ */
354
+ tags: string[];
355
+ /**
356
+ * Assets (images and videos) used for the marketplace.
357
+ */
358
+ assets?: MarketplaceAsset[];
359
+ /**
360
+ * Defines what subscription packages the Tile is available at.
361
+ */
362
+ allowForPackage: SubscriptionPackage[];
363
+ /**
364
+ * Homepage of the company building the app for the marketplace.
365
+ */
366
+ homePageUrl?: string;
367
+ /**
368
+ * The direct support page for this app.
369
+ */
370
+ supportUrl?: string;
371
+ }
372
+ export declare type SubscriptionPackage = "VIEW" | "COLLECT" | "INSIGHT" | "EXPLORE_FLEET_OWNER" | "EVOLVE_FLEET_OWNER" | "EXPAND_FLEET_OWNER" | "EXPLORE_OEM" | "EVOLVE_OEM" | "EXPAND_OEM";
373
+ export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "ADMIN_EXTENSION" | "FLEET_EXTENSION" | "ASSET_HOME_EXTENSION";
374
+ interface Dependencies {
375
+ [packageName: string]: string;
376
+ }
377
+ export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnitSi = exports.UnitUs = exports.translationKeys = void 0;
4
+ exports.translationKeys = [
5
+ "en",
6
+ "da",
7
+ "de",
8
+ "cs",
9
+ "nl",
10
+ "fr",
11
+ "fi",
12
+ "hu",
13
+ "it",
14
+ "nb",
15
+ "pl",
16
+ "pt",
17
+ "ru",
18
+ "ro",
19
+ "es",
20
+ "sv",
21
+ "ja",
22
+ "th",
23
+ ];
24
+ var UnitUs;
25
+ (function (UnitUs) {
26
+ UnitUs["mi"] = "mi";
27
+ UnitUs["yd"] = "yd";
28
+ UnitUs["ft"] = "ft";
29
+ UnitUs["in"] = "in";
30
+ UnitUs["ac"] = "ac";
31
+ UnitUs["ha"] = "ha";
32
+ UnitUs["ft_2"] = "ft\u00B2";
33
+ UnitUs["gal"] = "gal";
34
+ UnitUs["ft_3"] = "ft\u00B3";
35
+ UnitUs["ton_us"] = "ton_us";
36
+ UnitUs["lb"] = "lb";
37
+ UnitUs["oz"] = "oz";
38
+ UnitUs["mph"] = "mph";
39
+ UnitUs["lb_h"] = "lb/h";
40
+ UnitUs["lb_s"] = "lb/s";
41
+ })(UnitUs = exports.UnitUs || (exports.UnitUs = {}));
42
+ var UnitSi;
43
+ (function (UnitSi) {
44
+ UnitSi["km"] = "km";
45
+ UnitSi["m"] = "m";
46
+ UnitSi["cm"] = "cm";
47
+ UnitSi["mm"] = "mm";
48
+ UnitSi["l"] = "l";
49
+ UnitSi["kg"] = "kg";
50
+ UnitSi["g"] = "g";
51
+ UnitSi["ton"] = "ton";
52
+ UnitSi["N"] = "N";
53
+ UnitSi["kW"] = "kW";
54
+ UnitSi["W"] = "W";
55
+ UnitSi["kWh"] = "kWh";
56
+ UnitSi["kPa"] = "kPa";
57
+ UnitSi["Pa"] = "Pa";
58
+ UnitSi["bar"] = "bar";
59
+ UnitSi["m_s"] = "m/s";
60
+ UnitSi["kg_h"] = "kg/h";
61
+ UnitSi["kg_s"] = "kg/s";
62
+ UnitSi["km_h"] = "km/h";
63
+ UnitSi["km_2"] = "km\u00B2";
64
+ UnitSi["m_2"] = "m\u00B2";
65
+ UnitSi["m_3"] = "m\u00B3";
66
+ UnitSi["m_s_2"] = "m/s\u00B2";
67
+ })(UnitSi = exports.UnitSi || (exports.UnitSi = {}));
68
+ //# sourceMappingURL=irisAppManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":";;;AAqFa,QAAA,eAAe,GAAG;IAC7B,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;CACL,CAAC;AA4GF,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,MAwBX;AAxBD,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;AAClB,CAAC,EAxBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAwBjB","sourcesContent":["export interface IrisAppManifest {\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;\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_VISIBILITY then it will be controlled by the team that activates the subscription package for the customer.\n *\n * - All modes will take into consideration both validForAccountIds and marketplace.allowForPackage\n */\n activationMode: \"FORCE_ENABLE\" | \"DEFAULT_ENABLE\" | \"ALWAYS_VISIBLE\" | \"CONTROLLED_VISIBILITY\";\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;\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 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 translationKeys = [\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];\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 * @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\";\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 dropDownValueReplacements: 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}\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 unitSi: never;\n unitUs: never;\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}\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 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 | AdminExtensionManifest\n | FleetExtensionManifest\n | ReportExtensionManifest;\nexport interface ConsentConfig {\n /**\n * The application type. Should be one of WEB or BROWSER.\n */\n applicationType: string;\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 {\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 * 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: 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}\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\";\nexport declare type IrisAppExtensionType =\n | \"REPORT_EXTENSION\"\n | \"ADMIN_EXTENSION\"\n | \"FLEET_EXTENSION\"\n | \"ASSET_HOME_EXTENSION\";\ninterface Dependencies {\n [packageName: string]: string;\n}\nexport {};\n"]}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
3
+ */
4
+ export declare type Shared = (SharedItem | SharedObject)[] | SharedObject;
5
+ /**
6
+ * A module that should be shared in the share scope.
7
+ */
8
+ export declare type SharedItem = string;
9
+ /**
10
+ * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
11
+ */
12
+ export interface SharedObject {
13
+ /**
14
+ * Modules that should be shared in the share scope.
15
+ */
16
+ [k: string]: SharedConfig | SharedItem;
17
+ }
18
+ /**
19
+ * Advanced configuration for modules that should be shared in the share scope.
20
+ */
21
+ export interface SharedConfig {
22
+ /**
23
+ * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
24
+ */
25
+ eager?: boolean;
26
+ /**
27
+ * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
28
+ */
29
+ import?: false | SharedItem;
30
+ /**
31
+ * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
32
+ */
33
+ packageName?: string;
34
+ /**
35
+ * Version requirement from module in share scope.
36
+ */
37
+ requiredVersion?: false | string;
38
+ /**
39
+ * Module is looked up under this key from the share scope.
40
+ */
41
+ shareKey?: string;
42
+ /**
43
+ * Share scope name.
44
+ */
45
+ shareScope?: string;
46
+ /**
47
+ * Allow only a single version of the shared module in share scope (disabled by default).
48
+ */
49
+ singleton?: boolean;
50
+ /**
51
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
52
+ */
53
+ strictVersion?: boolean;
54
+ /**
55
+ * Version of the provided module. Will replace lower matching versions, but not higher.
56
+ */
57
+ version?: false | string;
58
+ }
59
+ /**
60
+ * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
61
+ */
62
+ export declare type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
63
+ /**
64
+ * Module that should be exposed by this container.
65
+ */
66
+ export declare type ExposesItem = string;
67
+ /**
68
+ * Modules that should be exposed by this container.
69
+ */
70
+ export declare type ExposesItems = ExposesItem[];
71
+ /**
72
+ * Modules that should be exposed by this container. Property names are used as public paths.
73
+ */
74
+ export interface ExposesObject {
75
+ /**
76
+ * Modules that should be exposed by this container.
77
+ */
78
+ [k: string]: ExposesConfig | ExposesItem | ExposesItems;
79
+ }
80
+ /**
81
+ * Advanced configuration for modules that should be exposed by this container.
82
+ */
83
+ export interface ExposesConfig {
84
+ /**
85
+ * Request to a module that should be exposed by this container.
86
+ */
87
+ import: ExposesItem | ExposesItems;
88
+ /**
89
+ * Custom chunk name for the exposed module.
90
+ */
91
+ name?: string;
92
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Source: https://github.com/webpack/webpack/blob/1c9b1b7a2136d4d9a27352fdbdf389490cca6460/declarations/plugins/container/ModuleFederationPlugin.d.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=modulefederation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modulefederation.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/modulefederation.ts"],"names":[],"mappings":";AAAA,sJAAsJ","sourcesContent":["// Source: https://github.com/webpack/webpack/blob/1c9b1b7a2136d4d9a27352fdbdf389490cca6460/declarations/plugins/container/ModuleFederationPlugin.d.ts\n\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n /**\n * Modules that should be shared in the share scope.\n */\n [k: string]: SharedConfig | SharedItem;\n}\n\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n}\n\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n /**\n * Modules that should be exposed by this container.\n */\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n"]}