@trackunit/iris-app-runtime-core-api 0.3.44 → 0.3.46
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 +70 -70
- package/index.js +70 -70
- package/package.json +2 -2
- package/src/AssetRuntime.d.ts +11 -11
- package/src/ChildConnector.d.ts +6 -6
- package/src/CurrentUserRuntime.d.ts +8 -8
- package/src/CustomFieldRuntime.d.ts +167 -167
- package/src/HostConnector.d.ts +52 -52
- package/src/RestRuntime.d.ts +30 -30
- package/src/SiteRuntime.d.ts +7 -7
- package/src/ToastRuntime.d.ts +8 -8
- package/src/index.d.ts +8 -8
package/index.cjs
CHANGED
@@ -2,80 +2,80 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
exports.AssetHomeSubPage = void 0;
|
6
|
-
(function (AssetHomeSubPage) {
|
7
|
-
AssetHomeSubPage["MOVEMENT"] = "movement";
|
8
|
-
AssetHomeSubPage["EVENTS"] = "events";
|
9
|
-
AssetHomeSubPage["INSIGHTS"] = "insights";
|
10
|
-
AssetHomeSubPage["TELEMATICS"] = "telematics";
|
11
|
-
AssetHomeSubPage["SPECIFICATION"] = "specification";
|
12
|
-
AssetHomeSubPage["ACTIVITY_TIMELINE"] = "activity-timeline";
|
5
|
+
exports.AssetHomeSubPage = void 0;
|
6
|
+
(function (AssetHomeSubPage) {
|
7
|
+
AssetHomeSubPage["MOVEMENT"] = "movement";
|
8
|
+
AssetHomeSubPage["EVENTS"] = "events";
|
9
|
+
AssetHomeSubPage["INSIGHTS"] = "insights";
|
10
|
+
AssetHomeSubPage["TELEMATICS"] = "telematics";
|
11
|
+
AssetHomeSubPage["SPECIFICATION"] = "specification";
|
12
|
+
AssetHomeSubPage["ACTIVITY_TIMELINE"] = "activity-timeline";
|
13
13
|
})(exports.AssetHomeSubPage || (exports.AssetHomeSubPage = {}));
|
14
14
|
|
15
|
-
exports.CustomFieldType = void 0;
|
16
|
-
(function (CustomFieldType) {
|
17
|
-
CustomFieldType["BOOLEAN"] = "BOOLEAN";
|
18
|
-
CustomFieldType["DATE"] = "DATE";
|
19
|
-
CustomFieldType["DROPDOWN"] = "DROPDOWN";
|
20
|
-
CustomFieldType["EMAIL"] = "EMAIL";
|
21
|
-
CustomFieldType["NUMBER"] = "NUMBER";
|
22
|
-
CustomFieldType["PHONE_NUMBER"] = "PHONE_NUMBER";
|
23
|
-
CustomFieldType["STRING"] = "STRING";
|
24
|
-
CustomFieldType["WEB_ADDRESS"] = "WEB_ADDRESS";
|
25
|
-
})(exports.CustomFieldType || (exports.CustomFieldType = {}));
|
26
|
-
exports.UnitUs = void 0;
|
27
|
-
(function (UnitUs) {
|
28
|
-
UnitUs["mi"] = "mi";
|
29
|
-
UnitUs["yd"] = "yd";
|
30
|
-
UnitUs["ft"] = "ft";
|
31
|
-
UnitUs["in"] = "in";
|
32
|
-
UnitUs["ac"] = "ac";
|
33
|
-
UnitUs["ha"] = "ha";
|
34
|
-
UnitUs["ft_2"] = "ft\u00B2";
|
35
|
-
UnitUs["gal"] = "gal";
|
36
|
-
UnitUs["ft_3"] = "ft\u00B3";
|
37
|
-
UnitUs["ton_us"] = "ton_us";
|
38
|
-
UnitUs["lb"] = "lb";
|
39
|
-
UnitUs["oz"] = "oz";
|
40
|
-
UnitUs["mph"] = "mph";
|
41
|
-
UnitUs["lb_h"] = "lb/h";
|
42
|
-
UnitUs["lb_s"] = "lb/s";
|
43
|
-
})(exports.UnitUs || (exports.UnitUs = {}));
|
44
|
-
exports.UnitSi = void 0;
|
45
|
-
(function (UnitSi) {
|
46
|
-
UnitSi["km"] = "km";
|
47
|
-
UnitSi["m"] = "m";
|
48
|
-
UnitSi["cm"] = "cm";
|
49
|
-
UnitSi["mm"] = "mm";
|
50
|
-
UnitSi["l"] = "l";
|
51
|
-
UnitSi["kg"] = "kg";
|
52
|
-
UnitSi["g"] = "g";
|
53
|
-
UnitSi["ton"] = "ton";
|
54
|
-
UnitSi["N"] = "N";
|
55
|
-
UnitSi["kW"] = "kW";
|
56
|
-
UnitSi["W"] = "W";
|
57
|
-
UnitSi["kWh"] = "kWh";
|
58
|
-
UnitSi["kPa"] = "kPa";
|
59
|
-
UnitSi["Pa"] = "Pa";
|
60
|
-
UnitSi["bar"] = "bar";
|
61
|
-
UnitSi["m_s"] = "m/s";
|
62
|
-
UnitSi["kg_h"] = "kg/h";
|
63
|
-
UnitSi["kg_s"] = "kg/s";
|
64
|
-
UnitSi["km_h"] = "km/h";
|
65
|
-
UnitSi["km_2"] = "km\u00B2";
|
66
|
-
UnitSi["m_2"] = "m\u00B2";
|
67
|
-
UnitSi["m_3"] = "m\u00B3";
|
68
|
-
UnitSi["m_s_2"] = "m/s\u00B2";
|
15
|
+
exports.CustomFieldType = void 0;
|
16
|
+
(function (CustomFieldType) {
|
17
|
+
CustomFieldType["BOOLEAN"] = "BOOLEAN";
|
18
|
+
CustomFieldType["DATE"] = "DATE";
|
19
|
+
CustomFieldType["DROPDOWN"] = "DROPDOWN";
|
20
|
+
CustomFieldType["EMAIL"] = "EMAIL";
|
21
|
+
CustomFieldType["NUMBER"] = "NUMBER";
|
22
|
+
CustomFieldType["PHONE_NUMBER"] = "PHONE_NUMBER";
|
23
|
+
CustomFieldType["STRING"] = "STRING";
|
24
|
+
CustomFieldType["WEB_ADDRESS"] = "WEB_ADDRESS";
|
25
|
+
})(exports.CustomFieldType || (exports.CustomFieldType = {}));
|
26
|
+
exports.UnitUs = void 0;
|
27
|
+
(function (UnitUs) {
|
28
|
+
UnitUs["mi"] = "mi";
|
29
|
+
UnitUs["yd"] = "yd";
|
30
|
+
UnitUs["ft"] = "ft";
|
31
|
+
UnitUs["in"] = "in";
|
32
|
+
UnitUs["ac"] = "ac";
|
33
|
+
UnitUs["ha"] = "ha";
|
34
|
+
UnitUs["ft_2"] = "ft\u00B2";
|
35
|
+
UnitUs["gal"] = "gal";
|
36
|
+
UnitUs["ft_3"] = "ft\u00B3";
|
37
|
+
UnitUs["ton_us"] = "ton_us";
|
38
|
+
UnitUs["lb"] = "lb";
|
39
|
+
UnitUs["oz"] = "oz";
|
40
|
+
UnitUs["mph"] = "mph";
|
41
|
+
UnitUs["lb_h"] = "lb/h";
|
42
|
+
UnitUs["lb_s"] = "lb/s";
|
43
|
+
})(exports.UnitUs || (exports.UnitUs = {}));
|
44
|
+
exports.UnitSi = void 0;
|
45
|
+
(function (UnitSi) {
|
46
|
+
UnitSi["km"] = "km";
|
47
|
+
UnitSi["m"] = "m";
|
48
|
+
UnitSi["cm"] = "cm";
|
49
|
+
UnitSi["mm"] = "mm";
|
50
|
+
UnitSi["l"] = "l";
|
51
|
+
UnitSi["kg"] = "kg";
|
52
|
+
UnitSi["g"] = "g";
|
53
|
+
UnitSi["ton"] = "ton";
|
54
|
+
UnitSi["N"] = "N";
|
55
|
+
UnitSi["kW"] = "kW";
|
56
|
+
UnitSi["W"] = "W";
|
57
|
+
UnitSi["kWh"] = "kWh";
|
58
|
+
UnitSi["kPa"] = "kPa";
|
59
|
+
UnitSi["Pa"] = "Pa";
|
60
|
+
UnitSi["bar"] = "bar";
|
61
|
+
UnitSi["m_s"] = "m/s";
|
62
|
+
UnitSi["kg_h"] = "kg/h";
|
63
|
+
UnitSi["kg_s"] = "kg/s";
|
64
|
+
UnitSi["km_h"] = "km/h";
|
65
|
+
UnitSi["km_2"] = "km\u00B2";
|
66
|
+
UnitSi["m_2"] = "m\u00B2";
|
67
|
+
UnitSi["m_3"] = "m\u00B3";
|
68
|
+
UnitSi["m_s_2"] = "m/s\u00B2";
|
69
69
|
})(exports.UnitSi || (exports.UnitSi = {}));
|
70
70
|
|
71
|
-
exports.BodyType = void 0;
|
72
|
-
(function (BodyType) {
|
73
|
-
BodyType[BodyType["Json"] = 0] = "Json";
|
74
|
-
BodyType[BodyType["FormData"] = 1] = "FormData";
|
71
|
+
exports.BodyType = void 0;
|
72
|
+
(function (BodyType) {
|
73
|
+
BodyType[BodyType["Json"] = 0] = "Json";
|
74
|
+
BodyType[BodyType["FormData"] = 1] = "FormData";
|
75
75
|
})(exports.BodyType || (exports.BodyType = {}));
|
76
76
|
|
77
|
-
exports.SiteHomeSubPage = void 0;
|
78
|
-
(function (SiteHomeSubPage) {
|
79
|
-
SiteHomeSubPage["INFORMATION"] = "information";
|
80
|
-
SiteHomeSubPage["HISTORY"] = "history";
|
77
|
+
exports.SiteHomeSubPage = void 0;
|
78
|
+
(function (SiteHomeSubPage) {
|
79
|
+
SiteHomeSubPage["INFORMATION"] = "information";
|
80
|
+
SiteHomeSubPage["HISTORY"] = "history";
|
81
81
|
})(exports.SiteHomeSubPage || (exports.SiteHomeSubPage = {}));
|
package/index.js
CHANGED
@@ -1,79 +1,79 @@
|
|
1
|
-
var AssetHomeSubPage;
|
2
|
-
(function (AssetHomeSubPage) {
|
3
|
-
AssetHomeSubPage["MOVEMENT"] = "movement";
|
4
|
-
AssetHomeSubPage["EVENTS"] = "events";
|
5
|
-
AssetHomeSubPage["INSIGHTS"] = "insights";
|
6
|
-
AssetHomeSubPage["TELEMATICS"] = "telematics";
|
7
|
-
AssetHomeSubPage["SPECIFICATION"] = "specification";
|
8
|
-
AssetHomeSubPage["ACTIVITY_TIMELINE"] = "activity-timeline";
|
1
|
+
var AssetHomeSubPage;
|
2
|
+
(function (AssetHomeSubPage) {
|
3
|
+
AssetHomeSubPage["MOVEMENT"] = "movement";
|
4
|
+
AssetHomeSubPage["EVENTS"] = "events";
|
5
|
+
AssetHomeSubPage["INSIGHTS"] = "insights";
|
6
|
+
AssetHomeSubPage["TELEMATICS"] = "telematics";
|
7
|
+
AssetHomeSubPage["SPECIFICATION"] = "specification";
|
8
|
+
AssetHomeSubPage["ACTIVITY_TIMELINE"] = "activity-timeline";
|
9
9
|
})(AssetHomeSubPage || (AssetHomeSubPage = {}));
|
10
10
|
|
11
|
-
var CustomFieldType;
|
12
|
-
(function (CustomFieldType) {
|
13
|
-
CustomFieldType["BOOLEAN"] = "BOOLEAN";
|
14
|
-
CustomFieldType["DATE"] = "DATE";
|
15
|
-
CustomFieldType["DROPDOWN"] = "DROPDOWN";
|
16
|
-
CustomFieldType["EMAIL"] = "EMAIL";
|
17
|
-
CustomFieldType["NUMBER"] = "NUMBER";
|
18
|
-
CustomFieldType["PHONE_NUMBER"] = "PHONE_NUMBER";
|
19
|
-
CustomFieldType["STRING"] = "STRING";
|
20
|
-
CustomFieldType["WEB_ADDRESS"] = "WEB_ADDRESS";
|
21
|
-
})(CustomFieldType || (CustomFieldType = {}));
|
22
|
-
var UnitUs;
|
23
|
-
(function (UnitUs) {
|
24
|
-
UnitUs["mi"] = "mi";
|
25
|
-
UnitUs["yd"] = "yd";
|
26
|
-
UnitUs["ft"] = "ft";
|
27
|
-
UnitUs["in"] = "in";
|
28
|
-
UnitUs["ac"] = "ac";
|
29
|
-
UnitUs["ha"] = "ha";
|
30
|
-
UnitUs["ft_2"] = "ft\u00B2";
|
31
|
-
UnitUs["gal"] = "gal";
|
32
|
-
UnitUs["ft_3"] = "ft\u00B3";
|
33
|
-
UnitUs["ton_us"] = "ton_us";
|
34
|
-
UnitUs["lb"] = "lb";
|
35
|
-
UnitUs["oz"] = "oz";
|
36
|
-
UnitUs["mph"] = "mph";
|
37
|
-
UnitUs["lb_h"] = "lb/h";
|
38
|
-
UnitUs["lb_s"] = "lb/s";
|
39
|
-
})(UnitUs || (UnitUs = {}));
|
40
|
-
var UnitSi;
|
41
|
-
(function (UnitSi) {
|
42
|
-
UnitSi["km"] = "km";
|
43
|
-
UnitSi["m"] = "m";
|
44
|
-
UnitSi["cm"] = "cm";
|
45
|
-
UnitSi["mm"] = "mm";
|
46
|
-
UnitSi["l"] = "l";
|
47
|
-
UnitSi["kg"] = "kg";
|
48
|
-
UnitSi["g"] = "g";
|
49
|
-
UnitSi["ton"] = "ton";
|
50
|
-
UnitSi["N"] = "N";
|
51
|
-
UnitSi["kW"] = "kW";
|
52
|
-
UnitSi["W"] = "W";
|
53
|
-
UnitSi["kWh"] = "kWh";
|
54
|
-
UnitSi["kPa"] = "kPa";
|
55
|
-
UnitSi["Pa"] = "Pa";
|
56
|
-
UnitSi["bar"] = "bar";
|
57
|
-
UnitSi["m_s"] = "m/s";
|
58
|
-
UnitSi["kg_h"] = "kg/h";
|
59
|
-
UnitSi["kg_s"] = "kg/s";
|
60
|
-
UnitSi["km_h"] = "km/h";
|
61
|
-
UnitSi["km_2"] = "km\u00B2";
|
62
|
-
UnitSi["m_2"] = "m\u00B2";
|
63
|
-
UnitSi["m_3"] = "m\u00B3";
|
64
|
-
UnitSi["m_s_2"] = "m/s\u00B2";
|
11
|
+
var CustomFieldType;
|
12
|
+
(function (CustomFieldType) {
|
13
|
+
CustomFieldType["BOOLEAN"] = "BOOLEAN";
|
14
|
+
CustomFieldType["DATE"] = "DATE";
|
15
|
+
CustomFieldType["DROPDOWN"] = "DROPDOWN";
|
16
|
+
CustomFieldType["EMAIL"] = "EMAIL";
|
17
|
+
CustomFieldType["NUMBER"] = "NUMBER";
|
18
|
+
CustomFieldType["PHONE_NUMBER"] = "PHONE_NUMBER";
|
19
|
+
CustomFieldType["STRING"] = "STRING";
|
20
|
+
CustomFieldType["WEB_ADDRESS"] = "WEB_ADDRESS";
|
21
|
+
})(CustomFieldType || (CustomFieldType = {}));
|
22
|
+
var UnitUs;
|
23
|
+
(function (UnitUs) {
|
24
|
+
UnitUs["mi"] = "mi";
|
25
|
+
UnitUs["yd"] = "yd";
|
26
|
+
UnitUs["ft"] = "ft";
|
27
|
+
UnitUs["in"] = "in";
|
28
|
+
UnitUs["ac"] = "ac";
|
29
|
+
UnitUs["ha"] = "ha";
|
30
|
+
UnitUs["ft_2"] = "ft\u00B2";
|
31
|
+
UnitUs["gal"] = "gal";
|
32
|
+
UnitUs["ft_3"] = "ft\u00B3";
|
33
|
+
UnitUs["ton_us"] = "ton_us";
|
34
|
+
UnitUs["lb"] = "lb";
|
35
|
+
UnitUs["oz"] = "oz";
|
36
|
+
UnitUs["mph"] = "mph";
|
37
|
+
UnitUs["lb_h"] = "lb/h";
|
38
|
+
UnitUs["lb_s"] = "lb/s";
|
39
|
+
})(UnitUs || (UnitUs = {}));
|
40
|
+
var UnitSi;
|
41
|
+
(function (UnitSi) {
|
42
|
+
UnitSi["km"] = "km";
|
43
|
+
UnitSi["m"] = "m";
|
44
|
+
UnitSi["cm"] = "cm";
|
45
|
+
UnitSi["mm"] = "mm";
|
46
|
+
UnitSi["l"] = "l";
|
47
|
+
UnitSi["kg"] = "kg";
|
48
|
+
UnitSi["g"] = "g";
|
49
|
+
UnitSi["ton"] = "ton";
|
50
|
+
UnitSi["N"] = "N";
|
51
|
+
UnitSi["kW"] = "kW";
|
52
|
+
UnitSi["W"] = "W";
|
53
|
+
UnitSi["kWh"] = "kWh";
|
54
|
+
UnitSi["kPa"] = "kPa";
|
55
|
+
UnitSi["Pa"] = "Pa";
|
56
|
+
UnitSi["bar"] = "bar";
|
57
|
+
UnitSi["m_s"] = "m/s";
|
58
|
+
UnitSi["kg_h"] = "kg/h";
|
59
|
+
UnitSi["kg_s"] = "kg/s";
|
60
|
+
UnitSi["km_h"] = "km/h";
|
61
|
+
UnitSi["km_2"] = "km\u00B2";
|
62
|
+
UnitSi["m_2"] = "m\u00B2";
|
63
|
+
UnitSi["m_3"] = "m\u00B3";
|
64
|
+
UnitSi["m_s_2"] = "m/s\u00B2";
|
65
65
|
})(UnitSi || (UnitSi = {}));
|
66
66
|
|
67
|
-
var BodyType;
|
68
|
-
(function (BodyType) {
|
69
|
-
BodyType[BodyType["Json"] = 0] = "Json";
|
70
|
-
BodyType[BodyType["FormData"] = 1] = "FormData";
|
67
|
+
var BodyType;
|
68
|
+
(function (BodyType) {
|
69
|
+
BodyType[BodyType["Json"] = 0] = "Json";
|
70
|
+
BodyType[BodyType["FormData"] = 1] = "FormData";
|
71
71
|
})(BodyType || (BodyType = {}));
|
72
72
|
|
73
|
-
var SiteHomeSubPage;
|
74
|
-
(function (SiteHomeSubPage) {
|
75
|
-
SiteHomeSubPage["INFORMATION"] = "information";
|
76
|
-
SiteHomeSubPage["HISTORY"] = "history";
|
73
|
+
var SiteHomeSubPage;
|
74
|
+
(function (SiteHomeSubPage) {
|
75
|
+
SiteHomeSubPage["INFORMATION"] = "information";
|
76
|
+
SiteHomeSubPage["HISTORY"] = "history";
|
77
77
|
})(SiteHomeSubPage || (SiteHomeSubPage = {}));
|
78
78
|
|
79
79
|
export { AssetHomeSubPage, BodyType, CustomFieldType, SiteHomeSubPage, UnitSi, UnitUs };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.46",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"engines": {
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"type": "module",
|
12
12
|
"types": "./src/index.d.ts",
|
13
13
|
"dependencies": {
|
14
|
-
"@trackunit/react-core-contexts-api": "0.2.
|
14
|
+
"@trackunit/react-core-contexts-api": "0.2.42"
|
15
15
|
},
|
16
16
|
"peerDependencies": {}
|
17
17
|
}
|
package/src/AssetRuntime.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export interface AssetInfo {
|
2
|
-
assetId: string;
|
3
|
-
}
|
4
|
-
export declare enum AssetHomeSubPage {
|
5
|
-
MOVEMENT = "movement",
|
6
|
-
EVENTS = "events",
|
7
|
-
INSIGHTS = "insights",
|
8
|
-
TELEMATICS = "telematics",
|
9
|
-
SPECIFICATION = "specification",
|
10
|
-
ACTIVITY_TIMELINE = "activity-timeline"
|
11
|
-
}
|
1
|
+
export interface AssetInfo {
|
2
|
+
assetId: string;
|
3
|
+
}
|
4
|
+
export declare enum AssetHomeSubPage {
|
5
|
+
MOVEMENT = "movement",
|
6
|
+
EVENTS = "events",
|
7
|
+
INSIGHTS = "insights",
|
8
|
+
TELEMATICS = "telematics",
|
9
|
+
SPECIFICATION = "specification",
|
10
|
+
ACTIVITY_TIMELINE = "activity-timeline"
|
11
|
+
}
|
package/src/ChildConnector.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { IAssetSortingContext, IGlobalSelectionContext, ITokenContext } from "@trackunit/react-core-contexts-api";
|
2
|
-
export interface ChildConnectorApi {
|
3
|
-
onTokenChanged: (token: ITokenContext) => void;
|
4
|
-
onGlobalSelectionChanged: (selection: IGlobalSelectionContext) => void;
|
5
|
-
onAssetSortingStateChanged: (sorting: IAssetSortingContext["sortingState"]) => void;
|
6
|
-
}
|
1
|
+
import { IAssetSortingContext, IGlobalSelectionContext, ITokenContext } from "@trackunit/react-core-contexts-api";
|
2
|
+
export interface ChildConnectorApi {
|
3
|
+
onTokenChanged: (token: ITokenContext) => void;
|
4
|
+
onGlobalSelectionChanged: (selection: IGlobalSelectionContext) => void;
|
5
|
+
onAssetSortingStateChanged: (sorting: IAssetSortingContext["sortingState"]) => void;
|
6
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export interface CurrentUserRole {
|
2
|
-
id: string;
|
3
|
-
accountOwner: boolean;
|
4
|
-
role: {
|
5
|
-
id: string;
|
6
|
-
name: string;
|
7
|
-
};
|
8
|
-
}
|
1
|
+
export interface CurrentUserRole {
|
2
|
+
id: string;
|
3
|
+
accountOwner: boolean;
|
4
|
+
role: {
|
5
|
+
id: string;
|
6
|
+
name: string;
|
7
|
+
};
|
8
|
+
}
|
@@ -1,167 +1,167 @@
|
|
1
|
-
export type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP";
|
2
|
-
export interface EntityIdentity {
|
3
|
-
type: EntityType;
|
4
|
-
id: string;
|
5
|
-
}
|
6
|
-
export declare enum CustomFieldType {
|
7
|
-
BOOLEAN = "BOOLEAN",
|
8
|
-
DATE = "DATE",
|
9
|
-
DROPDOWN = "DROPDOWN",
|
10
|
-
EMAIL = "EMAIL",
|
11
|
-
NUMBER = "NUMBER",
|
12
|
-
PHONE_NUMBER = "PHONE_NUMBER",
|
13
|
-
STRING = "STRING",
|
14
|
-
WEB_ADDRESS = "WEB_ADDRESS"
|
15
|
-
}
|
16
|
-
/**
|
17
|
-
* The new field definition
|
18
|
-
*/
|
19
|
-
export interface AbstractCustomFieldDefinitionObject {
|
20
|
-
key?: string | null;
|
21
|
-
/** The title */
|
22
|
-
title: string | null;
|
23
|
-
entityType: string;
|
24
|
-
description?: string | null;
|
25
|
-
uiVisible?: boolean | null;
|
26
|
-
uiEditable?: boolean | null;
|
27
|
-
type: CustomFieldType;
|
28
|
-
}
|
29
|
-
export type BooleanFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
30
|
-
defaultBooleanValue?: boolean | null;
|
31
|
-
type: CustomFieldType.BOOLEAN;
|
32
|
-
};
|
33
|
-
export type DateFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
34
|
-
/**
|
35
|
-
* ISO8601 formatted date
|
36
|
-
*/
|
37
|
-
defaultDateValue?: string | null;
|
38
|
-
type: CustomFieldType.DATE;
|
39
|
-
};
|
40
|
-
export type PhoneNumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
41
|
-
defaultStringValue?: string | null;
|
42
|
-
type: CustomFieldType.PHONE_NUMBER;
|
43
|
-
};
|
44
|
-
export type EmailFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
45
|
-
defaultStringValue?: string | null;
|
46
|
-
type: CustomFieldType.EMAIL;
|
47
|
-
};
|
48
|
-
export type WebAddressFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
49
|
-
defaultStringValue?: string | null;
|
50
|
-
type: CustomFieldType.WEB_ADDRESS;
|
51
|
-
};
|
52
|
-
export type DropDownFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
53
|
-
defaultStringArrayValue?: string[] | null;
|
54
|
-
multiSelect?: boolean | null;
|
55
|
-
allValues?: string[] | null;
|
56
|
-
type: CustomFieldType.DROPDOWN;
|
57
|
-
};
|
58
|
-
export declare enum UnitUs {
|
59
|
-
"mi" = "mi",
|
60
|
-
"yd" = "yd",
|
61
|
-
"ft" = "ft",
|
62
|
-
"in" = "in",
|
63
|
-
"ac" = "ac",
|
64
|
-
"ha" = "ha",
|
65
|
-
"ft_2" = "ft\u00B2",
|
66
|
-
"gal" = "gal",
|
67
|
-
"ft_3" = "ft\u00B3",
|
68
|
-
"ton_us" = "ton_us",
|
69
|
-
"lb" = "lb",
|
70
|
-
"oz" = "oz",
|
71
|
-
"mph" = "mph",
|
72
|
-
"lb_h" = "lb/h",
|
73
|
-
"lb_s" = "lb/s"
|
74
|
-
}
|
75
|
-
export declare enum UnitSi {
|
76
|
-
"km" = "km",
|
77
|
-
"m" = "m",
|
78
|
-
"cm" = "cm",
|
79
|
-
"mm" = "mm",
|
80
|
-
"l" = "l",
|
81
|
-
"kg" = "kg",
|
82
|
-
"g" = "g",
|
83
|
-
"ton" = "ton",
|
84
|
-
"N" = "N",
|
85
|
-
"kW" = "kW",
|
86
|
-
"W" = "W",
|
87
|
-
"kWh" = "kWh",
|
88
|
-
"kPa" = "kPa",
|
89
|
-
"Pa" = "Pa",
|
90
|
-
"bar" = "bar",
|
91
|
-
"m_s" = "m/s",
|
92
|
-
"kg_h" = "kg/h",
|
93
|
-
"kg_s" = "kg/s",
|
94
|
-
"km_h" = "km/h",
|
95
|
-
"km_2" = "km\u00B2",
|
96
|
-
"m_2" = "m\u00B2",
|
97
|
-
"m_3" = "m\u00B3",
|
98
|
-
"m_s_2" = "m/s\u00B2"
|
99
|
-
}
|
100
|
-
export type NumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
101
|
-
defaultNumberValue?: number | null;
|
102
|
-
minimumNumber?: number | null;
|
103
|
-
maximumNumber?: number | null;
|
104
|
-
unitSi?: UnitSi | null;
|
105
|
-
unitUs?: UnitUs | null;
|
106
|
-
isInteger?: boolean | null;
|
107
|
-
type: CustomFieldType.NUMBER;
|
108
|
-
};
|
109
|
-
export type StringFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
110
|
-
defaultStringValue?: string | null;
|
111
|
-
minimumLength?: number | null;
|
112
|
-
maximumLength?: number | null;
|
113
|
-
pattern?: string | null;
|
114
|
-
type: CustomFieldType.STRING;
|
115
|
-
};
|
116
|
-
export interface AbstractCustomFieldValue {
|
117
|
-
type: CustomFieldType;
|
118
|
-
}
|
119
|
-
export type BooleanFieldValue = {
|
120
|
-
type: CustomFieldType.BOOLEAN;
|
121
|
-
booleanValue?: boolean | null;
|
122
|
-
};
|
123
|
-
export type DateFieldValue = {
|
124
|
-
type: CustomFieldType.DATE;
|
125
|
-
/**
|
126
|
-
* ISO8601 formatted date
|
127
|
-
*/
|
128
|
-
dateValue?: string | null;
|
129
|
-
};
|
130
|
-
export type DropDownFieldValue = {
|
131
|
-
type: CustomFieldType.DROPDOWN;
|
132
|
-
stringArrayValue?: string[];
|
133
|
-
};
|
134
|
-
export type EmailFieldValue = {
|
135
|
-
type: CustomFieldType.EMAIL;
|
136
|
-
stringValue?: string | null;
|
137
|
-
};
|
138
|
-
export type NumberFieldValue = {
|
139
|
-
type: CustomFieldType.NUMBER;
|
140
|
-
numberValue?: number | null;
|
141
|
-
};
|
142
|
-
export type PhoneNumberFieldValue = {
|
143
|
-
type: CustomFieldType.PHONE_NUMBER;
|
144
|
-
stringValue?: string | null;
|
145
|
-
};
|
146
|
-
export type StringFieldValue = {
|
147
|
-
type: CustomFieldType.STRING;
|
148
|
-
stringValue?: string | null;
|
149
|
-
};
|
150
|
-
export type WebAddressFieldValue = {
|
151
|
-
type: CustomFieldType.WEB_ADDRESS;
|
152
|
-
stringValue?: string | null;
|
153
|
-
};
|
154
|
-
export type CustomFieldDefinition = BooleanFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | EmailFieldDefinition | NumberFieldDefinition | PhoneNumberFieldDefinition | StringFieldDefinition | WebAddressFieldDefinition;
|
155
|
-
export type CustomFieldValue = BooleanFieldValue | DateFieldValue | DropDownFieldValue | EmailFieldValue | NumberFieldValue | PhoneNumberFieldValue | StringFieldValue | WebAddressFieldValue;
|
156
|
-
export interface ValueAndDefinition {
|
157
|
-
definition: CustomFieldDefinition;
|
158
|
-
value: CustomFieldValue;
|
159
|
-
}
|
160
|
-
export interface AbstractValueAndDefinition {
|
161
|
-
definition: AbstractCustomFieldDefinitionObject;
|
162
|
-
value: AbstractCustomFieldValue;
|
163
|
-
}
|
164
|
-
export interface ValueAndDefinitionKey {
|
165
|
-
definitionKey: string;
|
166
|
-
value: CustomFieldValue;
|
167
|
-
}
|
1
|
+
export type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP";
|
2
|
+
export interface EntityIdentity {
|
3
|
+
type: EntityType;
|
4
|
+
id: string;
|
5
|
+
}
|
6
|
+
export declare enum CustomFieldType {
|
7
|
+
BOOLEAN = "BOOLEAN",
|
8
|
+
DATE = "DATE",
|
9
|
+
DROPDOWN = "DROPDOWN",
|
10
|
+
EMAIL = "EMAIL",
|
11
|
+
NUMBER = "NUMBER",
|
12
|
+
PHONE_NUMBER = "PHONE_NUMBER",
|
13
|
+
STRING = "STRING",
|
14
|
+
WEB_ADDRESS = "WEB_ADDRESS"
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* The new field definition
|
18
|
+
*/
|
19
|
+
export interface AbstractCustomFieldDefinitionObject {
|
20
|
+
key?: string | null;
|
21
|
+
/** The title */
|
22
|
+
title: string | null;
|
23
|
+
entityType: string;
|
24
|
+
description?: string | null;
|
25
|
+
uiVisible?: boolean | null;
|
26
|
+
uiEditable?: boolean | null;
|
27
|
+
type: CustomFieldType;
|
28
|
+
}
|
29
|
+
export type BooleanFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
30
|
+
defaultBooleanValue?: boolean | null;
|
31
|
+
type: CustomFieldType.BOOLEAN;
|
32
|
+
};
|
33
|
+
export type DateFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
34
|
+
/**
|
35
|
+
* ISO8601 formatted date
|
36
|
+
*/
|
37
|
+
defaultDateValue?: string | null;
|
38
|
+
type: CustomFieldType.DATE;
|
39
|
+
};
|
40
|
+
export type PhoneNumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
41
|
+
defaultStringValue?: string | null;
|
42
|
+
type: CustomFieldType.PHONE_NUMBER;
|
43
|
+
};
|
44
|
+
export type EmailFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
45
|
+
defaultStringValue?: string | null;
|
46
|
+
type: CustomFieldType.EMAIL;
|
47
|
+
};
|
48
|
+
export type WebAddressFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
49
|
+
defaultStringValue?: string | null;
|
50
|
+
type: CustomFieldType.WEB_ADDRESS;
|
51
|
+
};
|
52
|
+
export type DropDownFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
53
|
+
defaultStringArrayValue?: string[] | null;
|
54
|
+
multiSelect?: boolean | null;
|
55
|
+
allValues?: string[] | null;
|
56
|
+
type: CustomFieldType.DROPDOWN;
|
57
|
+
};
|
58
|
+
export declare enum UnitUs {
|
59
|
+
"mi" = "mi",
|
60
|
+
"yd" = "yd",
|
61
|
+
"ft" = "ft",
|
62
|
+
"in" = "in",
|
63
|
+
"ac" = "ac",
|
64
|
+
"ha" = "ha",
|
65
|
+
"ft_2" = "ft\u00B2",
|
66
|
+
"gal" = "gal",
|
67
|
+
"ft_3" = "ft\u00B3",
|
68
|
+
"ton_us" = "ton_us",
|
69
|
+
"lb" = "lb",
|
70
|
+
"oz" = "oz",
|
71
|
+
"mph" = "mph",
|
72
|
+
"lb_h" = "lb/h",
|
73
|
+
"lb_s" = "lb/s"
|
74
|
+
}
|
75
|
+
export declare enum UnitSi {
|
76
|
+
"km" = "km",
|
77
|
+
"m" = "m",
|
78
|
+
"cm" = "cm",
|
79
|
+
"mm" = "mm",
|
80
|
+
"l" = "l",
|
81
|
+
"kg" = "kg",
|
82
|
+
"g" = "g",
|
83
|
+
"ton" = "ton",
|
84
|
+
"N" = "N",
|
85
|
+
"kW" = "kW",
|
86
|
+
"W" = "W",
|
87
|
+
"kWh" = "kWh",
|
88
|
+
"kPa" = "kPa",
|
89
|
+
"Pa" = "Pa",
|
90
|
+
"bar" = "bar",
|
91
|
+
"m_s" = "m/s",
|
92
|
+
"kg_h" = "kg/h",
|
93
|
+
"kg_s" = "kg/s",
|
94
|
+
"km_h" = "km/h",
|
95
|
+
"km_2" = "km\u00B2",
|
96
|
+
"m_2" = "m\u00B2",
|
97
|
+
"m_3" = "m\u00B3",
|
98
|
+
"m_s_2" = "m/s\u00B2"
|
99
|
+
}
|
100
|
+
export type NumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
101
|
+
defaultNumberValue?: number | null;
|
102
|
+
minimumNumber?: number | null;
|
103
|
+
maximumNumber?: number | null;
|
104
|
+
unitSi?: UnitSi | null;
|
105
|
+
unitUs?: UnitUs | null;
|
106
|
+
isInteger?: boolean | null;
|
107
|
+
type: CustomFieldType.NUMBER;
|
108
|
+
};
|
109
|
+
export type StringFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
110
|
+
defaultStringValue?: string | null;
|
111
|
+
minimumLength?: number | null;
|
112
|
+
maximumLength?: number | null;
|
113
|
+
pattern?: string | null;
|
114
|
+
type: CustomFieldType.STRING;
|
115
|
+
};
|
116
|
+
export interface AbstractCustomFieldValue {
|
117
|
+
type: CustomFieldType;
|
118
|
+
}
|
119
|
+
export type BooleanFieldValue = {
|
120
|
+
type: CustomFieldType.BOOLEAN;
|
121
|
+
booleanValue?: boolean | null;
|
122
|
+
};
|
123
|
+
export type DateFieldValue = {
|
124
|
+
type: CustomFieldType.DATE;
|
125
|
+
/**
|
126
|
+
* ISO8601 formatted date
|
127
|
+
*/
|
128
|
+
dateValue?: string | null;
|
129
|
+
};
|
130
|
+
export type DropDownFieldValue = {
|
131
|
+
type: CustomFieldType.DROPDOWN;
|
132
|
+
stringArrayValue?: string[];
|
133
|
+
};
|
134
|
+
export type EmailFieldValue = {
|
135
|
+
type: CustomFieldType.EMAIL;
|
136
|
+
stringValue?: string | null;
|
137
|
+
};
|
138
|
+
export type NumberFieldValue = {
|
139
|
+
type: CustomFieldType.NUMBER;
|
140
|
+
numberValue?: number | null;
|
141
|
+
};
|
142
|
+
export type PhoneNumberFieldValue = {
|
143
|
+
type: CustomFieldType.PHONE_NUMBER;
|
144
|
+
stringValue?: string | null;
|
145
|
+
};
|
146
|
+
export type StringFieldValue = {
|
147
|
+
type: CustomFieldType.STRING;
|
148
|
+
stringValue?: string | null;
|
149
|
+
};
|
150
|
+
export type WebAddressFieldValue = {
|
151
|
+
type: CustomFieldType.WEB_ADDRESS;
|
152
|
+
stringValue?: string | null;
|
153
|
+
};
|
154
|
+
export type CustomFieldDefinition = BooleanFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | EmailFieldDefinition | NumberFieldDefinition | PhoneNumberFieldDefinition | StringFieldDefinition | WebAddressFieldDefinition;
|
155
|
+
export type CustomFieldValue = BooleanFieldValue | DateFieldValue | DropDownFieldValue | EmailFieldValue | NumberFieldValue | PhoneNumberFieldValue | StringFieldValue | WebAddressFieldValue;
|
156
|
+
export interface ValueAndDefinition {
|
157
|
+
definition: CustomFieldDefinition;
|
158
|
+
value: CustomFieldValue;
|
159
|
+
}
|
160
|
+
export interface AbstractValueAndDefinition {
|
161
|
+
definition: AbstractCustomFieldDefinitionObject;
|
162
|
+
value: AbstractCustomFieldValue;
|
163
|
+
}
|
164
|
+
export interface ValueAndDefinitionKey {
|
165
|
+
definitionKey: string;
|
166
|
+
value: CustomFieldValue;
|
167
|
+
}
|
package/src/HostConnector.d.ts
CHANGED
@@ -1,52 +1,52 @@
|
|
1
|
-
import { IAnalyticsContextAsync, IAssetSortingContext, ICurrentUserContext, IEnvironmentContext, IGlobalSelectionContext, ITokenContext, IUserSubscriptionContext, OemBranding, OemBrandingImageType } from "@trackunit/react-core-contexts-api";
|
2
|
-
import { AssetHomeSubPage, AssetInfo } from "./AssetRuntime";
|
3
|
-
import { CurrentUserRole } from "./CurrentUserRuntime";
|
4
|
-
import { EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "./CustomFieldRuntime";
|
5
|
-
import { BodyType, HttpResponse, RequestParams } from "./RestRuntime";
|
6
|
-
import { SiteHomeSubPage, SiteInfo } from "./SiteRuntime";
|
7
|
-
import { PublicToast } from "./ToastRuntime";
|
8
|
-
export interface CustomFieldError {
|
9
|
-
/**
|
10
|
-
* The custom fields that does not obey the rules of the definition, read the definition to figure out what is wrong.
|
11
|
-
*/
|
12
|
-
customFieldKeys: string[];
|
13
|
-
}
|
14
|
-
export interface HostConnectorApi extends IAnalyticsContextAsync<{}> {
|
15
|
-
getAssetInfo(): Promise<AssetInfo>;
|
16
|
-
getAssetSortingState(): Promise<IAssetSortingContext["sortingState"]>;
|
17
|
-
setAssetSortingState(...args: Parameters<IAssetSortingContext["setSortBy"]>): Promise<void>;
|
18
|
-
gotoAssetHome(assetId: string, options?: {
|
19
|
-
irisAppId?: string;
|
20
|
-
extensionId?: string;
|
21
|
-
subPage?: AssetHomeSubPage;
|
22
|
-
}): Promise<boolean>;
|
23
|
-
gotoSiteHome(siteId: string, options?: {
|
24
|
-
irisAppId?: string;
|
25
|
-
extensionId?: string;
|
26
|
-
subPage?: SiteHomeSubPage;
|
27
|
-
}): Promise<boolean>;
|
28
|
-
requestTrackunitRestApi: <T, E>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<T, E>>;
|
29
|
-
getCustomFieldsFor(entity: EntityIdentity): Promise<ValueAndDefinition[]>;
|
30
|
-
setCustomFieldsFor(entity: EntityIdentity, values: ValueAndDefinitionKey[]): Promise<void | CustomFieldError>;
|
31
|
-
getEnvironmentContext(): Promise<IEnvironmentContext>;
|
32
|
-
getUserSubscriptionContext(): Promise<IUserSubscriptionContext>;
|
33
|
-
getTokenContext(): Promise<ITokenContext>;
|
34
|
-
getGlobalSelectionContext(): Promise<IGlobalSelectionContext>;
|
35
|
-
getCurrentUserContext(): Promise<ICurrentUserContext>;
|
36
|
-
setDeepLink: SetDeepLink;
|
37
|
-
addToast(toast: PublicToast): Promise<void | "primaryAction" | "secondaryAction">;
|
38
|
-
getCurrentUserRole(userIds: string | string[]): Promise<CurrentUserRole | undefined>;
|
39
|
-
getAppName(): string | undefined;
|
40
|
-
getOrgName(): string | undefined;
|
41
|
-
getExtensionName(): string | undefined;
|
42
|
-
getSiteInfo(): Promise<SiteInfo>;
|
43
|
-
getOemBranding: (brand: string) => Promise<OemBranding | null>;
|
44
|
-
getOemImage: (imageType: OemBrandingImageType, brand: string, model?: string) => Promise<string | null>;
|
45
|
-
}
|
46
|
-
export type SetDeepLink = (deepLink: DeepLink) => void;
|
47
|
-
export type DeepLink = {
|
48
|
-
path: string;
|
49
|
-
pathname: string;
|
50
|
-
search: Location["search"];
|
51
|
-
hash: Location["hash"];
|
52
|
-
};
|
1
|
+
import { IAnalyticsContextAsync, IAssetSortingContext, ICurrentUserContext, IEnvironmentContext, IGlobalSelectionContext, ITokenContext, IUserSubscriptionContext, OemBranding, OemBrandingImageType } from "@trackunit/react-core-contexts-api";
|
2
|
+
import { AssetHomeSubPage, AssetInfo } from "./AssetRuntime";
|
3
|
+
import { CurrentUserRole } from "./CurrentUserRuntime";
|
4
|
+
import { EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "./CustomFieldRuntime";
|
5
|
+
import { BodyType, HttpResponse, RequestParams } from "./RestRuntime";
|
6
|
+
import { SiteHomeSubPage, SiteInfo } from "./SiteRuntime";
|
7
|
+
import { PublicToast } from "./ToastRuntime";
|
8
|
+
export interface CustomFieldError {
|
9
|
+
/**
|
10
|
+
* The custom fields that does not obey the rules of the definition, read the definition to figure out what is wrong.
|
11
|
+
*/
|
12
|
+
customFieldKeys: string[];
|
13
|
+
}
|
14
|
+
export interface HostConnectorApi extends IAnalyticsContextAsync<{}> {
|
15
|
+
getAssetInfo(): Promise<AssetInfo>;
|
16
|
+
getAssetSortingState(): Promise<IAssetSortingContext["sortingState"]>;
|
17
|
+
setAssetSortingState(...args: Parameters<IAssetSortingContext["setSortBy"]>): Promise<void>;
|
18
|
+
gotoAssetHome(assetId: string, options?: {
|
19
|
+
irisAppId?: string;
|
20
|
+
extensionId?: string;
|
21
|
+
subPage?: AssetHomeSubPage;
|
22
|
+
}): Promise<boolean>;
|
23
|
+
gotoSiteHome(siteId: string, options?: {
|
24
|
+
irisAppId?: string;
|
25
|
+
extensionId?: string;
|
26
|
+
subPage?: SiteHomeSubPage;
|
27
|
+
}): Promise<boolean>;
|
28
|
+
requestTrackunitRestApi: <T, E>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<T, E>>;
|
29
|
+
getCustomFieldsFor(entity: EntityIdentity): Promise<ValueAndDefinition[]>;
|
30
|
+
setCustomFieldsFor(entity: EntityIdentity, values: ValueAndDefinitionKey[]): Promise<void | CustomFieldError>;
|
31
|
+
getEnvironmentContext(): Promise<IEnvironmentContext>;
|
32
|
+
getUserSubscriptionContext(): Promise<IUserSubscriptionContext>;
|
33
|
+
getTokenContext(): Promise<ITokenContext>;
|
34
|
+
getGlobalSelectionContext(): Promise<IGlobalSelectionContext>;
|
35
|
+
getCurrentUserContext(): Promise<ICurrentUserContext>;
|
36
|
+
setDeepLink: SetDeepLink;
|
37
|
+
addToast(toast: PublicToast): Promise<void | "primaryAction" | "secondaryAction">;
|
38
|
+
getCurrentUserRole(userIds: string | string[]): Promise<CurrentUserRole | undefined>;
|
39
|
+
getAppName(): string | undefined;
|
40
|
+
getOrgName(): string | undefined;
|
41
|
+
getExtensionName(): string | undefined;
|
42
|
+
getSiteInfo(): Promise<SiteInfo>;
|
43
|
+
getOemBranding: (brand: string) => Promise<OemBranding | null>;
|
44
|
+
getOemImage: (imageType: OemBrandingImageType, brand: string, model?: string) => Promise<string | null>;
|
45
|
+
}
|
46
|
+
export type SetDeepLink = (deepLink: DeepLink) => void;
|
47
|
+
export type DeepLink = {
|
48
|
+
path: string;
|
49
|
+
pathname: string;
|
50
|
+
search: Location["search"];
|
51
|
+
hash: Location["hash"];
|
52
|
+
};
|
package/src/RestRuntime.d.ts
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
export type RequestParams = {
|
2
|
-
headers?: {
|
3
|
-
[key: string]: string;
|
4
|
-
};
|
5
|
-
secure?: boolean;
|
6
|
-
};
|
7
|
-
export declare enum BodyType {
|
8
|
-
Json = 0,
|
9
|
-
FormData = 1
|
10
|
-
}
|
11
|
-
export interface IRestApiClient {
|
12
|
-
request: <T, E>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<T, E>>;
|
13
|
-
apiHost: string;
|
14
|
-
}
|
15
|
-
export type RequestQueryParamsType = Record<string | number, any>;
|
16
|
-
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
17
|
-
export interface HttpResponse<D, E> {
|
18
|
-
data?: D;
|
19
|
-
error?: E;
|
20
|
-
headers: {
|
21
|
-
[key: string]: string;
|
22
|
-
};
|
23
|
-
ok: boolean;
|
24
|
-
redirected: boolean;
|
25
|
-
status: number;
|
26
|
-
statusText: string;
|
27
|
-
type: ResponseType;
|
28
|
-
url: string;
|
29
|
-
}
|
30
|
-
export {};
|
1
|
+
export type RequestParams = {
|
2
|
+
headers?: {
|
3
|
+
[key: string]: string;
|
4
|
+
};
|
5
|
+
secure?: boolean;
|
6
|
+
};
|
7
|
+
export declare enum BodyType {
|
8
|
+
Json = 0,
|
9
|
+
FormData = 1
|
10
|
+
}
|
11
|
+
export interface IRestApiClient {
|
12
|
+
request: <T, E>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<T, E>>;
|
13
|
+
apiHost: string;
|
14
|
+
}
|
15
|
+
export type RequestQueryParamsType = Record<string | number, any>;
|
16
|
+
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
17
|
+
export interface HttpResponse<D, E> {
|
18
|
+
data?: D;
|
19
|
+
error?: E;
|
20
|
+
headers: {
|
21
|
+
[key: string]: string;
|
22
|
+
};
|
23
|
+
ok: boolean;
|
24
|
+
redirected: boolean;
|
25
|
+
status: number;
|
26
|
+
statusText: string;
|
27
|
+
type: ResponseType;
|
28
|
+
url: string;
|
29
|
+
}
|
30
|
+
export {};
|
package/src/SiteRuntime.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export interface SiteInfo {
|
2
|
-
siteId: string;
|
3
|
-
}
|
4
|
-
export declare enum SiteHomeSubPage {
|
5
|
-
INFORMATION = "information",
|
6
|
-
HISTORY = "history"
|
7
|
-
}
|
1
|
+
export interface SiteInfo {
|
2
|
+
siteId: string;
|
3
|
+
}
|
4
|
+
export declare enum SiteHomeSubPage {
|
5
|
+
INFORMATION = "information",
|
6
|
+
HISTORY = "history"
|
7
|
+
}
|
package/src/ToastRuntime.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { Toast } from "@trackunit/react-core-contexts-api";
|
2
|
-
/**
|
3
|
-
* Serializable toast which is used for sending through penpal
|
4
|
-
*/
|
5
|
-
export interface PublicToast extends Omit<Toast, "primaryAction" | "secondaryAction"> {
|
6
|
-
primaryAction?: string;
|
7
|
-
secondaryAction?: string;
|
8
|
-
}
|
1
|
+
import { Toast } from "@trackunit/react-core-contexts-api";
|
2
|
+
/**
|
3
|
+
* Serializable toast which is used for sending through penpal
|
4
|
+
*/
|
5
|
+
export interface PublicToast extends Omit<Toast, "primaryAction" | "secondaryAction"> {
|
6
|
+
primaryAction?: string;
|
7
|
+
secondaryAction?: string;
|
8
|
+
}
|
package/src/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from "./AssetRuntime";
|
2
|
-
export * from "./ChildConnector";
|
3
|
-
export * from "./CurrentUserRuntime";
|
4
|
-
export * from "./CustomFieldRuntime";
|
5
|
-
export * from "./HostConnector";
|
6
|
-
export * from "./RestRuntime";
|
7
|
-
export * from "./SiteRuntime";
|
8
|
-
export * from "./ToastRuntime";
|
1
|
+
export * from "./AssetRuntime";
|
2
|
+
export * from "./ChildConnector";
|
3
|
+
export * from "./CurrentUserRuntime";
|
4
|
+
export * from "./CustomFieldRuntime";
|
5
|
+
export * from "./HostConnector";
|
6
|
+
export * from "./RestRuntime";
|
7
|
+
export * from "./SiteRuntime";
|
8
|
+
export * from "./ToastRuntime";
|