@omni-co/embed 0.18.0 → 0.20.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/README.md CHANGED
@@ -31,35 +31,35 @@ import {
31
31
  embedSsoDashboard,
32
32
  embedSsoWorkbook,
33
33
  embedSsoContentDiscovery,
34
- } from "@omni-co/embed";
34
+ } from '@omni-co/embed'
35
35
 
36
36
  // This creates a signed embed sso link for a dashboard
37
37
  // in the omni account named Acme.
38
38
  const iframeUrl = await embedSsoDashboard({
39
- contentId: "miU0hL6z",
40
- externalId: "wile.e@coyote.co",
41
- name: "Wile E",
42
- organizationName: "acme",
43
- secret: "abcdefghijklmnopqrstuvwxyz123456",
44
- });
39
+ contentId: 'miU0hL6z',
40
+ externalId: 'wile.e@coyote.co',
41
+ name: 'Wile E',
42
+ organizationName: 'acme',
43
+ secret: 'abcdefghijklmnopqrstuvwxyz123456',
44
+ })
45
45
 
46
46
  // Alternatively, you can create a signed embed sso link for a workbook.
47
47
  const iframeUrl = await embedSsoWorkbook({
48
- contentId: "miU0hL6z",
49
- externalId: "wile.e@coyote.co",
50
- name: "Wile E",
51
- organizationName: "acme",
52
- secret: "abcdefghijklmnopqrstuvwxyz123456",
53
- });
48
+ contentId: 'miU0hL6z',
49
+ externalId: 'wile.e@coyote.co',
50
+ name: 'Wile E',
51
+ organizationName: 'acme',
52
+ secret: 'abcdefghijklmnopqrstuvwxyz123456',
53
+ })
54
54
 
55
55
  // You can also create a signed embed sso link for a content discovery page.
56
56
  const iframeUrl = await embedSsoContentDiscovery({
57
- externalId: "wile.e@coyote.co",
58
- name: "Wile E",
59
- path: "root",
60
- organizationName: "acme",
61
- secret: "abcdefghijklmnopqrstuvwxyz123456",
62
- });
57
+ externalId: 'wile.e@coyote.co',
58
+ name: 'Wile E',
59
+ path: 'root',
60
+ organizationName: 'acme',
61
+ secret: 'abcdefghijklmnopqrstuvwxyz123456',
62
+ })
63
63
  ```
64
64
 
65
65
  ## 2-step Example
@@ -100,12 +100,12 @@ const redeemSessionUrl = await redeemSessionToken({
100
100
  // Use `host` to create a link to a vanity domain.
101
101
  // Note: `organizationName` and `domain` are incompatible with `host`
102
102
  const iframeUrl = await embedSsoDashboard({
103
- contentId: "miU0hL6z",
104
- externalId: "wile.e@coyote.co",
105
- host: "omni.example.com",
106
- name: "Wile E",
107
- secret: "abcdefghijklmnopqrstuvwxyz123456",
108
- });
103
+ contentId: 'miU0hL6z',
104
+ externalId: 'wile.e@coyote.co',
105
+ host: 'omni.example.com',
106
+ name: 'Wile E',
107
+ secret: 'abcdefghijklmnopqrstuvwxyz123456',
108
+ })
109
109
  ```
110
110
 
111
111
  ## embedSsoDashboard
