@qlik/api 2.2.0 → 2.3.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.
Files changed (231) hide show
  1. package/analytics/change-stores.d.ts +386 -0
  2. package/analytics/change-stores.js +123 -0
  3. package/analytics.d.ts +14 -0
  4. package/analytics.js +13 -0
  5. package/api-keys.d.ts +362 -3
  6. package/api-keys.js +2 -3
  7. package/apps.d.ts +2673 -3
  8. package/apps.js +2 -3
  9. package/assistants.d.ts +1370 -3
  10. package/assistants.js +2 -3
  11. package/audits.d.ts +318 -3
  12. package/audits.js +4 -4
  13. package/auth-types.d.ts +1 -1
  14. package/auth-types.js +1 -2
  15. package/auth.d.ts +94 -2
  16. package/auth.js +63 -3
  17. package/automation-connections.d.ts +366 -3
  18. package/automation-connections.js +2 -3
  19. package/automation-connectors.d.ts +84 -3
  20. package/automation-connectors.js +2 -3
  21. package/automations.d.ts +805 -3
  22. package/automations.js +2 -3
  23. package/automl-deployments.d.ts +101 -3
  24. package/automl-deployments.js +2 -3
  25. package/automl-predictions.d.ts +238 -3
  26. package/automl-predictions.js +2 -3
  27. package/banners.d.ts +184 -3
  28. package/banners.js +2 -3
  29. package/brands.d.ts +670 -3
  30. package/brands.js +2 -3
  31. package/chunks/{auth-Cle0_tmz.js → auth-BowS4SUR.js} +1 -5
  32. package/chunks/{chunk-EtTptKIv.js → chunk-D3vHIbds.js} +2 -2
  33. package/chunks/{dist-gXLIqDJW.js → dist-n3iOVn1W.js} +4 -4
  34. package/chunks/{auth-functions-BmZgZYSs.js → interceptors-DipDBQQ5.js} +258 -54
  35. package/chunks/{invoke-fetch-PcVIxLW4.js → invoke-fetch-B7lGscuQ.js} +3 -3
  36. package/chunks/{invoke-fetch-CucBpA1C.js → invoke-fetch-DhdyFZ0F.js} +1 -5
  37. package/chunks/{public-runtime-modules-Dwjzb3l8.js → public-runtime-modules-QhLPeQr5.js} +7 -7
  38. package/chunks/{qix-DI5o5XF4.d.ts → qix-CrqXv44x.d.ts} +6 -2
  39. package/chunks/{qix-DjxuPCX0.js → qix-RCUslia8.js} +11 -10
  40. package/chunks/{qix-chunk-entrypoint-tmTo-kpa.js → qix-chunk-entrypoint-WAS4NVTf.js} +48 -50
  41. package/collections.d.ts +582 -3
  42. package/collections.js +2 -3
  43. package/conditions.d.ts +662 -3
  44. package/conditions.js +2 -3
  45. package/consumption.d.ts +182 -3
  46. package/consumption.js +2 -3
  47. package/core/ip-policies.d.ts +328 -4
  48. package/core/ip-policies.js +108 -5
  49. package/core.d.ts +13 -4
  50. package/core.js +3 -4
  51. package/csp-origins.d.ts +273 -3
  52. package/csp-origins.js +2 -3
  53. package/csrf-token.d.ts +62 -3
  54. package/csrf-token.js +2 -3
  55. package/data-alerts.d.ts +1004 -3
  56. package/data-alerts.js +2 -3
  57. package/data-assets.d.ts +207 -3
  58. package/data-assets.js +2 -3
  59. package/data-connections.d.ts +678 -3
  60. package/data-connections.js +2 -3
  61. package/data-credentials.d.ts +292 -3
  62. package/data-credentials.js +2 -3
  63. package/data-files.d.ts +860 -3
  64. package/data-files.js +2 -3
  65. package/data-qualities.d.ts +175 -3
  66. package/data-qualities.js +2 -3
  67. package/data-sets.d.ts +424 -3
  68. package/data-sets.js +2 -3
  69. package/data-sources.d.ts +348 -3
  70. package/data-sources.js +2 -3
  71. package/data-stores.d.ts +537 -3
  72. package/data-stores.js +2 -3
  73. package/dcaas.d.ts +192 -3
  74. package/dcaas.js +2 -3
  75. package/di-projects.d.ts +812 -4
  76. package/di-projects.js +25 -4
  77. package/direct-access-agents.d.ts +710 -4
  78. package/direct-access-agents.js +37 -5
  79. package/docs/authentication.md +1 -1
  80. package/encryption.d.ts +372 -3
  81. package/encryption.js +2 -3
  82. package/extensions.d.ts +295 -3
  83. package/extensions.js +2 -3
  84. package/global-types.d.ts +1 -1
  85. package/global-types.js +0 -2
  86. package/glossaries.d.ts +1223 -3
  87. package/glossaries.js +2 -3
  88. package/groups.d.ts +510 -3
  89. package/groups.js +2 -3
  90. package/identity-providers.d.ts +711 -3
  91. package/identity-providers.js +2 -3
  92. package/index.d.ts +78 -69
  93. package/index.js +28 -10
  94. package/interceptors.d.ts +52 -3
  95. package/interceptors.js +1 -2
  96. package/invoke-fetch-types.d.ts +1 -1
  97. package/items.d.ts +536 -3
  98. package/items.js +2 -3
  99. package/knowledgebases.d.ts +976 -3
  100. package/knowledgebases.js +2 -3
  101. package/licenses.d.ts +663 -3
  102. package/licenses.js +2 -3
  103. package/lineage-graphs.d.ts +704 -3
  104. package/lineage-graphs.js +2 -3
  105. package/ml.d.ts +2808 -3
  106. package/ml.js +2 -3
  107. package/notes.d.ts +110 -3
  108. package/notes.js +2 -3
  109. package/notifications.d.ts +98 -3
  110. package/notifications.js +2 -3
  111. package/oauth-callback.iife.js +1151 -0
  112. package/oauth-clients.d.ts +562 -3
  113. package/oauth-clients.js +2 -3
  114. package/oauth-tokens.d.ts +126 -3
  115. package/oauth-tokens.js +2 -3
  116. package/package.json +6 -4
  117. package/qix.d.ts +3 -3
  118. package/qix.js +38 -3
  119. package/questions.d.ts +364 -3
  120. package/questions.js +2 -3
  121. package/quotas.d.ts +112 -3
  122. package/quotas.js +2 -3
  123. package/reload-tasks.d.ts +249 -3
  124. package/reload-tasks.js +2 -3
  125. package/reloads.d.ts +260 -3
  126. package/reloads.js +2 -3
  127. package/report-templates.d.ts +287 -3
  128. package/report-templates.js +2 -3
  129. package/reports.d.ts +863 -3
  130. package/reports.js +2 -3
  131. package/roles.d.ts +312 -3
  132. package/roles.js +2 -3
  133. package/sharing-tasks.d.ts +1164 -3
  134. package/sharing-tasks.js +2 -3
  135. package/spaces.d.ts +779 -3
  136. package/spaces.js +2 -3
  137. package/tasks.d.ts +564 -3
  138. package/tasks.js +2 -3
  139. package/temp-contents.d.ts +167 -3
  140. package/temp-contents.js +2 -3
  141. package/tenants.d.ts +360 -3
  142. package/tenants.js +2 -3
  143. package/themes.d.ts +270 -3
  144. package/themes.js +2 -3
  145. package/transports.d.ts +435 -4
  146. package/transports.js +20 -5
  147. package/ui-config.d.ts +274 -3
  148. package/ui-config.js +2 -3
  149. package/users.d.ts +674 -3
  150. package/users.js +2 -3
  151. package/web-integrations.d.ts +294 -3
  152. package/web-integrations.js +2 -3
  153. package/web-notifications.d.ts +273 -3
  154. package/web-notifications.js +2 -3
  155. package/webhooks.d.ts +505 -3
  156. package/webhooks.js +2 -3
  157. package/chunks/api-keys-D6Rqaov4.d.ts +0 -365
  158. package/chunks/apps-BwpXUGDb.d.ts +0 -2673
  159. package/chunks/assistants-wh6Qe7l6.d.ts +0 -1366
  160. package/chunks/audits-DakwzT97.d.ts +0 -316
  161. package/chunks/auth-6mptVm5Q.d.ts +0 -95
  162. package/chunks/auth-D11iO7ZV.js +0 -65
  163. package/chunks/automation-connections-k2G_n9rj.d.ts +0 -366
  164. package/chunks/automation-connectors-J5OE-1P0.d.ts +0 -84
  165. package/chunks/automations-BGy83EBO.d.ts +0 -797
  166. package/chunks/automl-deployments-CWEpX2pk.d.ts +0 -101
  167. package/chunks/automl-predictions-BNIjRhBm.d.ts +0 -238
  168. package/chunks/banners-CgBRnZGv.d.ts +0 -184
  169. package/chunks/brands-DCgk6Gqx.d.ts +0 -671
  170. package/chunks/collections-BpYjcpIY.d.ts +0 -582
  171. package/chunks/conditions-CJJG7Uph.d.ts +0 -662
  172. package/chunks/consumption-DerFk437.d.ts +0 -182
  173. package/chunks/core-DQXNZdnf.d.ts +0 -12
  174. package/chunks/csp-origins-3NJlh_n9.d.ts +0 -273
  175. package/chunks/csrf-token-DoaoOQzH.d.ts +0 -63
  176. package/chunks/data-alerts-CILSEFbQ.d.ts +0 -1004
  177. package/chunks/data-assets-CJDcssoX.d.ts +0 -207
  178. package/chunks/data-connections-VSB13K6g.d.ts +0 -678
  179. package/chunks/data-credentials-ChEp_hyU.d.ts +0 -292
  180. package/chunks/data-files-CVzn9M6V.d.ts +0 -860
  181. package/chunks/data-qualities-DBrot957.d.ts +0 -176
  182. package/chunks/data-sets-CFzxgWnO.d.ts +0 -424
  183. package/chunks/data-sources-IsAaof_C.d.ts +0 -346
  184. package/chunks/data-stores-DFOPdgfz.d.ts +0 -537
  185. package/chunks/dcaas-qyv7YlrN.d.ts +0 -192
  186. package/chunks/di-projects-DVQTxASr.d.ts +0 -777
  187. package/chunks/direct-access-agents-B77OhzZi.d.ts +0 -580
  188. package/chunks/encryption-BjA6xbCO.d.ts +0 -372
  189. package/chunks/extensions-OO0WtInj.d.ts +0 -294
  190. package/chunks/glossaries-CIX7-KT_.d.ts +0 -1213
  191. package/chunks/groups-C86-UG7S.d.ts +0 -511
  192. package/chunks/identity-providers-h0dKNxGZ.d.ts +0 -711
  193. package/chunks/interceptors-Csx2tEi5.d.ts +0 -52
  194. package/chunks/interceptors-DTYm37AU.js +0 -104
  195. package/chunks/ip-policies-CKRIlbP7.d.ts +0 -327
  196. package/chunks/ip-policies-DXlf172B.js +0 -108
  197. package/chunks/items-C-jzqvFW.d.ts +0 -536
  198. package/chunks/knowledgebases-CyQtVcZN.d.ts +0 -977
  199. package/chunks/licenses-xzjnkitW.d.ts +0 -663
  200. package/chunks/lineage-graphs-CViCCzKy.d.ts +0 -697
  201. package/chunks/ml-Abt2MUva.d.ts +0 -2809
  202. package/chunks/notes-BZxuyDgt.d.ts +0 -111
  203. package/chunks/notifications-Bd_gp4jU.d.ts +0 -99
  204. package/chunks/oauth-clients-B5QPr4IM.d.ts +0 -563
  205. package/chunks/oauth-tokens-1b7V8182.d.ts +0 -127
  206. package/chunks/qix-CYQsLyGQ.js +0 -40
  207. package/chunks/questions-BVp0tvNs.d.ts +0 -364
  208. package/chunks/quotas-CfAebRJd.d.ts +0 -113
  209. package/chunks/reload-tasks-DfwUTetn.d.ts +0 -249
  210. package/chunks/reloads-CwmagnFx.d.ts +0 -260
  211. package/chunks/report-templates-DjQYj5dn.d.ts +0 -287
  212. package/chunks/reports-DzNC6Uq3.d.ts +0 -861
  213. package/chunks/roles-BYFIY6E7.d.ts +0 -312
  214. package/chunks/sharing-tasks-BMGIQ-FO.d.ts +0 -1164
  215. package/chunks/spaces-BK823t-b.d.ts +0 -780
  216. package/chunks/tasks-COKDfShO.d.ts +0 -564
  217. package/chunks/temp-contents-zDomB-g6.d.ts +0 -168
  218. package/chunks/tenants-Bhn86519.d.ts +0 -361
  219. package/chunks/themes-v9NbhiBo.d.ts +0 -269
  220. package/chunks/transports-CqEiFxD3.d.ts +0 -362
  221. package/chunks/ui-config-Crs0mVMp.d.ts +0 -274
  222. package/chunks/users-BSOBU_fg.d.ts +0 -675
  223. package/chunks/web-integrations-MisPAHod.d.ts +0 -295
  224. package/chunks/web-notifications-DVy6FHYh.d.ts +0 -274
  225. package/chunks/webhooks-Dr4EiXqy.d.ts +0 -505
  226. /package/chunks/{auth-types-E99tzdN0.d.ts → auth-types-YrlH_R9f.d.ts} +0 -0
  227. /package/chunks/{auth-types-JehqruDP.js → auth-types-h43TVDpB.js} +0 -0
  228. /package/chunks/{global-types-CrOvI33z.js → global-types-CEVAJebk.js} +0 -0
  229. /package/chunks/{invoke-fetch-CbU2Dgqr.d.ts → invoke-fetch-C1Z0RJYU.d.ts} +0 -0
  230. /package/chunks/{utils-BnC4lrlq.js → utils-vv-xFm06.js} +0 -0
  231. /package/chunks/{websocket-errors-DSbO6kDZ.js → websocket-errors-CRTDTtBL.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (all, symbols) => {
3
+ var __exportAll = (all, symbols) => {
4
4
  let target = {};
5
5
  for (var name in all) {
6
6
  __defProp(target, name, {
@@ -15,4 +15,4 @@ var __export = (all, symbols) => {
15
15
  };
16
16
 
17
17
  //#endregion
18
- export { __export as t };
18
+ export { __exportAll as t };
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/@qlik+runtime-module-loader@1.3.3/node_modules/@qlik/runtime-module-loader/dist/index.js
1
+ //#region node_modules/.pnpm/@qlik+runtime-module-loader@1.4.0/node_modules/@qlik/runtime-module-loader/dist/index.js
2
2
  if (!window.__qlikMainPrivateResolvers) window.__qlikMainPrivateResolvers = {};
3
3
  if (!window.__qlikMainPrivateResolvers.mainUrlPromise) window.__qlikMainPrivateResolvers.mainUrlPromise = new Promise((resolve) => {
4
4
  if (window.__qlikMainPrivateResolvers) window.__qlikMainPrivateResolvers.resolveMainJsUrl = (value) => {
@@ -73,14 +73,14 @@ async function importFromCdn(name) {
73
73
  async function handleWindowsAuthentication(url, hostConfig) {
74
74
  if (hostConfig?.authType === "windowscookie") {
75
75
  if (hostConfig.getAccessToken) {
76
- const token = await resolveTokenIfPresent(hostConfig.getAccessToken);
77
- if (token) await fetch(url, {
76
+ const token2 = await resolveTokenIfPresent(hostConfig.getAccessToken);
77
+ if (token2) await fetch(url, {
78
78
  method: "GET",
79
79
  mode: "cors",
80
80
  credentials: "include",
81
81
  headers: {
82
82
  "Content-Type": "application/json",
83
- Authorization: `Bearer ${token}`
83
+ Authorization: `Bearer ${token2}`
84
84
  }
85
85
  });
86
86
  return true;
@@ -1,7 +1,5 @@
1
- import { a as sortKeys, i as isNode, r as isBrowser, t as cleanFalsyValues } from "./utils-BnC4lrlq.js";
2
- import { i as getInterceptors } from "./interceptors-DTYm37AU.js";
3
- import { n as hostConfigCommonProperties, t as authTypesThatCanBeOmitted } from "./auth-types-JehqruDP.js";
4
- import { customAlphabet, nanoid } from "nanoid";
1
+ import { a as sortKeys, i as isNode, r as isBrowser, t as cleanFalsyValues } from "./utils-vv-xFm06.js";
2
+ import { n as hostConfigCommonProperties, t as authTypesThatCanBeOmitted } from "./auth-types-h43TVDpB.js";
5
3
 
6
4
  //#region src/platform/platform-functions.ts
7
5
  const getPlatform = async (options = {}) => {
@@ -130,28 +128,42 @@ const result = (data) => ({
130
128
 
131
129
  //#endregion
132
130
  //#region src/utils/random.ts
131
+ const NANOID_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
132
+ const HEX_ALPHABET = "0123456789abcdef";
133
+ /**
134
+ * Generates a random string from the given alphabet using crypto.getRandomValues
135
+ * Works in both browser and Node.js environments
136
+ */
137
+ function generateRandomFromAlphabet(alphabet, length) {
138
+ const bytes = new Uint8Array(length);
139
+ globalThis.crypto.getRandomValues(bytes);
140
+ let result$1 = "";
141
+ for (let i = 0; i < length; i++) result$1 += alphabet[bytes[i] % alphabet.length];
142
+ return result$1;
143
+ }
133
144
  /**
134
145
  * Method helper for generating a random string [a-zA-Z0-9\-_]{length}
135
146
  * @param length - the length of the string
136
147
  */
137
148
  function generateRandomString(targetLength) {
138
- return nanoid(targetLength);
149
+ return generateRandomFromAlphabet(NANOID_ALPHABET, targetLength);
139
150
  }
140
151
  /**
141
152
  * Method helper for generating a random hexadecimal-string [0-9a-f]{length}
142
153
  * @param length - the length of the string
143
154
  */
144
155
  function generateRandomHexString(targetLength) {
145
- return customAlphabet("1234567890abcdef", targetLength)();
156
+ return generateRandomFromAlphabet(HEX_ALPHABET, targetLength);
146
157
  }
147
158
 
148
159
  //#endregion
149
160
  //#region src/utils/expose-internal-test-apis.ts
150
- const internalApisName = "__QLIK_INTERNAL__DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
151
161
  function exposeInternalApiOnWindow(name, fn) {
152
162
  if (globalThis.location?.origin.startsWith("https://localhost:") || globalThis.location?.origin?.endsWith("qlik-stage.com")) {
153
- if (globalThis[internalApisName] === void 0) globalThis[internalApisName] = {};
154
- globalThis[internalApisName][name] = fn;
163
+ if (globalThis.QlikMain) {
164
+ if (globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix === void 0) globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix = {};
165
+ globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix[name] = fn;
166
+ }
155
167
  }
156
168
  }
157
169
 
@@ -969,12 +981,12 @@ function shouldUseCachedResult(options, cacheEntry, defaultMaxCacheTime) {
969
981
  */
970
982
  function toCacheKey({ url, query, headers, serializedHostConfig }) {
971
983
  let cacheKey = url;
972
- if (query) {
984
+ if (query && Object.keys(query).length > 0) {
973
985
  const queryString = encodeQueryParams(query);
974
986
  if (url.includes("?")) cacheKey = cacheKey.concat(`&${queryString}`);
975
987
  else cacheKey = cacheKey.concat(`?${queryString}`);
976
988
  }
977
- if (headers) cacheKey = cacheKey.concat(`+headers=${JSON.stringify(headers)}`);
989
+ if (headers && Object.keys(headers).length > 0) cacheKey = cacheKey.concat(`+headers=${JSON.stringify(headers)}`);
978
990
  if (serializedHostConfig && serializedHostConfig !== "{}") cacheKey = cacheKey.concat(`+host-config=${serializedHostConfig}`);
979
991
  return cacheKey;
980
992
  }
@@ -1194,7 +1206,7 @@ async function getInvokeFetchUrlParams({ method, pathTemplate, pathVariables, qu
1194
1206
  ...query,
1195
1207
  ...authQueryParams
1196
1208
  }));
1197
- const serializedHostConfig = serializeHostConfig$1(options?.hostConfig);
1209
+ const serializedHostConfig = serializeHostConfig(options?.hostConfig);
1198
1210
  return {
1199
1211
  completeUrl,
1200
1212
  authHeaders,
@@ -1245,7 +1257,7 @@ function addPagingFunctions(api, { method, body, options, authHeaders, credentia
1245
1257
  return value.then((resp) => {
1246
1258
  const dataWithPotentialLinks = resp.data;
1247
1259
  if (!dataWithPotentialLinks) return resp;
1248
- const serializedHostConfig = serializeHostConfig$1(options?.hostConfig);
1260
+ const serializedHostConfig = serializeHostConfig(options?.hostConfig);
1249
1261
  const prevUrl = dataWithPotentialLinks.links?.prev?.href;
1250
1262
  const nextUrl = dataWithPotentialLinks.links?.next?.href;
1251
1263
  if (prevUrl) resp.prev = (prevOptions) => invokeFetchWithUrl(api, {
@@ -1340,8 +1352,8 @@ const defaultUserAgent = "qmfe-api/latest";
1340
1352
  * @param api Name of api to call. Will be used for caching responses.
1341
1353
  * @param invokeFetchProps InvokeFetchProperties
1342
1354
  */
1343
- async function invokeFetch(api, props, interceptors) {
1344
- const effectiveInterceptors = interceptors || getInterceptors();
1355
+ async function invokeFetch(api, props, interceptors$1) {
1356
+ const effectiveInterceptors = interceptors$1 || getInterceptors();
1345
1357
  const invokeFetchFinal = (reqeust) => invokeFetchIntercepted(api, reqeust);
1346
1358
  return (effectiveInterceptors || []).reduce((proceed, interceptor) => (request) => interceptor(request, proceed), invokeFetchFinal)(props);
1347
1359
  }
@@ -1451,6 +1463,7 @@ const QLIK_CSRF_TOKEN = "qlik-csrf-token";
1451
1463
  function clearCsrfToken(hostConfig) {
1452
1464
  const locationUrl = toValidLocationUrl(hostConfig);
1453
1465
  delete csrfTokens[locationUrl];
1466
+ clearApiCache("csrf-token");
1454
1467
  }
1455
1468
  /**
1456
1469
  * Fetches the CSRF token from the server. The token is cached and will be reused for subsequent calls.
@@ -1470,7 +1483,8 @@ async function getCsrfToken(hostConfig, noCache) {
1470
1483
  pathTemplate,
1471
1484
  options: {
1472
1485
  hostConfig,
1473
- noCache: true
1486
+ maxCacheAge: 5e3,
1487
+ noCache
1474
1488
  }
1475
1489
  })).headers.get(QLIK_CSRF_TOKEN);
1476
1490
  if (!csrfToken) return "";
@@ -1826,15 +1840,15 @@ var windows_cookie_default = {
1826
1840
  //#region src/auth/internal/default-auth-modules/windows-cookie-node.ts
1827
1841
  const nodeCookieStore = /* @__PURE__ */ new Map();
1828
1842
  function clearCookieInStore(hostConfig) {
1829
- const key = serializeHostConfig$1(hostConfig);
1843
+ const key = serializeHostConfig(hostConfig);
1830
1844
  nodeCookieStore.delete(key);
1831
1845
  }
1832
1846
  function setCookieInStore(hostConfig, cookie) {
1833
- const key = serializeHostConfig$1(hostConfig);
1847
+ const key = serializeHostConfig(hostConfig);
1834
1848
  nodeCookieStore.set(key, cookie);
1835
1849
  }
1836
1850
  function getCookieInStore(hostConfig) {
1837
- const key = serializeHostConfig$1(hostConfig);
1851
+ const key = serializeHostConfig(hostConfig);
1838
1852
  return nodeCookieStore.get(key);
1839
1853
  }
1840
1854
  async function getCookie(hostConfig) {
@@ -1910,15 +1924,15 @@ let ongoingAuthModuleLoading = Promise.resolve();
1910
1924
  let authModulesRegistered = false;
1911
1925
  (function registerDefaultAuthModules() {
1912
1926
  if (!authModulesRegistered) {
1913
- registerAuthModule("apikey", apikey_default);
1914
- registerAuthModule("cookie", cookie_default);
1915
- registerAuthModule("none", none_default);
1916
- registerAuthModule("noauth", noauth_default);
1917
- registerAuthModule("oauth2", oauth_default);
1918
- registerAuthModule("anonymous", anonymous_default);
1919
- if (isBrowser()) registerAuthModule("windowscookie", windows_cookie_default);
1920
- else registerAuthModule("windowscookie", windows_cookie_node_default);
1921
- registerAuthModule("reference", reference_default);
1927
+ registerAuthModule$1("apikey", apikey_default);
1928
+ registerAuthModule$1("cookie", cookie_default);
1929
+ registerAuthModule$1("none", none_default);
1930
+ registerAuthModule$1("noauth", noauth_default);
1931
+ registerAuthModule$1("oauth2", oauth_default);
1932
+ registerAuthModule$1("anonymous", anonymous_default);
1933
+ if (isBrowser()) registerAuthModule$1("windowscookie", windows_cookie_default);
1934
+ else registerAuthModule$1("windowscookie", windows_cookie_node_default);
1935
+ registerAuthModule$1("reference", reference_default);
1922
1936
  authModulesRegistered = true;
1923
1937
  }
1924
1938
  })();
@@ -1927,7 +1941,7 @@ let authModulesRegistered = false;
1927
1941
  * @param name the name of the module
1928
1942
  * @param authModule the implementation of the AuthModule interface
1929
1943
  */
1930
- function registerAuthModule(name, authModule) {
1944
+ function registerAuthModule$1(name, authModule) {
1931
1945
  authModules[name.toLowerCase()] = authModule;
1932
1946
  }
1933
1947
  /**
@@ -1955,7 +1969,7 @@ function getRegisteredAuthModule(authType) {
1955
1969
  */
1956
1970
  async function getAuthModule(hostConfig) {
1957
1971
  const hostConfigToUse = withResolvedHostConfig(hostConfig);
1958
- const authType = await determineAuthType(hostConfigToUse);
1972
+ const authType = await determineAuthType$1(hostConfigToUse);
1959
1973
  if (ongoingAuthModuleLoading) await ongoingAuthModuleLoading;
1960
1974
  let authModule = getRegisteredAuthModule(authType);
1961
1975
  if (!authModule) {
@@ -1965,7 +1979,7 @@ async function getAuthModule(hostConfig) {
1965
1979
  */
1966
1980
  ongoingAuthModuleLoading = (async () => {
1967
1981
  authModule = await resolveGloballyDefinedAuthModule(authType);
1968
- if (authModule) registerAuthModule(authType, authModule);
1982
+ if (authModule) registerAuthModule$1(authType, authModule);
1969
1983
  })();
1970
1984
  await ongoingAuthModuleLoading;
1971
1985
  }
@@ -2025,7 +2039,7 @@ function internalValidateHostConfig(hostConfig, { requiredProps, optionalProps }
2025
2039
  * Determines the authType associated with a HostConfig even if it's
2026
2040
  * not explicitly set.
2027
2041
  */
2028
- async function determineAuthType(hostConfig) {
2042
+ async function determineAuthType$1(hostConfig) {
2029
2043
  if (hostConfig.authType) return hostConfig.authType;
2030
2044
  if (hostConfig.apiKey) return "apikey";
2031
2045
  if (hostConfig.accessCode) return "anonymous";
@@ -2101,7 +2115,7 @@ function globalReplacer(key, value) {
2101
2115
  /**
2102
2116
  * Serializes the provided hostConfig, if present, otherwise the default one.
2103
2117
  */
2104
- function serializeHostConfig(hostConfig) {
2118
+ function serializeHostConfig$1(hostConfig) {
2105
2119
  const sorted = sortKeys(removeDefaults(withResolvedHostConfig(hostConfig)));
2106
2120
  return JSON.stringify(sorted, globalReplacer);
2107
2121
  }
@@ -2111,7 +2125,7 @@ const registeredHostConfigs = /* @__PURE__ */ new Map();
2111
2125
  * @param name The name of the host config to be used to reference the host config later.
2112
2126
  * @param hostConfig The host config to register.
2113
2127
  */
2114
- function registerHostConfig(name, hostConfig) {
2128
+ function registerHostConfig$1(name, hostConfig) {
2115
2129
  const reference = hostConfig?.reference || null;
2116
2130
  if (reference && !registeredHostConfigs.has(reference)) throw new InvalidHostConfigError(`Host config with reference "${reference}" is not registered. Please register it before using it.`);
2117
2131
  if (registeredHostConfigs.has(name)) console.warn(`registerHostConfig: Host config with name "${name}" is already registered. Overwriting.`);
@@ -2121,7 +2135,7 @@ function registerHostConfig(name, hostConfig) {
2121
2135
  * Unregisters a host config with the given name.
2122
2136
  * @param name The name of the host config to unregister.
2123
2137
  */
2124
- function unregisterHostConfig(name) {
2138
+ function unregisterHostConfig$1(name) {
2125
2139
  if (registeredHostConfigs.has(name)) registeredHostConfigs.delete(name);
2126
2140
  else console.warn(`unregisterHostConfig: Host config with name "${name}" not found.`);
2127
2141
  }
@@ -2139,15 +2153,15 @@ function getRegisteredHostConfig(name) {
2139
2153
  * @private
2140
2154
  * @param hostConfig the default HostConfig to use
2141
2155
  */
2142
- function setDefaultHostConfig(hostConfig) {
2143
- registerHostConfig("default", hostConfig || {});
2156
+ function setDefaultHostConfig$1(hostConfig) {
2157
+ registerHostConfig$1("default", hostConfig || {});
2144
2158
  }
2145
2159
  /**
2146
2160
  * Gets the default host config that will be used for all qmfe api calls that do not include a HostConfig.
2147
2161
  * @private
2148
2162
  * @returns The default host config that will be used for all qmfe api calls that do not include a HostConfig
2149
2163
  */
2150
- function getDefaultHostConfig() {
2164
+ function getDefaultHostConfig$1() {
2151
2165
  return getRegisteredHostConfig("default") || {};
2152
2166
  }
2153
2167
 
@@ -2171,8 +2185,8 @@ function logToConsole({ message }) {
2171
2185
  * @param hostConfig the HostConfig containing authentication details
2172
2186
  * @returns promise that resolvs with the determined authentication type
2173
2187
  */
2174
- function determineAuthType$1(hostConfig) {
2175
- return determineAuthType(hostConfig);
2188
+ function determineAuthType(hostConfig) {
2189
+ return determineAuthType$1(hostConfig);
2176
2190
  }
2177
2191
  /**
2178
2192
  * Determines if a host is cross origin or not
@@ -2314,36 +2328,36 @@ async function getAccessToken(props) {
2314
2328
  * @param name the name of the module
2315
2329
  * @param authModule the implementation of the AuthModule interface
2316
2330
  */
2317
- function registerAuthModule$1(name, authModule) {
2318
- registerAuthModule(name, authModule);
2331
+ function registerAuthModule(name, authModule) {
2332
+ registerAuthModule$1(name, authModule);
2319
2333
  }
2320
2334
  /**
2321
2335
  * Sets the default host config that will be used for all api calls that do not include a HostConfig
2322
2336
  * @param hostConfig the default HostConfig to use
2323
2337
  */
2324
- function setDefaultHostConfig$1(hostConfig) {
2325
- setDefaultHostConfig(hostConfig);
2338
+ function setDefaultHostConfig(hostConfig) {
2339
+ setDefaultHostConfig$1(hostConfig);
2326
2340
  }
2327
2341
  /**
2328
2342
  * Registers a host config with the given name.
2329
2343
  * @param name The name of the host config to be used to reference the host config later.
2330
2344
  * @param hostConfig The host config to register.
2331
2345
  */
2332
- function registerHostConfig$1(name, hostConfig) {
2333
- registerHostConfig(name, hostConfig);
2346
+ function registerHostConfig(name, hostConfig) {
2347
+ registerHostConfig$1(name, hostConfig);
2334
2348
  }
2335
2349
  /**
2336
2350
  * Unregisters a host config with the given name.
2337
2351
  * @param name The name of the host config to unregister.
2338
2352
  */
2339
- function unregisterHostConfig$1(name) {
2340
- unregisterHostConfig(name);
2353
+ function unregisterHostConfig(name) {
2354
+ unregisterHostConfig$1(name);
2341
2355
  }
2342
2356
  /**
2343
2357
  * Serializes the provided hostConfig, if present, otherwise the default one.
2344
2358
  */
2345
- function serializeHostConfig$1(hostConfig) {
2346
- return serializeHostConfig(hostConfig);
2359
+ function serializeHostConfig(hostConfig) {
2360
+ return serializeHostConfig$1(hostConfig);
2347
2361
  }
2348
2362
  /**
2349
2363
  * Throws errors if hostConfig is missing or missing properties on cross domain requests
@@ -2401,14 +2415,204 @@ function withResolvedHostConfig(hostConfig) {
2401
2415
  return refConfig;
2402
2416
  }
2403
2417
  if (hostConfig && Object.keys(hostConfig).length > 0) return hostConfig;
2404
- return getDefaultHostConfig();
2418
+ return getDefaultHostConfig$1();
2405
2419
  }
2406
2420
  /**
2407
2421
  * Returns the default host config that is used for all qmfe api calls that do not include a host config
2408
2422
  */
2409
- function getDefaultHostConfig$1() {
2410
- return getDefaultHostConfig();
2423
+ function getDefaultHostConfig() {
2424
+ return getDefaultHostConfig$1();
2425
+ }
2426
+
2427
+ //#endregion
2428
+ //#region src/interceptors/boot-interceptors.ts
2429
+ /**
2430
+ * @internal
2431
+ * The paths expected in the from core-init BFF response.
2432
+ * Exposed for testing.
2433
+ */
2434
+ const coreBootPaths = new Set([
2435
+ "/api/v1/brands/active",
2436
+ "/api/v1/claims/me",
2437
+ "/api/v1/licenses/allotments",
2438
+ "/api/v1/licenses/allotments/me",
2439
+ "/api/v1/licenses/number",
2440
+ "/api/v1/licenses/status",
2441
+ "/api/v1/tenants/me",
2442
+ "/api/v1/users/me",
2443
+ "/api/v1/user-locale"
2444
+ ]);
2445
+ /**
2446
+ * @internal
2447
+ * The path of the core-init BFF response.
2448
+ * Exposed for testing.
2449
+ */
2450
+ const coreBootEndpoint = "/api/v1/boot/core-init";
2451
+ let coreBootPromises = {};
2452
+ let enableDespiteNode = false;
2453
+ function interceptorEnabled() {
2454
+ return !isNode() || enableDespiteNode;
2455
+ }
2456
+ /**
2457
+ * An interceptor that populates the cache from the response of a _backend
2458
+ * for frontend_ endpoint. This endpoint contains the response of the most common
2459
+ * initial calls, mainly from **qmfe-core**.
2460
+ *
2461
+ * If the interceptor finds a matching call it runs once and then removes itself after
2462
+ * populating the cache causing the original request (and following ones) to hit the cache instead.
2463
+ *
2464
+ * The endpoint is implemented in the _customizations_ service and should
2465
+ * contain the responses of the requests specified in 'coreBootPaths'.
2466
+ */
2467
+ const coreBootInterceptor = async (request, proceed) => {
2468
+ if (!interceptorEnabled()) return proceed(request);
2469
+ if (request.pathTemplate !== "/api/v1/features" && !coreBootPaths.has(request.pathTemplate)) return proceed(request);
2470
+ const hostConfig = request.options?.hostConfig;
2471
+ if (hostConfig?.authType === "noauth" || await isWindows(hostConfig) || (await getPlatform({ hostConfig })).isCloudConsole) return proceed(request);
2472
+ const serializedHostConfig = serializeHostConfig$1(request.options?.hostConfig);
2473
+ coreBootPromises[serializedHostConfig] ??= callCoreBootAndFillCache(hostConfig, serializedHostConfig);
2474
+ if (request.pathTemplate !== "/api/v1/features") await coreBootPromises[serializedHostConfig];
2475
+ return proceed(request);
2476
+ };
2477
+ async function callCoreBootAndFillCache(hostConfig, serializedHostConfig) {
2478
+ const bootRequest = {
2479
+ method: "GET",
2480
+ pathTemplate: coreBootEndpoint,
2481
+ options: { hostConfig }
2482
+ };
2483
+ try {
2484
+ const bootResponse = await invokeFetch(".global", bootRequest);
2485
+ const locationUrl = toValidLocationUrl(hostConfig);
2486
+ populateCacheFrom(bootResponse.data, coreBootPaths, serializedHostConfig, locationUrl);
2487
+ } catch (e) {
2488
+ console.error("Failed to bootstrap core-info:", e);
2489
+ }
2490
+ }
2491
+ function populateCacheFrom(responses, pathsToInclude, serializedHostConfig, locationUrl) {
2492
+ if (!responses) return;
2493
+ for (const res of responses) {
2494
+ if (!pathsToInclude.has(res.path)) continue;
2495
+ const completeUrl = locationUrl + res.path;
2496
+ const { status, method, data } = res;
2497
+ if (typeof data === "undefined") continue;
2498
+ if (status && (status < 200 || status >= 300)) continue;
2499
+ const response = Promise.resolve({
2500
+ status: status || 200,
2501
+ data
2502
+ });
2503
+ const cacheKey = toCacheKey({
2504
+ url: completeUrl,
2505
+ serializedHostConfig
2506
+ });
2507
+ updateCache(globalCacheNamespace, {
2508
+ method: method || "GET",
2509
+ completeUrl,
2510
+ cacheKey
2511
+ }, response);
2512
+ }
2513
+ }
2514
+
2515
+ //#endregion
2516
+ //#region src/interceptors/interceptors.ts
2517
+ let GLOBAL_INTERCEPTORS;
2518
+ function createInterceptors() {
2519
+ const interceptors$1 = [...GLOBAL_INTERCEPTORS?.getInterceptors() || []];
2520
+ return {
2521
+ addInterceptor: (interceptor) => {
2522
+ interceptors$1.push(interceptor);
2523
+ return interceptor;
2524
+ },
2525
+ removeInterceptor: (interceptor) => {
2526
+ const index = interceptors$1.indexOf(interceptor);
2527
+ let removed;
2528
+ if (index !== -1) removed = interceptors$1.splice(index, 1)[0];
2529
+ return removed || null;
2530
+ },
2531
+ getInterceptors: () => interceptors$1
2532
+ };
2411
2533
  }
2534
+ let addDefaultInterceptorsRun = false;
2535
+ function addDefaultInterceptors() {
2536
+ if (addDefaultInterceptorsRun) return;
2537
+ if (isBrowser()) {
2538
+ const readFlagsFromUrlQuery = () => {
2539
+ const featuresParam = new URLSearchParams(window.location.search).get("features");
2540
+ if (!featuresParam) return {};
2541
+ return featuresParam.split(",").map((item) => item.trim()).reduce((map, obj) => {
2542
+ const value = !obj.startsWith("!");
2543
+ const key = value ? obj : obj.substring(1);
2544
+ map[key] = value;
2545
+ return map;
2546
+ }, {});
2547
+ };
2548
+ const readFlagsFromLocalStorage = () => {
2549
+ try {
2550
+ const featuresParam = localStorage.getItem("qcs-features");
2551
+ if (featuresParam) return JSON.parse(featuresParam);
2552
+ return {};
2553
+ } catch {
2554
+ return {};
2555
+ }
2556
+ };
2557
+ const flagsFromUrl = readFlagsFromUrlQuery();
2558
+ const flagsFromLocalStorage = readFlagsFromLocalStorage();
2559
+ const featuresInterceptor = async (request, proceed) => {
2560
+ let resultPromise;
2561
+ if (request.pathTemplate === "/api/v1/features") {
2562
+ resultPromise = proceed(request);
2563
+ const result$1 = await resultPromise;
2564
+ return {
2565
+ ...result$1,
2566
+ data: {
2567
+ ...result$1.data || {},
2568
+ ...flagsFromLocalStorage,
2569
+ ...flagsFromUrl
2570
+ }
2571
+ };
2572
+ }
2573
+ return proceed(request);
2574
+ };
2575
+ GLOBAL_INTERCEPTORS.addInterceptor(featuresInterceptor);
2576
+ GLOBAL_INTERCEPTORS.addInterceptor(coreBootInterceptor);
2577
+ }
2578
+ addDefaultInterceptorsRun = true;
2579
+ }
2580
+ /**
2581
+ * The global interceptor stack
2582
+ */
2583
+ GLOBAL_INTERCEPTORS = createInterceptors();
2584
+ /**
2585
+ * Adds an interceptor to the global interceptor stack
2586
+ * Returns the newly added interceptor
2587
+ * @param interceptor the interceptor to add
2588
+ * @returns the newly added interceptor
2589
+ */
2590
+ function addInterceptor(interceptor) {
2591
+ return GLOBAL_INTERCEPTORS.addInterceptor(interceptor);
2592
+ }
2593
+ /**
2594
+ * Removes an interceptor from the global interceptor stack
2595
+ * @param interceptor the interceptor remove
2596
+ */
2597
+ function removeInterceptor(interceptor) {
2598
+ return GLOBAL_INTERCEPTORS.removeInterceptor(interceptor);
2599
+ }
2600
+ /**
2601
+ * Gets all registered interceptors
2602
+ */
2603
+ function getInterceptors() {
2604
+ return GLOBAL_INTERCEPTORS.getInterceptors();
2605
+ }
2606
+ /**
2607
+ * The interceptors API
2608
+ */
2609
+ const interceptors = {
2610
+ addInterceptor,
2611
+ removeInterceptor,
2612
+ getInterceptors,
2613
+ createInterceptors
2614
+ };
2615
+ var interceptors_default = interceptors;
2412
2616
 
2413
2617
  //#endregion
2414
- export { getPlatform as A, invokeFetch as C, InvokeFetchError as D, EncodingError as E, exposeInternalApiOnWindow as O, clearApiCache as S, appendQueryToUrl as T, unregisterHostConfig$1 as _, getWebResourceAuthParams as a, InvalidHostConfigError as b, isHostCrossOrigin as c, registerAuthModule$1 as d, registerHostConfig$1 as f, toValidWebsocketLocationUrl as g, toValidLocationUrl as h, getRestCallAuthParams as i, generateRandomString as k, isWindows as l, setDefaultHostConfig$1 as m, getAccessToken as n, getWebSocketAuthParams as o, serializeHostConfig$1 as p, getDefaultHostConfig$1 as r, handleAuthenticationError as s, determineAuthType$1 as t, logout as u, AuthorizationError as v, parseFetchResponse as w, UnexpectedAuthTypeError as x, InvalidAuthTypeError as y };
2618
+ export { parseFetchResponse as A, unregisterHostConfig as C, UnexpectedAuthTypeError as D, InvalidHostConfigError as E, generateRandomString as F, getPlatform as I, EncodingError as M, InvokeFetchError as N, clearApiCache as O, exposeInternalApiOnWindow as P, toValidWebsocketLocationUrl as S, InvalidAuthTypeError as T, registerAuthModule as _, interceptors_default as a, setDefaultHostConfig as b, getAccessToken as c, getWebResourceAuthParams as d, getWebSocketAuthParams as f, logout as g, isWindows as h, getInterceptors as i, appendQueryToUrl as j, invokeFetch as k, getDefaultHostConfig as l, isHostCrossOrigin as m, addInterceptor as n, removeInterceptor as o, handleAuthenticationError as p, createInterceptors as r, determineAuthType as s, addDefaultInterceptors as t, getRestCallAuthParams as u, registerHostConfig as v, AuthorizationError as w, toValidLocationUrl as x, serializeHostConfig as y };
@@ -1,8 +1,8 @@
1
- import { r as isBrowser } from "./utils-BnC4lrlq.js";
2
- import { n as getInvokeFetchRuntimeModule } from "./public-runtime-modules-Dwjzb3l8.js";
1
+ import { r as isBrowser } from "./utils-vv-xFm06.js";
2
+ import { n as getInvokeFetchRuntimeModule } from "./public-runtime-modules-QhLPeQr5.js";
3
3
 
4
4
  //#region src/public/invoke-fetch.ts
5
- const defaultUserAgent = "qlik-api/2.2.0";
5
+ const defaultUserAgent = "qlik-api/2.3.0";
6
6
  async function invokeFetch(api, props) {
7
7
  const hostConfig = props.options?.hostConfig;
8
8
  let userAgent;
@@ -1,8 +1,4 @@
1
- import "./utils-BnC4lrlq.js";
2
- import "./interceptors-DTYm37AU.js";
3
- import "./global-types-CrOvI33z.js";
4
- import "./auth-types-JehqruDP.js";
5
- import { C as invokeFetch, D as InvokeFetchError, E as EncodingError, S as clearApiCache, w as parseFetchResponse } from "./auth-functions-BmZgZYSs.js";
1
+ import { A as parseFetchResponse, M as EncodingError, N as InvokeFetchError, O as clearApiCache, k as invokeFetch } from "./interceptors-DipDBQQ5.js";
6
2
 
7
3
  //#region src/invoke-fetch/invoke-fetch.ts
8
4
  /**
@@ -1,29 +1,29 @@
1
- import { i as isNode } from "./utils-BnC4lrlq.js";
1
+ import { i as isNode$1 } from "./utils-vv-xFm06.js";
2
2
 
3
3
  //#region src/public/public-runtime-modules.ts
4
- const isNode$1 = isNode();
4
+ const isNode = isNode$1();
5
5
  const importRuntimeModulePromise = (async () => {
6
- if (isNode$1) return () => {
6
+ if (isNode) return () => {
7
7
  throw new Error("importRuntimeModule cannot be used in a Node.js context");
8
8
  };
9
- return (await import("./dist-gXLIqDJW.js")).importRuntimeModule;
9
+ return (await import("./dist-n3iOVn1W.js")).importRuntimeModule;
10
10
  })();
11
11
  /**
12
12
  * @param hostConfig
13
13
  * @returns
14
14
  */
15
15
  async function getAuthRuntimeModule(hostConfig) {
16
- if (isNode$1) return import("./auth-Cle0_tmz.js");
16
+ if (isNode) return import("./auth-BowS4SUR.js");
17
17
  return (await importRuntimeModulePromise)("auth@v1", hostConfig);
18
18
  }
19
19
  async function getQixRuntimeModule(hostConfig) {
20
20
  await getAuthRuntimeModule(hostConfig);
21
- if (isNode$1) return import("./qix-DjxuPCX0.js");
21
+ if (isNode) return import("./qix-RCUslia8.js");
22
22
  return (await importRuntimeModulePromise)("qix@v1", hostConfig);
23
23
  }
24
24
  async function getInvokeFetchRuntimeModule(hostConfig) {
25
25
  await getAuthRuntimeModule(hostConfig);
26
- if (isNode$1) return import("./invoke-fetch-CucBpA1C.js");
26
+ if (isNode) return import("./invoke-fetch-DhdyFZ0F.js");
27
27
  return (await importRuntimeModulePromise)("invoke-fetch@v1", hostConfig);
28
28
  }
29
29
 
@@ -1,7 +1,7 @@
1
- import { d as HostConfig } from "./auth-types-E99tzdN0.js";
1
+ import { d as HostConfig } from "./auth-types-YrlH_R9f.js";
2
2
 
3
3
  //#region src/qix/types/engine-schema.d.ts
4
- declare const QIX_SCHEMA_VERSION = "12.2636.0";
4
+ declare const QIX_SCHEMA_VERSION = "12.2667.0";
5
5
  type AlfaNumString = {
6
6
  /**
7
7
  * Calculated value.
@@ -4006,6 +4006,10 @@ type NxGroupDef = {
4006
4006
  * The group's label. Will be evaluated as an expression if it starts with '='.
4007
4007
  */
4008
4008
  qLabel?: string;
4009
+ /**
4010
+ * Include all groups of the relevant type, by adding those groups last that are not explicitly included in the hierarchy (orphans)
4011
+ */
4012
+ qIncludeOrphanGroups?: boolean;
4009
4013
  /**
4010
4014
  * The objects and sub-groups that are members of the group.
4011
4015
  */