@trackunit/iris-app-runtime-core-api 0.3.5 → 0.3.7
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/package.json +2 -2
- package/src/CustomFieldRuntime.d.ts +19 -19
- package/src/HostConnector.d.ts +2 -2
- package/src/RestRuntime.d.ts +3 -3
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.7",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./index.cjs",
|
7
7
|
"type": "commonjs",
|
8
8
|
"types": "./src/index.d.ts",
|
9
9
|
"dependencies": {
|
10
|
-
"@trackunit/react-core-contexts-api": "0.2.
|
10
|
+
"@trackunit/react-core-contexts-api": "0.2.9"
|
11
11
|
},
|
12
12
|
"peerDependencies": {}
|
13
13
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export
|
1
|
+
export type EntityType = "ASSET";
|
2
2
|
export interface EntityIdentity {
|
3
3
|
type: EntityType;
|
4
4
|
id: string;
|
@@ -26,30 +26,30 @@ export interface AbstractCustomFieldDefinitionObject {
|
|
26
26
|
uiEditable?: boolean | null;
|
27
27
|
type: CustomFieldType;
|
28
28
|
}
|
29
|
-
export
|
29
|
+
export type BooleanFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
30
30
|
defaultBooleanValue?: boolean | null;
|
31
31
|
type: CustomFieldType.BOOLEAN;
|
32
32
|
};
|
33
|
-
export
|
33
|
+
export type DateFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
34
34
|
/**
|
35
35
|
* ISO8601 formatted date
|
36
36
|
*/
|
37
37
|
defaultDateValue?: string | null;
|
38
38
|
type: CustomFieldType.DATE;
|
39
39
|
};
|
40
|
-
export
|
40
|
+
export type PhoneNumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
41
41
|
defaultStringValue?: string | null;
|
42
42
|
type: CustomFieldType.PHONE_NUMBER;
|
43
43
|
};
|
44
|
-
export
|
44
|
+
export type EmailFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
45
45
|
defaultStringValue?: string | null;
|
46
46
|
type: CustomFieldType.EMAIL;
|
47
47
|
};
|
48
|
-
export
|
48
|
+
export type WebAddressFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
49
49
|
defaultStringValue?: string | null;
|
50
50
|
type: CustomFieldType.WEB_ADDRESS;
|
51
51
|
};
|
52
|
-
export
|
52
|
+
export type DropDownFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
53
53
|
defaultStringArrayValue?: string[] | null;
|
54
54
|
multiSelect?: boolean | null;
|
55
55
|
allValues?: string[] | null;
|
@@ -97,7 +97,7 @@ export declare enum UnitSi {
|
|
97
97
|
"m_3" = "m\u00B3",
|
98
98
|
"m_s_2" = "m/s\u00B2"
|
99
99
|
}
|
100
|
-
export
|
100
|
+
export type NumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
101
101
|
defaultNumberValue?: number | null;
|
102
102
|
minimumNumber?: number | null;
|
103
103
|
maximumNumber?: number | null;
|
@@ -106,7 +106,7 @@ export declare type NumberFieldDefinition = AbstractCustomFieldDefinitionObject
|
|
106
106
|
isInteger?: boolean | null;
|
107
107
|
type: CustomFieldType.NUMBER;
|
108
108
|
};
|
109
|
-
export
|
109
|
+
export type StringFieldDefinition = AbstractCustomFieldDefinitionObject & {
|
110
110
|
defaultStringValue?: string | null;
|
111
111
|
minimumLength?: number | null;
|
112
112
|
maximumLength?: number | null;
|
@@ -116,43 +116,43 @@ export declare type StringFieldDefinition = AbstractCustomFieldDefinitionObject
|
|
116
116
|
export interface AbstractCustomFieldValue {
|
117
117
|
type: CustomFieldType;
|
118
118
|
}
|
119
|
-
export
|
119
|
+
export type BooleanFieldValue = {
|
120
120
|
type: CustomFieldType.BOOLEAN;
|
121
121
|
booleanValue?: boolean | null;
|
122
122
|
};
|
123
|
-
export
|
123
|
+
export type DateFieldValue = {
|
124
124
|
type: CustomFieldType.DATE;
|
125
125
|
/**
|
126
126
|
* ISO8601 formatted date
|
127
127
|
*/
|
128
128
|
dateValue?: string | null;
|
129
129
|
};
|
130
|
-
export
|
130
|
+
export type DropDownFieldValue = {
|
131
131
|
type: CustomFieldType.DROPDOWN;
|
132
132
|
stringArrayValue?: string[];
|
133
133
|
};
|
134
|
-
export
|
134
|
+
export type EmailFieldValue = {
|
135
135
|
type: CustomFieldType.EMAIL;
|
136
136
|
stringValue?: string | null;
|
137
137
|
};
|
138
|
-
export
|
138
|
+
export type NumberFieldValue = {
|
139
139
|
type: CustomFieldType.NUMBER;
|
140
140
|
numberValue?: number | null;
|
141
141
|
};
|
142
|
-
export
|
142
|
+
export type PhoneNumberFieldValue = {
|
143
143
|
type: CustomFieldType.PHONE_NUMBER;
|
144
144
|
stringValue?: string | null;
|
145
145
|
};
|
146
|
-
export
|
146
|
+
export type StringFieldValue = {
|
147
147
|
type: CustomFieldType.STRING;
|
148
148
|
stringValue?: string | null;
|
149
149
|
};
|
150
|
-
export
|
150
|
+
export type WebAddressFieldValue = {
|
151
151
|
type: CustomFieldType.WEB_ADDRESS;
|
152
152
|
stringValue?: string | null;
|
153
153
|
};
|
154
|
-
export
|
155
|
-
export
|
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
156
|
export interface ValueAndDefinition {
|
157
157
|
definition: CustomFieldDefinition;
|
158
158
|
value: CustomFieldValue;
|
package/src/HostConnector.d.ts
CHANGED
@@ -31,8 +31,8 @@ export interface HostConnectorApi {
|
|
31
31
|
getOrgName(): string | undefined;
|
32
32
|
getExtensionName(): string | undefined;
|
33
33
|
}
|
34
|
-
export
|
35
|
-
export
|
34
|
+
export type SetDeepLink = (deepLink: DeepLink) => void;
|
35
|
+
export type DeepLink = {
|
36
36
|
path: string;
|
37
37
|
pathname: string;
|
38
38
|
search: Location["search"];
|
package/src/RestRuntime.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export
|
1
|
+
export type RequestParams = {
|
2
2
|
headers?: {
|
3
3
|
[key: string]: string;
|
4
4
|
};
|
@@ -12,8 +12,8 @@ export interface IRestApiClient {
|
|
12
12
|
request: <T, E>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<T, E>>;
|
13
13
|
apiHost: string;
|
14
14
|
}
|
15
|
-
export
|
16
|
-
|
15
|
+
export type RequestQueryParamsType = Record<string | number, any>;
|
16
|
+
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
17
17
|
export interface HttpResponse<D, E> {
|
18
18
|
data?: D;
|
19
19
|
error?: E;
|