@omni-co/embed 0.3.20 → 0.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.
- package/README.md +103 -31
- package/lib/cjs/embed.js +31 -20
- package/lib/cjs/types.d.ts +29 -3
- package/lib/esm/embed.js +31 -20
- package/lib/esm/types.d.ts +29 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ const iframeUrl = await embedSsoDashboard({
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
// Alternatively you can create a signed embed sso link for a workbook
|
|
43
|
-
|
|
43
|
+
const iframeUrl = await embedSsoWorkbook({
|
|
44
44
|
contentId: "miU0hL6z",
|
|
45
45
|
externalId: "wile.e@coyote.co",
|
|
46
46
|
name: "Wile E",
|
|
@@ -49,6 +49,20 @@ onst iframeUrl = await embedSsoWorkbook({
|
|
|
49
49
|
});
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Using Vanity Domains
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// Use `host` to create a link to a vanity domain.
|
|
56
|
+
// Note: `organizationName` and `domain` are incompatible with `host`
|
|
57
|
+
const iframeUrl = await embedSsoDashboard({
|
|
58
|
+
contentId: "miU0hL6z",
|
|
59
|
+
externalId: "wile.e@coyote.co",
|
|
60
|
+
host: "omni.example.com",
|
|
61
|
+
name: "Wile E",
|
|
62
|
+
secret: "abcdefghijklmnopqrstuvwxyz123456",
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
52
66
|
## Kitchen Sink Example
|
|
53
67
|
|
|
54
68
|
```ts
|
|
@@ -78,47 +92,76 @@ type EmbedSsoProps = {
|
|
|
78
92
|
// Short GUID of the dashboard. Can be obtained via the dashboard's url.
|
|
79
93
|
contentId: string;
|
|
80
94
|
|
|
95
|
+
// Optional custom theme property that styles the embedded dashboard.
|
|
96
|
+
customTheme?: CustomThemeProperties;
|
|
97
|
+
|
|
98
|
+
// Optional identifier to associate the user with an external
|
|
99
|
+
// organization or system.
|
|
100
|
+
entity?: string;
|
|
101
|
+
|
|
81
102
|
// Required identifier to associate the external user with an
|
|
82
103
|
// automatically generated internal Omni user.
|
|
83
104
|
externalId: string;
|
|
84
105
|
|
|
106
|
+
// Optional url filter search parameter. Should be the same as the filter search parameters on a dashboard url.
|
|
107
|
+
// 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
|
|
108
|
+
filterSearchParam?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Used to set the host of signed embed URL, required when using vanity domains.
|
|
112
|
+
* Protocol is not required, as https is assumed.
|
|
113
|
+
* Port is not accepted. If required, use the `port` prop.
|
|
114
|
+
*
|
|
115
|
+
* @throws Error if `domain` or `organizationName` are provided.
|
|
116
|
+
* @example "omni.example.com"
|
|
117
|
+
* @example "omni.another-example.app"
|
|
118
|
+
*/
|
|
119
|
+
host?: string;
|
|
120
|
+
|
|
121
|
+
// Optional link access setting to control which Omni dashboard links are shown. Note that regardless of the linkAccess value,
|
|
122
|
+
// all non-Omni dashboard links will be shown and allowed in drill menus. Acceptable values include:
|
|
123
|
+
// "__omni_link_access_open": Special string keyword that permisses and shows all Omni dashboard links on the embedded dashboard.
|
|
124
|
+
// "abcd1234,efgh5678,ijkl9999": An allowlist of dashboard IDs that permisses and shows links to the specified dashboards.
|
|
125
|
+
// undefined: If left undefined, the default behavior is to hide and disallow all links to other Omni dashboards on the embedded dashboard.
|
|
126
|
+
linkAccess?: string;
|
|
127
|
+
|
|
85
128
|
// Required name of the external user.
|
|
86
129
|
name: string;
|
|
87
130
|
|
|
88
|
-
|
|
89
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Name of the organization the content belongs to. If provided, generates a default embed host
|
|
133
|
+
* URL in the form of `https://<organizationName>.embed-omniapp.co`.
|
|
134
|
+
*
|
|
135
|
+
* @throws Error if `host` is provided.
|
|
136
|
+
*/
|
|
137
|
+
organizationName?: string;
|
|
138
|
+
|
|
139
|
+
// Port of host
|
|
140
|
+
port?: number;
|
|
141
|
+
|
|
142
|
+
// Optional dark mode setting. Can be one of "true", "false", or "system".
|
|
143
|
+
prefersDark?: string;
|
|
90
144
|
|
|
91
145
|
// Signing secret available to Omni admins.
|
|
92
146
|
secret: string;
|
|
93
147
|
|
|
94
|
-
// Optional identifier to associate the user with an external
|
|
95
|
-
// organization or system.
|
|
96
|
-
entity?: string;
|
|
97
|
-
|
|
98
148
|
// Optional user attributes to be passed to user associated with the
|
|
99
149
|
// externalId. User attributes must be created in Omni before being
|
|
100
150
|
// defined and given a value here.
|
|
101
151
|
userAttributes?: Record<string, string | string[] | number | number[]>;
|
|
102
152
|
|
|
103
|
-
// Optional dark mode setting. Can be one of "true", "false", or "system".
|
|
104
|
-
prefersDark?: string;
|
|
105
|
-
|
|
106
153
|
// Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
|
|
107
154
|
theme?: string;
|
|
108
155
|
|
|
109
|
-
//
|
|
110
|
-
// 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
|
|
111
|
-
filterSearchParam?: string;
|
|
112
|
-
|
|
113
|
-
// Optional link access setting to control which Omni dashboard links are shown. Note that regardless of the linkAccess value,
|
|
114
|
-
// all non-Omni dashboard links will be shown and allowed in drill menus. Acceptable values include:
|
|
115
|
-
// "__omni_link_access_open": Special string keyword that permisses and shows all Omni dashboard links on the embedded dashboard.
|
|
116
|
-
// "abcd1234,efgh5678,ijkl9999": An allowlist of dashboard IDs that permisses and shows links to the specified dashboards.
|
|
117
|
-
// undefined: If left undefined, the default behavior is to hide and disallow all links to other Omni dashboards on the embedded dashboard.
|
|
118
|
-
linkAccess?: string;
|
|
156
|
+
// DEPRECATED
|
|
119
157
|
|
|
120
|
-
|
|
121
|
-
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Introduced for internal testing only. For vanity domains, use the `host`
|
|
160
|
+
* prop instead. Will be dropped in a v1.0.0 release.
|
|
161
|
+
*
|
|
162
|
+
* @throws Error if `host` is provided.
|
|
163
|
+
*/
|
|
164
|
+
domain?: string;
|
|
122
165
|
};
|
|
123
166
|
```
|
|
124
167
|
|
|
@@ -131,32 +174,61 @@ type EmbedSsoProps = {
|
|
|
131
174
|
// Short GUID of the workbook. Can be obtained via the workbook's share -> embed -> iframe url or via the dashboard url (will embed the workbook associated with the dashboard id)
|
|
132
175
|
contentId: string;
|
|
133
176
|
|
|
177
|
+
// Optional identifier to associate the user with an external
|
|
178
|
+
// organization or system.
|
|
179
|
+
entity?: string;
|
|
180
|
+
|
|
134
181
|
// Required identifier to associate the external user with an
|
|
135
182
|
// automatically generated internal Omni user.
|
|
136
183
|
externalId: string;
|
|
137
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Used to set the host of signed embed URL, required when using vanity domains.
|
|
187
|
+
* Protocol is not required, as https is assumed.
|
|
188
|
+
* Port is not accepted. If required, use the `port` prop.
|
|
189
|
+
*
|
|
190
|
+
* @throws Error if `domain` or `organizationName` are provided.
|
|
191
|
+
* @example "omni.example.com"
|
|
192
|
+
* @example "omni.another-example.app"
|
|
193
|
+
*/
|
|
194
|
+
host?: string;
|
|
195
|
+
|
|
138
196
|
// Required name of the external user.
|
|
139
197
|
name: string;
|
|
140
198
|
|
|
141
|
-
|
|
142
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Name of the organization the content belongs to. If provided, generates a default embed host
|
|
201
|
+
* URL in the form of `https://<organizationName>.embed-omniapp.co`.
|
|
202
|
+
*
|
|
203
|
+
* @throws Error if `host` is provided.
|
|
204
|
+
*/
|
|
205
|
+
organizationName?: string;
|
|
206
|
+
|
|
207
|
+
// Port of host
|
|
208
|
+
port?: number;
|
|
209
|
+
|
|
210
|
+
// Optional dark mode setting. Can be one of "true", "false", or "system".
|
|
211
|
+
prefersDark?: string;
|
|
143
212
|
|
|
144
213
|
// Signing secret available to Omni admins.
|
|
145
214
|
secret: string;
|
|
146
215
|
|
|
147
|
-
// Optional identifier to associate the user with an external
|
|
148
|
-
// organization or system.
|
|
149
|
-
entity?: string;
|
|
150
|
-
|
|
151
216
|
// Optional user attributes to be passed to user associated with the
|
|
152
217
|
// externalId. User attributes must be created in Omni before being
|
|
153
218
|
// defined and given a value here.
|
|
154
219
|
userAttributes?: Record<string, string | string[] | number | number[]>;
|
|
155
220
|
|
|
156
|
-
// Optional dark mode setting. Can be one of "true", "false", or "system".
|
|
157
|
-
prefersDark?: string;
|
|
158
|
-
|
|
159
221
|
// Optional theme setting. Can be one of "dawn", "vibes", "breeze" or "blank".
|
|
160
222
|
theme?: string;
|
|
223
|
+
|
|
224
|
+
// DEPRECATED
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @deprecated Introduced for internal testing only. For vanity domains, use the `host`
|
|
228
|
+
* prop instead. Will be dropped in a v1.0.0 release.
|
|
229
|
+
*
|
|
230
|
+
* @throws Error if `host` is provided.
|
|
231
|
+
*/
|
|
232
|
+
domain?: string;
|
|
161
233
|
};
|
|
162
234
|
```
|
package/lib/cjs/embed.js
CHANGED
|
@@ -7,39 +7,50 @@ const types_1 = require("./types");
|
|
|
7
7
|
const defaultEmbedDomain = "embed-omniapp.co";
|
|
8
8
|
const embedLoginPath = "/embed/login";
|
|
9
9
|
const validateProps = (props) => {
|
|
10
|
-
const { externalId, name, nonce,
|
|
11
|
-
|
|
10
|
+
const { externalId, name, nonce, secret, userAttributes } = props;
|
|
11
|
+
let host, domain, organizationName;
|
|
12
|
+
if ("host" in props)
|
|
13
|
+
host = props.host;
|
|
14
|
+
if ("organizationName" in props)
|
|
15
|
+
organizationName = props.organizationName;
|
|
16
|
+
if ("domain" in props)
|
|
17
|
+
domain = props.domain;
|
|
18
|
+
if (!externalId)
|
|
12
19
|
throw new Error("externalId is required");
|
|
13
|
-
|
|
14
|
-
if (!name) {
|
|
20
|
+
if (!name)
|
|
15
21
|
throw new Error("name is required");
|
|
16
|
-
|
|
17
|
-
if (!organizationName) {
|
|
18
|
-
throw new Error("organizationName is required");
|
|
19
|
-
}
|
|
20
|
-
if (!secret) {
|
|
22
|
+
if (!secret)
|
|
21
23
|
throw new Error("secret is required");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
if (!host && !organizationName)
|
|
25
|
+
throw new Error("Must specify either `host` or `organizationName`");
|
|
26
|
+
if (host && (organizationName || domain))
|
|
27
|
+
throw new Error("`host` must be used exclusively and cannot be combined with `organizationName` or `domain` (domain is deprecated)");
|
|
28
|
+
if (domain)
|
|
29
|
+
console.warn("`domain` is deprecated and will be removed in a future v1.0.0 release. Use `host` to specify your vanity domain instead (eg `host: 'omni.my-company.com'`).");
|
|
30
|
+
if (nonce && nonce.length !== 32)
|
|
24
31
|
throw new Error("nonce must be 32 characters");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (userAttributes) {
|
|
28
|
-
throw new Error("userAttributes must be an object");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
32
|
+
if (typeof userAttributes !== "object" && userAttributes)
|
|
33
|
+
throw new Error("userAttributes must be an object");
|
|
31
34
|
};
|
|
32
35
|
const embedSsoContent = async (props) => {
|
|
33
36
|
validateProps(props);
|
|
34
|
-
let { accessBoost, connectionRoles: rawConnectionRoles, contentPath, customTheme: rawCustomTheme,
|
|
37
|
+
let { accessBoost, connectionRoles: rawConnectionRoles, contentPath, customTheme: rawCustomTheme, externalId, filterSearchParam, linkAccess, mode, name, nonce, port, secret, userAttributes: rawUserAttributes, entity, prefersDark, theme, } = props;
|
|
38
|
+
let host, domain, organizationName;
|
|
39
|
+
if ("host" in props)
|
|
40
|
+
host = props.host;
|
|
41
|
+
if ("organizationName" in props) {
|
|
42
|
+
domain = props.domain;
|
|
43
|
+
organizationName = props.organizationName;
|
|
44
|
+
}
|
|
35
45
|
// Handle defaults
|
|
36
46
|
nonce = nonce !== null && nonce !== void 0 ? nonce : (await (0, random_str_1.random32ByteString)());
|
|
37
|
-
domain = domain !== null && domain !== void 0 ? domain : defaultEmbedDomain;
|
|
38
47
|
const userAttributes = rawUserAttributes && JSON.stringify(rawUserAttributes);
|
|
39
48
|
const customTheme = rawCustomTheme && JSON.stringify(rawCustomTheme);
|
|
40
49
|
const connectionRoles = rawConnectionRoles && JSON.stringify(rawConnectionRoles);
|
|
41
50
|
// Generate the url for the embed login route
|
|
42
|
-
|
|
51
|
+
if (!host)
|
|
52
|
+
host = `${organizationName}.${domain !== null && domain !== void 0 ? domain : defaultEmbedDomain}`;
|
|
53
|
+
const url = new URL(embedLoginPath, `https://${host}${port ? `:${port}` : ""}`);
|
|
43
54
|
// Get a signature for the request
|
|
44
55
|
const signature = (0, signature_1.getSignature)({
|
|
45
56
|
loginUrl: url.toString(),
|
package/lib/cjs/types.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare enum EmbedSessionMode {
|
|
|
6
6
|
type EmbedSsoBaseProps = {
|
|
7
7
|
externalId: string;
|
|
8
8
|
name: string;
|
|
9
|
-
organizationName: string;
|
|
10
9
|
secret: string;
|
|
11
10
|
entity?: string;
|
|
12
11
|
userAttributes?: Record<string, UserAttributeValue>;
|
|
@@ -23,10 +22,37 @@ type EmbedSsoBaseProps = {
|
|
|
23
22
|
* only the content specified in the contentId will be embedded.
|
|
24
23
|
*/
|
|
25
24
|
mode?: EmbedSessionMode;
|
|
26
|
-
domain?: string;
|
|
27
25
|
nonce?: string;
|
|
28
26
|
port?: number;
|
|
29
|
-
}
|
|
27
|
+
} & ({
|
|
28
|
+
host?: never;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Introduced for internal testing only. For vanity domains, use the `host` prop instead.
|
|
31
|
+
*
|
|
32
|
+
* @throws Error if `host` is provided.
|
|
33
|
+
*/
|
|
34
|
+
domain?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Name of the organization the content belongs to. If provided, generates a default embed host
|
|
37
|
+
* URL in the form of `https://<organizationName>.embed-omniapp.co`.
|
|
38
|
+
*
|
|
39
|
+
* @throws Error if `host` is provided.
|
|
40
|
+
*/
|
|
41
|
+
organizationName: string;
|
|
42
|
+
} | {
|
|
43
|
+
domain?: never;
|
|
44
|
+
organizationName?: never;
|
|
45
|
+
/**
|
|
46
|
+
* Used to set the host of signed embed URL, required when using vanity domains.
|
|
47
|
+
* Protocol is not required, as https is assumed.
|
|
48
|
+
* Port is not accepted. If required, use the `port` prop.
|
|
49
|
+
*
|
|
50
|
+
* @throws Error if `domain` or `organizationName` are provided.
|
|
51
|
+
* @example "omni.example.com"
|
|
52
|
+
* @example "omni.another-example.app"
|
|
53
|
+
*/
|
|
54
|
+
host: string;
|
|
55
|
+
});
|
|
30
56
|
type EmbedSsoDashboardOnlyProps = {
|
|
31
57
|
accessBoost?: boolean;
|
|
32
58
|
filterSearchParam?: string;
|
package/lib/esm/embed.js
CHANGED
|
@@ -4,39 +4,50 @@ import { EmbeddedContent, } from "./types";
|
|
|
4
4
|
const defaultEmbedDomain = "embed-omniapp.co";
|
|
5
5
|
const embedLoginPath = "/embed/login";
|
|
6
6
|
const validateProps = (props) => {
|
|
7
|
-
const { externalId, name, nonce,
|
|
8
|
-
|
|
7
|
+
const { externalId, name, nonce, secret, userAttributes } = props;
|
|
8
|
+
let host, domain, organizationName;
|
|
9
|
+
if ("host" in props)
|
|
10
|
+
host = props.host;
|
|
11
|
+
if ("organizationName" in props)
|
|
12
|
+
organizationName = props.organizationName;
|
|
13
|
+
if ("domain" in props)
|
|
14
|
+
domain = props.domain;
|
|
15
|
+
if (!externalId)
|
|
9
16
|
throw new Error("externalId is required");
|
|
10
|
-
|
|
11
|
-
if (!name) {
|
|
17
|
+
if (!name)
|
|
12
18
|
throw new Error("name is required");
|
|
13
|
-
|
|
14
|
-
if (!organizationName) {
|
|
15
|
-
throw new Error("organizationName is required");
|
|
16
|
-
}
|
|
17
|
-
if (!secret) {
|
|
19
|
+
if (!secret)
|
|
18
20
|
throw new Error("secret is required");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
if (!host && !organizationName)
|
|
22
|
+
throw new Error("Must specify either `host` or `organizationName`");
|
|
23
|
+
if (host && (organizationName || domain))
|
|
24
|
+
throw new Error("`host` must be used exclusively and cannot be combined with `organizationName` or `domain` (domain is deprecated)");
|
|
25
|
+
if (domain)
|
|
26
|
+
console.warn("`domain` is deprecated and will be removed in a future v1.0.0 release. Use `host` to specify your vanity domain instead (eg `host: 'omni.my-company.com'`).");
|
|
27
|
+
if (nonce && nonce.length !== 32)
|
|
21
28
|
throw new Error("nonce must be 32 characters");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (userAttributes) {
|
|
25
|
-
throw new Error("userAttributes must be an object");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
29
|
+
if (typeof userAttributes !== "object" && userAttributes)
|
|
30
|
+
throw new Error("userAttributes must be an object");
|
|
28
31
|
};
|
|
29
32
|
const embedSsoContent = async (props) => {
|
|
30
33
|
validateProps(props);
|
|
31
|
-
let { accessBoost, connectionRoles: rawConnectionRoles, contentPath, customTheme: rawCustomTheme,
|
|
34
|
+
let { accessBoost, connectionRoles: rawConnectionRoles, contentPath, customTheme: rawCustomTheme, externalId, filterSearchParam, linkAccess, mode, name, nonce, port, secret, userAttributes: rawUserAttributes, entity, prefersDark, theme, } = props;
|
|
35
|
+
let host, domain, organizationName;
|
|
36
|
+
if ("host" in props)
|
|
37
|
+
host = props.host;
|
|
38
|
+
if ("organizationName" in props) {
|
|
39
|
+
domain = props.domain;
|
|
40
|
+
organizationName = props.organizationName;
|
|
41
|
+
}
|
|
32
42
|
// Handle defaults
|
|
33
43
|
nonce = nonce !== null && nonce !== void 0 ? nonce : (await random32ByteString());
|
|
34
|
-
domain = domain !== null && domain !== void 0 ? domain : defaultEmbedDomain;
|
|
35
44
|
const userAttributes = rawUserAttributes && JSON.stringify(rawUserAttributes);
|
|
36
45
|
const customTheme = rawCustomTheme && JSON.stringify(rawCustomTheme);
|
|
37
46
|
const connectionRoles = rawConnectionRoles && JSON.stringify(rawConnectionRoles);
|
|
38
47
|
// Generate the url for the embed login route
|
|
39
|
-
|
|
48
|
+
if (!host)
|
|
49
|
+
host = `${organizationName}.${domain !== null && domain !== void 0 ? domain : defaultEmbedDomain}`;
|
|
50
|
+
const url = new URL(embedLoginPath, `https://${host}${port ? `:${port}` : ""}`);
|
|
40
51
|
// Get a signature for the request
|
|
41
52
|
const signature = getSignature({
|
|
42
53
|
loginUrl: url.toString(),
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare enum EmbedSessionMode {
|
|
|
6
6
|
type EmbedSsoBaseProps = {
|
|
7
7
|
externalId: string;
|
|
8
8
|
name: string;
|
|
9
|
-
organizationName: string;
|
|
10
9
|
secret: string;
|
|
11
10
|
entity?: string;
|
|
12
11
|
userAttributes?: Record<string, UserAttributeValue>;
|
|
@@ -23,10 +22,37 @@ type EmbedSsoBaseProps = {
|
|
|
23
22
|
* only the content specified in the contentId will be embedded.
|
|
24
23
|
*/
|
|
25
24
|
mode?: EmbedSessionMode;
|
|
26
|
-
domain?: string;
|
|
27
25
|
nonce?: string;
|
|
28
26
|
port?: number;
|
|
29
|
-
}
|
|
27
|
+
} & ({
|
|
28
|
+
host?: never;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Introduced for internal testing only. For vanity domains, use the `host` prop instead.
|
|
31
|
+
*
|
|
32
|
+
* @throws Error if `host` is provided.
|
|
33
|
+
*/
|
|
34
|
+
domain?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Name of the organization the content belongs to. If provided, generates a default embed host
|
|
37
|
+
* URL in the form of `https://<organizationName>.embed-omniapp.co`.
|
|
38
|
+
*
|
|
39
|
+
* @throws Error if `host` is provided.
|
|
40
|
+
*/
|
|
41
|
+
organizationName: string;
|
|
42
|
+
} | {
|
|
43
|
+
domain?: never;
|
|
44
|
+
organizationName?: never;
|
|
45
|
+
/**
|
|
46
|
+
* Used to set the host of signed embed URL, required when using vanity domains.
|
|
47
|
+
* Protocol is not required, as https is assumed.
|
|
48
|
+
* Port is not accepted. If required, use the `port` prop.
|
|
49
|
+
*
|
|
50
|
+
* @throws Error if `domain` or `organizationName` are provided.
|
|
51
|
+
* @example "omni.example.com"
|
|
52
|
+
* @example "omni.another-example.app"
|
|
53
|
+
*/
|
|
54
|
+
host: string;
|
|
55
|
+
});
|
|
30
56
|
type EmbedSsoDashboardOnlyProps = {
|
|
31
57
|
accessBoost?: boolean;
|
|
32
58
|
filterSearchParam?: string;
|
package/package.json
CHANGED