@interopio/browser-platform 3.3.4 → 3.4.0-next.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/browser.platform.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { IOConnectCore } from "@interopio/core";
|
|
3
3
|
import { IOConnectBrowser } from "@interopio/browser";
|
|
4
4
|
import { IOConnectDesktop } from "@interopio/desktop";
|
|
5
|
+
import type request from "request";
|
|
5
6
|
|
|
6
7
|
export namespace IOConnectBrowserPlatform {
|
|
7
8
|
|
|
@@ -81,6 +82,84 @@ export namespace IOConnectBrowserPlatform {
|
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Configuration for publishing OpenTelemetry data and settings for the published data items.
|
|
87
|
+
*/
|
|
88
|
+
export namespace Otel {
|
|
89
|
+
/**
|
|
90
|
+
* Configuration for publishing OpenTelemetry data.
|
|
91
|
+
*/
|
|
92
|
+
export interface Config {
|
|
93
|
+
/**
|
|
94
|
+
* Settings for publishing OpenTelemetry metrics.
|
|
95
|
+
*/
|
|
96
|
+
metrics?: MetricsDefinition;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Settings for publishing OpenTelemetry metrics.
|
|
101
|
+
*/
|
|
102
|
+
export interface MetricsDefinition {
|
|
103
|
+
/**
|
|
104
|
+
* URL pointing to an OpenTelemetry metrics server.
|
|
105
|
+
*/
|
|
106
|
+
url: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Interval in milliseconds at which to publish the generated metrics.
|
|
110
|
+
* @default 30000
|
|
111
|
+
*/
|
|
112
|
+
publishInterval?: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Definitions of the OpenTelemetry metrics to publish.
|
|
116
|
+
*/
|
|
117
|
+
metrics?: MetricDefinition[];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Definition of an OpenTelemetry metric.
|
|
122
|
+
*/
|
|
123
|
+
export interface MetricDefinition {
|
|
124
|
+
/**
|
|
125
|
+
* If `true`, will enable publishing of the OpenTelemetry metric.
|
|
126
|
+
*/
|
|
127
|
+
enabled?: boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Name for the OpenTelemetry metric. May be used in visualization tools.
|
|
131
|
+
*/
|
|
132
|
+
name?: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Description for the OpenTelemetry metric.
|
|
136
|
+
*/
|
|
137
|
+
description?: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Specify explicit bucket boundaries for the OpenTelemetry SDK if the metric has been created by a `HistogramAggregator`.
|
|
141
|
+
*/
|
|
142
|
+
buckets?: number[];
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Type of the predefined OpenTelemetry metric.
|
|
146
|
+
*/
|
|
147
|
+
type:
|
|
148
|
+
"app_started" |
|
|
149
|
+
"app_stopped" |
|
|
150
|
+
"app_startup" |
|
|
151
|
+
"app_count" |
|
|
152
|
+
"app_duration" |
|
|
153
|
+
"app_error" |
|
|
154
|
+
"layout_startup" |
|
|
155
|
+
"workspace_startup" |
|
|
156
|
+
"workspace_stopped" |
|
|
157
|
+
"workspace_count" |
|
|
158
|
+
"platform_startup" |
|
|
159
|
+
"platform_error"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
84
163
|
export namespace ServiceWorker {
|
|
85
164
|
export interface Config {
|
|
86
165
|
url?: string;
|
|
@@ -217,7 +296,7 @@ export namespace IOConnectBrowserPlatform {
|
|
|
217
296
|
showDelayedIndicator?: boolean;
|
|
218
297
|
}
|
|
219
298
|
|
|
220
|
-
export interface IFrameSandboxConfig{
|
|
299
|
+
export interface IFrameSandboxConfig {
|
|
221
300
|
flags: string;
|
|
222
301
|
}
|
|
223
302
|
|
|
@@ -258,15 +337,100 @@ export namespace IOConnectBrowserPlatform {
|
|
|
258
337
|
includeCredentials?: boolean;
|
|
259
338
|
}
|
|
260
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Settings for the requests sent to **io.Manager**.
|
|
342
|
+
*/
|
|
343
|
+
export interface RequestsConfig {
|
|
344
|
+
/**
|
|
345
|
+
* Interval in milliseconds to wait for a response from **io.Manager**.
|
|
346
|
+
* @default 10000
|
|
347
|
+
*/
|
|
348
|
+
timeout?: number;
|
|
349
|
+
/**
|
|
350
|
+
* Interval in milliseconds to wait for a response to the `openSession` request to **io.Manager** before proceeding from cache.
|
|
351
|
+
* @default 10000
|
|
352
|
+
*/
|
|
353
|
+
openSessionTimeout?: number;
|
|
354
|
+
/**
|
|
355
|
+
* Interval in milliseconds to wait for a response to the `closeSession` request to **io.Manager**.
|
|
356
|
+
* @default 10000
|
|
357
|
+
*/
|
|
358
|
+
closeSessionTimeout?: number;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Settings for persisting data received from **io.Manager**.
|
|
363
|
+
*/
|
|
364
|
+
export interface CacheConfig {
|
|
365
|
+
/**
|
|
366
|
+
* If `true`, will enable caching and persisting data from **io.Manager** locally (e.g., in case of connection interruptions).
|
|
367
|
+
* @default true
|
|
368
|
+
*/
|
|
369
|
+
enabled?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* If `true`, on opening a new session to **io.Manager**, all cache databases from previous sessions will be deleted.
|
|
372
|
+
* @default false
|
|
373
|
+
*/
|
|
374
|
+
clearOld?: boolean;
|
|
375
|
+
}
|
|
376
|
+
|
|
261
377
|
export interface Config {
|
|
378
|
+
/**
|
|
379
|
+
* URL pointing to **io.Manager**.
|
|
380
|
+
*/
|
|
262
381
|
url: string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* User authentication configuration.
|
|
385
|
+
*/
|
|
263
386
|
auth: AuthConfig;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Deprecated. If `true`, the library will wait for this module to be fully operational before completing its initialization.
|
|
390
|
+
* @default false
|
|
391
|
+
* @deprecated
|
|
392
|
+
*/
|
|
264
393
|
critical?: boolean;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Object containing key/value pairs of headers to be sent with every request.
|
|
397
|
+
*/
|
|
265
398
|
headers?: {
|
|
266
399
|
[key: string]: string;
|
|
267
400
|
};
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Callback that will be invoked on every request. Use this callback to provide extra headers that will be applied to the request.
|
|
404
|
+
*/
|
|
405
|
+
getHeaders?: (req: request.Options) => Promise<Record<string, string>>;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Settings for the requests sent to **io.Manager**.
|
|
409
|
+
*/
|
|
410
|
+
requests?: RequestsConfig;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Settings for persisting data received from **io.Manager**.
|
|
414
|
+
*/
|
|
415
|
+
cache?: CacheConfig;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Interval in milliseconds at which the server will be polled for new data (apps, Layouts).
|
|
419
|
+
* @default 60000
|
|
420
|
+
*/
|
|
268
421
|
fetchIntervalMS?: number;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Interval in milliseconds at which **io.Connect Browser** will try to refresh the **io.Manager** token.
|
|
425
|
+
* @default 3600000
|
|
426
|
+
*/
|
|
269
427
|
tokenRefreshIntervalMS?: number;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Deprecated. Use `requests.timeout` instead. Interval in milliseconds to wait for a response from **io.Manager**.
|
|
431
|
+
* @default 10000
|
|
432
|
+
* @deprecated
|
|
433
|
+
*/
|
|
270
434
|
responseTimeoutMS?: number;
|
|
271
435
|
}
|
|
272
436
|
}
|
|
@@ -279,7 +443,12 @@ export namespace IOConnectBrowserPlatform {
|
|
|
279
443
|
|
|
280
444
|
export namespace User {
|
|
281
445
|
export interface Config {
|
|
282
|
-
|
|
446
|
+
id: string;
|
|
447
|
+
username?: string;
|
|
448
|
+
firstName?: string;
|
|
449
|
+
lastName?: string;
|
|
450
|
+
email?: string;
|
|
451
|
+
meta?: any;
|
|
283
452
|
}
|
|
284
453
|
}
|
|
285
454
|
|
|
@@ -308,6 +477,7 @@ export namespace IOConnectBrowserPlatform {
|
|
|
308
477
|
user?: User.Config;
|
|
309
478
|
environment?: any;
|
|
310
479
|
applicationPreferences?: Prefs.Config;
|
|
480
|
+
otel?: Otel.Config;
|
|
311
481
|
browserFactory?: (config?: IOConnectBrowser.Config) => Promise<IOConnectBrowser.API>;
|
|
312
482
|
}
|
|
313
483
|
|