@trackunit/iris-app-runtime-core-api 1.16.49-alpha-835605b395c.0 → 1.16.49
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/index.cjs.js +9 -0
- package/index.esm.js +9 -1
- package/package.json +3 -3
- package/src/NavigationRuntime.d.ts +18 -2
package/index.cjs.js
CHANGED
|
@@ -365,6 +365,14 @@ const isCustomerHomeOptions = (options) => {
|
|
|
365
365
|
!isIrisOptions(options) &&
|
|
366
366
|
customerHomePageIds.includes(options.page));
|
|
367
367
|
};
|
|
368
|
+
/**
|
|
369
|
+
* type guard for LegacyFeatureOptions
|
|
370
|
+
*/
|
|
371
|
+
const isLegacyFeatureOptions = (options) => {
|
|
372
|
+
return (typeof options === "object" &&
|
|
373
|
+
"legacyFeature" in options &&
|
|
374
|
+
Boolean(options.legacyFeature));
|
|
375
|
+
};
|
|
368
376
|
|
|
369
377
|
exports.BodyType = void 0;
|
|
370
378
|
(function (BodyType) {
|
|
@@ -411,6 +419,7 @@ exports.isCustomerHomeOptions = isCustomerHomeOptions;
|
|
|
411
419
|
exports.isFleetAppStandardOptions = isFleetAppStandardOptions;
|
|
412
420
|
exports.isGroupHomeOptions = isGroupHomeOptions;
|
|
413
421
|
exports.isIrisOptions = isIrisOptions;
|
|
422
|
+
exports.isLegacyFeatureOptions = isLegacyFeatureOptions;
|
|
414
423
|
exports.isSiteHomeOptions = isSiteHomeOptions;
|
|
415
424
|
exports.mainApps = mainApps;
|
|
416
425
|
exports.siteHomePageIds = siteHomePageIds;
|
package/index.esm.js
CHANGED
|
@@ -363,6 +363,14 @@ const isCustomerHomeOptions = (options) => {
|
|
|
363
363
|
!isIrisOptions(options) &&
|
|
364
364
|
customerHomePageIds.includes(options.page));
|
|
365
365
|
};
|
|
366
|
+
/**
|
|
367
|
+
* type guard for LegacyFeatureOptions
|
|
368
|
+
*/
|
|
369
|
+
const isLegacyFeatureOptions = (options) => {
|
|
370
|
+
return (typeof options === "object" &&
|
|
371
|
+
"legacyFeature" in options &&
|
|
372
|
+
Boolean(options.legacyFeature));
|
|
373
|
+
};
|
|
366
374
|
|
|
367
375
|
var BodyType;
|
|
368
376
|
(function (BodyType) {
|
|
@@ -391,4 +399,4 @@ const UserSubscriptionPackage = {
|
|
|
391
399
|
CUSTOMER_PORTAL: "Customer Portal",
|
|
392
400
|
};
|
|
393
401
|
|
|
394
|
-
export { AggregationPeriod, AssetSortByProperty, BodyType, Channels, SortOrder, SystemOfMeasurement, TimeFormat, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
|
|
402
|
+
export { AggregationPeriod, AssetSortByProperty, BodyType, Channels, SortOrder, SystemOfMeasurement, TimeFormat, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isLegacyFeatureOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
|
3
|
-
"version": "1.16.49
|
|
3
|
+
"version": "1.16.49",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
11
|
-
"@trackunit/shared-utils": "1.15.44
|
|
12
|
-
"@trackunit/geo-json-utils": "1.14.47
|
|
11
|
+
"@trackunit/shared-utils": "1.15.44",
|
|
12
|
+
"@trackunit/geo-json-utils": "1.14.47"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.esm.js",
|
|
15
15
|
"main": "./index.cjs.js",
|
|
@@ -54,11 +54,23 @@ export type CustomerHomeOptions = CustomerHomeStandardOptions & {
|
|
|
54
54
|
export type GroupHomeOptions = GroupHomeStandardOptions & {
|
|
55
55
|
groupId: string;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* A legacy subscription feature, identified by its raw feature UUID.
|
|
59
|
+
*
|
|
60
|
+
* This is a Trackunit-internal mechanism, not a public API intended for
|
|
61
|
+
* 3rd-party developers. It lives in this runtime package (rather than in an
|
|
62
|
+
* internal manager lib) only so Trackunit-built iris apps can check legacy
|
|
63
|
+
* subscription-feature access without depending on internal manager libs.
|
|
64
|
+
*/
|
|
65
|
+
export type LegacyFeature = string;
|
|
66
|
+
export type LegacyFeatureOptions = {
|
|
67
|
+
legacyFeature: LegacyFeature;
|
|
68
|
+
} & NeverPage & NeverIrisApp;
|
|
69
|
+
export type HasAccessToOptions = IrisAppOptions | AssetHomeOptions | SiteHomeOptions | GroupHomeOptions | CustomerHomeOptions | FleetAppStandardOptions | LegacyFeatureOptions;
|
|
58
70
|
/**
|
|
59
71
|
* type guard for IrisAppOptions
|
|
60
72
|
*/
|
|
61
|
-
export declare const isIrisOptions: (options: IrisAppOptions | AssetHomeStandardOptions | SiteHomeStandardOptions | FleetAppStandardOptions | GroupHomeStandardOptions | CustomerHomeStandardOptions | undefined) => options is IrisAppOptions;
|
|
73
|
+
export declare const isIrisOptions: (options: IrisAppOptions | AssetHomeStandardOptions | SiteHomeStandardOptions | FleetAppStandardOptions | GroupHomeStandardOptions | CustomerHomeStandardOptions | LegacyFeatureOptions | undefined) => options is IrisAppOptions;
|
|
62
74
|
/**
|
|
63
75
|
* type guard for FleetAppStandardOptions
|
|
64
76
|
*/
|
|
@@ -79,6 +91,10 @@ export declare const isGroupHomeOptions: (options: HasAccessToOptions) => option
|
|
|
79
91
|
* type guard for CustomerHomeOptions
|
|
80
92
|
*/
|
|
81
93
|
export declare const isCustomerHomeOptions: (options: HasAccessToOptions) => options is CustomerHomeOptions;
|
|
94
|
+
/**
|
|
95
|
+
* type guard for LegacyFeatureOptions
|
|
96
|
+
*/
|
|
97
|
+
export declare const isLegacyFeatureOptions: (options: HasAccessToOptions) => options is LegacyFeatureOptions;
|
|
82
98
|
export interface NavigationRuntimeApi {
|
|
83
99
|
hasAccessTo: (options: HasAccessToOptions) => Promise<boolean>;
|
|
84
100
|
gotoAssetHome: (assetId: string, options?: IrisAppOptions | AssetHomeStandardOptions) => Promise<boolean>;
|