@@ -115,32 +115,32 @@ This is the type signature for the `embedSsoDashboard` function:
115
115
  ```ts
116
116
  type EmbedSsoDashboardProps = {
117
117
  // Optional boolean property that toggles the dashboard's Access Boost setting.
118
- accessBoost?: boolean;
118
+ accessBoost?: boolean
119
119
 
120
120
  // Optional object that determines the connection permissions for the embed user.
121
- connectionRoles?: Record<string, EmbedConnectionRoles>;
121
+ connectionRoles?: Record<string, EmbedConnectionRoles>
122
122
 
123
123
  // Short GUID of the dashboard. Can be obtained via the dashboard's url.
124
- contentId: string;
124
+ contentId: string
125
125
 
126
126
  // Optional custom theme object that styles the embedded dashboard.
127
- customTheme?: CustomThemeProperties;
127
+ customTheme?: CustomThemeProperties
128
128
 
129
129
  /**
130
130
  * Optional custom theme ID setting that styles the embedded dashboard.
131
131
  * This ID should be from a theme created within the Omni application.
132
132
  */
133
- customThemeId?: string;
133
+ customThemeId?: string
134
134
 
135
135
  // Optional email parameter that sets the default scheduling email for the embed user.
136
- email?: string;
136
+ email?: string
137
137
 
138
138
  /**
139
139
  * Optional identifier to associate the user with an external organization or system.
140
140
  * Note that each distinct entity will generate its own folder and group. These can be used by
141
141
  * an embed user to share content with other members in the same entity.
142
142
  */
143
- entity?: string;
143
+ entity?: string
144
144
 
145
145
  /**
146
146
  * Sets embed user content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -153,7 +153,7 @@ type EmbedSsoDashboardProps = {
153
153
  * entityFolderGroupContentRole should also be set to NO_ACCESS in order to completely restrict access
154
154
  * to the top-level entity folder.
155
155
  */
156
- entityFolderContentRole?: EmbedEntityFolderContentRoles;
156
+ entityFolderContentRole?: EmbedEntityFolderContentRoles
157
157
 
158
158
  /**
159
159
  * Sets embed entity group content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -164,22 +164,22 @@ type EmbedSsoDashboardProps = {
164
164
  * VIEWER: all users in the group are restricted to just view content in the entity folder.
165
165
  * NO_ACCESS: all users in the group will have no access to content in the top-level entity folder.
166
166
  */
167
- entityFolderGroupContentRole?: EmbedEntityFolderContentRoles;
167
+ entityFolderGroupContentRole?: EmbedEntityFolderContentRoles
168
168
 
169
169
  // Required identifier to associate the external user with an automatically generated internal Omni user.
170
- externalId: string;
170
+ externalId: string
171
171
 
172
172
  /**
173
173
  * Optional url filter search parameter. Should be the same as the filter search parameters on a dashboard url.
174
174
  * Example: f--inventory_items.cost=%7B"kind"%3A"EQUALS"%2C"type"%3A"number"%2C"values"%3A%5B%5D%2C"is_negative"%3Afalse%2C"is_inclusive"%3Afalse%7D&f--users.state=%7B"kind"%3A"EQUALS"%2C"type"%3A"string"%2C"values"%3A%5B"Aberdeen"%2C"Alabama"%5D%2C"is_negative"%3Afalse%7D&f--users.country=%7B"kind"%3A"EQUALS"%2C"type"%3A"string"%2C"values"%3A%5B"UK"%5D%2C"is_negative"%3Afalse%7D
175
175
  *
176
176
  */
177
- filterSearchParam?: string;
177
+ filterSearchParam?: string
178
178
 
179
179
  /*
180
180
  * Optional groups array property. The array should be a list of group names from the Omni application, which the embed user will be added to.
181
181
  */
182
- groups?: string[];
182
+ groups?: string[]
183
183
 
184
184
  /**
185
185
  * Used to set the host of signed embed URL, required when using vanity domains.
@@ -190,7 +190,7 @@ type EmbedSsoDashboardProps = {
190
190
  * @example "omni.example.com"
191
191
  * @example "omni.another-example.app"
192
192
  */
193
- host?: string;
193
+ host?: string
194
194
 
195
195
  /**
196
196
  * Optional link access setting to control which Omni dashboard links are shown. Note that regardless of the linkAccess value,
@@ -200,7 +200,7 @@ type EmbedSsoDashboardProps = {
200
200
  * "abcd1234,efgh5678,ijkl9999": An allowlist of dashboard IDs that permisses and shows links to the specified dashboards.
201
201
  * undefined: If left undefined, the default behavior is to hide and disallow all links to other Omni dashboards on the embedded dashboard.
202
202
  */
203
- linkAccess?: string;
203
+ linkAccess?: string
204
204
 
205
205
  /**
206
206
  * Optional mode setting that determines whether the entire application should be embedded or a single piece of content.
@@ -208,13 +208,13 @@ type EmbedSsoDashboardProps = {
208
208
  * APPLICATION: the entire application will be embedded, meaning in-app navigation and document header options will be available.
209
209
  * SINGLE_CONTENT: only the content specified in the contentId will be embedded and application mode features will be hidden.
210
210
  */
211
- mode?: EmbedSessionMode;
211
+ mode?: EmbedSessionMode
212
212
 
213
213
  // Optional object that determines the model permissions for the embed user.
214
- modelRoles?: Record<string, EmbedConnectionRoles>;
214
+ modelRoles?: Record<string, EmbedConnectionRoles>
215
215
 
216
216
  // Required name of the external user.
217
- name: string;
217
+ name: string
218
218
 
219
219
  /**
220
220
  * Name of the organization the content belongs to. If provided, generates a default embed host
@@ -222,36 +222,36 @@ type EmbedSsoDashboardProps = {
222
222
  *
223
223
  * @throws Error if `host` is provided.
224
224
  */
225
- organizationName?: string;
225
+ organizationName?: string
226
226
 
227
227
  // Port of host.
228
- port?: number;
228
+ port?: number
229
229
 
230
230
  // Optional dark mode setting. Can be one of "true", "false", or "system".
231
- prefersDark?: string;
231
+ prefersDark?: string
232
232
 
233
233
  /**
234
234
  * When true, an existing content role for the embed user on the entity folder will not be overwritten
235
235
  * by the `entityFolderContentRole` value. If a content role does not exist on the entity folder for the embed user,
236
236
  * the `entityFolderContentRole` value will be applied.
237
237
  */
238
- preserveEntityFolderContentRole?: boolean;
238
+ preserveEntityFolderContentRole?: boolean
239
239
 
240
240
  // Signing secret available to Omni admins.
241
- secret: string;
241
+ secret: string
242
242
 
243
243
  // Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
244
- theme?: string;
244
+ theme?: string
245
245
 
246
246
  // Optional UI settings object to control appearance of embed experience.
247
- uiSettings?: Record<EmbedUiSettings, boolean>;
247
+ uiSettings?: EmbedUiSettingsObject
248
248
 
249
249
  /**
250
250
  * Optional user attributes to be passed to user associated with the
251
251
  * externalId. User attributes must be created in Omni before being
252
252
  * defined and given a value here.
253
253
  */
254
- userAttributes?: Record<string, string | string[] | number | number[]>;
254
+ userAttributes?: Record<string, string | string[] | number | number[]>
255
255
 
256
256
  // DEPRECATED
257
257
 
@@ -261,8 +261,8 @@ type EmbedSsoDashboardProps = {
261
261
  *
262
262
  * @throws Error if `host` is provided.
263
263
  */
264
- domain?: string;
265
- };
264
+ domain?: string
265
+ }
266
266
  ```
