@qlik/api 1.17.0 → 1.19.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/api-keys.d.ts +2 -2
- package/api-keys.js +2 -2
- package/apps.d.ts +4 -4
- package/apps.js +2 -2
- package/audits.d.ts +16 -16
- package/audits.js +2 -2
- package/{auth-types-BU5EGt_9.d.ts → auth-types-PkN9CAF_.d.ts} +3 -0
- package/auth.d.ts +2 -2
- package/auth.js +2 -2
- package/automations.d.ts +2 -2
- package/automations.js +2 -2
- package/brands.d.ts +2 -2
- package/brands.js +2 -2
- package/chunks/{HFUVFYT4.js → 63L3IUY2.js} +74 -25
- package/chunks/{RWQS4ASJ.js → 64RJJHEL.js} +1 -1
- package/chunks/{NJFCE5EM.js → AKBUFQRX.js} +1 -1
- package/chunks/{5W53XSXH.js → BOJLTXK6.js} +2 -2
- package/chunks/{S5OMX5JT.js → ILZFMC3L.js} +53 -4
- package/chunks/{AVML2WPM.js → J6G5ZOKI.js} +1 -1
- package/chunks/{JBH4H34J.js → KKAWWYOT.js} +1 -1
- package/chunks/{6MPNTVLD.js → P5AG7AME.js} +1 -1
- package/chunks/{NJRTJEAQ.js → VISO65GO.js} +3 -3
- package/collections.d.ts +18 -17
- package/collections.js +2 -2
- package/csp-origins.d.ts +2 -2
- package/csp-origins.js +2 -2
- package/data-assets.d.ts +2 -2
- package/data-assets.js +2 -2
- package/data-connections.d.ts +2 -2
- package/data-connections.js +2 -2
- package/data-credentials.d.ts +2 -2
- package/data-credentials.js +2 -2
- package/data-files.d.ts +2 -2
- package/data-files.js +2 -2
- package/extensions.d.ts +18 -18
- package/extensions.js +2 -2
- package/{global.types-BU2Yugjm.d.ts → global.types--37uwGji.d.ts} +1 -1
- package/glossaries.d.ts +2 -2
- package/glossaries.js +2 -2
- package/groups.d.ts +10 -10
- package/groups.js +2 -2
- package/identity-providers.d.ts +2 -2
- package/identity-providers.js +2 -2
- package/index.d.ts +2 -2
- package/index.js +4 -4
- package/items.d.ts +11 -11
- package/items.js +2 -2
- package/licenses.d.ts +2 -2
- package/licenses.js +2 -2
- package/package.json +2 -2
- package/qix.d.ts +7 -4
- package/qix.js +2 -2
- package/quotas.d.ts +2 -2
- package/quotas.js +2 -2
- package/reload-tasks.d.ts +2 -2
- package/reload-tasks.js +2 -2
- package/reloads.d.ts +2 -2
- package/reloads.js +2 -2
- package/reports.d.ts +2 -2
- package/reports.js +2 -2
- package/roles.d.ts +2 -2
- package/roles.js +2 -2
- package/spaces.d.ts +2 -2
- package/spaces.js +2 -2
- package/temp-contents.d.ts +2 -2
- package/temp-contents.js +2 -2
- package/tenants.d.ts +2 -2
- package/tenants.js +2 -2
- package/themes.d.ts +18 -18
- package/themes.js +2 -2
- package/transports.d.ts +2 -2
- package/transports.js +2 -2
- package/users.d.ts +2 -2
- package/users.js +2 -2
- package/web-integrations.d.ts +2 -2
- package/web-integrations.js +2 -2
- package/web-notifications.d.ts +2 -2
- package/web-notifications.js +2 -2
- package/webhooks.d.ts +2 -2
- package/webhooks.js +2 -2
package/api-keys.d.ts
CHANGED
package/api-keys.js
CHANGED
package/apps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiCallOptions, D as DownloadableBlob } from './global.types
|
|
2
|
-
import './auth-types-
|
|
1
|
+
import { A as ApiCallOptions, D as DownloadableBlob } from './global.types--37uwGji.js';
|
|
2
|
+
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
type Analysis = "breakdown" | "changePoint" | "comparison" | "contribution" | "correlation" | "fact" | "mutualInfo" | "rank" | "spike" | "trend" | "values";
|
|
5
5
|
type AnalysisComposition = {
|
|
@@ -696,7 +696,7 @@ type NxAttributes = {
|
|
|
696
696
|
/** The Origin App ID for published apps. */
|
|
697
697
|
originAppId?: string;
|
|
698
698
|
/** @deprecated
|
|
699
|
-
* Deprecated. Use
|
|
699
|
+
* Deprecated. Use the Users API to fetch user metadata. */
|
|
700
700
|
owner?: string;
|
|
701
701
|
/** Identifier of the app owner. */
|
|
702
702
|
ownerId?: string;
|
|
@@ -985,7 +985,7 @@ type UpdateOwner = {
|
|
|
985
985
|
type UpdateSpace = {
|
|
986
986
|
spaceId?: string;
|
|
987
987
|
};
|
|
988
|
-
type UsageEnum = "ANALYTICS" | "DATA_PREPARATION" | "DATAFLOW_PREP";
|
|
988
|
+
type UsageEnum = "ANALYTICS" | "DATA_PREPARATION" | "DATAFLOW_PREP" | "SINGLE_TABLE_PREP";
|
|
989
989
|
type UserPrivileges = "can_create_app" | "can_import_app" | "can_create_session_app";
|
|
990
990
|
type Classification = {
|
|
991
991
|
absoluteDiff?: number;
|
package/apps.js
CHANGED
package/audits.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './global.types
|
|
2
|
-
import './auth-types-
|
|
1
|
+
import { A as ApiCallOptions } from './global.types--37uwGji.js';
|
|
2
|
+
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
type ErrorResponse = {
|
|
5
5
|
errors?: {
|
|
@@ -101,7 +101,7 @@ type ListLinks = {
|
|
|
101
101
|
self?: Href;
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Retrieves list of events for subscribed services for your tenant. Stores events for 90 days, after which they can be accessed via `/v1/audits/archive`.
|
|
105
105
|
*
|
|
106
106
|
* @param query an object with query parameters
|
|
107
107
|
* @throws GetAuditsHttpError
|
|
@@ -109,7 +109,7 @@ type ListLinks = {
|
|
|
109
109
|
declare const getAudits: (query: {
|
|
110
110
|
/** The start/end time interval formatted in ISO 8601 to search by eventTime. For example, "?eventTime=2021-07-14T18:41:15.00Z/2021-07-14T18:41:15.99Z". */
|
|
111
111
|
eventTime?: string;
|
|
112
|
-
/** The case-sensitive string used to search by eventType. */
|
|
112
|
+
/** The case-sensitive string used to search by eventType. Retrieve a list of possible eventTypes with `/v1/audits/types`. */
|
|
113
113
|
eventType?: string;
|
|
114
114
|
/** The comma separated list of audit unique identifiers. */
|
|
115
115
|
id?: string;
|
|
@@ -121,7 +121,7 @@ declare const getAudits: (query: {
|
|
|
121
121
|
prev?: string;
|
|
122
122
|
/** The property of a resource to sort on (default sort is -eventTime). The supported properties are source, eventType, and eventTime. A property must be prefixed by + or - to indicate ascending or descending sort order respectively. */
|
|
123
123
|
sort?: string;
|
|
124
|
-
/** The case-sensitive string used to search by source. */
|
|
124
|
+
/** The case-sensitive string used to search by source. Retrieve a list of possible sources with `/v1/audits/sources`. */
|
|
125
125
|
source?: string;
|
|
126
126
|
/** The case-sensitive string used to search by userId. */
|
|
127
127
|
userId?: string;
|
|
@@ -139,7 +139,7 @@ type GetAuditsHttpError = {
|
|
|
139
139
|
status: number;
|
|
140
140
|
};
|
|
141
141
|
/**
|
|
142
|
-
* Finds and returns audit events from the archive, formatted as a JSON array, for the given date and tenant (in JWT).
|
|
142
|
+
* Retrieves audit events from long term storage. Finds and returns audit events from the archive, formatted as a JSON array, for the given date and tenant (in JWT). Archived events are not removed.
|
|
143
143
|
*
|
|
144
144
|
* @param query an object with query parameters
|
|
145
145
|
* @throws GetArchivedAuditsHttpError
|
|
@@ -159,7 +159,7 @@ type GetArchivedAuditsHttpError = {
|
|
|
159
159
|
status: number;
|
|
160
160
|
};
|
|
161
161
|
/**
|
|
162
|
-
* It includes options that represent the server configuration state and parameters that were used to run the server with certain functionality.
|
|
162
|
+
* Returns the server configuration options. It includes options that represent the server configuration state and parameters that were used to run the server with certain functionality.
|
|
163
163
|
*
|
|
164
164
|
* @throws GetAuditsSettingsHttpError
|
|
165
165
|
*/
|
|
@@ -175,7 +175,7 @@ type GetAuditsSettingsHttpError = {
|
|
|
175
175
|
status: number;
|
|
176
176
|
};
|
|
177
177
|
/**
|
|
178
|
-
* Finds and returns the
|
|
178
|
+
* Finds and returns the list of possible event sources for this tenant.
|
|
179
179
|
*
|
|
180
180
|
* @throws GetAuditSourcesHttpError
|
|
181
181
|
*/
|
|
@@ -193,7 +193,7 @@ type GetAuditSourcesHttpError = {
|
|
|
193
193
|
status: number;
|
|
194
194
|
};
|
|
195
195
|
/**
|
|
196
|
-
* Finds and returns the
|
|
196
|
+
* Finds and returns the list of possible event types for this tenant.
|
|
197
197
|
*
|
|
198
198
|
* @throws GetAuditTypesHttpError
|
|
199
199
|
*/
|
|
@@ -211,7 +211,7 @@ type GetAuditTypesHttpError = {
|
|
|
211
211
|
status: number;
|
|
212
212
|
};
|
|
213
213
|
/**
|
|
214
|
-
* Finds and returns
|
|
214
|
+
* Finds and returns a specific audit events for the given event ID.
|
|
215
215
|
*
|
|
216
216
|
* @param id The audit item's unique identifier.
|
|
217
217
|
* @throws GetAuditHttpError
|
|
@@ -233,39 +233,39 @@ type GetAuditHttpError = {
|
|
|
233
233
|
declare function clearCache(): void;
|
|
234
234
|
interface AuditsAPI {
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
236
|
+
* Retrieves list of events for subscribed services for your tenant. Stores events for 90 days, after which they can be accessed via `/v1/audits/archive`.
|
|
237
237
|
*
|
|
238
238
|
* @param query an object with query parameters
|
|
239
239
|
* @throws GetAuditsHttpError
|
|
240
240
|
*/
|
|
241
241
|
getAudits: typeof getAudits;
|
|
242
242
|
/**
|
|
243
|
-
* Finds and returns audit events from the archive, formatted as a JSON array, for the given date and tenant (in JWT).
|
|
243
|
+
* Retrieves audit events from long term storage. Finds and returns audit events from the archive, formatted as a JSON array, for the given date and tenant (in JWT). Archived events are not removed.
|
|
244
244
|
*
|
|
245
245
|
* @param query an object with query parameters
|
|
246
246
|
* @throws GetArchivedAuditsHttpError
|
|
247
247
|
*/
|
|
248
248
|
getArchivedAudits: typeof getArchivedAudits;
|
|
249
249
|
/**
|
|
250
|
-
* It includes options that represent the server configuration state and parameters that were used to run the server with certain functionality.
|
|
250
|
+
* Returns the server configuration options. It includes options that represent the server configuration state and parameters that were used to run the server with certain functionality.
|
|
251
251
|
*
|
|
252
252
|
* @throws GetAuditsSettingsHttpError
|
|
253
253
|
*/
|
|
254
254
|
getAuditsSettings: typeof getAuditsSettings;
|
|
255
255
|
/**
|
|
256
|
-
* Finds and returns the
|
|
256
|
+
* Finds and returns the list of possible event sources for this tenant.
|
|
257
257
|
*
|
|
258
258
|
* @throws GetAuditSourcesHttpError
|
|
259
259
|
*/
|
|
260
260
|
getAuditSources: typeof getAuditSources;
|
|
261
261
|
/**
|
|
262
|
-
* Finds and returns the
|
|
262
|
+
* Finds and returns the list of possible event types for this tenant.
|
|
263
263
|
*
|
|
264
264
|
* @throws GetAuditTypesHttpError
|
|
265
265
|
*/
|
|
266
266
|
getAuditTypes: typeof getAuditTypes;
|
|
267
267
|
/**
|
|
268
|
-
* Finds and returns
|
|
268
|
+
* Finds and returns a specific audit events for the given event ID.
|
|
269
269
|
*
|
|
270
270
|
* @param id The audit item's unique identifier.
|
|
271
271
|
* @throws GetAuditHttpError
|
package/audits.js
CHANGED
|
@@ -98,6 +98,9 @@ type HostConfigCommon = {
|
|
|
98
98
|
* Optional parameter that can be used to point to a Qlik Cloud tenant domain from which the embed runtime should be loaded. If omitted the host parameter will be used.
|
|
99
99
|
*/
|
|
100
100
|
embedRuntimeUrl?: string;
|
|
101
|
+
onAuthFailed?: (props: {
|
|
102
|
+
message: string;
|
|
103
|
+
}) => unknown;
|
|
101
104
|
};
|
|
102
105
|
|
|
103
106
|
export type { AuthType as A, Credentials as C, GetRestCallAuthParamsProps as G, HostConfig as H, RestCallAuthParams as R, WebSocketAuthParams as W, AuthModule as a, GetWebSocketAuthParamsProps as b, GetWebResourceAuthParamsProps as c, WebResourceAuthParams as d, GetRemoteAuthDataProps as e, HandleAuthenticationErrorProps as f, AuthenticationErrorAction as g };
|
package/auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AuthType, a as AuthModule, H as HostConfig } from './auth-types-
|
|
2
|
-
export { g as AuthenticationErrorAction, C as Credentials, e as GetRemoteAuthDataProps, G as GetRestCallAuthParamsProps, c as GetWebResourceAuthParamsProps, b as GetWebSocketAuthParamsProps, f as HandleAuthenticationErrorProps, R as RestCallAuthParams, d as WebResourceAuthParams, W as WebSocketAuthParams } from './auth-types-
|
|
1
|
+
import { A as AuthType, a as AuthModule, H as HostConfig } from './auth-types-PkN9CAF_.js';
|
|
2
|
+
export { g as AuthenticationErrorAction, C as Credentials, e as GetRemoteAuthDataProps, G as GetRestCallAuthParamsProps, c as GetWebResourceAuthParamsProps, b as GetWebSocketAuthParamsProps, f as HandleAuthenticationErrorProps, R as RestCallAuthParams, d as WebResourceAuthParams, W as WebSocketAuthParams } from './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Registers an auth module that can handle authentication. An auth module is used by specifying its name as authType in the HostConfig passed in to api calls.
|
package/auth.js
CHANGED
package/automations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './global.types
|
|
2
|
-
import './auth-types-
|
|
1
|
+
import { A as ApiCallOptions } from './global.types--37uwGji.js';
|
|
2
|
+
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
type AutomationDetailRequestObject = {
|
|
5
5
|
description?: string;
|
package/automations.js
CHANGED
package/brands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiCallOptions, D as DownloadableBlob } from './global.types
|
|
2
|
-
import './auth-types-
|
|
1
|
+
import { A as ApiCallOptions, D as DownloadableBlob } from './global.types--37uwGji.js';
|
|
2
|
+
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A brand is a collection of assets for applying custom branding. Only a single brand can be active in a tenant.
|
package/brands.js
CHANGED
|
@@ -188,23 +188,33 @@ var InvalidAuthTypeError = class extends Error {
|
|
|
188
188
|
this.name = "InvalidAuthTypeError";
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
+
function errorToString({ title, detail, code, status }) {
|
|
192
|
+
if (detail) {
|
|
193
|
+
return `${title} - ${detail} (Status: ${status}, Code: ${code})`;
|
|
194
|
+
}
|
|
195
|
+
return `${title} (Status: ${status}, Code: ${code})`;
|
|
196
|
+
}
|
|
191
197
|
var AuthorizationError = class extends Error {
|
|
198
|
+
errors;
|
|
192
199
|
constructor(errors) {
|
|
200
|
+
if (typeof errors !== "object") {
|
|
201
|
+
super("Unknown error");
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
193
204
|
const errorArray = Array.isArray(errors) ? errors : [errors];
|
|
194
|
-
super(
|
|
195
|
-
|
|
196
|
-
(error) => `
|
|
197
|
-
Code: ${error.code}
|
|
198
|
-
Status: ${error.status}
|
|
199
|
-
${error.title}:
|
|
200
|
-
${error.detail}
|
|
201
|
-
`
|
|
202
|
-
).join(",\n")
|
|
203
|
-
);
|
|
205
|
+
super(errorArray.map(errorToString).join(", "));
|
|
206
|
+
this.errors = errorArray;
|
|
204
207
|
}
|
|
205
208
|
};
|
|
206
209
|
|
|
207
210
|
// src/auth/auth-functions.ts
|
|
211
|
+
var lastErrorMessage = "";
|
|
212
|
+
function logToConsole({ message }) {
|
|
213
|
+
if (message !== lastErrorMessage) {
|
|
214
|
+
lastErrorMessage = message;
|
|
215
|
+
console.error(message);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
208
218
|
function isHostCrossOrigin(hostConfig) {
|
|
209
219
|
if (!globalThis.location?.origin) {
|
|
210
220
|
return true;
|
|
@@ -265,31 +275,57 @@ function toValidWebsocketLocationUrl(hostConfig) {
|
|
|
265
275
|
}
|
|
266
276
|
async function getWebSocketAuthParams(props) {
|
|
267
277
|
const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
278
|
+
try {
|
|
279
|
+
const authModule = await getAuthModule(hostConfigToUse);
|
|
280
|
+
return await authModule.getWebSocketAuthParams({
|
|
281
|
+
...props,
|
|
282
|
+
hostConfig: hostConfigToUse
|
|
283
|
+
});
|
|
284
|
+
} catch (err) {
|
|
285
|
+
(hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
|
|
286
|
+
throw err;
|
|
287
|
+
}
|
|
272
288
|
}
|
|
273
289
|
async function getWebResourceAuthParams(props) {
|
|
274
290
|
const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
291
|
+
try {
|
|
292
|
+
const authModule = await getAuthModule(hostConfigToUse);
|
|
293
|
+
return await authModule.getWebResourceAuthParams?.({
|
|
294
|
+
...props,
|
|
295
|
+
hostConfig: hostConfigToUse
|
|
296
|
+
}) || { queryParams: {} };
|
|
297
|
+
} catch (err) {
|
|
298
|
+
(hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
|
|
299
|
+
throw err;
|
|
300
|
+
}
|
|
279
301
|
}
|
|
280
302
|
async function handleAuthenticationError(props) {
|
|
281
303
|
const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
|
|
282
|
-
|
|
304
|
+
const authModule = await getAuthModule(hostConfigToUse);
|
|
305
|
+
const result2 = await authModule.handleAuthenticationError({
|
|
283
306
|
...props,
|
|
284
307
|
hostConfig: hostConfigToUse
|
|
285
308
|
});
|
|
309
|
+
const willRetry = props.canRetry && result2.retry;
|
|
310
|
+
const willHangUntilANewPageIsLoaded = result2.preventDefault;
|
|
311
|
+
if (!willRetry && !willHangUntilANewPageIsLoaded) {
|
|
312
|
+
const { status, errorBody } = props;
|
|
313
|
+
(hostConfigToUse.onAuthFailed || logToConsole)(normalizeInbandAuthError({ status, errorBody }));
|
|
314
|
+
}
|
|
315
|
+
return result2;
|
|
286
316
|
}
|
|
287
317
|
async function getRestCallAuthParams(props) {
|
|
288
318
|
const hostConfigToUse = withDefaultHostConfig(props.hostConfig);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
319
|
+
try {
|
|
320
|
+
const authModule = await getAuthModule(hostConfigToUse);
|
|
321
|
+
return await authModule.getRestCallAuthParams({
|
|
322
|
+
...props,
|
|
323
|
+
hostConfig: hostConfigToUse
|
|
324
|
+
});
|
|
325
|
+
} catch (err) {
|
|
326
|
+
(hostConfigToUse.onAuthFailed || logToConsole)(normalizeAuthModuleError(err));
|
|
327
|
+
throw err;
|
|
328
|
+
}
|
|
293
329
|
}
|
|
294
330
|
async function getAccessToken(props) {
|
|
295
331
|
const res = await getRestCallAuthParams({ method: "GET", ...props });
|
|
@@ -321,6 +357,17 @@ var logout = () => {
|
|
|
321
357
|
globalThis.location.href = "/logout";
|
|
322
358
|
};
|
|
323
359
|
var leadingHttp = /^http/;
|
|
360
|
+
function normalizeInbandAuthError({ errorBody, status }) {
|
|
361
|
+
const authError = errorBody;
|
|
362
|
+
if (typeof authError?.errors === "object") {
|
|
363
|
+
const err = new AuthorizationError(authError?.errors);
|
|
364
|
+
return { message: err.message };
|
|
365
|
+
}
|
|
366
|
+
return { message: `HTTP ${status}` };
|
|
367
|
+
}
|
|
368
|
+
function normalizeAuthModuleError(err) {
|
|
369
|
+
return { message: err.message || "Unknown error" };
|
|
370
|
+
}
|
|
324
371
|
|
|
325
372
|
// src/random/random.ts
|
|
326
373
|
import { customAlphabet, nanoid } from "nanoid";
|
|
@@ -359,6 +406,7 @@ function internalValidateHostConfig(hostConfig, options) {
|
|
|
359
406
|
"authRedirectUserConfirmation",
|
|
360
407
|
"embedRuntimeUrl",
|
|
361
408
|
"host",
|
|
409
|
+
"onAuthFailed",
|
|
362
410
|
...options.requiredProps,
|
|
363
411
|
...options.optionalProps
|
|
364
412
|
];
|
|
@@ -652,7 +700,7 @@ async function getOauthTokensWithRefreshToken(baseUrl, refreshToken, clientSecre
|
|
|
652
700
|
};
|
|
653
701
|
}
|
|
654
702
|
async function getAnonymousOauthAccessToken(baseUrl, accessCode, clientId, trackingCode) {
|
|
655
|
-
const result2 = await fetch(`${baseUrl}/oauth/token`, {
|
|
703
|
+
const result2 = await fetch(`${baseUrl}/oauth/token/anonymous-embed`, {
|
|
656
704
|
method: "POST",
|
|
657
705
|
mode: "cors",
|
|
658
706
|
headers: { "content-type": "application/json" },
|
|
@@ -1638,7 +1686,8 @@ function invokeFetchWithUrl(api, props, interceptors) {
|
|
|
1638
1686
|
const { cacheKey, authHeaders, credentials } = await getInvokeFetchUrlParams(props);
|
|
1639
1687
|
return invokeFetchWithUrlAndRetry(
|
|
1640
1688
|
api,
|
|
1641
|
-
{ ...props, cacheKey, authHeaders, credentials },
|
|
1689
|
+
{ ...props, cacheKey, authHeaders, credentials, options: { ...props.options, noCache: true } },
|
|
1690
|
+
// don't cache the retry
|
|
1642
1691
|
void 0,
|
|
1643
1692
|
// only retry once
|
|
1644
1693
|
interceptors
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInvokeFetchRuntimeModule
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./VISO65GO.js";
|
|
4
4
|
import {
|
|
5
5
|
isBrowser
|
|
6
6
|
} from "./2ZQ3ZX7F.js";
|
|
7
7
|
|
|
8
8
|
// src/public/invoke-fetch.ts
|
|
9
|
-
var defaultUserAgent = "qlik-api/1.
|
|
9
|
+
var defaultUserAgent = "qlik-api/1.19.0";
|
|
10
10
|
async function invokeFetch(api, props) {
|
|
11
11
|
const hostConfig = props.options?.hostConfig;
|
|
12
12
|
let userAgent;
|
|
@@ -4,11 +4,55 @@ import {
|
|
|
4
4
|
invokeFetch,
|
|
5
5
|
isWindows,
|
|
6
6
|
toValidWebsocketLocationUrl
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./63L3IUY2.js";
|
|
8
8
|
import {
|
|
9
9
|
isBrowser
|
|
10
10
|
} from "./2ZQ3ZX7F.js";
|
|
11
11
|
|
|
12
|
+
// src/qix/session/websocket-errors.ts
|
|
13
|
+
var closeCodeEngineTerminating = 4003;
|
|
14
|
+
var closeCodeEngineAbnormalClosure = 1006;
|
|
15
|
+
var closeCodeEngineProxyGeneric = 4200;
|
|
16
|
+
var closeCodeClientTimeout = 4201;
|
|
17
|
+
var closeCodeBadRequest = 4202;
|
|
18
|
+
var closeCodePermissions = 4203;
|
|
19
|
+
var closeCodeNotFound = 4204;
|
|
20
|
+
var closeCodeTooManyRequests = 4205;
|
|
21
|
+
var closeCodeNetwork = 4206;
|
|
22
|
+
var closeCodeDependencyGeneric = 4210;
|
|
23
|
+
var closeCodeDependencyUnavailable = 4211;
|
|
24
|
+
var closeCodeEngineGeneric = 4220;
|
|
25
|
+
var closeCodeEntitlement = 4230;
|
|
26
|
+
var closeCodeNoEnginesAvailable = 4240;
|
|
27
|
+
var CloseCodeSessionReservationMissing = 4222;
|
|
28
|
+
var closeCodeMessages = {
|
|
29
|
+
[closeCodeEngineTerminating]: "The engine is in terminating state",
|
|
30
|
+
[closeCodeEngineAbnormalClosure]: "The engine is abnormally closed",
|
|
31
|
+
[closeCodeEngineProxyGeneric]: "A problem occurred in engine-proxy",
|
|
32
|
+
[closeCodeClientTimeout]: "The client has closed the connection",
|
|
33
|
+
[closeCodeBadRequest]: "The provided request is invalid and/or malformed",
|
|
34
|
+
[closeCodePermissions]: "No permission to open the app",
|
|
35
|
+
[closeCodeNotFound]: "App not found",
|
|
36
|
+
[closeCodeTooManyRequests]: "Too many requests have been sent in a given amount of time",
|
|
37
|
+
[closeCodeNetwork]: "Networking issues",
|
|
38
|
+
[closeCodeDependencyGeneric]: "A problem occurred in a dependency of engine-proxy",
|
|
39
|
+
[closeCodeDependencyUnavailable]: "A dependency is unavailable and not serving any requests",
|
|
40
|
+
[closeCodeEngineGeneric]: "A problem occurred in an engine",
|
|
41
|
+
[closeCodeEntitlement]: "You are not entitled to perform that operation",
|
|
42
|
+
[closeCodeNoEnginesAvailable]: "There are currently no engines available",
|
|
43
|
+
[CloseCodeSessionReservationMissing]: "The reserved session is missing"
|
|
44
|
+
};
|
|
45
|
+
var uknownCloseErrorMessage = "websocket closed for unknown reason";
|
|
46
|
+
function getHumanReadableSocketClosedErrorMessage(err, { appId, hostConfig }) {
|
|
47
|
+
const closeCode = err?.original?.code;
|
|
48
|
+
const closeMessage = closeCode ? closeCodeMessages[closeCode] || uknownCloseErrorMessage : err.message;
|
|
49
|
+
if (hostConfig?.host) {
|
|
50
|
+
return `Failed to open app ${appId} on ${hostConfig?.host}: ${closeMessage}`;
|
|
51
|
+
} else {
|
|
52
|
+
return `Failed to open app ${appId}: ${closeMessage}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
12
56
|
// src/qix/session/shared-sessions.ts
|
|
13
57
|
var globalEventListeners = /* @__PURE__ */ new Set();
|
|
14
58
|
function globalOnWebSocketEvent(listener) {
|
|
@@ -101,7 +145,7 @@ function listenForWindowsAuthenticationInformation(session) {
|
|
|
101
145
|
return authSuggestedInWebsocket;
|
|
102
146
|
}
|
|
103
147
|
async function createAndSetupEnigmaSession(props, canRetry) {
|
|
104
|
-
const { createEnigmaSession } = await import("./
|
|
148
|
+
const { createEnigmaSession } = await import("./P5AG7AME.js");
|
|
105
149
|
const session = await createEnigmaSession(props);
|
|
106
150
|
setupSessionListeners(session, props);
|
|
107
151
|
let global;
|
|
@@ -327,7 +371,8 @@ function createSharedSession(props) {
|
|
|
327
371
|
const clients = [];
|
|
328
372
|
function closeEnigmaSession() {
|
|
329
373
|
delete sharedSessions[key];
|
|
330
|
-
return sharedSession.sessionPromise.then((session) => session.close())
|
|
374
|
+
return sharedSession.sessionPromise.then((session) => session.close()).catch(() => {
|
|
375
|
+
});
|
|
331
376
|
}
|
|
332
377
|
const sharedSession = {
|
|
333
378
|
sessionPromise,
|
|
@@ -380,7 +425,11 @@ function createSharedSession(props) {
|
|
|
380
425
|
});
|
|
381
426
|
sharedSession.docPromise = sharedSession.docPromise.catch((err) => {
|
|
382
427
|
closeEnigmaSession();
|
|
383
|
-
|
|
428
|
+
const errorWithReadableMessage = new Error(getHumanReadableSocketClosedErrorMessage(err, props));
|
|
429
|
+
Object.entries(err).forEach(([key2, value]) => {
|
|
430
|
+
errorWithReadableMessage[key2] = value;
|
|
431
|
+
});
|
|
432
|
+
return Promise.reject(errorWithReadableMessage);
|
|
384
433
|
});
|
|
385
434
|
return sharedSession;
|
|
386
435
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// src/public/public-runtime-modules.ts
|
|
2
2
|
function getAuthRuntimeModule(hostConfig) {
|
|
3
3
|
const isNode = !!globalThis.process?.argv;
|
|
4
|
-
return isNode ? import("./
|
|
4
|
+
return isNode ? import("./64RJJHEL.js") : import("./GLS4DAZ4.js").then(
|
|
5
5
|
(mod) => mod.importRuntimeModule("auth@v1", hostConfig)
|
|
6
6
|
);
|
|
7
7
|
}
|
|
8
8
|
async function getQixRuntimeModule(hostConfig) {
|
|
9
9
|
await getAuthRuntimeModule(hostConfig);
|
|
10
10
|
const isNode = !!globalThis.process?.argv;
|
|
11
|
-
return isNode ? import("./
|
|
11
|
+
return isNode ? import("./ILZFMC3L.js") : import("./GLS4DAZ4.js").then(
|
|
12
12
|
(mod) => mod.importRuntimeModule("qix@v1", hostConfig)
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
async function getInvokeFetchRuntimeModule(hostConfig) {
|
|
16
16
|
await getAuthRuntimeModule(hostConfig);
|
|
17
17
|
const isNode = !!globalThis.process?.argv;
|
|
18
|
-
return isNode ? import("./
|
|
18
|
+
return isNode ? import("./AKBUFQRX.js") : import("./GLS4DAZ4.js").then(
|
|
19
19
|
(mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig)
|
|
20
20
|
);
|
|
21
21
|
}
|