@qlik/api 1.25.0 → 1.27.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 +12 -12
- package/api-keys.js +2 -2
- package/apps.d.ts +69 -69
- package/apps.js +2 -2
- package/audits.d.ts +37 -15
- package/audits.js +2 -2
- package/auth.js +2 -2
- package/automations.d.ts +37 -37
- package/automations.js +2 -2
- package/brands.d.ts +24 -24
- package/brands.js +2 -2
- package/chunks/{3DYV7KOJ.js → 2BRBIRM2.js} +2 -2
- package/chunks/{7BDAXGID.js → 3RGGGGAR.js} +6 -9
- package/chunks/{6DEESTGF.js → 4D5NADHK.js} +4 -4
- package/chunks/{VX3MQBE7.js → 4K3CNR7C.js} +1 -1
- package/chunks/{OIQ5ELGS.js → 55SZVSAG.js} +1 -1
- package/chunks/{BL5PJM4B.js → EOGHK2R4.js} +1 -1
- package/chunks/{N3ZFICDU.js → MGXEGSJC.js} +3 -3
- package/chunks/{I5UOE4ZZ.js → NBW6PHZU.js} +120 -44
- package/chunks/{6QRR5VUM.js → QOOCP2TS.js} +4 -3
- package/chunks/{CZC7KEJN.js → V3TZ54UE.js} +3 -3
- package/chunks/{UA6BE3VB.js → WY7IOA3Q.js} +2 -2
- package/collections.d.ts +23 -23
- package/collections.js +2 -2
- package/csp-origins.d.ts +25 -25
- package/csp-origins.js +2 -2
- package/data-assets.d.ts +12 -12
- package/data-assets.js +2 -2
- package/data-connections.d.ts +19 -19
- package/data-connections.js +2 -2
- package/data-credentials.d.ts +11 -11
- package/data-credentials.js +2 -2
- package/data-files.d.ts +25 -25
- package/data-files.js +2 -2
- package/docs/authentication.md +1 -1
- package/docs/qix.md +28 -8
- package/extensions.d.ts +12 -12
- package/extensions.js +2 -2
- package/glossaries.d.ts +49 -49
- package/glossaries.js +2 -2
- package/groups.d.ts +17 -17
- package/groups.js +2 -2
- package/identity-providers.d.ts +43 -18
- package/identity-providers.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +5 -5
- package/interceptors.d.ts +1 -1
- package/interceptors.js +1 -1
- package/{invoke-fetch-types-BLrpeZOL.d.ts → invoke-fetch-types-BXn-uSF5.d.ts} +27 -1
- package/items.d.ts +17 -17
- package/items.js +2 -2
- package/licenses.d.ts +19 -19
- package/licenses.js +2 -2
- package/package.json +3 -3
- package/qix.d.ts +2 -2
- package/qix.js +2 -2
- package/quotas.d.ts +5 -5
- package/quotas.js +2 -2
- package/reload-tasks.d.ts +11 -11
- package/reload-tasks.js +2 -2
- package/reloads.d.ts +9 -9
- package/reloads.js +2 -2
- package/reports.d.ts +13 -11
- package/reports.js +2 -2
- package/roles.d.ts +12 -12
- package/roles.js +2 -2
- package/spaces.d.ts +60 -26
- package/spaces.js +2 -2
- package/temp-contents.d.ts +7 -7
- package/temp-contents.js +2 -2
- package/tenants.d.ts +10 -10
- package/tenants.js +2 -2
- package/themes.d.ts +12 -12
- package/themes.js +2 -2
- package/transports.d.ts +18 -18
- package/transports.js +2 -2
- package/users.d.ts +20 -20
- package/users.js +2 -2
- package/web-integrations.d.ts +10 -10
- package/web-integrations.js +2 -2
- package/web-notifications.d.ts +13 -13
- package/web-notifications.js +2 -2
- package/webhooks.d.ts +21 -21
- package/webhooks.js +2 -2
|
@@ -51,15 +51,12 @@ function addDefaultInterceptors() {
|
|
|
51
51
|
return {};
|
|
52
52
|
}
|
|
53
53
|
const features = featuresParam.split(",").map((item) => item.trim());
|
|
54
|
-
const urlFeatures = features.reduce(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
{}
|
|
62
|
-
);
|
|
54
|
+
const urlFeatures = features.reduce((map, obj) => {
|
|
55
|
+
const value = !obj.startsWith("!");
|
|
56
|
+
const key = value ? obj : obj.substring(1);
|
|
57
|
+
map[key] = value;
|
|
58
|
+
return map;
|
|
59
|
+
}, {});
|
|
63
60
|
return urlFeatures;
|
|
64
61
|
};
|
|
65
62
|
const readFlagsFromLocalStorage = () => {
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
UnexpectedAuthTypeError,
|
|
6
6
|
auth_default,
|
|
7
7
|
checkForCrossDomainRequest,
|
|
8
|
+
determineAuthType,
|
|
8
9
|
getAccessToken,
|
|
9
10
|
getRestCallAuthParams,
|
|
10
11
|
getWebResourceAuthParams,
|
|
@@ -16,11 +17,10 @@ import {
|
|
|
16
17
|
registerAuthModule,
|
|
17
18
|
serializeHostConfig,
|
|
18
19
|
setDefaultHostConfig,
|
|
19
|
-
toValidEnigmaLocationUrl,
|
|
20
20
|
toValidLocationUrl,
|
|
21
21
|
toValidWebsocketLocationUrl
|
|
22
|
-
} from "./
|
|
23
|
-
import "./
|
|
22
|
+
} from "./NBW6PHZU.js";
|
|
23
|
+
import "./3RGGGGAR.js";
|
|
24
24
|
import "./2ZQ3ZX7F.js";
|
|
25
25
|
export {
|
|
26
26
|
AuthorizationError,
|
|
@@ -29,6 +29,7 @@ export {
|
|
|
29
29
|
UnexpectedAuthTypeError,
|
|
30
30
|
checkForCrossDomainRequest,
|
|
31
31
|
auth_default as default,
|
|
32
|
+
determineAuthType,
|
|
32
33
|
getAccessToken,
|
|
33
34
|
getRestCallAuthParams,
|
|
34
35
|
getWebResourceAuthParams,
|
|
@@ -40,7 +41,6 @@ export {
|
|
|
40
41
|
registerAuthModule,
|
|
41
42
|
serializeHostConfig,
|
|
42
43
|
setDefaultHostConfig,
|
|
43
|
-
toValidEnigmaLocationUrl,
|
|
44
44
|
toValidLocationUrl,
|
|
45
45
|
toValidWebsocketLocationUrl
|
|
46
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@qlik+runtime-module-loader@1.0.
|
|
1
|
+
// node_modules/.pnpm/@qlik+runtime-module-loader@1.0.16/node_modules/@qlik/runtime-module-loader/dist/index.js
|
|
2
2
|
window.__qlikMainPrivateResolvers = window.__qlikMainPrivateResolvers || {};
|
|
3
3
|
window.__qlikMainPrivateResolvers.mainUrlPromise = window.__qlikMainPrivateResolvers.mainUrlPromise || new Promise((resolve) => {
|
|
4
4
|
window.__qlikMainPrivateResolvers.resolveMainJsUrl = (value) => resolve(value);
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
invokeFetch,
|
|
5
5
|
isWindows,
|
|
6
6
|
toValidWebsocketLocationUrl
|
|
7
|
-
} from "./
|
|
8
|
-
import "./
|
|
7
|
+
} from "./NBW6PHZU.js";
|
|
8
|
+
import "./3RGGGGAR.js";
|
|
9
9
|
import {
|
|
10
10
|
isBrowser
|
|
11
11
|
} from "./2ZQ3ZX7F.js";
|
|
@@ -161,7 +161,7 @@ function listenForWindowsAuthenticationInformation(session) {
|
|
|
161
161
|
return authSuggestedInWebsocket;
|
|
162
162
|
}
|
|
163
163
|
async function createAndSetupEnigmaSession(props, canRetry) {
|
|
164
|
-
const { createEnigmaSession } = await import("./
|
|
164
|
+
const { createEnigmaSession } = await import("./QOOCP2TS.js");
|
|
165
165
|
const session = await createEnigmaSession(props);
|
|
166
166
|
setupSessionListeners(session, props);
|
|
167
167
|
let global;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInterceptors
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./3RGGGGAR.js";
|
|
4
4
|
import {
|
|
5
5
|
isBrowser,
|
|
6
6
|
isNode
|
|
@@ -27,6 +27,12 @@ var getPlatform = async (options = {}) => {
|
|
|
27
27
|
if (deploymentType === "qliksensedesktop") {
|
|
28
28
|
return result({ isQSD: true, isWindows: true });
|
|
29
29
|
}
|
|
30
|
+
if (deploymentType === "qliksensemobile") {
|
|
31
|
+
return result({ isQSE: true, isWindows: true });
|
|
32
|
+
}
|
|
33
|
+
if (deploymentType === "cloud-console") {
|
|
34
|
+
return result({ isCloud: true, isCloudConsole: true });
|
|
35
|
+
}
|
|
30
36
|
if (productInfo.composition?.provider === "fedramp") {
|
|
31
37
|
return result({ isCloud: true, isQCG: true, isControlCenter });
|
|
32
38
|
}
|
|
@@ -58,7 +64,7 @@ var getProductInfo = async ({ hostConfig, noCache } = {}) => {
|
|
|
58
64
|
delete productInfoPromises[completeUrl];
|
|
59
65
|
}
|
|
60
66
|
return response;
|
|
61
|
-
} catch
|
|
67
|
+
} catch {
|
|
62
68
|
delete productInfoPromises[completeUrl];
|
|
63
69
|
return { data: void 0, status: 500 };
|
|
64
70
|
} finally {
|
|
@@ -72,6 +78,7 @@ var result = (data) => ({
|
|
|
72
78
|
isCloud: false,
|
|
73
79
|
isQCS: false,
|
|
74
80
|
isQCG: false,
|
|
81
|
+
isCloudConsole: false,
|
|
75
82
|
isControlCenter: false,
|
|
76
83
|
isWindows: false,
|
|
77
84
|
isQSE: false,
|
|
@@ -106,7 +113,7 @@ function getRegisteredAuthModule(authType) {
|
|
|
106
113
|
}
|
|
107
114
|
async function getAuthModule(hostConfig) {
|
|
108
115
|
const hostConfigToUse = withDefaultHostConfig(hostConfig);
|
|
109
|
-
const authType = await
|
|
116
|
+
const authType = await determineAuthType(hostConfigToUse);
|
|
110
117
|
if (ongoingAuthModuleLoading) {
|
|
111
118
|
await ongoingAuthModuleLoading;
|
|
112
119
|
}
|
|
@@ -128,27 +135,6 @@ async function getAuthModule(hostConfig) {
|
|
|
128
135
|
}
|
|
129
136
|
return authModule;
|
|
130
137
|
}
|
|
131
|
-
async function guessAuthTypeIfMissing(hostConfig) {
|
|
132
|
-
if (hostConfig.authType) {
|
|
133
|
-
return hostConfig.authType;
|
|
134
|
-
}
|
|
135
|
-
if (hostConfig.apiKey) {
|
|
136
|
-
return "apikey";
|
|
137
|
-
}
|
|
138
|
-
if (hostConfig.accessCode) {
|
|
139
|
-
return "anonymous";
|
|
140
|
-
}
|
|
141
|
-
if (hostConfig.clientId) {
|
|
142
|
-
return "oauth2";
|
|
143
|
-
}
|
|
144
|
-
if (hostConfig.webIntegrationId) {
|
|
145
|
-
return "cookie";
|
|
146
|
-
}
|
|
147
|
-
if (await isWindows(hostConfig)) {
|
|
148
|
-
return "windowscookie";
|
|
149
|
-
}
|
|
150
|
-
return "cookie";
|
|
151
|
-
}
|
|
152
138
|
async function resolveGloballyDefinedAuthModule(authType) {
|
|
153
139
|
const globalWindow = globalThis;
|
|
154
140
|
const globalVariable = globalWindow[authType];
|
|
@@ -258,9 +244,6 @@ function toValidLocationUrl(hostConfig) {
|
|
|
258
244
|
}
|
|
259
245
|
return locationUrl;
|
|
260
246
|
}
|
|
261
|
-
function toValidEnigmaLocationUrl(hostConfig) {
|
|
262
|
-
return toValidWebsocketLocationUrl(hostConfig);
|
|
263
|
-
}
|
|
264
247
|
function toValidWebsocketLocationUrl(hostConfig) {
|
|
265
248
|
const url = withDefaultHostConfig(hostConfig)?.host;
|
|
266
249
|
let locationUrl;
|
|
@@ -348,6 +331,27 @@ function serializeHostConfig(hostConfig) {
|
|
|
348
331
|
const hostConfigToUse = withDefaultHostConfig(hostConfig);
|
|
349
332
|
return JSON.stringify(hostConfigToUse, hostConfigPropertyIgnorer);
|
|
350
333
|
}
|
|
334
|
+
async function determineAuthType(hostConfig) {
|
|
335
|
+
if (hostConfig.authType) {
|
|
336
|
+
return hostConfig.authType;
|
|
337
|
+
}
|
|
338
|
+
if (hostConfig.apiKey) {
|
|
339
|
+
return "apikey";
|
|
340
|
+
}
|
|
341
|
+
if (hostConfig.accessCode) {
|
|
342
|
+
return "anonymous";
|
|
343
|
+
}
|
|
344
|
+
if (hostConfig.clientId) {
|
|
345
|
+
return "oauth2";
|
|
346
|
+
}
|
|
347
|
+
if (hostConfig.webIntegrationId) {
|
|
348
|
+
return "cookie";
|
|
349
|
+
}
|
|
350
|
+
if (await isWindows(hostConfig)) {
|
|
351
|
+
return "windowscookie";
|
|
352
|
+
}
|
|
353
|
+
return "cookie";
|
|
354
|
+
}
|
|
351
355
|
function checkForCrossDomainRequest(hostConfig) {
|
|
352
356
|
const hostConfigToUse = withDefaultHostConfig(hostConfig);
|
|
353
357
|
if (isHostCrossOrigin(hostConfigToUse)) {
|
|
@@ -445,7 +449,7 @@ function internalValidateHostConfig(hostConfig, options) {
|
|
|
445
449
|
// src/auth/internal/default-auth-modules/oauth/storage-helpers.ts
|
|
446
450
|
var storagePrefix = "qlik-qmfe-api";
|
|
447
451
|
function getTopicFromOauthHostConfig(hostConfig) {
|
|
448
|
-
let topic =
|
|
452
|
+
let topic = hostConfig.clientId + (hostConfig.scope ? `_${hostConfig.scope}` : "_user_default");
|
|
449
453
|
if (hostConfig.subject) {
|
|
450
454
|
topic += `_${hostConfig.subject}`;
|
|
451
455
|
}
|
|
@@ -804,7 +808,7 @@ async function getOAuthTokensForBrowser(hostConfig) {
|
|
|
804
808
|
refreshToken: void 0,
|
|
805
809
|
errors: void 0
|
|
806
810
|
};
|
|
807
|
-
} catch
|
|
811
|
+
} catch {
|
|
808
812
|
return errorMessageToAuthData("Could not fetch access token using custom function");
|
|
809
813
|
}
|
|
810
814
|
}
|
|
@@ -846,7 +850,6 @@ async function getOAuthTokensForBrowser(hostConfig) {
|
|
|
846
850
|
code: "",
|
|
847
851
|
status: 401,
|
|
848
852
|
title: "Could not perform custom interactive login",
|
|
849
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
850
853
|
detail: `${error}`
|
|
851
854
|
}
|
|
852
855
|
]
|
|
@@ -977,7 +980,7 @@ async function toError(response) {
|
|
|
977
980
|
try {
|
|
978
981
|
const data = JSON.parse(body);
|
|
979
982
|
return new AuthorizationError(data.errors);
|
|
980
|
-
} catch
|
|
983
|
+
} catch {
|
|
981
984
|
return new AuthorizationError([
|
|
982
985
|
{
|
|
983
986
|
code: "unknown",
|
|
@@ -1489,10 +1492,11 @@ var auth = {
|
|
|
1489
1492
|
getWebResourceAuthParams,
|
|
1490
1493
|
handleAuthenticationError,
|
|
1491
1494
|
toValidLocationUrl,
|
|
1492
|
-
toValidEnigmaLocationUrl,
|
|
1493
1495
|
toValidWebsocketLocationUrl,
|
|
1494
1496
|
isWindows,
|
|
1495
|
-
isHostCrossOrigin
|
|
1497
|
+
isHostCrossOrigin,
|
|
1498
|
+
determineAuthType,
|
|
1499
|
+
serializeHostConfig
|
|
1496
1500
|
};
|
|
1497
1501
|
var auth_default = auth;
|
|
1498
1502
|
|
|
@@ -1543,7 +1547,7 @@ function toCompleteUrl(url, query) {
|
|
|
1543
1547
|
return url;
|
|
1544
1548
|
}
|
|
1545
1549
|
function shouldUseCachedResult(options, cacheEntry, defaultMaxCacheTime) {
|
|
1546
|
-
if (!cacheEntry || typeof cacheEntry.value ===
|
|
1550
|
+
if (!cacheEntry || typeof cacheEntry.value === "undefined") {
|
|
1547
1551
|
return false;
|
|
1548
1552
|
}
|
|
1549
1553
|
if (options?.noCache) {
|
|
@@ -1624,6 +1628,73 @@ function clearCacheOnError(cacheEntry, cacheKey, value) {
|
|
|
1624
1628
|
});
|
|
1625
1629
|
}
|
|
1626
1630
|
|
|
1631
|
+
// src/invoke-fetch/internal/invoke-xhr.ts
|
|
1632
|
+
async function invokeXHR(completeUrl, { method, headers, credentials, keepalive, body, signal, progress }) {
|
|
1633
|
+
const xhr = new XMLHttpRequest();
|
|
1634
|
+
let resolve;
|
|
1635
|
+
let reject;
|
|
1636
|
+
const promise = new Promise((res, rej) => {
|
|
1637
|
+
resolve = res;
|
|
1638
|
+
reject = rej;
|
|
1639
|
+
});
|
|
1640
|
+
xhr.open(method || "GET", completeUrl);
|
|
1641
|
+
if (typeof headers === "object") {
|
|
1642
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
1643
|
+
xhr.setRequestHeader(key, value);
|
|
1644
|
+
}
|
|
1645
|
+
} else {
|
|
1646
|
+
throw Error("malformed headers", headers);
|
|
1647
|
+
}
|
|
1648
|
+
if (keepalive) {
|
|
1649
|
+
xhr.setRequestHeader("Connection", "keep-alive");
|
|
1650
|
+
}
|
|
1651
|
+
if (signal) {
|
|
1652
|
+
signal.addEventListener("abort", () => {
|
|
1653
|
+
xhr.abort();
|
|
1654
|
+
reject();
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
if (credentials === "include") {
|
|
1658
|
+
xhr.withCredentials = true;
|
|
1659
|
+
} else {
|
|
1660
|
+
xhr.withCredentials = false;
|
|
1661
|
+
}
|
|
1662
|
+
if (progress?.onUpload) {
|
|
1663
|
+
xhr.upload.onprogress = (event) => {
|
|
1664
|
+
const { loaded, total, lengthComputable } = event;
|
|
1665
|
+
progress.onUpload?.({ loaded, total: lengthComputable ? total : void 0 });
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
if (progress?.onDownload) {
|
|
1669
|
+
xhr.onprogress = (event) => {
|
|
1670
|
+
const { loaded, total, lengthComputable } = event;
|
|
1671
|
+
progress.onDownload?.({ loaded, total: lengthComputable ? total : void 0 });
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
xhr.onloadend = () => {
|
|
1675
|
+
const { status } = xhr;
|
|
1676
|
+
const responseHeaders = {};
|
|
1677
|
+
for (const line of xhr.getAllResponseHeaders().split("\r\n")) {
|
|
1678
|
+
const [key, value] = line.split(":", 2);
|
|
1679
|
+
if (key && value) {
|
|
1680
|
+
responseHeaders[key] = value;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
if (xhr.response) {
|
|
1684
|
+
resolve(new Response(xhr.response, { status, headers: responseHeaders }));
|
|
1685
|
+
} else {
|
|
1686
|
+
resolve(new Response(void 0, { status, headers: responseHeaders }));
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
try {
|
|
1690
|
+
const bod = body;
|
|
1691
|
+
xhr.send(bod);
|
|
1692
|
+
} catch (e) {
|
|
1693
|
+
return Promise.reject(new InvokeFetchError(getErrorMessage(e), 0, new Headers(), {}));
|
|
1694
|
+
}
|
|
1695
|
+
return promise;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1627
1698
|
// src/invoke-fetch/internal/invoke-fetch-methods.ts
|
|
1628
1699
|
var defaultCacheTime = 1e3 * 60 * 10;
|
|
1629
1700
|
var cache = {};
|
|
@@ -1647,7 +1718,7 @@ async function fetchAndTransformExceptions(input, init) {
|
|
|
1647
1718
|
try {
|
|
1648
1719
|
return await fetch(input, init);
|
|
1649
1720
|
} catch (e) {
|
|
1650
|
-
return Promise.reject(new
|
|
1721
|
+
return Promise.reject(new InvokeFetchError(getErrorMessage(e), 0, new Headers(), {}));
|
|
1651
1722
|
}
|
|
1652
1723
|
}
|
|
1653
1724
|
async function performActualHttpFetch(method, completeUrl, unencodedBody, contentType, options, authHeaders, credentials, userAgent) {
|
|
@@ -1661,14 +1732,14 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
|
|
|
1661
1732
|
if (!headers["User-Agent"] && userAgent) {
|
|
1662
1733
|
headers["User-Agent"] = userAgent;
|
|
1663
1734
|
}
|
|
1664
|
-
const isCrossOrigin = isHostCrossOrigin(options?.hostConfig);
|
|
1665
1735
|
const request = {
|
|
1666
1736
|
method,
|
|
1667
1737
|
credentials,
|
|
1668
|
-
mode:
|
|
1738
|
+
mode: "cors",
|
|
1669
1739
|
headers,
|
|
1670
1740
|
redirect: await isWindows(options?.hostConfig) ? "manual" : "follow",
|
|
1671
1741
|
keepalive: options?.keepalive,
|
|
1742
|
+
progress: options?.progress,
|
|
1672
1743
|
body,
|
|
1673
1744
|
// body data type must match "Content-Type" header
|
|
1674
1745
|
...requestOptions
|
|
@@ -1684,11 +1755,16 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
|
|
|
1684
1755
|
}, options.timeoutMs);
|
|
1685
1756
|
request.signal = controller.signal;
|
|
1686
1757
|
}
|
|
1687
|
-
|
|
1758
|
+
let response;
|
|
1759
|
+
if (options?.progress) {
|
|
1760
|
+
response = await invokeXHR(completeUrl, request);
|
|
1761
|
+
} else {
|
|
1762
|
+
response = await fetchAndTransformExceptions(completeUrl, request);
|
|
1763
|
+
}
|
|
1688
1764
|
if (fetchTimeoutId) {
|
|
1689
1765
|
clearTimeout(fetchTimeoutId);
|
|
1690
1766
|
}
|
|
1691
|
-
const invokeFetchResponse = await parseFetchResponse(
|
|
1767
|
+
const invokeFetchResponse = await parseFetchResponse(response, completeUrl);
|
|
1692
1768
|
return invokeFetchResponse;
|
|
1693
1769
|
}
|
|
1694
1770
|
function encodeBody(unencodedBody, contentType) {
|
|
@@ -1981,7 +2057,7 @@ async function download(blob, filename) {
|
|
|
1981
2057
|
}
|
|
1982
2058
|
|
|
1983
2059
|
// src/invoke-fetch/invoke-fetch-error.ts
|
|
1984
|
-
var
|
|
2060
|
+
var InvokeFetchError = class extends Error {
|
|
1985
2061
|
status;
|
|
1986
2062
|
headers;
|
|
1987
2063
|
data;
|
|
@@ -2102,10 +2178,10 @@ async function parseFetchResponse(fetchResponse, url) {
|
|
|
2102
2178
|
const { status, statusText, headers } = fetchResponse;
|
|
2103
2179
|
const errorMsg = `request to '${url}' failed with status ${status} ${statusText}.`;
|
|
2104
2180
|
if (status >= 300) {
|
|
2105
|
-
throw new
|
|
2181
|
+
throw new InvokeFetchError(errorMsg, status, headers, resultData);
|
|
2106
2182
|
}
|
|
2107
2183
|
if (status === 0) {
|
|
2108
|
-
throw new
|
|
2184
|
+
throw new InvokeFetchError(errorMsg, 302, headers, resultData);
|
|
2109
2185
|
}
|
|
2110
2186
|
const invokeFetchResponse = {
|
|
2111
2187
|
status,
|
|
@@ -2132,7 +2208,6 @@ export {
|
|
|
2132
2208
|
isHostCrossOrigin,
|
|
2133
2209
|
isWindows,
|
|
2134
2210
|
toValidLocationUrl,
|
|
2135
|
-
toValidEnigmaLocationUrl,
|
|
2136
2211
|
toValidWebsocketLocationUrl,
|
|
2137
2212
|
getWebSocketAuthParams,
|
|
2138
2213
|
getWebResourceAuthParams,
|
|
@@ -2142,10 +2217,11 @@ export {
|
|
|
2142
2217
|
registerAuthModule2 as registerAuthModule,
|
|
2143
2218
|
setDefaultHostConfig2 as setDefaultHostConfig,
|
|
2144
2219
|
serializeHostConfig,
|
|
2220
|
+
determineAuthType,
|
|
2145
2221
|
checkForCrossDomainRequest,
|
|
2146
2222
|
logout,
|
|
2147
2223
|
generateRandomString,
|
|
2148
|
-
|
|
2224
|
+
InvokeFetchError,
|
|
2149
2225
|
EncodingError,
|
|
2150
2226
|
invokeFetch,
|
|
2151
2227
|
clearApiCache,
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getRestCallAuthParams,
|
|
4
4
|
getWebSocketAuthParams,
|
|
5
5
|
toValidWebsocketLocationUrl
|
|
6
|
-
} from "./
|
|
7
|
-
import "./
|
|
6
|
+
} from "./NBW6PHZU.js";
|
|
7
|
+
import "./3RGGGGAR.js";
|
|
8
8
|
import {
|
|
9
9
|
isNode
|
|
10
10
|
} from "./2ZQ3ZX7F.js";
|
|
@@ -9723,7 +9723,8 @@ var bookmarkListProps = {
|
|
|
9723
9723
|
description: "/qMetaDef/description",
|
|
9724
9724
|
sheetId: "/sheetId",
|
|
9725
9725
|
selectionFields: "/selectionFields",
|
|
9726
|
-
creationDate: "/creationDate"
|
|
9726
|
+
creationDate: "/creationDate",
|
|
9727
|
+
groupId: "/groupId"
|
|
9727
9728
|
}
|
|
9728
9729
|
}
|
|
9729
9730
|
};
|
|
@@ -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("./4D5NADHK.js") : import("./4K3CNR7C.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("./MGXEGSJC.js") : import("./4K3CNR7C.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("./2BRBIRM2.js") : import("./4K3CNR7C.js").then(
|
|
19
19
|
(mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig)
|
|
20
20
|
);
|
|
21
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInvokeFetchRuntimeModule
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./V3TZ54UE.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.27.0";
|
|
10
10
|
async function invokeFetch(api, props) {
|
|
11
11
|
const hostConfig = props.options?.hostConfig;
|
|
12
12
|
let userAgent;
|
package/collections.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './invoke-fetch-types-
|
|
1
|
+
import { A as ApiCallOptions } from './invoke-fetch-types-BXn-uSF5.js';
|
|
2
2
|
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
type CollectionByIdPatch = {
|
|
@@ -270,14 +270,14 @@ declare const getCollections: (query: {
|
|
|
270
270
|
type GetCollectionsHttpResponse = {
|
|
271
271
|
data: CollectionsListCollectionsResponseBody;
|
|
272
272
|
headers: Headers;
|
|
273
|
-
status:
|
|
273
|
+
status: 200;
|
|
274
274
|
prev?: (options?: ApiCallOptions) => Promise<GetCollectionsHttpResponse>;
|
|
275
275
|
next?: (options?: ApiCallOptions) => Promise<GetCollectionsHttpResponse>;
|
|
276
276
|
};
|
|
277
277
|
type GetCollectionsHttpError = {
|
|
278
278
|
data: ErrorResponseBody;
|
|
279
279
|
headers: Headers;
|
|
280
|
-
status:
|
|
280
|
+
status: 400 | 401 | 500;
|
|
281
281
|
};
|
|
282
282
|
/**
|
|
283
283
|
* Creates and returns a new collection. Collections of type `public` (shown as tags in the user interface) must have unique names. Other collection types can reuse names.
|
|
@@ -289,12 +289,12 @@ declare const createCollection: (body: CollectionsCreateCollectionRequestBody, o
|
|
|
289
289
|
type CreateCollectionHttpResponse = {
|
|
290
290
|
data: CollectionResultResponseBody;
|
|
291
291
|
headers: Headers;
|
|
292
|
-
status:
|
|
292
|
+
status: 201;
|
|
293
293
|
};
|
|
294
294
|
type CreateCollectionHttpError = {
|
|
295
295
|
data: ErrorResponseBody;
|
|
296
296
|
headers: Headers;
|
|
297
|
-
status:
|
|
297
|
+
status: 400 | 401 | 403 | 409 | 500;
|
|
298
298
|
};
|
|
299
299
|
/**
|
|
300
300
|
* Lists the user's favorites collection.
|
|
@@ -305,12 +305,12 @@ declare const getFavoritesCollection: (options?: ApiCallOptions) => Promise<GetF
|
|
|
305
305
|
type GetFavoritesCollectionHttpResponse = {
|
|
306
306
|
data: CollectionResultResponseBody;
|
|
307
307
|
headers: Headers;
|
|
308
|
-
status:
|
|
308
|
+
status: 200;
|
|
309
309
|
};
|
|
310
310
|
type GetFavoritesCollectionHttpError = {
|
|
311
311
|
data: ErrorResponseBody;
|
|
312
312
|
headers: Headers;
|
|
313
|
-
status:
|
|
313
|
+
status: 401 | 404 | 500;
|
|
314
314
|
};
|
|
315
315
|
/**
|
|
316
316
|
* Deletes a collection and removes all items from the collection.
|
|
@@ -322,12 +322,12 @@ declare const deleteCollection: (collectionId: string, options?: ApiCallOptions)
|
|
|
322
322
|
type DeleteCollectionHttpResponse = {
|
|
323
323
|
data: void;
|
|
324
324
|
headers: Headers;
|
|
325
|
-
status:
|
|
325
|
+
status: 204;
|
|
326
326
|
};
|
|
327
327
|
type DeleteCollectionHttpError = {
|
|
328
328
|
data: ErrorResponseBody;
|
|
329
329
|
headers: Headers;
|
|
330
|
-
status:
|
|
330
|
+
status: 401 | 404 | 500;
|
|
331
331
|
};
|
|
332
332
|
/**
|
|
333
333
|
* Finds and returns a collection.
|
|
@@ -339,12 +339,12 @@ declare const getCollection: (collectionId: string, options?: ApiCallOptions) =>
|
|
|
339
339
|
type GetCollectionHttpResponse = {
|
|
340
340
|
data: CollectionResultResponseBody;
|
|
341
341
|
headers: Headers;
|
|
342
|
-
status:
|
|
342
|
+
status: 200;
|
|
343
343
|
};
|
|
344
344
|
type GetCollectionHttpError = {
|
|
345
345
|
data: ErrorResponseBody;
|
|
346
346
|
headers: Headers;
|
|
347
|
-
status:
|
|
347
|
+
status: 400 | 401 | 404 | 500;
|
|
348
348
|
};
|
|
349
349
|
/**
|
|
350
350
|
* Updates the name, description, or type fields provided in the patch body. Can be used to publish a `private` collection as a `publicgoverned` collection by patching `/type` with `publicgoverned` once the collection contains at least 1 item. Can also be used to return a `publicgoverned` collection to `private`. Cannot be used to change between `public` (tag) and `private / publicgoverned` (collection).
|
|
@@ -357,12 +357,12 @@ declare const patchCollection: (collectionId: string, body: CollectionByIdPatch,
|
|
|
357
357
|
type PatchCollectionHttpResponse = {
|
|
358
358
|
data: CollectionResultResponseBody;
|
|
359
359
|
headers: Headers;
|
|
360
|
-
status:
|
|
360
|
+
status: 200;
|
|
361
361
|
};
|
|
362
362
|
type PatchCollectionHttpError = {
|
|
363
363
|
data: ErrorResponseBody;
|
|
364
364
|
headers: Headers;
|
|
365
|
-
status:
|
|
365
|
+
status: 400 | 401 | 404 | 409 | 500;
|
|
366
366
|
};
|
|
367
367
|
/**
|
|
368
368
|
* Updates a collection's name and description and returns the updated collection. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.
|
|
@@ -375,12 +375,12 @@ declare const updateCollection: (collectionId: string, body: CollectionsUpdateCo
|
|
|
375
375
|
type UpdateCollectionHttpResponse = {
|
|
376
376
|
data: CollectionResultResponseBody;
|
|
377
377
|
headers: Headers;
|
|
378
|
-
status:
|
|
378
|
+
status: 200;
|
|
379
379
|
};
|
|
380
380
|
type UpdateCollectionHttpError = {
|
|
381
381
|
data: ErrorResponseBody;
|
|
382
382
|
headers: Headers;
|
|
383
|
-
status:
|
|
383
|
+
status: 400 | 401 | 404 | 409 | 500;
|
|
384
384
|
};
|
|
385
385
|
/**
|
|
386
386
|
* Retrieves items from a collection that the user has access to.
|
|
@@ -420,12 +420,12 @@ declare const getCollectionItems: (collectionId: string, query: {
|
|
|
420
420
|
type GetCollectionItemsHttpResponse = {
|
|
421
421
|
data: CollectionsListCollectionItemsResponseBody;
|
|
422
422
|
headers: Headers;
|
|
423
|
-
status:
|
|
423
|
+
status: 200;
|
|
424
424
|
};
|
|
425
425
|
type GetCollectionItemsHttpError = {
|
|
426
426
|
data: ErrorResponseBody;
|
|
427
427
|
headers: Headers;
|
|
428
|
-
status:
|
|
428
|
+
status: 400 | 401 | 404 | 500;
|
|
429
429
|
};
|
|
430
430
|
/**
|
|
431
431
|
* Adds an item to a collection and returns the item.
|
|
@@ -438,12 +438,12 @@ declare const addCollectionItem: (collectionId: string, body: CollectionsAddColl
|
|
|
438
438
|
type AddCollectionItemHttpResponse = {
|
|
439
439
|
data: ItemResultResponseBody;
|
|
440
440
|
headers: Headers;
|
|
441
|
-
status:
|
|
441
|
+
status: 201;
|
|
442
442
|
};
|
|
443
443
|
type AddCollectionItemHttpError = {
|
|
444
444
|
data: ErrorResponseBody;
|
|
445
445
|
headers: Headers;
|
|
446
|
-
status:
|
|
446
|
+
status: 400 | 401 | 403 | 404 | 409 | 500;
|
|
447
447
|
};
|
|
448
448
|
/**
|
|
449
449
|
* Removes an item from a collection.
|
|
@@ -456,12 +456,12 @@ declare const deleteCollectionItem: (collectionId: string, itemId: string, optio
|
|
|
456
456
|
type DeleteCollectionItemHttpResponse = {
|
|
457
457
|
data: void;
|
|
458
458
|
headers: Headers;
|
|
459
|
-
status:
|
|
459
|
+
status: 204;
|
|
460
460
|
};
|
|
461
461
|
type DeleteCollectionItemHttpError = {
|
|
462
462
|
data: ErrorResponseBody;
|
|
463
463
|
headers: Headers;
|
|
464
|
-
status:
|
|
464
|
+
status: 400 | 401 | 404 | 500;
|
|
465
465
|
};
|
|
466
466
|
/**
|
|
467
467
|
* Finds and returns an item in a specific collection. See GET `/items/{id}`.
|
|
@@ -474,12 +474,12 @@ declare const getCollectionItem: (collectionId: string, itemId: string, options?
|
|
|
474
474
|
type GetCollectionItemHttpResponse = {
|
|
475
475
|
data: ItemResultResponseBody;
|
|
476
476
|
headers: Headers;
|
|
477
|
-
status:
|
|
477
|
+
status: 200;
|
|
478
478
|
};
|
|
479
479
|
type GetCollectionItemHttpError = {
|
|
480
480
|
data: ErrorResponseBody;
|
|
481
481
|
headers: Headers;
|
|
482
|
-
status:
|
|
482
|
+
status: 400 | 401 | 404 | 500;
|
|
483
483
|
};
|
|
484
484
|
/**
|
|
485
485
|
* Clears the cache for collections api requests.
|
package/collections.js
CHANGED