@ixon-cdk/types 1.13.0-next.2 → 1.13.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/dist/types/component-context/index.d.ts +40 -3
- package/dist/types/component-context/toast.d.ts +14 -0
- package/dist/types/ixapi/resources/access-token.d.ts +1 -0
- package/dist/types/ixapi/resources/agent-access-request.d.ts +2 -1
- package/dist/types/ixapi/resources/audience-agent-reference.d.ts +7 -0
- package/dist/types/ixapi/resources/audience-asset-reference.d.ts +7 -0
- package/dist/types/ixapi/resources/data-protocol-applied.d.ts +1 -1
- package/dist/types/ixapi/resources/data.d.ts +11 -2
- package/dist/types/ixapi/resources/index.d.ts +3 -0
- package/dist/types/ixapi/resources/vpn-config.d.ts +7 -0
- package/dist/types/resource-data/resource-data-client.d.ts +1 -0
- package/dist/types/resource-data/resource-data-query.d.ts +1 -1
- package/dist/types/resource-data/resource-data.d.ts +8 -0
- package/package.json +1 -1
|
@@ -8,11 +8,13 @@ import type { ComponentContextAppData } from './app-data';
|
|
|
8
8
|
import type { ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
|
|
9
9
|
import type { AlertDialogOptions, ConfirmDialogOptions, ContentDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
|
|
10
10
|
import type { ActionMenuOptions, ActionMenuResult } from './menu';
|
|
11
|
+
import type { ToastOptions } from './toast';
|
|
11
12
|
import type { Tooltip, TooltipOptions } from './tooltip';
|
|
12
13
|
export type { ComponentContextAppData } from './app-data';
|
|
13
14
|
export type { ActionBottomSheetAction, ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
|
|
14
15
|
export type { AlertDialogOptions, ConfirmDialogOptions, ContentDialogOptions, FormDialogOptions, FormDialogResult, } from './dialog';
|
|
15
16
|
export type { ActionMenuAction, ActionMenuOptions, ActionMenuResult } from './menu';
|
|
17
|
+
export type { ToastOptions } from './toast';
|
|
16
18
|
export type { Tooltip, TooltipOptions } from './tooltip';
|
|
17
19
|
export * from './input';
|
|
18
20
|
/**
|
|
@@ -175,6 +177,41 @@ export interface ComponentContext<ComponentContextInputs extends object = {
|
|
|
175
177
|
* @param options configures the form dialog
|
|
176
178
|
*/
|
|
177
179
|
openFormDialog(options: FormDialogOptions): Promise<FormDialogResult | false | undefined>;
|
|
180
|
+
/**
|
|
181
|
+
* Opens a toast notification.
|
|
182
|
+
*
|
|
183
|
+
* @param options - Options to configure the toast.
|
|
184
|
+
* @returns A promise that resolves to `true` if the action was triggered, or `undefined` otherwise.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* // Default auto-close behavior (true)
|
|
188
|
+
* context.openToast({ message: 'Changes saved' });
|
|
189
|
+
*
|
|
190
|
+
* // Default auto-close behavior when actionButtonText is set (false)
|
|
191
|
+
* context.openToast({ message: 'Connection timed out', actionButtonText: 'Retry' });
|
|
192
|
+
*
|
|
193
|
+
* // Overrides default auto-close behavior, despite actionButtonText being set.
|
|
194
|
+
* context.openToast({ message: 'Email archived', actionButtonText: 'Undo', autoClose: true });
|
|
195
|
+
*/
|
|
196
|
+
openToast(options: ToastOptions): Promise<true | undefined>;
|
|
197
|
+
/**
|
|
198
|
+
* Opens a toast notification with a simple message and additional options.
|
|
199
|
+
*
|
|
200
|
+
* @param message - The message to display in the toast.
|
|
201
|
+
* @param options - Additional options to configure the toast.
|
|
202
|
+
* @returns A promise that resolves to `true` if the action was triggered, or `undefined` otherwise.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* // Default auto-close behavior (true)
|
|
206
|
+
* context.openToast('Changes saved');
|
|
207
|
+
*
|
|
208
|
+
* // Default auto-close behavior when actionButtonText is set (false)
|
|
209
|
+
* context.openToast('Connection timed out', { actionButtonText: 'Retry' });
|
|
210
|
+
*
|
|
211
|
+
* // Overrides default auto-close behavior, despite actionButtonText being set.
|
|
212
|
+
* context.openToast('Email archived', { actionButtonText: 'Undo', autoClose: true });
|
|
213
|
+
*/
|
|
214
|
+
openToast(message: string, options?: Omit<ToastOptions, 'message'>): Promise<true | undefined>;
|
|
178
215
|
/**
|
|
179
216
|
* Helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing the passed HTML, removing any potentially unsafe content.
|
|
180
217
|
*
|
|
@@ -223,9 +260,9 @@ export interface ComponentContext<ComponentContextInputs extends object = {
|
|
|
223
260
|
* @param interpolateParams
|
|
224
261
|
* @param options
|
|
225
262
|
*/
|
|
226
|
-
translate(key: string, interpolateParams?:
|
|
227
|
-
translate<T extends string>(key: T[], interpolateParams?:
|
|
228
|
-
translate<T extends string>(key: string | T[], interpolateParams?:
|
|
263
|
+
translate(key: string, interpolateParams?: object, options?: TranslateOptions): string;
|
|
264
|
+
translate<T extends string>(key: T[], interpolateParams?: object, options?: TranslateOptions): Record<T, string>;
|
|
265
|
+
translate<T extends string>(key: string | T[], interpolateParams?: object, options?: TranslateOptions): string | Record<T, string>;
|
|
229
266
|
}
|
|
230
267
|
export interface TranslateOptions {
|
|
231
268
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ToastOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Text for an optional action button. If provided, `autoClose` defaults to false.
|
|
4
|
+
*/
|
|
5
|
+
actionButtonText?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the toast automatically closes. Defaults to true, unless `actionButtonText` is set.
|
|
8
|
+
*/
|
|
9
|
+
autoClose?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The message to display in the toast.
|
|
12
|
+
*/
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
@@ -19,6 +19,7 @@ export interface AccessToken {
|
|
|
19
19
|
export interface AccessTokenCreate {
|
|
20
20
|
/** In seconds. */
|
|
21
21
|
expiresIn: number;
|
|
22
|
+
scope?: AccessTokenScopesUnion | null;
|
|
22
23
|
trustedDeviceName?: string | null;
|
|
23
24
|
}
|
|
24
25
|
export interface AccessTokenSsoCreate extends AccessTokenCreate {
|
|
@@ -9,6 +9,8 @@ export interface AgentAccessRequest {
|
|
|
9
9
|
end?: string;
|
|
10
10
|
publicId: string;
|
|
11
11
|
reason?: string;
|
|
12
|
+
/** I.e. "2019-01-01T12:00:00Z" */
|
|
13
|
+
reviewExpiresOn?: string | null;
|
|
12
14
|
servers?: AgentServerReference[];
|
|
13
15
|
/** I.e. "2019-01-01T12:00:00Z" */
|
|
14
16
|
start?: string;
|
|
@@ -18,7 +20,6 @@ export interface AgentAccessRequest {
|
|
|
18
20
|
user?: UserReference;
|
|
19
21
|
vpn?: boolean;
|
|
20
22
|
}
|
|
21
|
-
/** @check AgentAccessRequestApproveResponse*/
|
|
22
23
|
export type AgentAccessRequestApproveResponse = AgentAccessRequestResult;
|
|
23
24
|
export type AgentAccessRequestRejectResponse = AgentAccessRequestResult;
|
|
24
25
|
type AgentAccessRequestStatus = 'approved' | 'pending' | 'rejected';
|
|
@@ -12,7 +12,7 @@ export interface DataProtocolAppliedCustom {
|
|
|
12
12
|
publicId: 'custom';
|
|
13
13
|
}
|
|
14
14
|
export interface DataProtocolAppliedEthernetIp {
|
|
15
|
-
cpu
|
|
15
|
+
cpu?: EthernetIpCpu | null;
|
|
16
16
|
publicId: 'ethernet-ip';
|
|
17
17
|
/** only used when cpu in [compactlogix|controllogix|flexlogix]. default is 0 */
|
|
18
18
|
rack?: number | null;
|
|
@@ -6,6 +6,13 @@ export interface Data {
|
|
|
6
6
|
start: string;
|
|
7
7
|
timeZone: string;
|
|
8
8
|
}
|
|
9
|
+
export interface DataCreate {
|
|
10
|
+
end: string;
|
|
11
|
+
source: ResLink;
|
|
12
|
+
start: string;
|
|
13
|
+
tags: Tag[];
|
|
14
|
+
timeZone?: string;
|
|
15
|
+
}
|
|
9
16
|
export interface DataPoint {
|
|
10
17
|
/** "2019-01-01T12:00:00Z" */
|
|
11
18
|
time: string;
|
|
@@ -18,12 +25,14 @@ export interface DataQuery {
|
|
|
18
25
|
decimals?: number;
|
|
19
26
|
/** Default is false */
|
|
20
27
|
extendedBoundary?: boolean;
|
|
21
|
-
factor?: number;
|
|
28
|
+
factor?: number | string;
|
|
22
29
|
/** Default is 5000 */
|
|
23
30
|
limit?: number;
|
|
24
31
|
offset?: number;
|
|
25
32
|
operator?: string;
|
|
26
|
-
|
|
33
|
+
order?: 'asc' | 'desc';
|
|
34
|
+
postAggr?: string;
|
|
35
|
+
postTransform?: 'difference' | null;
|
|
27
36
|
ref: string;
|
|
28
37
|
step?: number | 'day' | 'week';
|
|
29
38
|
}
|
|
@@ -37,6 +37,8 @@ export * from './asset-app-config';
|
|
|
37
37
|
export * from './asset-library-version';
|
|
38
38
|
export * from './asset-membership';
|
|
39
39
|
export * from './asset-type';
|
|
40
|
+
export * from './audience-agent-reference';
|
|
41
|
+
export * from './audience-asset-reference';
|
|
40
42
|
export * from './audience';
|
|
41
43
|
export * from './audit-log';
|
|
42
44
|
export * from './auth-token';
|
|
@@ -107,6 +109,7 @@ export * from './trusted-device';
|
|
|
107
109
|
export * from './user';
|
|
108
110
|
export * from './user-membership';
|
|
109
111
|
export * from './user-push-device';
|
|
112
|
+
export * from './vpn-config';
|
|
110
113
|
export * from './vpn-protocol';
|
|
111
114
|
export * from './vpn-session';
|
|
112
115
|
export * from './vpn-usage';
|
|
@@ -11,6 +11,7 @@ interface ResultDataMap {
|
|
|
11
11
|
Branding: ResourceData.Branding;
|
|
12
12
|
CustomPropertyList: ResourceData.CustomProperty[];
|
|
13
13
|
GroupList: ResourceData.Group[];
|
|
14
|
+
LicenceList: ResourceData.Licence[];
|
|
14
15
|
MyCompany: ResourceData.MyCompany;
|
|
15
16
|
MyUser: ResourceData.MyUser;
|
|
16
17
|
PagePage: ResourceData.PagePage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @module ResourceDataQuery */
|
|
2
|
-
export type ResourceDataQuerySelector = 'Agent' | 'Asset' | 'AssetAppConfig' | 'AssetAppConfigList' | 'Branding' | 'CustomPropertyList' | 'GroupList' | 'MyCompany' | 'MyUser' | 'PagePage' | 'PageVersion' | 'UserList';
|
|
2
|
+
export type ResourceDataQuerySelector = 'Agent' | 'Asset' | 'AssetAppConfig' | 'AssetAppConfigList' | 'Branding' | 'CustomPropertyList' | 'GroupList' | 'LicenceList' | 'MyCompany' | 'MyUser' | 'PagePage' | 'PageVersion' | 'UserList';
|
|
3
3
|
export interface ResourceDataQuery<T = ResourceDataQuerySelector> {
|
|
4
4
|
/**
|
|
5
5
|
* String reference unique to the query call made by the client
|
|
@@ -147,6 +147,13 @@ interface GroupResourceData {
|
|
|
147
147
|
publicId: string;
|
|
148
148
|
} | null;
|
|
149
149
|
}
|
|
150
|
+
interface LicenceResourceData {
|
|
151
|
+
publicId: string;
|
|
152
|
+
type?: {
|
|
153
|
+
publicId: string;
|
|
154
|
+
usageType?: string;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
150
157
|
interface MyCompanyResourceData {
|
|
151
158
|
name?: string;
|
|
152
159
|
permissions?: string[];
|
|
@@ -182,6 +189,7 @@ export declare namespace ResourceData {
|
|
|
182
189
|
type Branding = BrandingResourceData;
|
|
183
190
|
type CustomProperty = CustomPropertyResourceData;
|
|
184
191
|
type Group = GroupResourceData;
|
|
192
|
+
type Licence = LicenceResourceData;
|
|
185
193
|
type MyCompany = MyCompanyResourceData;
|
|
186
194
|
type MyUser = MyUserResourceData;
|
|
187
195
|
type PagePage = PagePageResourceData;
|