@qlik/api 1.22.0 → 1.23.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 (54) hide show
  1. package/api-keys.js +2 -2
  2. package/apps.d.ts +9 -1
  3. package/apps.js +2 -2
  4. package/audits.js +2 -2
  5. package/auth.js +2 -2
  6. package/automations.js +2 -2
  7. package/brands.d.ts +22 -22
  8. package/brands.js +2 -2
  9. package/chunks/{SNQHDUYY.js → 3KD5W26Z.js} +3 -3
  10. package/chunks/{PR52AAWU.js → 3REGOC54.js} +35 -31
  11. package/chunks/{TGDZVKG2.js → 3W4PFUMC.js} +1 -1
  12. package/chunks/{SEBN4KFZ.js → CUC5USM5.js} +1 -1
  13. package/chunks/{GZRY5VHW.js → E5TLRYTH.js} +1 -1
  14. package/chunks/{OEVNZ5IQ.js → OCV75U5H.js} +9 -8
  15. package/chunks/{TUPLQG25.js → SMQGR3VM.js} +2 -2
  16. package/chunks/{KBR7JBWC.js → UJV2QU2J.js} +37 -23
  17. package/chunks/{VHPC6L7L.js → VXEOAWM6.js} +1 -1
  18. package/collections.js +2 -2
  19. package/csp-origins.js +2 -2
  20. package/data-assets.js +2 -2
  21. package/data-connections.d.ts +1 -1
  22. package/data-connections.js +2 -2
  23. package/data-credentials.d.ts +63 -1
  24. package/data-credentials.js +11 -2
  25. package/data-files.js +2 -2
  26. package/extensions.js +2 -2
  27. package/glossaries.js +2 -2
  28. package/groups.js +2 -2
  29. package/identity-providers.d.ts +16 -16
  30. package/identity-providers.js +2 -2
  31. package/index.js +5 -4
  32. package/items.js +2 -2
  33. package/licenses.js +2 -2
  34. package/package.json +2 -2
  35. package/qix.d.ts +5 -2
  36. package/qix.js +2 -2
  37. package/quotas.js +2 -2
  38. package/reload-tasks.js +2 -2
  39. package/reloads.js +2 -2
  40. package/reports.d.ts +37 -1
  41. package/reports.js +2 -2
  42. package/roles.js +2 -2
  43. package/spaces.d.ts +2 -0
  44. package/spaces.js +2 -2
  45. package/temp-contents.js +2 -2
  46. package/tenants.d.ts +24 -15
  47. package/tenants.js +2 -2
  48. package/themes.js +2 -2
  49. package/transports.js +2 -2
  50. package/users.d.ts +1 -1
  51. package/users.js +2 -2
  52. package/web-integrations.js +2 -2
  53. package/web-notifications.js +2 -2
  54. package/webhooks.js +2 -2
