@interopio/browser-platform 3.3.6 → 3.4.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.
@@ -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;
@@ -263,15 +342,100 @@ export namespace IOConnectBrowserPlatform {
263
342
  includeCredentials?: boolean;
264
343
  }
265
344
 
345
+ /**
346
+ * Settings for the requests sent to **io.Manager**.
347
+ */
348
+ export interface RequestsConfig {
349
+ /**
350
+ * Interval in milliseconds to wait for a response from **io.Manager**.
351
+ * @default 10000
352
+ */
353
+ timeout?: number;
354
+ /**
355
+ * Interval in milliseconds to wait for a response to the `openSession` request to **io.Manager** before proceeding from cache.
356
+ * @default 10000
357
+ */
358
+ openSessionTimeout?: number;
359
+ /**
360
+ * Interval in milliseconds to wait for a response to the `closeSession` request to **io.Manager**.
361
+ * @default 10000
362
+ */
363
+ closeSessionTimeout?: number;
364
+ }
365
+
366
+ /**
367
+ * Settings for persisting data received from **io.Manager**.
368
+ */
369
+ export interface CacheConfig {
370
+ /**
371
+ * If `true`, will enable caching and persisting data from **io.Manager** locally (e.g., in case of connection interruptions).
372
+ * @default true
373
+ */
374
+ enabled?: boolean;
375
+ /**
376
+ * If `true`, on opening a new session to **io.Manager**, all cache databases from previous sessions will be deleted.
377
+ * @default false
378
+ */
379
+ clearOld?: boolean;
380
+ }
381
+
266
382
  export interface Config {
383
+ /**
384
+ * URL pointing to **io.Manager**.
385
+ */
267
386
  url: string;
387
+
388
+ /**
389
+ * User authentication configuration.
390
+ */
268
391
  auth: AuthConfig;
392
+
393
+ /**
394
+ * Deprecated. If `true`, the library will wait for this module to be fully operational before completing its initialization.
395
+ * @default false
396
+ * @deprecated
397
+ */
269
398
  critical?: boolean;
399
+
400
+ /**
401
+ * Object containing key/value pairs of headers to be sent with every request.
402
+ */
270
403
  headers?: {
271
404
  [key: string]: string;
272
405
  };
406
+
407
+ /**
408
+ * Callback that will be invoked on every request. Use this callback to provide extra headers that will be applied to the request.
409
+ */
410
+ getHeaders?: (req: request.Options) => Promise<Record<string, string>>;
411
+
412
+ /**
413
+ * Settings for the requests sent to **io.Manager**.
414
+ */
415
+ requests?: RequestsConfig;
416
+
417
+ /**
418
+ * Settings for persisting data received from **io.Manager**.
419
+ */
420
+ cache?: CacheConfig;
421
+
422
+ /**
423
+ * Interval in milliseconds at which the server will be polled for new data (apps, Layouts).
424
+ * @default 60000
425
+ */
273
426
  fetchIntervalMS?: number;
427
+
428
+ /**
429
+ * Interval in milliseconds at which **io.Connect Browser** will try to refresh the **io.Manager** token.
430
+ * @default 3600000
431
+ */
274
432
  tokenRefreshIntervalMS?: number;
433
+
434
+ /**
435
+ * Deprecated. Use `requests.timeout` instead. Interval in milliseconds to wait for a response from **io.Manager**.
436
+ * @default 10000
437
+ * @deprecated
438
+ */
275
439
  responseTimeoutMS?: number;
276
440
  }
277
441
  }
@@ -284,7 +448,12 @@ export namespace IOConnectBrowserPlatform {
284
448
 
285
449
  export namespace User {
286
450
  export interface Config {
287
- username: string;
451
+ id: string;
452
+ username?: string;
453
+ firstName?: string;
454
+ lastName?: string;
455
+ email?: string;
456
+ meta?: any;
288
457
  }
289
458
  }
290
459
 
@@ -313,6 +482,7 @@ export namespace IOConnectBrowserPlatform {
313
482
  user?: User.Config;
314
483
  environment?: any;
315
484
  applicationPreferences?: Prefs.Config;
485
+ otel?: Otel.Config;
316
486
  browserFactory?: (config?: IOConnectBrowser.Config) => Promise<IOConnectBrowser.API>;
317
487
  }
318
488
 
package/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 3.4.0
2
+ feat: Extend channels methods with fdc3 options
3
+ feat: Add error events
4
+ feat: Implement open telemetry
5
+ feat: Implement io.Manager Caching
1
6
  3.3.5
2
7
  fix: fixed manager controller variable error causing reference error
3
8
  feat: Added the permissions config for workspaces