@interopio/browser-platform 3.3.5-next.0 → 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
|
|
|
@@ -336,15 +337,100 @@ export namespace IOConnectBrowserPlatform {
|
|
|
336
337
|
includeCredentials?: boolean;
|
|
337
338
|
}
|
|
338
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
|
+
|
|
339
377
|
export interface Config {
|
|
378
|
+
/**
|
|
379
|
+
* URL pointing to **io.Manager**.
|
|
380
|
+
*/
|
|
340
381
|
url: string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* User authentication configuration.
|
|
385
|
+
*/
|
|
341
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
|
+
*/
|
|
342
393
|
critical?: boolean;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Object containing key/value pairs of headers to be sent with every request.
|
|
397
|
+
*/
|
|
343
398
|
headers?: {
|
|
344
399
|
[key: string]: string;
|
|
345
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
|
+
*/
|
|
346
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
|
+
*/
|
|
347
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
|
+
*/
|
|
348
434
|
responseTimeoutMS?: number;
|
|
349
435
|
}
|
|
350
436
|
}
|
|
@@ -357,7 +443,12 @@ export namespace IOConnectBrowserPlatform {
|
|
|
357
443
|
|
|
358
444
|
export namespace User {
|
|
359
445
|
export interface Config {
|
|
360
|
-
|
|
446
|
+
id: string;
|
|
447
|
+
username?: string;
|
|
448
|
+
firstName?: string;
|
|
449
|
+
lastName?: string;
|
|
450
|
+
email?: string;
|
|
451
|
+
meta?: any;
|
|
361
452
|
}
|
|
362
453
|
}
|
|
363
454
|
|