@trackunit/iris-app-oem-api 0.0.124 → 0.0.126
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 +1 -1
- package/src/types/Branding.d.ts +52 -0
- package/src/types/Branding.js +3 -0
- package/src/types/Branding.js.map +1 -0
- package/src/types/EventEnrichment.d.ts +113 -0
- package/src/types/EventEnrichment.js +3 -0
- package/src/types/EventEnrichment.js.map +1 -0
- package/src/types/irisAppOemManifest.d.ts +21 -43
- package/src/types/irisAppOemManifest.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.126](https://github.com/Trackunit/manager/compare/iris-app-oem-api/0.0.125...iris-app-oem-api/0.0.126) (2024-12-09)
|
|
6
|
+
|
|
7
|
+
## [0.0.125](https://github.com/Trackunit/manager/compare/iris-app-oem-api/0.0.124...iris-app-oem-api/0.0.125) (2024-12-04)
|
|
8
|
+
|
|
5
9
|
## [0.0.124](https://github.com/Trackunit/manager/compare/iris-app-oem-api/0.0.123...iris-app-oem-api/0.0.124) (2024-12-02)
|
|
6
10
|
|
|
7
11
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface Branding {
|
|
2
|
+
/**
|
|
3
|
+
* Conditions for the OEM app to be shown.
|
|
4
|
+
*/
|
|
5
|
+
conditions: {
|
|
6
|
+
/**
|
|
7
|
+
* It is case insensitive so does not matter how you write the brand.
|
|
8
|
+
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
9
|
+
*
|
|
10
|
+
* Brand used/filled out then the asset needs to match the filled out property.
|
|
11
|
+
*/
|
|
12
|
+
brand: string;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the asset is licensed by OEM
|
|
15
|
+
*/
|
|
16
|
+
oemLicensedOnly?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Path to an image in the assets folder of the app.
|
|
20
|
+
* The image will be shown as brand logo.
|
|
21
|
+
* The image will be shown as fleet list logo of an OEM asset.
|
|
22
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
23
|
+
*/
|
|
24
|
+
logoPath?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Path to an image in the assets folder of the app.
|
|
27
|
+
* The image will be shown as banner of an OEM asset.
|
|
28
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
29
|
+
*/
|
|
30
|
+
assetBannerPath?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Color will be applied to banner and also will used as brand theme color.
|
|
33
|
+
* It will be a hex code. e.g.: '#FF0000'.
|
|
34
|
+
*/
|
|
35
|
+
color?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Path to an image in the assets folder of the app.
|
|
38
|
+
* The image will be shown in the Events and Insights tab in Asset home.
|
|
39
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
40
|
+
*/
|
|
41
|
+
platformLogoPath?: string;
|
|
42
|
+
/**
|
|
43
|
+
* List of model images.
|
|
44
|
+
* Key will be the model name.
|
|
45
|
+
* Value will be path to an image in the assets folder of the app.
|
|
46
|
+
* The image will be shown as the model image in Asset home.
|
|
47
|
+
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
48
|
+
*/
|
|
49
|
+
modelImages?: {
|
|
50
|
+
[key: string]: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Branding.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-oem-api/src/types/Branding.ts"],"names":[],"mappings":"","sourcesContent":["export interface Branding {\n /**\n * Conditions for the OEM app to be shown.\n */\n conditions: {\n /**\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 * Brand used/filled out then the asset needs to match the filled out property.\n */\n brand: string;\n /**\n * Indicates if the asset is licensed by OEM\n */\n oemLicensedOnly?: boolean;\n };\n /**\n * Path to an image in the assets folder of the app.\n * The image will be shown as brand logo.\n * The image will be shown as fleet list logo of an OEM asset.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n logoPath?: string;\n /**\n * Path to an image in the assets folder of the app.\n * The image will be shown as banner of an OEM asset.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n assetBannerPath?: string;\n /**\n * Color will be applied to banner and also will used as brand theme color.\n * It will be a hex code. e.g.: '#FF0000'.\n */\n color?: string;\n /**\n * Path to an image in the assets folder of the app.\n * The image will be shown in the Events and Insights tab in Asset home.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n platformLogoPath?: string;\n /**\n * List of model images.\n * Key will be the model name.\n * Value will be path to an image in the assets folder of the app.\n * The image will be shown as the model image in Asset home.\n * Example: typing \"MyImage.png\" here, will show the file \"apps/my-app/assets/MyImage.png\"\n */\n modelImages?: { [key: string]: string };\n}\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for enriching events.
|
|
3
|
+
*/
|
|
4
|
+
export interface EventEnrichment {
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for asset registration.
|
|
7
|
+
*/
|
|
8
|
+
assetRegistration: AssetRegistrationConfiguration;
|
|
9
|
+
auth: AuthConfiguration;
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for handling fault details.
|
|
12
|
+
* */
|
|
13
|
+
fault: FaultConfiguration;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for heartbeats.
|
|
16
|
+
*/
|
|
17
|
+
heartbeat: HeartbeatConfiguration;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for asset registration.
|
|
21
|
+
*/
|
|
22
|
+
export interface AssetRegistrationConfiguration extends ApiRequestConfig {
|
|
23
|
+
/**
|
|
24
|
+
* Connecting specific data points to their intended targets or fields.
|
|
25
|
+
*/
|
|
26
|
+
data: TargetData;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Authentication configuration for event enrichment.
|
|
30
|
+
*/
|
|
31
|
+
export interface AuthConfiguration extends ApiRequestConfig {
|
|
32
|
+
/**
|
|
33
|
+
* Type of authorization protocol. e.g.: Basic, OAuth2
|
|
34
|
+
*/
|
|
35
|
+
type: "Basic" | "OAuth2";
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Configuration for handling fault details.
|
|
39
|
+
*/
|
|
40
|
+
export interface FaultConfiguration extends ApiRequestConfig {
|
|
41
|
+
/**
|
|
42
|
+
* List of fault codes that the OEM app is interested in.
|
|
43
|
+
*/
|
|
44
|
+
sourceAddresses: number[];
|
|
45
|
+
/**
|
|
46
|
+
* Max number of elements when batching.
|
|
47
|
+
*/
|
|
48
|
+
batchSize?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Connecting specific data points to their intended targets or fields.
|
|
51
|
+
*/
|
|
52
|
+
data: TargetData;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for heartbeats.
|
|
56
|
+
*/
|
|
57
|
+
export interface HeartbeatConfiguration extends ApiRequestConfig {
|
|
58
|
+
/**
|
|
59
|
+
* Frequency of the heartbeat.
|
|
60
|
+
*/
|
|
61
|
+
frequency: "PT15M" | "PT1H" | "P1D";
|
|
62
|
+
/**
|
|
63
|
+
* Max number of elements when batching.
|
|
64
|
+
*/
|
|
65
|
+
batchSize?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Connecting specific data points to their intended targets or fields.
|
|
68
|
+
*/
|
|
69
|
+
data: TargetData;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Common configuration for API requests.
|
|
73
|
+
*/
|
|
74
|
+
export interface ApiRequestConfig {
|
|
75
|
+
/**
|
|
76
|
+
* Headers with which to build the request.
|
|
77
|
+
*/
|
|
78
|
+
headers?: HeadersMap;
|
|
79
|
+
/**
|
|
80
|
+
* Body parameters with which to build the request.
|
|
81
|
+
*/
|
|
82
|
+
bodyParams?: Record<string, string>;
|
|
83
|
+
/**
|
|
84
|
+
* URL for the API endpoint.
|
|
85
|
+
*/
|
|
86
|
+
url: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Mapping of HTTP header keys to values.
|
|
90
|
+
*/
|
|
91
|
+
type HeadersMap = {
|
|
92
|
+
[key in HeaderKey]: "application/x-www-form-urlencoded" | "application/json" | "multipart/form-data";
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* HTTP header keys. More can be added as a union.
|
|
96
|
+
*/
|
|
97
|
+
type HeaderKey = "Content-Type";
|
|
98
|
+
/**
|
|
99
|
+
* Node attribute. With recursion, together, they allow the backend to dynamically build a payload that supports arrays and objects.
|
|
100
|
+
*/
|
|
101
|
+
export interface TargetData {
|
|
102
|
+
[sourceName: string]: TargetDataAttributes;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Attributes for target data mapping.
|
|
106
|
+
*/
|
|
107
|
+
export interface TargetDataAttributes {
|
|
108
|
+
targetName: string;
|
|
109
|
+
targetType: "String" | "Number";
|
|
110
|
+
targetFormat?: "EpochMs" | "EpochS" | "Iso8601";
|
|
111
|
+
fallbackSourceName?: string;
|
|
112
|
+
}
|
|
113
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventEnrichment.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-oem-api/src/types/EventEnrichment.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Configuration for enriching events.\n */\nexport interface EventEnrichment {\n /**\n * Configuration for asset registration.\n */\n assetRegistration: AssetRegistrationConfiguration;\n /*\n * Authentication configuration for event enrichment.\n */\n auth: AuthConfiguration;\n /**\n * Configuration for handling fault details.\n * */\n fault: FaultConfiguration;\n /**\n * Configuration for heartbeats.\n */\n heartbeat: HeartbeatConfiguration;\n}\n\n/**\n * Configuration for asset registration.\n */\nexport interface AssetRegistrationConfiguration extends ApiRequestConfig {\n /**\n * Connecting specific data points to their intended targets or fields.\n */\n data: TargetData;\n}\n\n/**\n * Authentication configuration for event enrichment.\n */\nexport interface AuthConfiguration extends ApiRequestConfig {\n /**\n * Type of authorization protocol. e.g.: Basic, OAuth2\n */\n type: \"Basic\" | \"OAuth2\";\n}\n\n/**\n * Configuration for handling fault details.\n */\nexport interface FaultConfiguration extends ApiRequestConfig {\n /**\n * List of fault codes that the OEM app is interested in.\n */\n sourceAddresses: number[];\n /**\n * Max number of elements when batching.\n */\n batchSize?: number;\n /**\n * Connecting specific data points to their intended targets or fields.\n */\n data: TargetData;\n}\n\n/**\n * Configuration for heartbeats.\n */\nexport interface HeartbeatConfiguration extends ApiRequestConfig {\n /**\n * Frequency of the heartbeat.\n */\n frequency: \"PT15M\" | \"PT1H\" | \"P1D\";\n /**\n * Max number of elements when batching.\n */\n batchSize?: number;\n /**\n * Connecting specific data points to their intended targets or fields.\n */\n data: TargetData;\n}\n\n/**\n * Common configuration for API requests.\n */\nexport interface ApiRequestConfig {\n /**\n * Headers with which to build the request.\n */\n headers?: HeadersMap;\n /**\n * Body parameters with which to build the request.\n */\n bodyParams?: Record<string, string>;\n /**\n * URL for the API endpoint.\n */\n url: string;\n}\n\n/**\n * Mapping of HTTP header keys to values.\n */\ntype HeadersMap = {\n [key in HeaderKey]: \"application/x-www-form-urlencoded\" | \"application/json\" | \"multipart/form-data\";\n};\n\n/**\n * HTTP header keys. More can be added as a union.\n */\ntype HeaderKey = \"Content-Type\";\n\n/**\n * Node attribute. With recursion, together, they allow the backend to dynamically build a payload that supports arrays and objects.\n */\nexport interface TargetData {\n [sourceName: string]: TargetDataAttributes;\n}\n\n/**\n * Attributes for target data mapping.\n */\nexport interface TargetDataAttributes {\n targetName: string;\n targetType: \"String\" | \"Number\";\n targetFormat?: \"EpochMs\" | \"EpochS\" | \"Iso8601\";\n fallbackSourceName?: string;\n}\n"]}
|
|
@@ -1,60 +1,38 @@
|
|
|
1
1
|
import { IrisAppManifest } from "@trackunit/iris-app-api";
|
|
2
|
+
import { Branding } from "./Branding";
|
|
3
|
+
import { EventEnrichment } from "./EventEnrichment";
|
|
2
4
|
export interface IrisAppOemManifest extends IrisAppManifest {
|
|
5
|
+
/**
|
|
6
|
+
* OEM specific configuration.
|
|
7
|
+
*/
|
|
8
|
+
oem?: OemConfiguration;
|
|
3
9
|
/**
|
|
4
10
|
* OEM Branding, where logos and color will be added for branding.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated Use oem.branding instead.
|
|
5
13
|
*/
|
|
6
14
|
oemBranding?: Branding;
|
|
7
15
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
conditions: {
|
|
13
|
-
/**
|
|
14
|
-
* It is case insensitive so does not matter how you write the brand.
|
|
15
|
-
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
16
|
-
*
|
|
17
|
-
* Brand used/filled out then the asset needs to match the filled out property.
|
|
18
|
-
*/
|
|
19
|
-
brand: string;
|
|
20
|
-
/**
|
|
21
|
-
* Indicates if the asset is licensed by OEM
|
|
22
|
-
*/
|
|
23
|
-
oemLicensedOnly?: boolean;
|
|
24
|
-
};
|
|
16
|
+
/**
|
|
17
|
+
* Configuration specific to OEMs.
|
|
18
|
+
*/
|
|
19
|
+
export interface OemConfiguration {
|
|
25
20
|
/**
|
|
26
|
-
*
|
|
27
|
-
* The
|
|
28
|
-
* The image will be shown as fleet list logo of an OEM asset.
|
|
29
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
21
|
+
* Name is brand used/filled out then the asset needs to match the filled out property.
|
|
22
|
+
* The brand of the OEM to own these specifications. Used to determine which assets to apply to.
|
|
30
23
|
*/
|
|
31
|
-
|
|
24
|
+
name: string;
|
|
32
25
|
/**
|
|
33
|
-
*
|
|
34
|
-
* The image will be shown as banner of an OEM asset.
|
|
35
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
26
|
+
* Type of OEM. e.g.: EngineOem, MachineOem, ToolOem
|
|
36
27
|
*/
|
|
37
|
-
|
|
28
|
+
type: "EngineOem" | "MachineOem" | "ToolOem";
|
|
38
29
|
/**
|
|
39
|
-
*
|
|
40
|
-
* It will be a hex code. eg: '#FF0000'.
|
|
30
|
+
* Event enrichment configuration.
|
|
41
31
|
*/
|
|
42
|
-
|
|
32
|
+
eventEnrichment?: EventEnrichment;
|
|
43
33
|
/**
|
|
44
|
-
*
|
|
45
|
-
* The image will be shown in the Events and Insights tab in Asset home.
|
|
46
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
47
|
-
*/
|
|
48
|
-
platformLogoPath?: string;
|
|
49
|
-
/**
|
|
50
|
-
* List of model images.
|
|
51
|
-
* Key will be the model name.
|
|
52
|
-
* Value will be path to an image in the assets folder of the app.
|
|
53
|
-
* The image will be shown as the model image in Asset home.
|
|
54
|
-
* Example: typing "MyImage.png" here, will show the file "apps/my-app/assets/MyImage.png"
|
|
34
|
+
* OEM Branding, where logos and color will be added for branding.
|
|
55
35
|
*/
|
|
56
|
-
|
|
57
|
-
[key: string]: string;
|
|
58
|
-
};
|
|
36
|
+
branding?: Branding;
|
|
59
37
|
}
|
|
60
38
|
export type PublicIrisAppOemManifest = Omit<IrisAppOemManifest, "dependencies" | "devDependencies" | "installation">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppOemManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-oem-api/src/types/irisAppOemManifest.ts"],"names":[],"mappings":"","sourcesContent":["import { IrisAppManifest } from \"@trackunit/iris-app-api\";\n\nexport interface IrisAppOemManifest extends IrisAppManifest {\n /**\n * OEM Branding, where logos and color will be added for branding.\n */\n oemBranding?: Branding;\n}\n\
|
|
1
|
+
{"version":3,"file":"irisAppOemManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-oem-api/src/types/irisAppOemManifest.ts"],"names":[],"mappings":"","sourcesContent":["import { IrisAppManifest } from \"@trackunit/iris-app-api\";\nimport { Branding } from \"./Branding\";\nimport { EventEnrichment } from \"./EventEnrichment\";\n\nexport interface IrisAppOemManifest extends IrisAppManifest {\n /**\n * OEM specific configuration.\n */\n oem?: OemConfiguration;\n /**\n * OEM Branding, where logos and color will be added for branding.\n *\n * @deprecated Use oem.branding instead.\n */\n oemBranding?: Branding;\n}\n\n/**\n * Configuration specific to OEMs.\n */\nexport interface OemConfiguration {\n /**\n * Name is brand used/filled out then the asset needs to match the filled out property.\n * The brand of the OEM to own these specifications. Used to determine which assets to apply to.\n */\n name: string;\n /**\n * Type of OEM. e.g.: EngineOem, MachineOem, ToolOem\n */\n type: \"EngineOem\" | \"MachineOem\" | \"ToolOem\";\n /**\n * Event enrichment configuration.\n */\n eventEnrichment?: EventEnrichment;\n /**\n * OEM Branding, where logos and color will be added for branding.\n */\n branding?: Branding;\n}\n\nexport type PublicIrisAppOemManifest = Omit<IrisAppOemManifest, \"dependencies\" | \"devDependencies\" | \"installation\">;\n"]}
|