package/api-keys.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/api-keys.ts
package/apps.d.ts CHANGED
@@ -463,7 +463,15 @@ type FilterError = {
463
463
  * - "REP-500000" Fail to resolve resource.
464
464
  * - "REP-503005" Engine unavailable, qix-sessions error no engines available.
465
465
  * - "REP-503013" Session unavailable. The engine session used to create the report is unavailable.
466
- * - "REP-504042" Context deadline exceeded applying selections of the Filter. */
466
+ * - "REP-504042" Context deadline exceeded applying selections of the Filter.
467
+ * - "REP-500031" Error creating bookmark.
468
+ * - "REP-404032" Bookmark not found after creating the bookmark.
469
+ * - "REP-500033" Error destroying bookmark.
470
+ * - "REP-404033" Bookmark not found destroying the bookmark.
471
+ * - "REP-409043" Dupliacate bookmark name.
472
+ * - "REP-429034" Filters quota exceeded.
473
+ * - "REP-400044" Missing or renamed field.
474
+ * - "REP-403049" Report filter access not allowed. */
467
475
  code: string;
468
476
  /** A summary in english explaining what went wrong. */
469
477
  title: string;
package/apps.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/apps.ts
package/audits.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/audits.ts
package/auth.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  logout,
5
5
  registerAuthModule,
6
6
  setDefaultHostConfig
7
- } from "./chunks/TGDZVKG2.js";
8
- import "./chunks/SNQHDUYY.js";
7
+ } from "./chunks/3W4PFUMC.js";
8
+ import "./chunks/3KD5W26Z.js";
9
9
  export {
10
10
  auth_default as default,
11
11
  getAccessToken,
package/automations.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/automations.ts
package/brands.d.ts CHANGED
@@ -100,7 +100,7 @@ type Link = {
100
100
  */
101
101
  type NoActiveBrand = unknown;
102
102
  /**
103
- * Lists all brand entries for a tenant
103
+ * Lists all brand entries for a tenant.
104
104
  *
105
105
  * @param query an object with query parameters
106
106
  * @throws GetBrandsHttpError
@@ -144,7 +144,7 @@ type GetBrands500HttpError = {
144
144
  };
145
145
  type GetBrandsHttpError = GetBrands400HttpError | GetBrands401HttpError | GetBrands403HttpError | GetBrands500HttpError;
146
146
  /**
147
- * Creates a new brand
147
+ * Creates a new brand.
148
148
  *
149
149
  * @param body an object with the body content
150
150
  * @throws CreateBrandHttpError
@@ -188,7 +188,7 @@ type CreateBrand500HttpError = {
188
188
  };
189
189
  type CreateBrandHttpError = CreateBrand400HttpError | CreateBrand401HttpError | CreateBrand403HttpError | CreateBrand500HttpError;
190
190
  /**
191
- * Retrieves the current active brand
191
+ * Returns the current active brand. If using the Qlik default brand, no value is returned.
192
192
  *
193
193
  * @throws GetActiveBrandHttpError
194
194
  */
@@ -204,7 +204,7 @@ type GetActiveBrandHttpError = {
204
204
  status: number;
205
205
  };
206
206
  /**
207
- * Deletes a specific brand
207
+ * Deletes a specific brand. If the active brand is deleted, the tenant will return to the Qlik default.
208
208
  *
209
209
  * @param brandId The brand's unique identifier.
210
210
  * @throws DeleteBrandHttpError
@@ -242,7 +242,7 @@ type DeleteBrand500HttpError = {
242
242
  };
243
243
  type DeleteBrandHttpError = DeleteBrand400HttpError | DeleteBrand401HttpError | DeleteBrand403HttpError | DeleteBrand404HttpError | DeleteBrand500HttpError;
244
244
  /**
245
- * Retrieves a specific brand
245
+ * Returns a specific brand.
246
246
  *
247
247
  * @param brandId The brand's unique identifier.
248
248
  * @throws GetBrandHttpError
@@ -280,7 +280,7 @@ type GetBrand500HttpError = {
280
280
  };
281
281
  type GetBrandHttpError = GetBrand400HttpError | GetBrand401HttpError | GetBrand403HttpError | GetBrand404HttpError | GetBrand500HttpError;
282
282
  /**
283
- * Patches a brand
283
+ * Patches a brand.
284
284
  *
285
285
  * @param brandId The brand's unique identifier.
286
286
  * @param body an object with the body content
@@ -358,7 +358,7 @@ type ActivateBrand500HttpError = {
358
358
  };
359
359
  type ActivateBrandHttpError = ActivateBrand400HttpError | ActivateBrand401HttpError | ActivateBrand403HttpError | ActivateBrand404HttpError | ActivateBrand500HttpError;
360
360
  /**
361
- * Sets the brand so it is no longer active. If the brand is already inactive, no action is taken.
361
+ * Sets the brand so it is no longer active, returning the tenant the Qlik default brand. If the brand is already inactive, no action is taken.
362
362
  *
363
363
  * @param brandId The brand's unique identifier.
364
364
  * @param body an object with the body content
@@ -397,7 +397,7 @@ type DeactivateBrand500HttpError = {
397
397
  };
398
398
  type DeactivateBrandHttpError = DeactivateBrand400HttpError | DeactivateBrand401HttpError | DeactivateBrand403HttpError | DeactivateBrand404HttpError | DeactivateBrand500HttpError;
399
399
  /**
400
- * Deletes a specific brand file
400
+ * Deletes the specified brand file.
401
401
  *
402
402
  * @param brandId The brand's unique identifier.
403
403
  * @param brandFileId The unique identifier of a file within a brand.
@@ -436,7 +436,7 @@ type DeleteBrandFile500HttpError = {
436
436
  };
437
437
  type DeleteBrandFileHttpError = DeleteBrandFile400HttpError | DeleteBrandFile401HttpError | DeleteBrandFile403HttpError | DeleteBrandFile404HttpError | DeleteBrandFile500HttpError;
438
438
  /**
439
- * Downloads the brand file
439
+ * Downloads the specified brand file.
440
440
  *
441
441
  * @param brandId The brand's unique identifier.
442
442
  * @param brandFileId The unique identifier of a file within a brand.
@@ -475,7 +475,7 @@ type GetBrandFile500HttpError = {
475
475
  };
476
476
  type GetBrandFileHttpError = GetBrandFile400HttpError | GetBrandFile401HttpError | GetBrandFile403HttpError | GetBrandFile404HttpError | GetBrandFile500HttpError;
477
477
  /**
478
- * Creates a brand file
478
+ * Creates a brand file for the specified identifier.
479
479
  *
480
480
  * @param brandId The brand's unique identifier.
481
481
  * @param brandFileId The unique identifier of a file within a brand.
@@ -518,7 +518,7 @@ type CreateBrandFile500HttpError = {
518
518
  };
519
519
  type CreateBrandFileHttpError = CreateBrandFile400HttpError | CreateBrandFile401HttpError | CreateBrandFile403HttpError | CreateBrandFile404HttpError | CreateBrandFile500HttpError;
520
520
  /**
521
- * Updates existing file
521
+ * Updates the specified brand file.
522
522
  *
523
523
  * @param brandId The brand's unique identifier.
524
524
  * @param brandFileId The unique identifier of a file within a brand.
@@ -566,41 +566,41 @@ type UpdateBrandFileHttpError = UpdateBrandFile400HttpError | UpdateBrandFile401
566
566
  declare function clearCache(): void;
567
567
  interface BrandsAPI {
568
568
  /**
569
- * Lists all brand entries for a tenant
569
+ * Lists all brand entries for a tenant.
570
570
  *
571
571
  * @param query an object with query parameters
572
572
  * @throws GetBrandsHttpError
573
573
  */
574
574
  getBrands: typeof getBrands;
575
575
  /**
576
- * Creates a new brand
576
+ * Creates a new brand.
577
577
  *
578
578
  * @param body an object with the body content
579
579
  * @throws CreateBrandHttpError
580
580
  */
581
581
  createBrand: typeof createBrand;
582
582
  /**
583
- * Retrieves the current active brand
583
+ * Returns the current active brand. If using the Qlik default brand, no value is returned.
584
584
  *
585
585
  * @throws GetActiveBrandHttpError
586
586
  */
587
587
  getActiveBrand: typeof getActiveBrand;
588
588
  /**
589
- * Deletes a specific brand
589
+ * Deletes a specific brand. If the active brand is deleted, the tenant will return to the Qlik default.
590
590
  *
591
591
  * @param brandId The brand's unique identifier.
592
592
  * @throws DeleteBrandHttpError
593
593
  */
594
594
  deleteBrand: typeof deleteBrand;
595
595
  /**
596
- * Retrieves a specific brand
596
+ * Returns a specific brand.
597
597
  *
598
598
  * @param brandId The brand's unique identifier.
599
599
  * @throws GetBrandHttpError
600
600
  */
601
601
  getBrand: typeof getBrand;
602
602
  /**
603
- * Patches a brand
603
+ * Patches a brand.
604
604
  *
605
605
  * @param brandId The brand's unique identifier.
606
606
  * @param body an object with the body content
@@ -616,7 +616,7 @@ interface BrandsAPI {
616
616
  */
617
617
  activateBrand: typeof activateBrand;
618
618
  /**
619
- * Sets the brand so it is no longer active. If the brand is already inactive, no action is taken.
619
+ * Sets the brand so it is no longer active, returning the tenant the Qlik default brand. If the brand is already inactive, no action is taken.
620
620
  *
621
621
  * @param brandId The brand's unique identifier.
622
622
  * @param body an object with the body content
@@ -624,7 +624,7 @@ interface BrandsAPI {
624
624
  */
625
625
  deactivateBrand: typeof deactivateBrand;
626
626
  /**
627
- * Deletes a specific brand file
627
+ * Deletes the specified brand file.
628
628
  *
629
629
  * @param brandId The brand's unique identifier.
630
630
  * @param brandFileId The unique identifier of a file within a brand.
@@ -632,7 +632,7 @@ interface BrandsAPI {
632
632
  */
633
633
  deleteBrandFile: typeof deleteBrandFile;
634
634
  /**
635
- * Downloads the brand file
635
+ * Downloads the specified brand file.
636
636
  *
637
637
  * @param brandId The brand's unique identifier.
638
638
  * @param brandFileId The unique identifier of a file within a brand.
@@ -640,7 +640,7 @@ interface BrandsAPI {
640
640
  */
641
641
  getBrandFile: typeof getBrandFile;
642
642
  /**
643
- * Creates a brand file
643
+ * Creates a brand file for the specified identifier.
644
644
  *
645
645
  * @param brandId The brand's unique identifier.
646
646
  * @param brandFileId The unique identifier of a file within a brand.
@@ -649,7 +649,7 @@ interface BrandsAPI {
649
649
  */
650
650
  createBrandFile: typeof createBrandFile;
651
651
  /**
652
- * Updates existing file
652
+ * Updates the specified brand file.
653
653
  *
654
654
  * @param brandId The brand's unique identifier.
655
655
  * @param brandFileId The unique identifier of a file within a brand.
package/brands.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/brands.ts
@@ -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("./SEBN4KFZ.js") : import("./EUWNVVK5.js").then(
4
+ return isNode ? import("./CUC5USM5.js") : import("./EUWNVVK5.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("./KBR7JBWC.js") : import("./EUWNVVK5.js").then(
11
+ return isNode ? import("./UJV2QU2J.js") : import("./EUWNVVK5.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("./GZRY5VHW.js") : import("./EUWNVVK5.js").then(
18
+ return isNode ? import("./E5TLRYTH.js") : import("./EUWNVVK5.js").then(
19
19
  (mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig)
20
20
  );
21
21
  }
@@ -1,13 +1,11 @@
1
1
  import {
2
2
  generateRandomString,
3
- getCsrfToken,
4
3
  getRestCallAuthParams,
5
4
  getWebSocketAuthParams,
6
5
  toValidWebsocketLocationUrl
7
- } from "./OEVNZ5IQ.js";
6
+ } from "./OCV75U5H.js";
8
7
  import "./7RHSSS4W.js";
9
8
  import {
10
- isBrowser,
11
9
  isNode
12
10
  } from "./2ZQ3ZX7F.js";
13
11
 
@@ -10368,49 +10366,48 @@ async function createEnigmaSession({
10368
10366
  identity,
10369
10367
  hostConfig,
10370
10368
  useReloadEngine = false,
10371
- ttlSeconds
10369
+ ttlSeconds,
10370
+ workloadType
10372
10371
  }) {
10372
+ const isNodeEnvironment = isNode();
10373
10373
  const locationUrl = toValidWebsocketLocationUrl(hostConfig);
10374
10374
  const reloadUri = encodeURIComponent(`${locationUrl}/sense/app/${appId}`);
10375
10375
  const ttlPart = ttlSeconds !== void 0 && ttlSeconds >= 0 ? `/ttl/${ttlSeconds}` : "";
10376
10376
  const identityPart = identity ? `/identity/${identity}` : "";
10377
- const reloadEnginePart = useReloadEngine ? "&workloadType=interactive-reload" : "";
10378
- let csrfToken = "";
10379
- if (isBrowser() && (!hostConfig || hostConfig.authType === "cookie" || hostConfig.authType === "windowscookie")) {
10380
- try {
10381
- csrfToken = await getCsrfToken(hostConfig);
10382
- } catch {
10383
- }
10384
- }
10385
- const csrfPart = csrfToken ? `&qlik-csrf-token=${csrfToken}` : "";
10386
- let url = `${locationUrl}/app/${appId}${identityPart}${ttlPart}?reloadUri=${reloadUri}${reloadEnginePart}${csrfPart}`.replace(
10377
+ const workloadTypePart = useReloadEngine ? "&workloadType=interactive-reload" : workloadType ? `&workloadType=${workloadType}` : "";
10378
+ const baseUrl = `${locationUrl}/app/${appId}${identityPart}${ttlPart}?reloadUri=${reloadUri}${workloadTypePart}`.replace(
10387
10379
  /^http/,
10388
10380
  "ws"
10389
10381
  );
10390
- const isNodeEnvironment = isNode();
10391
- let createSocketMethod;
10382
+ let createSocketBuilder;
10392
10383
  if (isNodeEnvironment) {
10393
- const { headers, queryParams } = await getRestCallAuthParams({ hostConfig, method: "POST" });
10394
10384
  const WS = (await import("ws")).default;
10395
- Object.entries(queryParams).forEach(([key, value]) => {
10396
- url = `${url}&${key}=${value}`;
10397
- });
10398
- createSocketMethod = (socketUrl) => new WS(socketUrl, void 0, {
10399
- headers
10400
- });
10385
+ createSocketBuilder = async () => {
10386
+ let url = baseUrl;
10387
+ const { headers, queryParams } = await getRestCallAuthParams({ hostConfig, method: "POST" });
10388
+ Object.entries(queryParams).forEach(([key, value]) => {
10389
+ url = `${url}&${key}=${value}`;
10390
+ });
10391
+ return (socketUrl) => new WS(url, void 0, {
10392
+ headers
10393
+ });
10394
+ };
10401
10395
  } else {
10402
- const { queryParams } = await getWebSocketAuthParams({ hostConfig });
10403
- Object.entries(queryParams).forEach(([key, value]) => {
10404
- url = `${url}&${key}=${value}`;
10405
- });
10406
- createSocketMethod = (socketUrl) => new WebSocket(socketUrl);
10396
+ createSocketBuilder = async () => {
10397
+ let url = baseUrl;
10398
+ const { queryParams } = await getWebSocketAuthParams({ hostConfig });
10399
+ Object.entries(queryParams).forEach(([key, value]) => {
10400
+ url = `${url}&${key}=${value}`;
10401
+ });
10402
+ return (socketUrl) => new WebSocket(url);
10403
+ };
10407
10404
  }
10408
- return enigma.create({
10405
+ const session = enigma.create({
10409
10406
  schema: engine_api_default,
10410
10407
  mixins: mixins5,
10411
- url,
10408
+ url: baseUrl,
10412
10409
  suspendOnClose: !useReloadEngine,
10413
- createSocket: createSocketMethod,
10410
+ createSocket: await createSocketBuilder(),
10414
10411
  requestInterceptors: [somethingWithEmptyMethodsRequestInterceptor],
10415
10412
  responseInterceptors: [
10416
10413
  retryAbortedErrorResponseInterceptor,
@@ -10418,6 +10415,13 @@ async function createEnigmaSession({
10418
10415
  somethingWithErrorPopupsResponnseInterceptor
10419
10416
  ]
10420
10417
  });
10418
+ const originalResume = session.resume.bind(session);
10419
+ const resume = async (onlyIfAttached) => {
10420
+ session.rpc.createSocket = await createSocketBuilder();
10421
+ await originalResume(onlyIfAttached);
10422
+ };
10423
+ session.resume = resume;
10424
+ return session;
10421
10425
  }
10422
10426
  export {
10423
10427
  createEnigmaSession
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getAuthRuntimeModule
3
- } from "./SNQHDUYY.js";
3
+ } from "./3KD5W26Z.js";
4
4
 
5
5
  // src/public/auth.ts
6
6
  function registerAuthModule(name, authModule) {
@@ -19,7 +19,7 @@ import {
19
19
  toValidEnigmaLocationUrl,
20
20
  toValidLocationUrl,
21
21
  toValidWebsocketLocationUrl
22
- } from "./OEVNZ5IQ.js";
22
+ } from "./OCV75U5H.js";
23
23
  import "./7RHSSS4W.js";
24
24
  import "./2ZQ3ZX7F.js";
25
25
  export {
@@ -5,7 +5,7 @@ import {
5
5
  invokeFetch,
6
6
  invoke_fetch_default,
7
7
  parseFetchResponse
8
- } from "./OEVNZ5IQ.js";
8
+ } from "./OCV75U5H.js";
9
9
  import "./7RHSSS4W.js";
10
10
  import "./2ZQ3ZX7F.js";
11
11
  export {
@@ -1403,10 +1403,10 @@ function getXrfKey(hostConfig) {
1403
1403
  }
1404
1404
 
1405
1405
  // src/auth/internal/default-auth-modules/windows-cookie.ts
1406
- function getRestCallAuthParams7({
1406
+ async function getRestCallAuthParams7({
1407
1407
  hostConfig
1408
1408
  }) {
1409
- return Promise.resolve({
1409
+ return {
1410
1410
  headers: {
1411
1411
  "X-Qlik-XrfKey": getXrfKey(hostConfig)
1412
1412
  },
@@ -1414,16 +1414,17 @@ function getRestCallAuthParams7({
1414
1414
  xrfkey: getXrfKey(hostConfig)
1415
1415
  },
1416
1416
  credentials: getCredentialsForCookieAuth(hostConfig)
1417
- });
1417
+ };
1418
1418
  }
1419
- function getWebSocketAuthParams7({
1419
+ async function getWebSocketAuthParams7({
1420
1420
  hostConfig
1421
1421
  }) {
1422
- return Promise.resolve({
1422
+ return {
1423
1423
  queryParams: {
1424
- xrfkey: getXrfKey(hostConfig)
1424
+ xrfkey: getXrfKey(hostConfig),
1425
+ "qlik-csrf-token": await getCsrfToken(hostConfig, true)
1425
1426
  }
1426
- });
1427
+ };
1427
1428
  }
1428
1429
  async function handleAuthenticationError7({
1429
1430
  hostConfig
@@ -2079,6 +2080,7 @@ async function parseFetchResponse(fetchResponse, url) {
2079
2080
  case "application/octet-stream":
2080
2081
  case "application/zip":
2081
2082
  case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
2083
+ case "application/pdf":
2082
2084
  resultData = toDownloadableBlob(await fetchResponse.blob());
2083
2085
  break;
2084
2086
  case "text/event-stream":
@@ -2145,6 +2147,5 @@ export {
2145
2147
  clearApiCache,
2146
2148
  parseFetchResponse,
2147
2149
  invoke_fetch_default,
2148
- getCsrfToken,
2149
2150
  auth_default
2150
2151
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getInvokeFetchRuntimeModule
3
- } from "./SNQHDUYY.js";
3
+ } from "./3KD5W26Z.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.22.0";
9
+ var defaultUserAgent = "qlik-api/1.23.0";
10
10
  async function invokeFetch(api, props) {
11
11
  const hostConfig = props.options?.hostConfig;
12
12
  let userAgent;
@@ -4,7 +4,7 @@ import {
4
4
  invokeFetch,
5
5
  isWindows,
6
6
  toValidWebsocketLocationUrl
7
- } from "./OEVNZ5IQ.js";
7
+ } from "./OCV75U5H.js";
8
8
  import "./7RHSSS4W.js";
9
9
  import {
10
10
  isBrowser
@@ -88,7 +88,8 @@ function toGlobalAppSessionId({
88
88
  hostConfig,
89
89
  withoutData,
90
90
  useReloadEngine,
91
- ttlSeconds
91
+ ttlSeconds,
92
+ workloadType
92
93
  }) {
93
94
  const locationUrl = toValidWebsocketLocationUrl(hostConfig);
94
95
  let url = `${locationUrl}/${appId}`;
@@ -104,6 +105,9 @@ function toGlobalAppSessionId({
104
105
  if (withoutData) {
105
106
  url += "/withoutData";
106
107
  }
108
+ if (workloadType) {
109
+ url += `?workloadType=${workloadType}`;
110
+ }
107
111
  return url;
108
112
  }
109
113
  async function runPendingInitialActions(initialActionsForApp, sharedSession, doc) {
@@ -114,7 +118,7 @@ async function runPendingInitialActions(initialActionsForApp, sharedSession, doc
114
118
  }
115
119
  }
116
120
  }
117
- async function addInitialSharedSessionCreationAction(openAppSessionProps, action) {
121
+ function addInitialSharedSessionCreationAction(openAppSessionProps, action) {
118
122
  const key = toGlobalAppSessionId(openAppSessionProps);
119
123
  let initialActionArray = initialActions[key];
120
124
  if (!initialActionArray) {
@@ -123,11 +127,18 @@ async function addInitialSharedSessionCreationAction(openAppSessionProps, action
123
127
  initialActionArray.push(action);
124
128
  const existingSharedSession = sharedSessions[key];
125
129
  if (existingSharedSession) {
126
- const doc = await existingSharedSession.docPromise;
127
- if (doc) {
128
- runPendingInitialActions(initialActionArray, existingSharedSession, doc);
129
- }
130
+ existingSharedSession.docPromise.then((doc) => {
131
+ if (doc) {
132
+ runPendingInitialActions(initialActionArray, existingSharedSession, doc);
133
+ }
134
+ });
130
135
  }
136
+ return () => {
137
+ const index = initialActionArray.indexOf(action);
138
+ if (index > -1) {
139
+ initialActionArray.splice(index, 1);
140
+ }
141
+ };
131
142
  }
132
143
  function listenForWindowsAuthenticationInformation(session) {
133
144
  let resolveAuthSuggestedInWebsocket;
@@ -150,7 +161,7 @@ function listenForWindowsAuthenticationInformation(session) {
150
161
  return authSuggestedInWebsocket;
151
162
  }
152
163
  async function createAndSetupEnigmaSession(props, canRetry) {
153
- const { createEnigmaSession } = await import("./PR52AAWU.js");
164
+ const { createEnigmaSession } = await import("./3REGOC54.js");
154
165
  const session = await createEnigmaSession(props);
155
166
  setupSessionListeners(session, props);
156
167
  let global;
@@ -444,7 +455,18 @@ function resumeShouldRejectPromiseIfNotReattached(bool) {
444
455
  }
445
456
  async function checkConnectivity(hostConfig) {
446
457
  let status = "online";
447
- const catchFunc = (err) => {
458
+ const method = "get";
459
+ const options = {
460
+ hostConfig,
461
+ timeoutMs: 4e3,
462
+ noCache: true
463
+ };
464
+ try {
465
+ const result = await invokeFetch("", { method, pathTemplate: "/api/v1/user-locale", options });
466
+ if (!result.headers.get("content-type")?.includes("application/json")) {
467
+ status = "unauthorized";
468
+ }
469
+ } catch (err) {
448
470
  const fetchErr = err;
449
471
  switch (fetchErr.status) {
450
472
  case 0:
@@ -454,16 +476,7 @@ async function checkConnectivity(hostConfig) {
454
476
  status = "unauthorized";
455
477
  break;
456
478
  }
457
- };
458
- const method = "get";
459
- const options = {
460
- hostConfig,
461
- timeoutMs: 2e3,
462
- noCache: true
463
- };
464
- const fetchRoot = invokeFetch("", { method, pathTemplate: "", options }).catch(catchFunc);
465
- const fetchMe = invokeFetch("", { method, pathTemplate: "/api/v1/users/me", options }).catch(catchFunc);
466
- await Promise.all([fetchRoot, fetchMe]);
479
+ }
467
480
  return Promise.resolve(status);
468
481
  }
469
482
  async function sessionResumeWithRetry(session, hostConfig) {
@@ -571,15 +584,16 @@ function getExternalSession(externalApp, appSessionProps) {
571
584
  }
572
585
 
573
586
  // src/qix/qix-functions.ts
574
- async function createSessionApp(ttlSeconds) {
587
+ async function createSessionApp(ttlSeconds, workloadType) {
575
588
  let sharedSession;
576
589
  if ((await getPlatform()).isCloud) {
577
- sharedSession = await getOrCreateSharedSession({ appId: `SessionApp_${Date.now()}`, ttlSeconds });
590
+ sharedSession = await getOrCreateSharedSession({ appId: `SessionApp_${Date.now()}`, ttlSeconds, workloadType });
578
591
  } else {
579
592
  sharedSession = await getOrCreateSharedSession({
580
593
  appId: `%3Ftransient%3D/identity/${Date.now()}`,
581
594
  useSessionApp: true,
582
- ttlSeconds
595
+ ttlSeconds,
596
+ workloadType
583
597
  });
584
598
  }
585
599
  let alreadyClosed = false;
@@ -663,7 +677,7 @@ function useAppHook(react) {
663
677
  };
664
678
  }
665
679
  function addInitialAppAction(openAppSessionProps, action) {
666
- addInitialSharedSessionCreationAction(openAppSessionProps, action);
680
+ return addInitialSharedSessionCreationAction(openAppSessionProps, action);
667
681
  }
668
682
  function onWebSocketEvent(fn) {
669
683
  return globalOnWebSocketEvent(fn);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getQixRuntimeModule
3
- } from "./SNQHDUYY.js";
3
+ } from "./3KD5W26Z.js";
4
4
 
5
5
  // src/public/qix.ts
6
6
  function openAppSession(appSessionProps) {
package/collections.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/collections.ts
package/csp-origins.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/TUPLQG25.js";
5
- import "./chunks/SNQHDUYY.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/csp-origins.ts