@qlik/api 1.23.0 → 1.25.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 +6 -2
- package/api-keys.js +2 -2
- package/apps.d.ts +1 -1
- package/apps.js +2 -2
- package/audits.d.ts +4 -16
- package/audits.js +2 -2
- package/auth.js +2 -2
- package/automations.d.ts +2 -59
- package/automations.js +3 -19
- package/brands.d.ts +1 -1
- package/brands.js +2 -2
- package/chunks/{E5TLRYTH.js → 3DYV7KOJ.js} +2 -2
- package/chunks/{CUC5USM5.js → 6DEESTGF.js} +2 -2
- package/chunks/{3REGOC54.js → 6QRR5VUM.js} +2 -2
- package/chunks/7BDAXGID.js +116 -0
- package/chunks/{3W4PFUMC.js → BL5PJM4B.js} +1 -1
- package/chunks/{3KD5W26Z.js → CZC7KEJN.js} +3 -3
- package/chunks/{OCV75U5H.js → I5UOE4ZZ.js} +81 -77
- package/chunks/{UJV2QU2J.js → N3ZFICDU.js} +3 -3
- package/chunks/{VXEOAWM6.js → OIQ5ELGS.js} +1 -1
- package/chunks/{SMQGR3VM.js → UA6BE3VB.js} +2 -2
- package/chunks/{EUWNVVK5.js → VX3MQBE7.js} +1 -1
- package/collections.d.ts +1 -1
- package/collections.js +2 -2
- package/csp-origins.d.ts +1 -1
- package/csp-origins.js +2 -2
- package/data-assets.d.ts +1 -1
- package/data-assets.js +2 -2
- package/data-connections.d.ts +1 -1
- package/data-connections.js +2 -2
- package/data-credentials.d.ts +1 -1
- package/data-credentials.js +2 -2
- package/data-files.d.ts +1 -1
- package/data-files.js +2 -2
- package/docs/rest.md +47 -0
- package/extensions.d.ts +1 -1
- package/extensions.js +2 -2
- package/glossaries.d.ts +3 -4
- package/glossaries.js +2 -2
- package/groups.d.ts +3 -3
- package/groups.js +2 -2
- package/identity-providers.d.ts +1 -1
- package/identity-providers.js +2 -2
- package/index.d.ts +11 -4
- package/index.js +89 -79
- package/interceptors.d.ts +51 -0
- package/interceptors.js +17 -0
- package/{global.types-qsBNouXJ.d.ts → invoke-fetch-types-BLrpeZOL.d.ts} +81 -48
- package/items.d.ts +3 -3
- package/items.js +2 -2
- package/licenses.d.ts +3 -1
- package/licenses.js +2 -2
- package/package.json +2 -2
- package/qix.d.ts +35 -2
- package/qix.js +2 -2
- package/quotas.d.ts +1 -1
- package/quotas.js +2 -2
- package/reload-tasks.d.ts +1 -1
- package/reload-tasks.js +2 -2
- package/reloads.d.ts +1 -1
- package/reloads.js +2 -2
- package/reports.d.ts +5 -3
- package/reports.js +2 -2
- package/roles.d.ts +98 -4
- package/roles.js +28 -4
- package/spaces.d.ts +23 -23
- package/spaces.js +2 -2
- package/temp-contents.d.ts +5 -5
- package/temp-contents.js +2 -2
- package/tenants.d.ts +1 -1
- package/tenants.js +2 -2
- package/themes.d.ts +1 -1
- package/themes.js +2 -2
- package/transports.d.ts +1 -1
- package/transports.js +2 -2
- package/users.d.ts +37 -61
- package/users.js +2 -9
- package/web-integrations.d.ts +1 -1
- package/web-integrations.js +2 -2
- package/web-notifications.d.ts +1 -1
- package/web-notifications.js +2 -2
- package/webhooks.d.ts +1 -1
- package/webhooks.js +2 -2
- package/chunks/7RHSSS4W.js +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getInterceptors
|
|
3
|
+
} from "./7BDAXGID.js";
|
|
1
4
|
import {
|
|
2
5
|
isBrowser,
|
|
3
6
|
isNode
|
|
@@ -1142,19 +1145,27 @@ async function getCsrfToken(hostConfig, noCache) {
|
|
|
1142
1145
|
pathTemplate = "/api/v1/csrf-token";
|
|
1143
1146
|
}
|
|
1144
1147
|
const fetchCsrfToken = async () => {
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
try {
|
|
1149
|
+
const res = await invokeFetch("csrf-token", {
|
|
1150
|
+
method: "get",
|
|
1151
|
+
pathTemplate,
|
|
1152
|
+
options: {
|
|
1153
|
+
hostConfig,
|
|
1154
|
+
noCache: true
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
const csrfToken = res.headers.get(QLIK_CSRF_TOKEN);
|
|
1158
|
+
if (!csrfToken) {
|
|
1159
|
+
return "";
|
|
1151
1160
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1161
|
+
return csrfToken;
|
|
1162
|
+
} catch (e) {
|
|
1163
|
+
const error = e;
|
|
1164
|
+
if (error.status === 404) {
|
|
1165
|
+
return "";
|
|
1166
|
+
}
|
|
1167
|
+
throw e;
|
|
1156
1168
|
}
|
|
1157
|
-
return csrfToken;
|
|
1158
1169
|
};
|
|
1159
1170
|
if (noCache) {
|
|
1160
1171
|
csrfTokens[locationUrl] = fetchCsrfToken();
|
|
@@ -1636,10 +1647,10 @@ async function fetchAndTransformExceptions(input, init) {
|
|
|
1636
1647
|
try {
|
|
1637
1648
|
return await fetch(input, init);
|
|
1638
1649
|
} catch (e) {
|
|
1639
|
-
return Promise.reject(new
|
|
1650
|
+
return Promise.reject(new InvokeFetchError2(getErrorMessage(e), 0, new Headers(), {}));
|
|
1640
1651
|
}
|
|
1641
1652
|
}
|
|
1642
|
-
async function performActualHttpFetch(method, completeUrl, unencodedBody, contentType, options,
|
|
1653
|
+
async function performActualHttpFetch(method, completeUrl, unencodedBody, contentType, options, authHeaders, credentials, userAgent) {
|
|
1643
1654
|
const { body, contentTypeHeader, requestOptions } = encodeBody(unencodedBody, contentType ?? "");
|
|
1644
1655
|
const headers = {
|
|
1645
1656
|
...contentTypeHeader,
|
|
@@ -1651,12 +1662,13 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
|
|
|
1651
1662
|
headers["User-Agent"] = userAgent;
|
|
1652
1663
|
}
|
|
1653
1664
|
const isCrossOrigin = isHostCrossOrigin(options?.hostConfig);
|
|
1654
|
-
|
|
1665
|
+
const request = {
|
|
1655
1666
|
method,
|
|
1656
1667
|
credentials,
|
|
1657
1668
|
mode: isCrossOrigin ? "cors" : "same-origin",
|
|
1658
1669
|
headers,
|
|
1659
1670
|
redirect: await isWindows(options?.hostConfig) ? "manual" : "follow",
|
|
1671
|
+
keepalive: options?.keepalive,
|
|
1660
1672
|
body,
|
|
1661
1673
|
// body data type must match "Content-Type" header
|
|
1662
1674
|
...requestOptions
|
|
@@ -1672,17 +1684,11 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
|
|
|
1672
1684
|
}, options.timeoutMs);
|
|
1673
1685
|
request.signal = controller.signal;
|
|
1674
1686
|
}
|
|
1675
|
-
if (interceptors?.request.hasInterceptors()) {
|
|
1676
|
-
request = await interceptors.request.apply(completeUrl, request);
|
|
1677
|
-
}
|
|
1678
1687
|
const fetchResponse = await fetchAndTransformExceptions(completeUrl, request);
|
|
1679
1688
|
if (fetchTimeoutId) {
|
|
1680
1689
|
clearTimeout(fetchTimeoutId);
|
|
1681
1690
|
}
|
|
1682
|
-
|
|
1683
|
-
if (interceptors?.response.hasInterceptors()) {
|
|
1684
|
-
invokeFetchResponse = await interceptors.response.apply(invokeFetchResponse);
|
|
1685
|
-
}
|
|
1691
|
+
const invokeFetchResponse = await parseFetchResponse(fetchResponse, completeUrl);
|
|
1686
1692
|
return invokeFetchResponse;
|
|
1687
1693
|
}
|
|
1688
1694
|
function encodeBody(unencodedBody, contentType) {
|
|
@@ -1799,23 +1805,17 @@ async function getInvokeFetchUrlParams({
|
|
|
1799
1805
|
const cacheKey = toCacheKey(url, queryString, serializeHostConfig(options?.hostConfig), options?.headers);
|
|
1800
1806
|
return { completeUrl, cacheKey, authHeaders, credentials };
|
|
1801
1807
|
}
|
|
1802
|
-
function invokeFetchWithUrl(api, props
|
|
1803
|
-
return invokeFetchWithUrlAndRetry(
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
// only retry once
|
|
1814
|
-
interceptors
|
|
1815
|
-
);
|
|
1816
|
-
},
|
|
1817
|
-
interceptors
|
|
1818
|
-
);
|
|
1808
|
+
function invokeFetchWithUrl(api, props) {
|
|
1809
|
+
return invokeFetchWithUrlAndRetry(api, props, async () => {
|
|
1810
|
+
const { cacheKey, authHeaders, credentials } = await getInvokeFetchUrlParams(props);
|
|
1811
|
+
return invokeFetchWithUrlAndRetry(
|
|
1812
|
+
api,
|
|
1813
|
+
{ ...props, cacheKey, authHeaders, credentials, options: { ...props.options, noCache: true } },
|
|
1814
|
+
// don't cache the retry
|
|
1815
|
+
void 0
|
|
1816
|
+
// only retry once
|
|
1817
|
+
);
|
|
1818
|
+
});
|
|
1819
1819
|
}
|
|
1820
1820
|
function invokeFetchWithUrlAndRetry(api, {
|
|
1821
1821
|
method,
|
|
@@ -1827,7 +1827,7 @@ function invokeFetchWithUrlAndRetry(api, {
|
|
|
1827
1827
|
credentials,
|
|
1828
1828
|
contentType,
|
|
1829
1829
|
userAgent
|
|
1830
|
-
}, performRetry
|
|
1830
|
+
}, performRetry) {
|
|
1831
1831
|
if (!cache[api]) {
|
|
1832
1832
|
cache[api] = {};
|
|
1833
1833
|
}
|
|
@@ -1847,7 +1847,6 @@ function invokeFetchWithUrlAndRetry(api, {
|
|
|
1847
1847
|
body,
|
|
1848
1848
|
contentType,
|
|
1849
1849
|
options,
|
|
1850
|
-
interceptors,
|
|
1851
1850
|
authHeaders,
|
|
1852
1851
|
credentials,
|
|
1853
1852
|
userAgent
|
|
@@ -1863,7 +1862,6 @@ function invokeFetchWithUrlAndRetry(api, {
|
|
|
1863
1862
|
method,
|
|
1864
1863
|
body,
|
|
1865
1864
|
options,
|
|
1866
|
-
interceptors,
|
|
1867
1865
|
authHeaders,
|
|
1868
1866
|
credentials
|
|
1869
1867
|
);
|
|
@@ -1882,7 +1880,7 @@ function invokeFetchWithUrlAndRetry(api, {
|
|
|
1882
1880
|
}
|
|
1883
1881
|
return cloneResultPromise(resultPromiseAfterCacheClearing);
|
|
1884
1882
|
}
|
|
1885
|
-
function addPagingFunctions(api, value, method, body, options,
|
|
1883
|
+
function addPagingFunctions(api, value, method, body, options, authHeaders, credentials) {
|
|
1886
1884
|
const serializedHostConfig = serializeHostConfig(options?.hostConfig);
|
|
1887
1885
|
return value.then((resp) => {
|
|
1888
1886
|
const dataWithPotentialLinks = resp.data;
|
|
@@ -1892,34 +1890,26 @@ function addPagingFunctions(api, value, method, body, options, interceptors, aut
|
|
|
1892
1890
|
const prevUrl = dataWithPotentialLinks.links?.prev?.href;
|
|
1893
1891
|
const nextUrl = dataWithPotentialLinks.links?.next?.href;
|
|
1894
1892
|
if (prevUrl) {
|
|
1895
|
-
resp.prev = (prevOptions) => invokeFetchWithUrl(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
credentials
|
|
1905
|
-
},
|
|
1906
|
-
interceptors
|
|
1907
|
-
);
|
|
1893
|
+
resp.prev = (prevOptions) => invokeFetchWithUrl(api, {
|
|
1894
|
+
method,
|
|
1895
|
+
completeUrl: prevUrl,
|
|
1896
|
+
body,
|
|
1897
|
+
options: prevOptions || options,
|
|
1898
|
+
cacheKey: toCacheKey(prevUrl, "", serializedHostConfig, options?.headers),
|
|
1899
|
+
authHeaders,
|
|
1900
|
+
credentials
|
|
1901
|
+
});
|
|
1908
1902
|
}
|
|
1909
1903
|
if (nextUrl) {
|
|
1910
|
-
resp.next = (nextOptions) => invokeFetchWithUrl(
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
credentials
|
|
1920
|
-
},
|
|
1921
|
-
interceptors
|
|
1922
|
-
);
|
|
1904
|
+
resp.next = (nextOptions) => invokeFetchWithUrl(api, {
|
|
1905
|
+
method,
|
|
1906
|
+
completeUrl: nextUrl,
|
|
1907
|
+
body,
|
|
1908
|
+
options: nextOptions || options,
|
|
1909
|
+
cacheKey: toCacheKey(nextUrl, "", serializedHostConfig, options?.headers),
|
|
1910
|
+
authHeaders,
|
|
1911
|
+
credentials
|
|
1912
|
+
});
|
|
1923
1913
|
}
|
|
1924
1914
|
return resp;
|
|
1925
1915
|
});
|
|
@@ -1991,7 +1981,7 @@ async function download(blob, filename) {
|
|
|
1991
1981
|
}
|
|
1992
1982
|
|
|
1993
1983
|
// src/invoke-fetch/invoke-fetch-error.ts
|
|
1994
|
-
var
|
|
1984
|
+
var InvokeFetchError2 = class extends Error {
|
|
1995
1985
|
status;
|
|
1996
1986
|
headers;
|
|
1997
1987
|
data;
|
|
@@ -2037,6 +2027,15 @@ function cleanStack(stack) {
|
|
|
2037
2027
|
// src/invoke-fetch/invoke-fetch-functions.ts
|
|
2038
2028
|
var defaultUserAgent = "qmfe-api/latest";
|
|
2039
2029
|
async function invokeFetch(api, props, interceptors) {
|
|
2030
|
+
interceptors = interceptors || getInterceptors();
|
|
2031
|
+
const invokeFetchFinal = (reqeust) => invokeFetchIntercepted(api, reqeust);
|
|
2032
|
+
const withInterceptors = (interceptors || []).reduce(
|
|
2033
|
+
(proceed, interceptor) => (request) => interceptor(request, proceed),
|
|
2034
|
+
invokeFetchFinal
|
|
2035
|
+
);
|
|
2036
|
+
return withInterceptors(props);
|
|
2037
|
+
}
|
|
2038
|
+
async function invokeFetchIntercepted(api, props) {
|
|
2040
2039
|
checkForCrossDomainRequest(props.options?.hostConfig);
|
|
2041
2040
|
let userAgent;
|
|
2042
2041
|
if (props?.userAgent) {
|
|
@@ -2047,11 +2046,15 @@ async function invokeFetch(api, props, interceptors) {
|
|
|
2047
2046
|
userAgent = defaultUserAgent;
|
|
2048
2047
|
}
|
|
2049
2048
|
const { completeUrl, cacheKey, authHeaders, credentials } = await getInvokeFetchUrlParams(props);
|
|
2050
|
-
return invokeFetchWithUrl(
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2049
|
+
return invokeFetchWithUrl(api, {
|
|
2050
|
+
...props,
|
|
2051
|
+
method: props.method.toUpperCase(),
|
|
2052
|
+
completeUrl,
|
|
2053
|
+
cacheKey,
|
|
2054
|
+
authHeaders,
|
|
2055
|
+
credentials,
|
|
2056
|
+
userAgent
|
|
2057
|
+
});
|
|
2055
2058
|
}
|
|
2056
2059
|
function clearApiCache(api) {
|
|
2057
2060
|
clearApiCacheInternal(api);
|
|
@@ -2073,6 +2076,7 @@ async function parseFetchResponse(fetchResponse, url) {
|
|
|
2073
2076
|
resultData = toDownloadableBlob(await fetchResponse.blob(), filename);
|
|
2074
2077
|
} else {
|
|
2075
2078
|
switch (contentType) {
|
|
2079
|
+
// Note: This list is by no means exhaustive, populate with more types as needed.
|
|
2076
2080
|
case "image/png":
|
|
2077
2081
|
case "image/jpeg":
|
|
2078
2082
|
case "image/x-icon":
|
|
@@ -2098,10 +2102,10 @@ async function parseFetchResponse(fetchResponse, url) {
|
|
|
2098
2102
|
const { status, statusText, headers } = fetchResponse;
|
|
2099
2103
|
const errorMsg = `request to '${url}' failed with status ${status} ${statusText}.`;
|
|
2100
2104
|
if (status >= 300) {
|
|
2101
|
-
throw new
|
|
2105
|
+
throw new InvokeFetchError2(errorMsg, status, headers, resultData);
|
|
2102
2106
|
}
|
|
2103
2107
|
if (status === 0) {
|
|
2104
|
-
throw new
|
|
2108
|
+
throw new InvokeFetchError2(errorMsg, 302, headers, resultData);
|
|
2105
2109
|
}
|
|
2106
2110
|
const invokeFetchResponse = {
|
|
2107
2111
|
status,
|
|
@@ -2141,7 +2145,7 @@ export {
|
|
|
2141
2145
|
checkForCrossDomainRequest,
|
|
2142
2146
|
logout,
|
|
2143
2147
|
generateRandomString,
|
|
2144
|
-
InvokeFetchError,
|
|
2148
|
+
InvokeFetchError2 as InvokeFetchError,
|
|
2145
2149
|
EncodingError,
|
|
2146
2150
|
invokeFetch,
|
|
2147
2151
|
clearApiCache,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
invokeFetch,
|
|
5
5
|
isWindows,
|
|
6
6
|
toValidWebsocketLocationUrl
|
|
7
|
-
} from "./
|
|
8
|
-
import "./
|
|
7
|
+
} from "./I5UOE4ZZ.js";
|
|
8
|
+
import "./7BDAXGID.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("./6QRR5VUM.js");
|
|
165
165
|
const session = await createEnigmaSession(props);
|
|
166
166
|
setupSessionListeners(session, props);
|
|
167
167
|
let global;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInvokeFetchRuntimeModule
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./CZC7KEJN.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.25.0";
|
|
10
10
|
async function invokeFetch(api, props) {
|
|
11
11
|
const hostConfig = props.options?.hostConfig;
|
|
12
12
|
let userAgent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@qlik+runtime-module-loader@1.0.
|
|
1
|
+
// node_modules/.pnpm/@qlik+runtime-module-loader@1.0.14/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);
|
package/collections.d.ts
CHANGED
package/collections.js
CHANGED
package/csp-origins.d.ts
CHANGED
package/csp-origins.js
CHANGED
package/data-assets.d.ts
CHANGED
package/data-assets.js
CHANGED
package/data-connections.d.ts
CHANGED
package/data-connections.js
CHANGED
package/data-credentials.d.ts
CHANGED
package/data-credentials.js
CHANGED
package/data-files.d.ts
CHANGED
package/data-files.js
CHANGED
package/docs/rest.md
CHANGED
|
@@ -62,3 +62,50 @@ try {
|
|
|
62
62
|
## Caching
|
|
63
63
|
|
|
64
64
|
Every GET request is cached so that subsequent calls to the same api will resolve immediately from the cache. Read more about caching [here](features.md#caching).
|
|
65
|
+
|
|
66
|
+
## Rest Interceptors
|
|
67
|
+
|
|
68
|
+
Interceptors can be added to allow custom functionality to happen before or after an api call. They run globally always on every request. The format is:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
// the interceptor format
|
|
72
|
+
const interceptor = async (request, proceed) => {
|
|
73
|
+
// do things before the request
|
|
74
|
+
const result = await proceed(request);
|
|
75
|
+
// do things after the request
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> [!WARNING]
|
|
81
|
+
> Use Interceptors with caution. They affect every request made by the library and can introduce strange side effects that are hard to discover and debug.
|
|
82
|
+
|
|
83
|
+
#### Examples
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { addInterceptor, removeInterceptor } from "@qlik/api/interceptors";
|
|
87
|
+
|
|
88
|
+
// add a logging interceptor, which logs all requests, responses and errors
|
|
89
|
+
addInterceptor(async (request, proceed) => {
|
|
90
|
+
try {
|
|
91
|
+
console.log("-->", request.method, request.pathTemplate, request.pathVariables, request.query, request.body);
|
|
92
|
+
const result = await proceed(request);
|
|
93
|
+
console.log("<--", result.data);
|
|
94
|
+
return result;
|
|
95
|
+
} catch (err) {
|
|
96
|
+
console.log("<-*", err);
|
|
97
|
+
throw err;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// add additional header to a request
|
|
102
|
+
const headerInterceptor = addInterceptor(async (request, proceed) => {
|
|
103
|
+
// make sure headers object exists
|
|
104
|
+
(request.options = request.options || {}).headers = request.options.headers || {};
|
|
105
|
+
request.options.headers["x-another-header"] = "foobarvalue";
|
|
106
|
+
return proceed(request);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// remove an interceptor
|
|
110
|
+
removeInterceptor(headerInterceptor);
|
|
111
|
+
```
|
package/extensions.d.ts
CHANGED
package/extensions.js
CHANGED
package/glossaries.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './
|
|
1
|
+
import { A as ApiCallOptions } from './invoke-fetch-types-BLrpeZOL.js';
|
|
2
2
|
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -110,6 +110,8 @@ type Category = {
|
|
|
110
110
|
readonly createdBy: string;
|
|
111
111
|
description: string;
|
|
112
112
|
glossaryId: string;
|
|
113
|
+
/** The id for resolving updates in future imports/updates.
|
|
114
|
+
* Opposed to the id of terms, id on category are not resolved by backend. Any category referred in the category array in terms will have to be identical to the id property of the category. If not, the category reference will be discarded. */
|
|
113
115
|
id: string;
|
|
114
116
|
name: string;
|
|
115
117
|
parentId?: string;
|
|
@@ -121,9 +123,6 @@ type Category = {
|
|
|
121
123
|
};
|
|
122
124
|
type CreateCategory = {
|
|
123
125
|
description?: string;
|
|
124
|
-
/** The id for resolving updates in future imports/updates.
|
|
125
|
-
* Opposed to the id of terms, id on category are not resolved by backend. Any category referred in the category array in terms will have to be identical to the id property of the category. If not, the category reference will be discarded. */
|
|
126
|
-
id?: string;
|
|
127
126
|
/** The name of the category. May not be identical to another category belonging to the same parent. */
|
|
128
127
|
name?: string;
|
|
129
128
|
parentId?: string;
|
package/glossaries.js
CHANGED
package/groups.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './
|
|
1
|
+
import { A as ApiCallOptions } from './invoke-fetch-types-BLrpeZOL.js';
|
|
2
2
|
import './auth-types-PkN9CAF_.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -108,8 +108,8 @@ type GroupPatch = {
|
|
|
108
108
|
op: "replace";
|
|
109
109
|
/** Attribute name of a field of the Groups entity. "Name" and "description" is only available for custom groups. */
|
|
110
110
|
path: "assignedRoles" | "name" | "description";
|
|
111
|
-
/** The roles to assign to the group (limit of 100 roles per group). */
|
|
112
|
-
value: AssignedRolesRefIDs | AssignedRolesRefNames;
|
|
111
|
+
/** The roles to assign to the group (limit of 100 roles per group) or the new custom group name or description. */
|
|
112
|
+
value: AssignedRolesRefIDs | AssignedRolesRefNames | string;
|
|
113
113
|
};
|
|
114
114
|
/**
|
|
115
115
|
* An array of JSON Patches for a group.
|
package/groups.js
CHANGED
package/identity-providers.d.ts
CHANGED
package/identity-providers.js
CHANGED