267
267
 
268
268
  ## embedSsoWorkbook
@@ -272,7 +272,7 @@ This is the type signature for the `embedSsoWorkbook` function:
272
272
  ```ts
273
273
  type EmbedSsoWorkbookProps = {
274
274
  // Optional object that determines the connection permissions for the embed user.
275
- connectionRoles?: Record<string, EmbedConnectionRoles>;
275
+ connectionRoles?: Record<string, EmbedConnectionRoles>
276
276
 
277
277
  /**
278
278
  * Short GUID of the workbook.
@@ -280,29 +280,29 @@ type EmbedSsoWorkbookProps = {
280
280
  * Can be obtained via the workbook's share -> embed -> iframe url or via the dashboard url.
281
281
  * This will embed the workbook associated with the dashboard id.
282
282
  */
283
- contentId: string;
283
+ contentId: string
284
284
 
285
285
  /**
286
286
  * Optional custom theme object. Note that this theme will only apply to dashboards viewed
287
287
  * during the generated embed session.
288
288
  */
289
- customTheme?: CustomThemeProperties;
289
+ customTheme?: CustomThemeProperties
290
290
 
291
291
  /**
292
292
  * Optional custom theme ID setting. Note that this theme will only apply to dashboards viewed
293
293
  * during the generated embed session.
294
294
  */
295
- customThemeId?: string;
295
+ customThemeId?: string
296
296
 
297
297
  // Optional email parameter that sets the default scheduling email for the embed user.
298
- email?: string;
298
+ email?: string
299
299
 
300
300
  /**
301
301
  * Optional identifier to associate the user with an external organization or system.
302
302
  * Note that each distinct entity will generate its own folder and group. These can be used by
303
303
  * an embed user to share content with other members in the same entity.
304
304
  */
305
- entity?: string;
305
+ entity?: string
306
306
 
307
307
  /**
308
308
  * Sets embed user content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -315,7 +315,7 @@ type EmbedSsoWorkbookProps = {
315
315
  * entityFolderGroupContentRole should also be set to NO_ACCESS in order to completely restrict access
316
316
  * to the top-level entity folder.
317
317
  */
318
- entityFolderContentRole?: EmbedEntityFolderContentRoles;
318
+ entityFolderContentRole?: EmbedEntityFolderContentRoles
319
319
 
320
320
  /**
321
321
  * Sets embed entity group content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -326,16 +326,16 @@ type EmbedSsoWorkbookProps = {
326
326
  * VIEWER: all users in the group are restricted to just view content in the entity folder.
327
327
  * NO_ACCESS: all users in the group will have no access to content in the top-level entity folder.
328
328
  */
329
- entityFolderGroupContentRole?: EmbedEntityFolderContentRoles;
329
+ entityFolderGroupContentRole?: EmbedEntityFolderContentRoles
330
330
 
331
331
  // Required identifier to associate the external user with an
332
332
  // automatically generated internal Omni user.
333
- externalId: string;
333
+ externalId: string
334
334
 
335
335
  /*
336
336
  * Optional groups array property. The array should be a list of group names from the Omni application, which the embed user will be added to.
337
337
  */
338
- groups?: string[];
338
+ groups?: string[]
339
339
 
340
340
  /**
341
341
  * Used to set the host of signed embed URL, required when using vanity domains.
@@ -346,7 +346,7 @@ type EmbedSsoWorkbookProps = {
346
346
  * @example "omni.example.com"
347
347
  * @example "omni.another-example.app"
348
348
  */
349
- host?: string;
349
+ host?: string
350
350
 
351
351
  /**
352
352
  * Optional mode setting that determines whether the entire application should be embedded or a single piece of content.
@@ -354,13 +354,13 @@ type EmbedSsoWorkbookProps = {
354
354
  * APPLICATION: the entire application will be embedded, meaning in-app navigation and document header options will be available.
355
355
  * SINGLE_CONTENT: only the content specified in the contentId will be embedded and application mode features will be hidden.
356
356
  */
357
- mode?: EmbedSessionMode;
357
+ mode?: EmbedSessionMode
358
358
 
359
359
  // Optional object that determines the model permissions for the embed user.
360
- modelRoles?: Record<string, EmbedConnectionRoles>;
360
+ modelRoles?: Record<string, EmbedConnectionRoles>
361
361
 
362
362
  // Required name of the external user.
363
- name: string;
363
+ name: string
364
364
 
365
365
  /**
366
366
  * Name of the organization the content belongs to. If provided, generates a default embed host
@@ -368,36 +368,36 @@ type EmbedSsoWorkbookProps = {
368
368
  *
369
369
  * @throws Error if `host` is provided.
370
370
  */
371
- organizationName?: string;
371
+ organizationName?: string
372
372
 
373
373
  // Port of host.
374
- port?: number;
374
+ port?: number
375
375
 
376
376
  // Optional dark mode setting. Can be one of "true", "false", or "system".
377
- prefersDark?: string;
377
+ prefersDark?: string
378
378
 
379
379
  /**
380
380
  * When true, an existing content role for the embed user on the entity folder will not be overwritten
381
381
  * by the `entityFolderContentRole` value. If a content role does not exist on the entity folder for the embed user,
382
382
  * the `entityFolderContentRole` value will be applied.
383
383
  */
384
- preserveEntityFolderContentRole?: boolean;
384
+ preserveEntityFolderContentRole?: boolean
385
385
 
386
386
  // Signing secret available to Omni admins.
387
- secret: string;
387
+ secret: string
388
388
 
389
389
  // Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
390
- theme?: string;
390
+ theme?: string
391
391
 
392
392
  // Optional UI settings object to control appearance of embed experience.
393
- uiSettings?: Record<EmbedUiSettings, boolean>;
393
+ uiSettings?: EmbedUiSettingsObject
394
394
 
395
395
  /**
396
396
  * Optional user attributes to be passed to user associated with the
397
397
  * externalId. User attributes must be created in Omni before being
398
398
  * defined and given a value here.
399
399
  */
400
- userAttributes?: Record<string, string | string[] | number | number[]>;
400
+ userAttributes?: Record<string, string | string[] | number | number[]>
401
401
 
402
402
  // DEPRECATED
403
403
 
@@ -407,8 +407,8 @@ type EmbedSsoWorkbookProps = {
407
407
  *
408
408
  * @throws Error if `host` is provided.
409
409
  */
410
- domain?: string;
411
- };
410
+ domain?: string
411
+ }
412
412
  ```
