@trackunit/iris-app-runtime-core-api 0.3.6 → 0.3.8

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core-api",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
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.8"
10
+ "@trackunit/react-core-contexts-api": "0.2.9"
11
11
  },
12
12
  "peerDependencies": {}
13
13
  }
@@ -1,4 +1,4 @@
1
- export declare type EntityType = "ASSET";
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 declare type BooleanFieldDefinition = AbstractCustomFieldDefinitionObject & {
29
+ export type BooleanFieldDefinition = AbstractCustomFieldDefinitionObject & {
30
30
  defaultBooleanValue?: boolean | null;
31
31
  type: CustomFieldType.BOOLEAN;
32
32
  };
33
- export declare type DateFieldDefinition = AbstractCustomFieldDefinitionObject & {
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 declare type PhoneNumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
40
+ export type PhoneNumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
41
41
  defaultStringValue?: string | null;
42
42
  type: CustomFieldType.PHONE_NUMBER;
43
43
  };
44
- export declare type EmailFieldDefinition = AbstractCustomFieldDefinitionObject & {
44
+ export type EmailFieldDefinition = AbstractCustomFieldDefinitionObject & {
45
45
  defaultStringValue?: string | null;
46
46
  type: CustomFieldType.EMAIL;
47
47
  };
48
- export declare type WebAddressFieldDefinition = AbstractCustomFieldDefinitionObject & {
48
+ export type WebAddressFieldDefinition = AbstractCustomFieldDefinitionObject & {
49
49
  defaultStringValue?: string | null;
50
50
  type: CustomFieldType.WEB_ADDRESS;
51
51
  };
52
- export declare type DropDownFieldDefinition = AbstractCustomFieldDefinitionObject & {
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 declare type NumberFieldDefinition = AbstractCustomFieldDefinitionObject & {
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 declare type StringFieldDefinition = AbstractCustomFieldDefinitionObject & {
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 declare type BooleanFieldValue = {
119
+ export type BooleanFieldValue = {
120
120
  type: CustomFieldType.BOOLEAN;
121
121
  booleanValue?: boolean | null;
122
122
  };
123
- export declare type DateFieldValue = {
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 declare type DropDownFieldValue = {
130
+ export type DropDownFieldValue = {
131
131
  type: CustomFieldType.DROPDOWN;
132
132
  stringArrayValue?: string[];
133
133
  };
134
- export declare type EmailFieldValue = {
134
+ export type EmailFieldValue = {
135
135
  type: CustomFieldType.EMAIL;
136
136
  stringValue?: string | null;
137
137
  };
138
- export declare type NumberFieldValue = {
138
+ export type NumberFieldValue = {
139
139
  type: CustomFieldType.NUMBER;
140
140
  numberValue?: number | null;
141
141
  };
142
- export declare type PhoneNumberFieldValue = {
142
+ export type PhoneNumberFieldValue = {
143
143
  type: CustomFieldType.PHONE_NUMBER;
144
144
  stringValue?: string | null;
145
145
  };
146
- export declare type StringFieldValue = {
146
+ export type StringFieldValue = {
147
147
  type: CustomFieldType.STRING;
148
148
  stringValue?: string | null;
149
149
  };
150
- export declare type WebAddressFieldValue = {
150
+ export type WebAddressFieldValue = {
151
151
  type: CustomFieldType.WEB_ADDRESS;
152
152
  stringValue?: string | null;
153
153
  };
154
- export declare type CustomFieldDefinition = BooleanFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | EmailFieldDefinition | NumberFieldDefinition | PhoneNumberFieldDefinition | StringFieldDefinition | WebAddressFieldDefinition;
155
- export declare type CustomFieldValue = BooleanFieldValue | DateFieldValue | DropDownFieldValue | EmailFieldValue | NumberFieldValue | PhoneNumberFieldValue | StringFieldValue | WebAddressFieldValue;
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;
@@ -3,6 +3,7 @@ import { AssetInfo } from "./AssetRuntime";
3
3
  import { CurrentUserRole } from "./CurrentUserRuntime";
4
4
  import { EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "./CustomFieldRuntime";
5
5
  import { BodyType, HttpResponse, RequestParams } from "./RestRuntime";
6
+ import { SiteInfo } from "./SiteRuntime";
6
7
  import { PublicToast } from "./ToastRuntime";
7
8
  export interface CustomFieldError {
8
9
  /**
@@ -30,9 +31,10 @@ export interface HostConnectorApi {
30
31
  getAppName(): string | undefined;
31
32
  getOrgName(): string | undefined;
32
33
  getExtensionName(): string | undefined;
34
+ getSiteInfo(): Promise<SiteInfo>;
33
35
  }
34
- export declare type SetDeepLink = (deepLink: DeepLink) => void;
35
- export declare type DeepLink = {
36
+ export type SetDeepLink = (deepLink: DeepLink) => void;
37
+ export type DeepLink = {
36
38
  path: string;
37
39
  pathname: string;
38
40
  search: Location["search"];
@@ -1,4 +1,4 @@
1
- export declare type RequestParams = {
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 declare type RequestQueryParamsType = Record<string | number, any>;
16
- declare type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
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;
@@ -0,0 +1,3 @@
1
+ export interface SiteInfo {
2
+ siteId: string;
3
+ }
package/src/index.d.ts CHANGED
@@ -4,4 +4,5 @@ export * from "./CurrentUserRuntime";
4
4
  export * from "./CustomFieldRuntime";
5
5
  export * from "./HostConnector";
6
6
  export * from "./RestRuntime";
7
+ export * from "./SiteRuntime";
7
8
  export * from "./ToastRuntime";