@trackunit/iris-app-runtime-core 0.3.50 → 0.3.52

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "0.3.50",
3
+ "version": "0.3.52",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,8 +11,8 @@
11
11
  "type": "module",
12
12
  "types": "./src/index.d.ts",
13
13
  "dependencies": {
14
- "@trackunit/iris-app-runtime-core-api": "0.3.44",
15
- "@trackunit/react-core-contexts-api": "0.2.40"
14
+ "@trackunit/iris-app-runtime-core-api": "0.3.46",
15
+ "@trackunit/react-core-contexts-api": "0.2.42"
16
16
  },
17
17
  "peerDependencies": {}
18
18
  }
@@ -1,2 +1,2 @@
1
- import { IAnalyticsContextAsync } from "@trackunit/react-core-contexts-api";
2
- export declare const AnalyticsContextRuntime: IAnalyticsContextAsync<{}>;
1
+ import { IAnalyticsContextAsync } from "@trackunit/react-core-contexts-api";
2
+ export declare const AnalyticsContextRuntime: IAnalyticsContextAsync<{}>;
@@ -1,5 +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;
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;
@@ -1,6 +1,6 @@
1
- import { IAssetSortingContext } from "@trackunit/react-core-contexts-api";
2
- export interface IAssetSortingRuntime {
3
- getAssetSortingState: () => Promise<IAssetSortingContext["sortingState"]>;
4
- setAssetSortingState: (...args: Parameters<IAssetSortingContext["setSortBy"]>) => Promise<void>;
5
- }
6
- export declare const AssetSortingRuntime: IAssetSortingRuntime;
1
+ import { IAssetSortingContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IAssetSortingRuntime {
3
+ getAssetSortingState: () => Promise<IAssetSortingContext["sortingState"]>;
4
+ setAssetSortingState: (...args: Parameters<IAssetSortingContext["setSortBy"]>) => Promise<void>;
5
+ }
6
+ export declare const AssetSortingRuntime: IAssetSortingRuntime;
@@ -1,7 +1,7 @@
1
- import { CurrentUserRole } from "@trackunit/iris-app-runtime-core-api";
2
- import { ICurrentUserContext } from "@trackunit/react-core-contexts-api";
3
- export interface ICurrentUserRuntime {
4
- getCurrentUserContext: () => Promise<ICurrentUserContext>;
5
- getCurrentUserRole: (userIds: string | string[]) => Promise<CurrentUserRole | undefined>;
6
- }
7
- export declare const CurrentUserRuntime: ICurrentUserRuntime;
1
+ import { CurrentUserRole } from "@trackunit/iris-app-runtime-core-api";
2
+ import { ICurrentUserContext } from "@trackunit/react-core-contexts-api";
3
+ export interface ICurrentUserRuntime {
4
+ getCurrentUserContext: () => Promise<ICurrentUserContext>;
5
+ getCurrentUserRole: (userIds: string | string[]) => Promise<CurrentUserRole | undefined>;
6
+ }
7
+ export declare const CurrentUserRuntime: ICurrentUserRuntime;
@@ -1,27 +1,27 @@
1
- import { CustomFieldDefinition, CustomFieldError, CustomFieldValue, EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "@trackunit/iris-app-runtime-core-api";
2
- export interface DropdownSelection {
3
- value: string;
4
- }
5
- /**
6
- * Get the value of a custom field from a raw value.
7
- *
8
- * @param customFieldDefinition the definition of the custom field
9
- * @param newValue the new value to set
10
- * @returns { CustomFieldValue } an updated CustomFieldValue
11
- */
12
- export declare const getCustomFieldValueFromRawValue: (customFieldDefinition: CustomFieldDefinition, newValue: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => CustomFieldValue;
13
- /**
14
- * Convert the received value to a string
15
- */
16
- export declare const getStringValue: (value: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => string | null;
17
- /**
18
- * Format the received value to a date string
19
- * yyyy-mm-dd
20
- */
21
- export declare const getDateValue: (value: string) => string;
22
- export interface ICustomFieldRuntime {
23
- getCustomFieldsFor: (entity: EntityIdentity) => Promise<ValueAndDefinition[]>;
24
- setCustomFieldsFor: (entity: EntityIdentity, values: ValueAndDefinitionKey[]) => Promise<void | CustomFieldError>;
25
- setCustomFieldsFromFormData: (entity: EntityIdentity, formData: Record<string, boolean | string | string[] | number>, originalDefinitions: ValueAndDefinition[]) => Promise<void | CustomFieldError>;
26
- }
27
- export declare const CustomFieldRuntime: ICustomFieldRuntime;
1
+ import { CustomFieldDefinition, CustomFieldError, CustomFieldValue, EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface DropdownSelection {
3
+ value: string;
4
+ }
5
+ /**
6
+ * Get the value of a custom field from a raw value.
7
+ *
8
+ * @param customFieldDefinition the definition of the custom field
9
+ * @param newValue the new value to set
10
+ * @returns { CustomFieldValue } an updated CustomFieldValue
11
+ */
12
+ export declare const getCustomFieldValueFromRawValue: (customFieldDefinition: CustomFieldDefinition, newValue: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => CustomFieldValue;
13
+ /**
14
+ * Convert the received value to a string
15
+ */
16
+ export declare const getStringValue: (value: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => string | null;
17
+ /**
18
+ * Format the received value to a date string
19
+ * yyyy-mm-dd
20
+ */
21
+ export declare const getDateValue: (value: string) => string;
22
+ export interface ICustomFieldRuntime {
23
+ getCustomFieldsFor: (entity: EntityIdentity) => Promise<ValueAndDefinition[]>;
24
+ setCustomFieldsFor: (entity: EntityIdentity, values: ValueAndDefinitionKey[]) => Promise<void | CustomFieldError>;
25
+ setCustomFieldsFromFormData: (entity: EntityIdentity, formData: Record<string, boolean | string | string[] | number>, originalDefinitions: ValueAndDefinition[]) => Promise<void | CustomFieldError>;
26
+ }
27
+ export declare const CustomFieldRuntime: ICustomFieldRuntime;
@@ -1,5 +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;
1
+ import { IEnvironmentContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IEnvironmentRuntime {
3
+ getEnvironmentContext: () => Promise<IEnvironmentContext>;
4
+ }
5
+ export declare const EnvironmentRuntime: IEnvironmentRuntime;
@@ -1,5 +1,5 @@
1
- import { IGlobalSelectionContext } from "@trackunit/react-core-contexts-api";
2
- export interface IGlobalSelectionRuntime {
3
- getGlobalSelection: () => Promise<IGlobalSelectionContext>;
4
- }
5
- export declare const GlobalSelectionRuntime: IGlobalSelectionRuntime;
1
+ import { IGlobalSelectionContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IGlobalSelectionRuntime {
3
+ getGlobalSelection: () => Promise<IGlobalSelectionContext>;
4
+ }
5
+ export declare const GlobalSelectionRuntime: IGlobalSelectionRuntime;
@@ -1,18 +1,18 @@
1
- import { ChildConnectorApi, HostConnectorApi } from "@trackunit/iris-app-runtime-core-api";
2
- import { Methods } from "penpal";
3
- /**
4
- * Setup using the subscribedMethods to subscribe to events from the host.
5
- *
6
- * @param subscribedMethods the methods to subscribe to
7
- * @returns { Connection<HostConnectorApi> } the connection to the host
8
- */
9
- export declare const setupHostConnector: (subscribedMethods: Partial<ChildConnectorApi> & Methods) => {
10
- promise: Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
11
- destroy: Function;
12
- };
13
- /**
14
- * Gets the host connector.
15
- *
16
- * @returns { Promise<HostConnectorApi> } the connection to the host
17
- */
18
- export declare const getHostConnector: () => Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
1
+ import { ChildConnectorApi, HostConnectorApi } from "@trackunit/iris-app-runtime-core-api";
2
+ import { Methods } from "penpal";
3
+ /**
4
+ * Setup using the subscribedMethods to subscribe to events from the host.
5
+ *
6
+ * @param subscribedMethods the methods to subscribe to
7
+ * @returns { Connection<HostConnectorApi> } the connection to the host
8
+ */
9
+ export declare const setupHostConnector: (subscribedMethods: Partial<ChildConnectorApi> & Methods) => {
10
+ promise: Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
11
+ destroy: Function;
12
+ };
13
+ /**
14
+ * Gets the host connector.
15
+ *
16
+ * @returns { Promise<HostConnectorApi> } the connection to the host
17
+ */
18
+ export declare const getHostConnector: () => Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
@@ -1,5 +1,5 @@
1
- import { IOemBrandingContext } from "@trackunit/react-core-contexts-api";
2
- export interface IOemBrandingContextRuntime {
3
- getOemBrandingContextRuntime: () => Promise<IOemBrandingContext>;
4
- }
5
- export declare const OemBrandingContextRuntime: IOemBrandingContextRuntime;
1
+ import { IOemBrandingContext } from "@trackunit/react-core-contexts-api";
2
+ export interface IOemBrandingContextRuntime {
3
+ getOemBrandingContextRuntime: () => Promise<IOemBrandingContext>;
4
+ }
5
+ export declare const OemBrandingContextRuntime: IOemBrandingContextRuntime;
@@ -1,15 +1,15 @@
1
- import { AssetHomeSubPage, SetDeepLink, SiteHomeSubPage } from "@trackunit/iris-app-runtime-core-api";
2
- export interface INavigationRuntime {
3
- setDeepLink: SetDeepLink;
4
- gotoAssetHome: (assetId: string, options?: {
5
- irisAppId?: string;
6
- extensionId?: string;
7
- subPage?: AssetHomeSubPage;
8
- }) => Promise<boolean>;
9
- gotoSiteHome: (siteId: string, options?: {
10
- irisAppId?: string;
11
- extensionId?: string;
12
- subPage?: SiteHomeSubPage;
13
- }) => Promise<boolean>;
14
- }
15
- export declare const NavigationRuntime: INavigationRuntime;
1
+ import { AssetHomeSubPage, SetDeepLink, SiteHomeSubPage } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface INavigationRuntime {
3
+ setDeepLink: SetDeepLink;
4
+ gotoAssetHome: (assetId: string, options?: {
5
+ irisAppId?: string;
6
+ extensionId?: string;
7
+ subPage?: AssetHomeSubPage;
8
+ }) => Promise<boolean>;
9
+ gotoSiteHome: (siteId: string, options?: {
10
+ irisAppId?: string;
11
+ extensionId?: string;
12
+ subPage?: SiteHomeSubPage;
13
+ }) => Promise<boolean>;
14
+ }
15
+ export declare const NavigationRuntime: INavigationRuntime;
@@ -1,6 +1,6 @@
1
- export interface IParamsRuntime {
2
- getAppName: () => Promise<string | undefined>;
3
- getExtensionName: () => Promise<string | undefined>;
4
- getOrgName: () => Promise<string | undefined>;
5
- }
6
- export declare const ParamsRuntime: IParamsRuntime;
1
+ export interface IParamsRuntime {
2
+ getAppName: () => Promise<string | undefined>;
3
+ getExtensionName: () => Promise<string | undefined>;
4
+ getOrgName: () => Promise<string | undefined>;
5
+ }
6
+ export declare const ParamsRuntime: IParamsRuntime;
@@ -1,7 +1,7 @@
1
- import { BodyType, HttpResponse, RequestParams } from "@trackunit/iris-app-runtime-core-api";
2
- export 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;
1
+ import { BodyType, HttpResponse, RequestParams } from "@trackunit/iris-app-runtime-core-api";
2
+ export 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;
@@ -1,5 +1,5 @@
1
- import { SiteInfo } from "@trackunit/iris-app-runtime-core-api";
2
- export interface ISiteRuntime {
3
- getSiteInfo: () => Promise<SiteInfo>;
4
- }
5
- export declare const SiteRuntime: ISiteRuntime;
1
+ import { SiteInfo } from "@trackunit/iris-app-runtime-core-api";
2
+ export interface ISiteRuntime {
3
+ getSiteInfo: () => Promise<SiteInfo>;
4
+ }
5
+ export declare const SiteRuntime: ISiteRuntime;
@@ -1,4 +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
- };
1
+ import { Toast } from "@trackunit/react-core-contexts-api";
2
+ export declare const ToastRuntime: {
3
+ addToast(toast: Toast): Promise<void | "primaryAction" | "secondaryAction">;
4
+ };
@@ -1,5 +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;
1
+ import { ITokenContext } from "@trackunit/react-core-contexts-api";
2
+ export interface ITokenRuntime {
3
+ getTokenContext: () => Promise<ITokenContext>;
4
+ }
5
+ export declare const TokenRuntime: ITokenRuntime;
@@ -1,5 +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;
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/src/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- export * from "@trackunit/iris-app-runtime-core-api";
2
- export * from "./AnalyticsRuntime";
3
- export * from "./AssetRuntime";
4
- export * from "./AssetSortingRuntime";
5
- export * from "./CurrentUserRuntime";
6
- export * from "./CustomFieldRuntime";
7
- export * from "./EnvironmentRuntime";
8
- export * from "./GlobalSelectionRuntime";
9
- export * from "./HostConnector";
10
- export * from "./IrisOemManifestRuntime";
11
- export * from "./NavigationRuntime";
12
- export * from "./ParamsRuntime";
13
- export * from "./RestRuntime";
14
- export * from "./SiteRuntime";
15
- export * from "./ToastRuntime";
16
- export * from "./TokenRuntime";
17
- export * from "./UserSubscriptionRuntime";
1
+ export * from "@trackunit/iris-app-runtime-core-api";
2
+ export * from "./AnalyticsRuntime";
3
+ export * from "./AssetRuntime";
4
+ export * from "./AssetSortingRuntime";
5
+ export * from "./CurrentUserRuntime";
6
+ export * from "./CustomFieldRuntime";
7
+ export * from "./EnvironmentRuntime";
8
+ export * from "./GlobalSelectionRuntime";
9
+ export * from "./HostConnector";
10
+ export * from "./IrisOemManifestRuntime";
11
+ export * from "./NavigationRuntime";
12
+ export * from "./ParamsRuntime";
13
+ export * from "./RestRuntime";
14
+ export * from "./SiteRuntime";
15
+ export * from "./ToastRuntime";
16
+ export * from "./TokenRuntime";
17
+ export * from "./UserSubscriptionRuntime";