413
413
 
414
414
  ## embedSsoContentDiscovery
@@ -418,29 +418,29 @@ This is the type signature for the `embedSsoContentDiscovery` function:
418
418
  ```ts
419
419
  type EmbedSsoContentDiscoveryProps = {
420
420
  // Optional object that determines the connection permissions for the embed user.
421
- connectionRoles?: Record<string, EmbedConnectionRoles>;
421
+ connectionRoles?: Record<string, EmbedConnectionRoles>
422
422
 
423
423
  /**
424
424
  * Optional custom theme object. Note that this theme will only apply to dashboards viewed
425
425
  * during the generated embed session.
426
426
  */
427
- customTheme?: CustomThemeProperties;
427
+ customTheme?: CustomThemeProperties
428
428
 
429
429
  /**
430
430
  * Optional custom theme ID setting. Note that this theme will only apply to dashboards viewed
431
431
  * during the generated embed session.
432
432
  */
433
- customThemeId?: string;
433
+ customThemeId?: string
434
434
 
435
435
  // Optional email parameter that sets the default scheduling email for the embed user.
436
- email?: string;
436
+ email?: string
437
437
 
438
438
  /**
439
439
  * Optional identifier to associate the user with an external organization or system.
440
440
  * Note that each distinct entity will generate its own folder and group. These can be used by
441
441
  * an embed user to share content with other members in the same entity.
442
442
  */
443
- entity?: string;
443
+ entity?: string
444
444
 
445
445
  /**
446
446
  * Sets embed user content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -453,7 +453,7 @@ type EmbedSsoContentDiscoveryProps = {
453
453
  * entityFolderGroupContentRole should also be set to NO_ACCESS in order to completely restrict access
454
454
  * to the top-level entity folder.
455
455
  */
456
- entityFolderContentRole?: EmbedEntityFolderContentRoles;
456
+ entityFolderContentRole?: EmbedEntityFolderContentRoles
457
457
 
458
458
  /**
459
459
  * Sets embed entity group content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -464,16 +464,16 @@ type EmbedSsoContentDiscoveryProps = {
464
464
  * VIEWER: all users in the group are restricted to just view content in the entity folder.
465
465
  * NO_ACCESS: all users in the group will have no access to content in the top-level entity folder.
466
466
  */
467
- entityFolderGroupContentRole?: EmbedEntityFolderContentRoles;
467
+ entityFolderGroupContentRole?: EmbedEntityFolderContentRoles
468
468
 
469
469
  // Required identifier to associate the external user with an
470
470
  // automatically generated internal Omni user.
471
- externalId: string;
471
+ externalId: string
472
472
 
473
473
  /*
474
474
  * Optional groups array property. The array should be a list of group names from the Omni application, which the embed user will be added to.
475
475
  */
476
- groups?: string[];
476
+ groups?: string[]
477
477
 
478
478
  /**
479
479
  * Used to set the host of signed embed URL, required when using vanity domains.
@@ -484,7 +484,7 @@ type EmbedSsoContentDiscoveryProps = {
484
484
  * @example "omni.example.com"
485
485
  * @example "omni.another-example.app"
486
486
  */
487
- host?: string;
487
+ host?: string
488
488
 
489
489
  /**
490
490
  * Optional mode setting that determines whether the entire application should be embedded or a single piece of content.
@@ -492,13 +492,13 @@ type EmbedSsoContentDiscoveryProps = {
492
492
  * APPLICATION: the entire application will be embedded, meaning in-app navigation and document header options will be available.
493
493
  * SINGLE_CONTENT: only the content specified in the contentId will be embedded and application mode features will be hidden.
494
494
  */
495
- mode?: EmbedSessionMode;
495
+ mode?: EmbedSessionMode
496
496
 
497
497
  // Optional object that determines the model permissions for the embed user.
498
- modelRoles?: Record<string, EmbedConnectionRoles>;
498
+ modelRoles?: Record<string, EmbedConnectionRoles>
499
499
 
500
500
  // Required name of the external user.
501
- name: string;
501
+ name: string
502
502
 
503
503
  /**
504
504
  * Name of the organization the content belongs to. If provided, generates a default embed host
@@ -506,7 +506,7 @@ type EmbedSsoContentDiscoveryProps = {
506
506
  *
507
507
  * @throws Error if `host` is provided.
508
508
  */
509
- organizationName?: string;
509
+ organizationName?: string
510
510
 
511
511
  /**
512
512
  * Required path property. The path value determines the starting content discovery page
@@ -516,36 +516,36 @@ type EmbedSsoContentDiscoveryProps = {
516
516
  * entity-folder: embed entity folder
517
517
  * root: "Hub" page
518
518
  */
519
- path: string;
519
+ path: string
520
520
 
521
521
  // Port of host.
522
- port?: number;
522
+ port?: number
523
523
 
524
524
  // Optional dark mode setting. Can be one of "true", "false", or "system".
525
- prefersDark?: string;
525
+ prefersDark?: string
526
526
 
527
527
  /**
528
528
  * When true, an existing content role for the embed user on the entity folder will not be overwritten
529
529
  * by the `entityFolderContentRole` value. If a content role does not exist on the entity folder for the embed user,
530
530
  * the `entityFolderContentRole` value will be applied.
531
531
  */
532
- preserveEntityFolderContentRole?: boolean;
532
+ preserveEntityFolderContentRole?: boolean
533
533
 
534
534
  // Signing secret available to Omni admins.
535
- secret: string;
535
+ secret: string
536
536
 
537
537
  // Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
538
- theme?: string;
538
+ theme?: string
539
539
 
540
540
  // Optional UI settings object to control appearance of embed experience.
541
- uiSettings?: Record<EmbedUiSettings, boolean>;
541
+ uiSettings?: EmbedUiSettingsObject
542
542
 
543
543
  /**
544
544
  * Optional user attributes to be passed to user associated with the
545
545
  * externalId. User attributes must be created in Omni before being
546
546
  * defined and given a value here.
547
547
  */
548
- userAttributes?: Record<string, string | string[] | number | number[]>;
548
+ userAttributes?: Record<string, string | string[] | number | number[]>
549
549
 
550
550
  // DEPRECATED
551
551
 
@@ -555,8 +555,8 @@ type EmbedSsoContentDiscoveryProps = {
555
555
  *
556
556
  * @throws Error if `host` is provided.
557
557
  */
558
- domain?: string;
559
- };
558
+ domain?: string
559
+ }
560
560
  ```
