@trackunit/iris-app-runtime-core 0.0.1-alpha-afcc978985.0

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.
@@ -0,0 +1,5 @@
1
+ import { AssetInfo } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface IAssetRuntime {
3
+ getAssetInfo: () => Promise<AssetInfo>;
4
+ }
5
+ export declare const AssetRuntime: IAssetRuntime;
@@ -0,0 +1,5 @@
1
+ import { ICurrentUserContext } from "@trackunit/react-core-contexts-api";
2
+ export interface ICurrentUserRuntime {
3
+ getCurrentUserContext: () => Promise<ICurrentUserContext>;
4
+ }
5
+ export declare const CurrentUserRuntime: ICurrentUserRuntime;
@@ -0,0 +1,11 @@
1
+ import { CustomFieldDefinition, CustomFieldError, CustomFieldValue, EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface DropdownSelection {
3
+ value: string;
4
+ }
5
+ export declare const getCustomFieldValueFromRawValue: (customFieldDefinition: CustomFieldDefinition, newValue: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => CustomFieldValue;
6
+ export interface ICustomFieldRuntime {
7
+ getCustomFieldsFor: (entity: EntityIdentity) => Promise<ValueAndDefinition[]>;
8
+ setCustomFieldsFor: (entity: EntityIdentity, values: ValueAndDefinitionKey[]) => Promise<void | CustomFieldError>;
9
+ setCustomFieldsFromFormData: (entity: EntityIdentity, formData: Record<string, boolean | string | string[] | number>, originalDefinitions: ValueAndDefinition[]) => Promise<void | CustomFieldError>;
10
+ }
11
+ export declare const CustomFieldRuntime: ICustomFieldRuntime;
@@ -0,0 +1,4 @@
1
+ import { IDeveloperSettingsContext } from "@trackunit/react-core-contexts-api";
2
+ export declare const DeveloperSettingsRuntime: {
3
+ getDeveloperSettingsContext: () => Promise<IDeveloperSettingsContext>;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { IEnvironmentContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IEnvironmentRuntime {
3
+ getEnvironmentContext: () => Promise<IEnvironmentContext>;
4
+ }
5
+ export declare const EnvironmentRuntime: IEnvironmentRuntime;
@@ -0,0 +1,2 @@
1
+ import { HostConnectorApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const getHostConnector: () => Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
@@ -0,0 +1,5 @@
1
+ import { SetDeepLink } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface INavigationRuntime {
3
+ setDeepLink: SetDeepLink;
4
+ }
5
+ export declare const NavigationRuntime: INavigationRuntime;
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ > **⚠️ Beta**
2
+ >
3
+ > This is a beta version and subject to change without notice.
4
+
5
+ # Trackunit Iris App Runtime Core
6
+
7
+ The `@trackunit/iris-app-runtime-core` package is used for development with the Trackunit [Iris App SDK](https://www.npmjs.com/package/@trackunit/iris-app).
8
+
9
+ For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
10
+ ## Trackunit
11
+ This package was developed by Trackunit ApS.
12
+ Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
13
+
14
+ ![The Trackunit logo](https://trackunit.com/wp-content/uploads/2022/03/top-logo.svg)
@@ -0,0 +1,7 @@
1
+ import { BodyType, HttpResponse, RequestParams } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare type RestRunTimeResponse = HttpResponse<any, any>;
3
+ export interface IRestRuntime {
4
+ apiHost: string;
5
+ request: (path: string, method: string, requestParams?: RequestParams | undefined, body?: unknown, bodyType?: BodyType | undefined, secureByDefault?: boolean | undefined) => Promise<RestRunTimeResponse>;
6
+ }
7
+ export declare const RestRuntime: IRestRuntime;
@@ -0,0 +1,4 @@
1
+ import { Toast } from "@trackunit/react-core-contexts-api";
2
+ export declare const ToastRuntime: {
3
+ addToast(toast: Toast): Promise<void | "primaryAction" | "secondaryAction">;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { ITokenContext } from "@trackunit/react-core-contexts-api";
2
+ export interface ITokenRuntime {
3
+ getTokenContext: () => Promise<ITokenContext>;
4
+ }
5
+ export declare const TokenRuntime: ITokenRuntime;
@@ -0,0 +1,5 @@
1
+ import { IUserSubscriptionContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IUserSubscriptionRuntime {
3
+ getUserSubscriptionContext: () => Promise<IUserSubscriptionContext>;
4
+ }
5
+ export declare const UserSubscriptionRuntime: IUserSubscriptionRuntime;
package/index.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export * from "@trackunit/iris-app-runtime-core-api";
2
+ export * from "./AssetRuntime";
3
+ export * from "./CurrentUserRuntime";
4
+ export * from "./CustomFieldRuntime";
5
+ export * from "./DeveloperSettingsRuntime";
6
+ export * from "./EnvironmentRuntime";
7
+ export * from "./NavigationRuntime";
8
+ export * from "./RestRuntime";
9
+ export * from "./ToastRuntime";
10
+ export * from "./TokenRuntime";
11
+ export * from "./UserSubscriptionRuntime";