@trackunit/iris-app-runtime-core-api 0.0.45-alpha-319b0ab14.0 → 0.0.48-alpha-5162616e1.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.
- package/HostConnector.d.ts +2 -0
- package/ToastRuntime.d.ts +19 -0
- package/index.d.ts +1 -0
- package/package.json +3 -3
package/HostConnector.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { ICurrentUserContext, IDeveloperSettingsContext, IEnvironmentContext, IT
|
|
2
2
|
import { AssetInfo } from "./AssetRuntime";
|
3
3
|
import { EntityIdentity, ValueAndDefinition, ValueAndDefinitionKey } from "./CustomFieldRuntime";
|
4
4
|
import { BodyType, HttpResponse, RequestParams } from "./RestRuntime";
|
5
|
+
import { PublicToast } from "./ToastRuntime";
|
5
6
|
export interface CustomFieldError {
|
6
7
|
/**
|
7
8
|
* The custom fields that does not obey the rules of the definition, read the definition to figure out what is wrong.
|
@@ -17,5 +18,6 @@ export interface HostConnectorApi {
|
|
17
18
|
getUserSubscriptionContext(): Promise<IUserSubscriptionContext>;
|
18
19
|
getTokenContext(): Promise<ITokenContext>;
|
19
20
|
getCurrentUserContext(): Promise<ICurrentUserContext>;
|
21
|
+
addToast(toast: PublicToast): Promise<void | "primaryAction" | "secondaryAction">;
|
20
22
|
getDeveloperSettingsContext(): Promise<IDeveloperSettingsContext>;
|
21
23
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare type AlertIntent = "info" | "warning" | "danger" | "success";
|
2
|
+
export declare type AlertAction = {
|
3
|
+
label: string;
|
4
|
+
onClick: () => void;
|
5
|
+
loading?: boolean;
|
6
|
+
};
|
7
|
+
export interface Toast {
|
8
|
+
dedupeKey?: string;
|
9
|
+
intent: AlertIntent;
|
10
|
+
title: string;
|
11
|
+
description?: string;
|
12
|
+
primaryAction?: AlertAction;
|
13
|
+
secondaryAction?: AlertAction;
|
14
|
+
duration?: number;
|
15
|
+
}
|
16
|
+
export interface PublicToast extends Omit<Toast, "primaryAction" | "secondaryAction"> {
|
17
|
+
primaryAction: string;
|
18
|
+
secondaryAction: string;
|
19
|
+
}
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.48-alpha-5162616e1.0",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
|
-
"license": "
|
5
|
+
"license": "UNLICENSED",
|
6
6
|
"module": "./index.js",
|
7
7
|
"main": "./index.js",
|
8
8
|
"type": "module",
|
9
9
|
"types": "./index.d.ts",
|
10
10
|
"dependencies": {
|
11
|
-
"@trackunit/react-core-contexts-api": "0.0.
|
11
|
+
"@trackunit/react-core-contexts-api": "0.0.46-alpha-5162616e1.0"
|
12
12
|
},
|
13
13
|
"peerDependencies": {}
|
14
14
|
}
|