561
561
 
562
562
  ## createSessionToken
@@ -566,35 +566,35 @@ This is the type signature for the `createSessionToken` function:
566
566
  ```ts
567
567
  type CreateSessionTokenProps = {
568
568
  // Optional boolean property that toggles the dashboard's Access Boost setting.
569
- accessBoost?: boolean;
569
+ accessBoost?: boolean
570
570
 
571
571
  // An Omni API key used for authentication purposes. Can be generated in your Omni application in the Admin > API Keys section.
572
- apiKey: string;
572
+ apiKey: string
573
573
 
574
574
  // Optional object that determines the connection permissions for the embed user.
575
- connectionRoles?: Record<string, EmbedConnectionRoles>;
575
+ connectionRoles?: Record<string, EmbedConnectionRoles>
576
576
 
577
577
  // Short GUID of the dashboard. Can be obtained via the dashboard's url.
578
- contentId: string;
578
+ contentId: string
579
579
 
580
580
  // Optional custom theme object that styles the embedded dashboard.
581
- customTheme?: CustomThemeProperties;
581
+ customTheme?: CustomThemeProperties
582
582
 
583
583
  /**
584
584
  * Optional custom theme ID setting that styles the embedded dashboard.
585
585
  * This ID should be from a theme created within the Omni application.
586
586
  */
587
- customThemeId?: string;
587
+ customThemeId?: string
588
588
 
589
589
  // Optional email parameter that sets the default scheduling email for the embed user.
590
- email?: string;
590
+ email?: string
591
591
 
592
592
  /**
593
593
  * Optional identifier to associate the user with an external organization or system.
594
594
  * Note that each distinct entity will generate its own folder and group. These can be used by
595
595
  * an embed user to share content with other members in the same entity.
596
596
  */
597
- entity?: string;
597
+ entity?: string
598
598
 
599
599
  /**
600
600
  * Sets embed user content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -607,7 +607,7 @@ type CreateSessionTokenProps = {
607
607
  * entityFolderGroupContentRole should also be set to NO_ACCESS in order to completely restrict access
608
608
  * to the top-level entity folder.
609
609
  */
610
- entityFolderContentRole?: EmbedEntityFolderContentRoles;
610
+ entityFolderContentRole?: EmbedEntityFolderContentRoles
611
611
 
612
612
  /**
613
613
  * Sets embed entity group content permission on the entity folder. Can be one of "MANAGER", "EDITOR", "VIEWER",
@@ -618,22 +618,22 @@ type CreateSessionTokenProps = {
618
618
  * VIEWER: all users in the group are restricted to just view content in the entity folder.
619
619
  * NO_ACCESS: all users in the group will have no access to content in the top-level entity folder.
620
620
  */
621
- entityFolderGroupContentRole?: EmbedEntityFolderContentRoles;
621
+ entityFolderGroupContentRole?: EmbedEntityFolderContentRoles
622
622
 
623
623
  // Required identifier to associate the external user with an automatically generated internal Omni user.
624
- externalId: string;
624
+ externalId: string
625
625
 
626
626
  /**
627
627
  * Optional url filter search parameter. Should be the same as the filter search parameters on a dashboard url.
628
628
  * Example: f--inventory_items.cost=%7B"kind"%3A"EQUALS"%2C"type"%3A"number"%2C"values"%3A%5B%5D%2C"is_negative"%3Afalse%2C"is_inclusive"%3Afalse%7D&f--users.state=%7B"kind"%3A"EQUALS"%2C"type"%3A"string"%2C"values"%3A%5B"Aberdeen"%2C"Alabama"%5D%2C"is_negative"%3Afalse%7D&f--users.country=%7B"kind"%3A"EQUALS"%2C"type"%3A"string"%2C"values"%3A%5B"UK"%5D%2C"is_negative"%3Afalse%7D
629
629
  *
630
630
  */
631
- filterSearchParam?: string;
631
+ filterSearchParam?: string
632
632
 
633
633
  /*
634
634
  * Optional groups array property. The array should be a list of group names from the Omni application, which the embed user will be added to.
635
635
  */
636
- groups?: string[];
636
+ groups?: string[]
637
637
 
638
638
  /**
639
639
  * Used to set the host of signed embed URL, required when using vanity domains.
@@ -644,7 +644,7 @@ type CreateSessionTokenProps = {
644
644
  * @example "omni.example.com"
645
645
  * @example "omni.another-example.app"
646
646
  */
647
- host?: string;
647
+ host?: string
648
648
 
649
649
  /**
650
650
  * Optional link access setting to control which Omni dashboard links are shown. Note that regardless of the linkAccess value,
@@ -654,7 +654,7 @@ type CreateSessionTokenProps = {
654
654
  * "abcd1234,efgh5678,ijkl9999": An allowlist of dashboard IDs that permisses and shows links to the specified dashboards.
655
655
  * undefined: If left undefined, the default behavior is to hide and disallow all links to other Omni dashboards on the embedded dashboard.
656
656
  */
657
- linkAccess?: string;
657
+ linkAccess?: string
658
658
 
659
659
  /**
660
660
  * Optional mode setting that determines whether the entire application should be embedded or a single piece of content.
@@ -662,13 +662,13 @@ type CreateSessionTokenProps = {
662
662
  * APPLICATION: the entire application will be embedded, meaning in-app navigation and document header options will be available.
663
663
  * SINGLE_CONTENT: only the content specified in the contentId will be embedded and application mode features will be hidden.
664
664
  */
665
- mode?: EmbedSessionMode;
665
+ mode?: EmbedSessionMode
666
666
 
667
667
  // Optional object that determines the model permissions for the embed user.
668
- modelRoles?: Record<string, EmbedConnectionRoles>;
668
+ modelRoles?: Record<string, EmbedConnectionRoles>
669
669
 
670
670
  // Required name of the external user.
671
- name: string;
671
+ name: string
672
672
 
673
673
  /**
674
674
  * Name of the organization the content belongs to. If provided, generates a default embed host
@@ -676,27 +676,27 @@ type CreateSessionTokenProps = {
676
676
  *
677
677
  * @throws Error if `host` is provided.
678
678
  */
679
- organizationName?: string;
679
+ organizationName?: string
680
680
 
681
681
  // Port of host.
682
- port?: number;
682
+ port?: number
683
683
 
684
684
  /**
685
685
  * When true, an existing content role for the embed user on the entity folder will not be overwritten
686
686
  * by the `entityFolderContentRole` value. If a content role does not exist on the entity folder for the embed user,
687
687
  * the `entityFolderContentRole` value will be applied.
688
688
  */
689
- preserveEntityFolderContentRole?: boolean;
689
+ preserveEntityFolderContentRole?: boolean
690
690
 
691
691
  // Optional UI settings object to control appearance of embed experience.
692
- uiSettings?: Record<EmbedUiSettings, boolean>;
692
+ uiSettings?: EmbedUiSettingsObject
693
693
 
694
694
  /**
695
695
  * Optional user attributes to be passed to user associated with the
696
696
  * externalId. User attributes must be created in Omni before being
697
697
  * defined and given a value here.
698
698
  */
699
- userAttributes?: Record<string, string | string[] | number | number[]>;
699
+ userAttributes?: Record<string, string | string[] | number | number[]>
700
700
 
701
701
  // DEPRECATED
702
702
 
@@ -706,8 +706,8 @@ type CreateSessionTokenProps = {
706
706
  *
707
707
  * @throws Error if `host` is provided.
708
708
  */
709
- domain?: string;
710
- };
709
+ domain?: string
710
+ }
711
711
  ```
