@trackunit/iris-app-api 0.0.102 → 0.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/src/types/extensions/adminExtensionManifest.d.ts +7 -0
- package/src/types/extensions/adminExtensionManifest.js +3 -0
- package/src/types/extensions/adminExtensionManifest.js.map +1 -0
- package/src/types/extensions/assetHomeExtensionManifest.d.ts +19 -0
- package/src/types/extensions/assetHomeExtensionManifest.js +3 -0
- package/src/types/extensions/assetHomeExtensionManifest.js.map +1 -0
- package/src/types/extensions/fleetExtensionManifest.d.ts +20 -0
- package/src/types/extensions/fleetExtensionManifest.js +3 -0
- package/src/types/extensions/fleetExtensionManifest.js.map +1 -0
- package/src/types/extensions/index.d.ts +6 -0
- package/src/types/extensions/index.js +10 -0
- package/src/types/extensions/index.js.map +1 -0
- package/src/types/extensions/irisAppSettingsExtensionManifest.d.ts +4 -0
- package/src/types/extensions/irisAppSettingsExtensionManifest.js +3 -0
- package/src/types/extensions/irisAppSettingsExtensionManifest.js.map +1 -0
- package/src/types/extensions/reportExtensionManifest.d.ts +19 -0
- package/src/types/extensions/reportExtensionManifest.js +3 -0
- package/src/types/extensions/reportExtensionManifest.js.map +1 -0
- package/src/types/extensions/siteHomeExtensionManifest.d.ts +7 -0
- package/src/types/extensions/siteHomeExtensionManifest.js +3 -0
- package/src/types/extensions/siteHomeExtensionManifest.js.map +1 -0
- package/src/types/index.d.ts +6 -0
- package/src/types/index.js +6 -0
- package/src/types/index.js.map +1 -1
- package/src/types/irisAppCspInput.d.ts +1 -0
- package/src/types/irisAppCspInput.js.map +1 -1
- package/src/types/irisAppCustomFields.d.ts +125 -0
- package/src/types/irisAppCustomFields.js +49 -0
- package/src/types/irisAppCustomFields.js.map +1 -0
- package/src/types/irisAppExtensionManifest.d.ts +42 -0
- package/src/types/irisAppExtensionManifest.js +24 -0
- package/src/types/irisAppExtensionManifest.js.map +1 -0
- package/src/types/irisAppInstallationConfig.d.ts +24 -0
- package/src/types/irisAppInstallationConfig.js +3 -0
- package/src/types/irisAppInstallationConfig.js.map +1 -0
- package/src/types/irisAppManifest.d.ts +26 -373
- package/src/types/irisAppManifest.js +0 -66
- package/src/types/irisAppManifest.js.map +1 -1
- package/src/types/irisAppMarketplace.d.ts +93 -0
- package/src/types/irisAppMarketplace.js +3 -0
- package/src/types/irisAppMarketplace.js.map +1 -0
- package/src/types/mocks.d.ts +1 -1
- package/src/types/mocks.js.map +1 -1
- package/src/types/subscriptionPackages.d.ts +1 -0
- package/src/types/subscriptionPackages.js +3 -0
- package/src/types/subscriptionPackages.js.map +1 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { AdminExtensionManifest, AssetHomeExtensionManifest, FleetExtensionManifest, IrisAppSettingsExtensionManifest, ReportExtensionManifest, SiteHomeExtensionManifest } from "./extensions";
|
|
2
|
+
import { BooleanFieldDefinition, DateFieldDefinition, DecimalNumberFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, IntegerNumberFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, WebAddressFieldDefinition } from "./irisAppCustomFields";
|
|
3
|
+
import { InstallationConfig } from "./irisAppInstallationConfig";
|
|
4
|
+
import { Marketplace, Marketplace_1_0 } from "./irisAppMarketplace";
|
|
1
5
|
export interface IrisAppManifest extends Omit<IrisAppManifest_1_0, "specVersion" | "activationMode" | "marketplace" | "validForAccountIds"> {
|
|
2
6
|
/**
|
|
3
7
|
* A spec version for the manifest.
|
|
@@ -16,28 +20,34 @@ export interface IrisAppManifest extends Omit<IrisAppManifest_1_0, "specVersion"
|
|
|
16
20
|
*/
|
|
17
21
|
marketplace: Marketplace;
|
|
18
22
|
}
|
|
19
|
-
|
|
23
|
+
export declare type IrisAppExtension = AssetHomeExtensionManifest | IrisAppSettingsExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | SiteHomeExtensionManifest | ReportExtensionManifest;
|
|
24
|
+
export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition;
|
|
25
|
+
export interface ConsentConfig {
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* - `PERMANENT`: Always installed and cannot be removed by the end customer.
|
|
24
|
-
* - `PREINSTALLED`: Initially installed and can be removed by the end customer.
|
|
25
|
-
* - `ON_DEMAND`: Available to be installed and removed by the end customer.
|
|
26
|
-
* - `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.
|
|
27
|
-
* - `PREINSTALLED_REQUIRES_APPROVAL`: Requires approval by the Trackunit billing team and installs automatically once approved. Behaves like 'PREINSTALLED' after receiving approval.
|
|
28
|
-
*
|
|
29
|
-
* All policies will take into consideration both `accountIds` and `subscriptionPlan`.
|
|
27
|
+
* The application type. Should be one of WEB or BROWSER.
|
|
30
28
|
*/
|
|
31
|
-
|
|
29
|
+
applicationType: "WEB" | "BROWSER";
|
|
32
30
|
/**
|
|
33
|
-
* List of
|
|
31
|
+
* List of scopes required by the application.
|
|
34
32
|
*/
|
|
35
|
-
|
|
33
|
+
scopes: string[];
|
|
36
34
|
/**
|
|
37
|
-
* List of
|
|
35
|
+
* List of redirect URIs to be used when returning an authorization code.
|
|
38
36
|
*/
|
|
39
|
-
|
|
37
|
+
redirectUris?: string[];
|
|
40
38
|
}
|
|
39
|
+
export interface Dependencies {
|
|
40
|
+
[packageName: string]: string;
|
|
41
|
+
}
|
|
42
|
+
export type PublicIrisAppManifest = Omit<IrisAppManifest, "dependencies" | "devDependencies" | "installation"> & {
|
|
43
|
+
/**
|
|
44
|
+
* Relative path for this iris app.
|
|
45
|
+
*
|
|
46
|
+
* @returns {string} the path to the iris app
|
|
47
|
+
*/
|
|
48
|
+
irisAppPath: string;
|
|
49
|
+
installation: Omit<InstallationConfig, "accountIds">;
|
|
50
|
+
};
|
|
41
51
|
/**
|
|
42
52
|
* @deprecated
|
|
43
53
|
*/
|
|
@@ -111,364 +121,7 @@ export interface IrisAppManifest_1_0 {
|
|
|
111
121
|
*/
|
|
112
122
|
customFieldDefinitions?: CustomFieldDefinition[];
|
|
113
123
|
}
|
|
114
|
-
export type PublicIrisAppManifest = Omit<IrisAppManifest, "dependencies" | "devDependencies" | "installation"> & {
|
|
115
|
-
/**
|
|
116
|
-
* Relative path for this iris app.
|
|
117
|
-
*
|
|
118
|
-
* @returns {string} the path to the iris app
|
|
119
|
-
*/
|
|
120
|
-
irisAppPath: string;
|
|
121
|
-
installation: Omit<InstallationConfig, "accountIds">;
|
|
122
|
-
};
|
|
123
|
-
export type ActivationMode = "FORCE_ENABLE" | "DEFAULT_ENABLE" | "ALWAYS_VISIBLE" | "CONTROLLED_MANUAL_INSTALLATION" | "CONTROLLED_AUTOMATIC_INSTALLATION";
|
|
124
|
-
export type InstallationPolicy = "PERMANENT" | "PREINSTALLED" | "ON_DEMAND" | "ON_DEMAND_REQUIRES_APPROVAL" | "PREINSTALLED_REQUIRES_APPROVAL";
|
|
125
|
-
export interface Translations {
|
|
126
|
-
en: string;
|
|
127
|
-
da?: string;
|
|
128
|
-
de?: string;
|
|
129
|
-
cs?: string;
|
|
130
|
-
nl?: string;
|
|
131
|
-
fr?: string;
|
|
132
|
-
fi?: string;
|
|
133
|
-
hu?: string;
|
|
134
|
-
it?: string;
|
|
135
|
-
nb?: string;
|
|
136
|
-
pl?: string;
|
|
137
|
-
pt?: string;
|
|
138
|
-
ru?: string;
|
|
139
|
-
ro?: string;
|
|
140
|
-
es?: string;
|
|
141
|
-
sv?: string;
|
|
142
|
-
ja?: string;
|
|
143
|
-
th?: string;
|
|
144
|
-
}
|
|
145
|
-
export declare const languageKeys: readonly ["en", "da", "de", "cs", "nl", "fr", "fi", "hu", "it", "nb", "pl", "pt", "ru", "ro", "es", "sv", "ja", "th"];
|
|
146
|
-
export type TranslationLanguageKeys = typeof languageKeys[number];
|
|
147
|
-
export interface TranslationKey {
|
|
148
|
-
key: string;
|
|
149
|
-
}
|
|
150
|
-
export interface AbstractExtensionManifest {
|
|
151
|
-
/** The id of the app extension, will be part of the URL in the manager */
|
|
152
|
-
id: string;
|
|
153
|
-
/**
|
|
154
|
-
* The path to the main entry point for the extension.
|
|
155
|
-
*
|
|
156
|
-
* @default "index.tsx"
|
|
157
|
-
*/
|
|
158
|
-
main?: string;
|
|
159
|
-
/**
|
|
160
|
-
* The relative path from the NX workspace to this projects source Root.
|
|
161
|
-
*/
|
|
162
|
-
sourceRoot: string;
|
|
163
|
-
/** The type of the app extension */
|
|
164
|
-
type: IrisAppExtensionType;
|
|
165
|
-
}
|
|
166
|
-
export declare type CustomFieldDefinitionType = "STRING" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS";
|
|
167
|
-
export declare type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP";
|
|
168
|
-
export interface AbstractCustomFieldDefinition {
|
|
169
|
-
/**
|
|
170
|
-
* The key is the name you use to get the custom field.
|
|
171
|
-
*/
|
|
172
|
-
key: string;
|
|
173
|
-
/**
|
|
174
|
-
* The type of the entity to attach this custom field on.
|
|
175
|
-
*/
|
|
176
|
-
entityType: EntityType;
|
|
177
|
-
/**
|
|
178
|
-
* The human readable translation of the key. So what the end customer will see.
|
|
179
|
-
*/
|
|
180
|
-
title: string;
|
|
181
|
-
/**
|
|
182
|
-
* Should this be visible in the generic UI in Manager.
|
|
183
|
-
*/
|
|
184
|
-
uiVisible?: boolean;
|
|
185
|
-
/**
|
|
186
|
-
* Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.
|
|
187
|
-
*/
|
|
188
|
-
uiEditable?: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* The type of this custom field definition
|
|
191
|
-
*/
|
|
192
|
-
type: CustomFieldDefinitionType;
|
|
193
|
-
}
|
|
194
|
-
export interface StringFieldDefinition extends AbstractCustomFieldDefinition {
|
|
195
|
-
type: "STRING";
|
|
196
|
-
minimumLength?: number;
|
|
197
|
-
maximumLength?: number;
|
|
198
|
-
pattern?: string;
|
|
199
|
-
defaultStringValue?: string;
|
|
200
|
-
}
|
|
201
|
-
export interface EmailFieldDefinition extends AbstractCustomFieldDefinition {
|
|
202
|
-
type: "EMAIL";
|
|
203
|
-
defaultStringValue?: string;
|
|
204
|
-
}
|
|
205
|
-
export interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {
|
|
206
|
-
type: "WEB_ADDRESS";
|
|
207
|
-
defaultStringValue?: string;
|
|
208
|
-
}
|
|
209
|
-
export interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {
|
|
210
|
-
type: "PHONE_NUMBER";
|
|
211
|
-
defaultStringValue?: string;
|
|
212
|
-
}
|
|
213
|
-
export interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {
|
|
214
|
-
type: "BOOLEAN";
|
|
215
|
-
defaultBooleanValue?: boolean;
|
|
216
|
-
}
|
|
217
|
-
export interface DateFieldDefinition extends AbstractCustomFieldDefinition {
|
|
218
|
-
type: "DATE";
|
|
219
|
-
defaultDateValue?: string;
|
|
220
|
-
}
|
|
221
|
-
export interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {
|
|
222
|
-
type: "DROPDOWN";
|
|
223
|
-
defaultStringArrayValue?: string[];
|
|
224
|
-
multiSelect?: boolean;
|
|
225
|
-
allValues?: string[];
|
|
226
|
-
/**
|
|
227
|
-
* Map from old values not in {@link allValues} to new values. Used for updating existing data when changing
|
|
228
|
-
* the drop down options.
|
|
229
|
-
*/
|
|
230
|
-
valueReplacements?: Record<string, string>;
|
|
231
|
-
}
|
|
232
|
-
export declare enum UnitUs {
|
|
233
|
-
"mi" = "mi",
|
|
234
|
-
"yd" = "yd",
|
|
235
|
-
"ft" = "ft",
|
|
236
|
-
"in" = "in",
|
|
237
|
-
"ac" = "ac",
|
|
238
|
-
"ha" = "ha",
|
|
239
|
-
"ft_2" = "ft\u00B2",
|
|
240
|
-
"gal" = "gal",
|
|
241
|
-
"ft_3" = "ft\u00B3",
|
|
242
|
-
"ton_us" = "ton_us",
|
|
243
|
-
"lb" = "lb",
|
|
244
|
-
"oz" = "oz",
|
|
245
|
-
"mph" = "mph",
|
|
246
|
-
"lb_h" = "lb/h",
|
|
247
|
-
"lb_s" = "lb/s"
|
|
248
|
-
}
|
|
249
|
-
export declare enum UnitSi {
|
|
250
|
-
"km" = "km",
|
|
251
|
-
"m" = "m",
|
|
252
|
-
"cm" = "cm",
|
|
253
|
-
"mm" = "mm",
|
|
254
|
-
"l" = "l",
|
|
255
|
-
"kg" = "kg",
|
|
256
|
-
"g" = "g",
|
|
257
|
-
"ton" = "ton",
|
|
258
|
-
"N" = "N",
|
|
259
|
-
"kW" = "kW",
|
|
260
|
-
"W" = "W",
|
|
261
|
-
"kWh" = "kWh",
|
|
262
|
-
"kPa" = "kPa",
|
|
263
|
-
"Pa" = "Pa",
|
|
264
|
-
"bar" = "bar",
|
|
265
|
-
"m_s" = "m/s",
|
|
266
|
-
"kg_h" = "kg/h",
|
|
267
|
-
"kg_s" = "kg/s",
|
|
268
|
-
"km_h" = "km/h",
|
|
269
|
-
"km_2" = "km\u00B2",
|
|
270
|
-
"m_2" = "m\u00B2",
|
|
271
|
-
"m_3" = "m\u00B3",
|
|
272
|
-
"m_s_2" = "m/s\u00B2",
|
|
273
|
-
"h" = "h"
|
|
274
|
-
}
|
|
275
|
-
export interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {
|
|
276
|
-
type: "NUMBER";
|
|
277
|
-
defaultNumberValue?: number;
|
|
278
|
-
minimum?: number;
|
|
279
|
-
maximum?: number;
|
|
280
|
-
unitSi?: UnitSi;
|
|
281
|
-
unitUs?: UnitUs;
|
|
282
|
-
isInteger: false;
|
|
283
|
-
}
|
|
284
|
-
export interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {
|
|
285
|
-
type: "NUMBER";
|
|
286
|
-
defaultNumberValue?: number;
|
|
287
|
-
minimum?: number;
|
|
288
|
-
maximum?: number;
|
|
289
|
-
isInteger: true;
|
|
290
|
-
}
|
|
291
|
-
export declare type CustomFieldDefinition = BooleanFieldDefinition | DecimalNumberFieldDefinition | IntegerNumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition;
|
|
292
|
-
export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
|
|
293
|
-
type: "ASSET_HOME_EXTENSION";
|
|
294
|
-
/**
|
|
295
|
-
* Conditions for the asset home app to be shown.
|
|
296
|
-
* It is case insensitive so does not matter how you write the brand.
|
|
297
|
-
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
298
|
-
*
|
|
299
|
-
* If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
300
|
-
* If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
301
|
-
*/
|
|
302
|
-
conditions?: {
|
|
303
|
-
model?: string[] | string;
|
|
304
|
-
brand?: string[] | string;
|
|
305
|
-
};
|
|
306
|
-
menuItem: {
|
|
307
|
-
name: string | Translations | TranslationKey;
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
export interface SiteHomeExtensionManifest extends AbstractExtensionManifest {
|
|
311
|
-
type: "SITE_HOME_EXTENSION";
|
|
312
|
-
menuItem: {
|
|
313
|
-
name: string | Translations | TranslationKey;
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
export interface FleetExtensionManifest extends AbstractExtensionManifest {
|
|
317
|
-
type: "FLEET_EXTENSION";
|
|
318
|
-
/**
|
|
319
|
-
* Conditions for the asset home app to be shown.
|
|
320
|
-
* It is case insensitive so does not matter how you write the brand.
|
|
321
|
-
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
322
|
-
*
|
|
323
|
-
* If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
324
|
-
* If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
325
|
-
*/
|
|
326
|
-
conditions?: {
|
|
327
|
-
model?: string[] | string;
|
|
328
|
-
brand?: string[] | string;
|
|
329
|
-
};
|
|
330
|
-
menuItem: {
|
|
331
|
-
name: string | Translations | TranslationKey;
|
|
332
|
-
icon: string;
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
export interface AdminExtensionManifest extends AbstractExtensionManifest {
|
|
336
|
-
type: "ADMIN_EXTENSION";
|
|
337
|
-
menuItem: {
|
|
338
|
-
name: string | Translations | TranslationKey;
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
export interface IrisAppSettingsExtensionManifest extends AbstractExtensionManifest {
|
|
342
|
-
type: "IRIS_APP_SETTINGS_EXTENSION";
|
|
343
|
-
}
|
|
344
|
-
export interface ReportExtensionManifest extends AbstractExtensionManifest {
|
|
345
|
-
type: "REPORT_EXTENSION";
|
|
346
|
-
menuItem: {
|
|
347
|
-
/**
|
|
348
|
-
* Title of the card in manager
|
|
349
|
-
*/
|
|
350
|
-
name: string | Translations | TranslationKey;
|
|
351
|
-
/**
|
|
352
|
-
* Subtitle of the card in manager
|
|
353
|
-
*/
|
|
354
|
-
description: string | Translations | TranslationKey;
|
|
355
|
-
/**
|
|
356
|
-
* Icon of the card in manager, must use icons from:
|
|
357
|
-
* https://apps.dev.iris.trackunit.com/storybook/?path=/docs/components-icon--default
|
|
358
|
-
*/
|
|
359
|
-
icon: string;
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
export declare type IrisAppExtension = AssetHomeExtensionManifest | IrisAppSettingsExtensionManifest | AdminExtensionManifest | FleetExtensionManifest | SiteHomeExtensionManifest | ReportExtensionManifest;
|
|
363
|
-
export interface ConsentConfig {
|
|
364
|
-
/**
|
|
365
|
-
* The application type. Should be one of WEB or BROWSER.
|
|
366
|
-
*/
|
|
367
|
-
applicationType: "WEB" | "BROWSER";
|
|
368
|
-
/**
|
|
369
|
-
* List of scopes required by the application.
|
|
370
|
-
*/
|
|
371
|
-
scopes: string[];
|
|
372
|
-
/**
|
|
373
|
-
* List of redirect URIs to be used when returning an authorization code.
|
|
374
|
-
*/
|
|
375
|
-
redirectUris?: string[];
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* An image that should be shown in the marketplace for this app.
|
|
379
|
-
*/
|
|
380
|
-
export interface MarketplaceAssetImage {
|
|
381
|
-
/**
|
|
382
|
-
* The type of the Asset
|
|
383
|
-
*/
|
|
384
|
-
type: "IMAGE";
|
|
385
|
-
/**
|
|
386
|
-
* A Path to an image in the assets folder of the app.
|
|
387
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
388
|
-
*/
|
|
389
|
-
path: string;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* A video that should be shown in the marketplace for this app.
|
|
393
|
-
*/
|
|
394
|
-
export interface MarketplaceAssetVideo {
|
|
395
|
-
/**
|
|
396
|
-
* The type of the Asset
|
|
397
|
-
*/
|
|
398
|
-
type: "VIDEO";
|
|
399
|
-
/**
|
|
400
|
-
* An url for a youtube video.
|
|
401
|
-
*/
|
|
402
|
-
url: string;
|
|
403
|
-
}
|
|
404
124
|
/**
|
|
405
|
-
* A video or image that should be shown in the marketplace for this app.
|
|
406
|
-
*/
|
|
407
|
-
export type MarketplaceAsset = MarketplaceAssetImage | MarketplaceAssetVideo;
|
|
408
|
-
/**
|
|
409
|
-
* An object of data used when the app is displayed in the marketplace
|
|
410
|
-
*/
|
|
411
|
-
export interface Marketplace extends Omit<Marketplace_1_0, "allowForPackage"> {
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* An object of data used when the app is displayed in the marketplace
|
|
415
|
-
*
|
|
416
125
|
* @deprecated
|
|
417
126
|
*/
|
|
418
|
-
export
|
|
419
|
-
/**
|
|
420
|
-
* Name used for the marketplace.
|
|
421
|
-
*/
|
|
422
|
-
name: string;
|
|
423
|
-
/**
|
|
424
|
-
* A short summary used for the card on marketplace.
|
|
425
|
-
* For longer description add a description.md file in the /assets/ folder of the app, and set the fullDescriptionPath.
|
|
426
|
-
*/
|
|
427
|
-
description: string;
|
|
428
|
-
/**
|
|
429
|
-
* The path to a markdown file that explains your app in more detail.
|
|
430
|
-
* The file must be stored in the assets folder within the app directory to work.
|
|
431
|
-
* The path is relative to that directory.
|
|
432
|
-
* For a file apps/my-app/assets/description.md, this parameter should be: description.md
|
|
433
|
-
*/
|
|
434
|
-
fullDescriptionPath: string;
|
|
435
|
-
/**
|
|
436
|
-
* Path to an image in the assets folder of the app.
|
|
437
|
-
* The image will be shown in the marketplace.
|
|
438
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
439
|
-
*/
|
|
440
|
-
logoPath?: string;
|
|
441
|
-
/**
|
|
442
|
-
* A list of relevant tags to make your app easier to find.
|
|
443
|
-
*/
|
|
444
|
-
tags?: string[];
|
|
445
|
-
/**
|
|
446
|
-
* Categories used for the app in the marketplace.
|
|
447
|
-
*/
|
|
448
|
-
categories?: Category[];
|
|
449
|
-
/**
|
|
450
|
-
* Assets (images and videos) used for the marketplace.
|
|
451
|
-
*/
|
|
452
|
-
assets?: MarketplaceAsset[];
|
|
453
|
-
/**
|
|
454
|
-
* Defines with which subscription packages your app is compatible.
|
|
455
|
-
* Take great care when entering this, as your app might bug out (if it went through the approval phase in the first place)
|
|
456
|
-
* if what is stated here does not match reality.
|
|
457
|
-
*/
|
|
458
|
-
allowForPackage: "ALL_PACKAGES" | SubscriptionPackage[];
|
|
459
|
-
/**
|
|
460
|
-
* Homepage of the company building the app for the marketplace.
|
|
461
|
-
*/
|
|
462
|
-
homePageUrl?: string;
|
|
463
|
-
/**
|
|
464
|
-
* The direct support page for this app.
|
|
465
|
-
*/
|
|
466
|
-
supportUrl?: string;
|
|
467
|
-
}
|
|
468
|
-
export declare type Category = "ANALYTICS" | "DATA_FEEDS" | "ENGINES_AND_HYDRAULICS" | "SERVICE_AND_MAINTENANCE" | "CONSULTANTS" | "CONNECTIVITY_AND_NETWORK" | "REPORTS" | "FAULT_CODES_AND_REMOTE_DIAGNOSTICS" | "SAFETY_AND_QUALITY";
|
|
469
|
-
export declare type SubscriptionPackage = "VIEW" | "COLLECT" | "INSIGHT" | "EXPLORE_FLEET_OWNER" | "EVOLVE_FLEET_OWNER" | "EXPAND_FLEET_OWNER" | "EXPLORE_OEM" | "EVOLVE_OEM" | "EXPAND_OEM";
|
|
470
|
-
export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "IRIS_APP_SETTINGS_EXTENSION" | "ADMIN_EXTENSION" | "FLEET_EXTENSION" | "ASSET_HOME_EXTENSION" | "SITE_HOME_EXTENSION";
|
|
471
|
-
interface Dependencies {
|
|
472
|
-
[packageName: string]: string;
|
|
473
|
-
}
|
|
474
|
-
export {};
|
|
127
|
+
export type ActivationMode = "FORCE_ENABLE" | "DEFAULT_ENABLE" | "ALWAYS_VISIBLE" | "CONTROLLED_MANUAL_INSTALLATION" | "CONTROLLED_AUTOMATIC_INSTALLATION";
|
|
@@ -1,69 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnitSi = exports.UnitUs = exports.languageKeys = void 0;
|
|
4
|
-
exports.languageKeys = [
|
|
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["h"] = "h";
|
|
68
|
-
})(UnitSi = exports.UnitSi || (exports.UnitSi = {}));
|
|
69
3
|
//# sourceMappingURL=irisAppManifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":";;;AA0Ka,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 * Basically the name of your app including workspace name, automatically parsed from your app-specific package.json.\n */\n moduleFederationName: string;\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 validForAccountIds} and {@link 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\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 a markdown file that explains your app in more detail.\n * The file must be stored in the assets folder within the app directory to work.\n * The path is relative to that directory.\n * For a file apps/my-app/assets/description.md, this parameter should be: description.md\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 * A list of relevant tags to make your app easier to find.\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 with which subscription packages your app is compatible.\n * Take great care when entering this, as your app might bug out (if it went through the approval phase in the first place)\n * if what is stated here does not match reality.\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":"","sourcesContent":["import {\n AdminExtensionManifest,\n AssetHomeExtensionManifest,\n FleetExtensionManifest,\n IrisAppSettingsExtensionManifest,\n ReportExtensionManifest,\n SiteHomeExtensionManifest,\n} from \"./extensions\";\nimport {\n BooleanFieldDefinition,\n DateFieldDefinition,\n DecimalNumberFieldDefinition,\n DropDownFieldDefinition,\n EmailFieldDefinition,\n IntegerNumberFieldDefinition,\n PhoneNumberFieldDefinition,\n StringFieldDefinition,\n WebAddressFieldDefinition,\n} from \"./irisAppCustomFields\";\nimport { InstallationConfig } from \"./irisAppInstallationConfig\";\nimport { Marketplace, Marketplace_1_0 } from \"./irisAppMarketplace\";\n\nexport 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\nexport declare type IrisAppExtension =\n | AssetHomeExtensionManifest\n | IrisAppSettingsExtensionManifest\n | AdminExtensionManifest\n | FleetExtensionManifest\n | SiteHomeExtensionManifest\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\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 * 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 validForAccountIds} and {@link 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"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { SubscriptionPackage } from "./subscriptionPackages";
|
|
2
|
+
/**
|
|
3
|
+
* An image that should be shown in the marketplace for this app.
|
|
4
|
+
*/
|
|
5
|
+
export interface MarketplaceAssetImage {
|
|
6
|
+
/**
|
|
7
|
+
* The type of the Asset
|
|
8
|
+
*/
|
|
9
|
+
type: "IMAGE";
|
|
10
|
+
/**
|
|
11
|
+
* A Path to an image in the assets folder of the app.
|
|
12
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
13
|
+
*/
|
|
14
|
+
path: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A video that should be shown in the marketplace for this app.
|
|
18
|
+
*/
|
|
19
|
+
export interface MarketplaceAssetVideo {
|
|
20
|
+
/**
|
|
21
|
+
* The type of the Asset
|
|
22
|
+
*/
|
|
23
|
+
type: "VIDEO";
|
|
24
|
+
/**
|
|
25
|
+
* An url for a youtube video.
|
|
26
|
+
*/
|
|
27
|
+
url: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A video or image that should be shown in the marketplace for this app.
|
|
31
|
+
*/
|
|
32
|
+
export type MarketplaceAsset = MarketplaceAssetImage | MarketplaceAssetVideo;
|
|
33
|
+
/**
|
|
34
|
+
* An object of data used when the app is displayed in the marketplace
|
|
35
|
+
*/
|
|
36
|
+
export interface Marketplace extends Omit<Marketplace_1_0, "allowForPackage"> {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* An object of data used when the app is displayed in the marketplace
|
|
40
|
+
*
|
|
41
|
+
* @deprecated
|
|
42
|
+
*/
|
|
43
|
+
export interface Marketplace_1_0 {
|
|
44
|
+
/**
|
|
45
|
+
* Name used for the marketplace.
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
/**
|
|
49
|
+
* A short summary used for the card on marketplace.
|
|
50
|
+
* For longer description add a description.md file in the /assets/ folder of the app, and set the fullDescriptionPath.
|
|
51
|
+
*/
|
|
52
|
+
description: string;
|
|
53
|
+
/**
|
|
54
|
+
* The path to a markdown file that explains your app in more detail.
|
|
55
|
+
* The file must be stored in the assets folder within the app directory to work.
|
|
56
|
+
* The path is relative to that directory.
|
|
57
|
+
* For a file apps/my-app/assets/description.md, this parameter should be: description.md
|
|
58
|
+
*/
|
|
59
|
+
fullDescriptionPath: string;
|
|
60
|
+
/**
|
|
61
|
+
* Path to an image in the assets folder of the app.
|
|
62
|
+
* The image will be shown in the marketplace.
|
|
63
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
64
|
+
*/
|
|
65
|
+
logoPath?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A list of relevant tags to make your app easier to find.
|
|
68
|
+
*/
|
|
69
|
+
tags?: string[];
|
|
70
|
+
/**
|
|
71
|
+
* Categories used for the app in the marketplace.
|
|
72
|
+
*/
|
|
73
|
+
categories?: Category[];
|
|
74
|
+
/**
|
|
75
|
+
* Assets (images and videos) used for the marketplace.
|
|
76
|
+
*/
|
|
77
|
+
assets?: MarketplaceAsset[];
|
|
78
|
+
/**
|
|
79
|
+
* Defines with which subscription packages your app is compatible.
|
|
80
|
+
* Take great care when entering this, as your app might bug out (if it went through the approval phase in the first place)
|
|
81
|
+
* if what is stated here does not match reality.
|
|
82
|
+
*/
|
|
83
|
+
allowForPackage: "ALL_PACKAGES" | SubscriptionPackage[];
|
|
84
|
+
/**
|
|
85
|
+
* Homepage of the company building the app for the marketplace.
|
|
86
|
+
*/
|
|
87
|
+
homePageUrl?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The direct support page for this app.
|
|
90
|
+
*/
|
|
91
|
+
supportUrl?: string;
|
|
92
|
+
}
|
|
93
|
+
export declare type Category = "ANALYTICS" | "DATA_FEEDS" | "ENGINES_AND_HYDRAULICS" | "SERVICE_AND_MAINTENANCE" | "CONSULTANTS" | "CONNECTIVITY_AND_NETWORK" | "REPORTS" | "FAULT_CODES_AND_REMOTE_DIAGNOSTICS" | "SAFETY_AND_QUALITY";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irisAppMarketplace.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppMarketplace.ts"],"names":[],"mappings":"","sourcesContent":["import { SubscriptionPackage } from \"./subscriptionPackages\";\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 a markdown file that explains your app in more detail.\n * The file must be stored in the assets folder within the app directory to work.\n * The path is relative to that directory.\n * For a file apps/my-app/assets/description.md, this parameter should be: description.md\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 * A list of relevant tags to make your app easier to find.\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 with which subscription packages your app is compatible.\n * Take great care when entering this, as your app might bug out (if it went through the approval phase in the first place)\n * if what is stated here does not match reality.\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"]}
|
package/src/types/mocks.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AdminExtensionManifest } from "./
|
|
1
|
+
import { AdminExtensionManifest } from "./extensions/adminExtensionManifest";
|
|
2
2
|
export declare const mockAdminExtension: AdminExtensionManifest;
|