712
712
 
713
713
  ## redeemSessionToken
@@ -725,7 +725,7 @@ type RedeemSessionTokenProps = {
725
725
  * @example "omni.example.com"
726
726
  * @example "omni.another-example.app"
727
727
  */
728
- host?: string;
728
+ host?: string
729
729
 
730
730
  /**
731
731
  * Name of the organization the content belongs to. If provided, generates a default embed host
@@ -733,23 +733,23 @@ type RedeemSessionTokenProps = {
733
733
  *
734
734
  * @throws Error if `host` is provided.
735
735
  */
736
- organizationName?: string;
736
+ organizationName?: string
737
737
 
738
738
  // Port of host.
739
- port?: number;
739
+ port?: number
740
740
 
741
741
  // Optional dark mode setting. Can be one of "true", "false", or "system".
742
- prefersDark?: string;
742
+ prefersDark?: string
743
743
 
744
744
  // Signing secret available to Omni admins.
745
- secret: string;
745
+ secret: string
746
746
 
747
747
  // Session token string. The `createSessionToken` sdk function returns a session token that
748
748
  // can be used as the `sessionToken` parameter here in `redeemSessionToken`.
749
- sessionToken: string;
749
+ sessionToken: string
750
750
 
751
751
  // Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
752
- theme?: string;
752
+ theme?: string
753
753
 
754
754
  // DEPRECATED
755
755
 
@@ -759,6 +759,6 @@ type RedeemSessionTokenProps = {
759
759
  *
760
760
  * @throws Error if `host` is provided.
761
761
  */
762
- domain?: string;
763
- };
762
+ domain?: string
763
+ }
764
764
  ```