@qlik/api 1.4.0 → 1.5.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 (81) hide show
  1. package/.github/workflows/release.yaml +6 -1
  2. package/README.md +0 -3
  3. package/api-keys.d.ts +1 -1
  4. package/api-keys.js +3 -2
  5. package/apps.d.ts +1 -1
  6. package/apps.js +3 -2
  7. package/audits.d.ts +1 -1
  8. package/audits.js +3 -2
  9. package/auth.js +2 -2
  10. package/automations.d.ts +88 -7
  11. package/automations.js +21 -2
  12. package/brands.d.ts +1 -1
  13. package/brands.js +3 -2
  14. package/chunks/BGRBTH7Y.js +38 -0
  15. package/chunks/{JK564JXC.js → BMB4CQGB.js} +1 -1
  16. package/chunks/{GEU5U7Z5.js → F2X7MIT2.js} +1 -1
  17. package/chunks/{5GE4XPP3.js → GFJ653I2.js} +36 -40
  18. package/chunks/{54UDXFVD.js → S2BIIZLQ.js} +3 -3
  19. package/chunks/{W3BAQSQ7.js → SYGKZE7X.js} +14 -2
  20. package/chunks/{2G2EK3MP.js → TTSM4BX5.js} +2 -1
  21. package/chunks/{3IA4SDJA.js → UY5PBIVC.js} +1 -1
  22. package/chunks/{LDQGW22R.js → WEENC3NJ.js} +2 -1
  23. package/chunks/{DD5UK3PZ.js → YGESHYCZ.js} +13 -5
  24. package/chunks/{QGXPKKG2.js → YNDOPW5S.js} +4 -2
  25. package/collections.d.ts +1 -1
  26. package/collections.js +3 -2
  27. package/csp-origins.d.ts +1 -1
  28. package/csp-origins.js +3 -2
  29. package/data-assets.d.ts +1 -1
  30. package/data-assets.js +3 -2
  31. package/data-connections.d.ts +1 -1
  32. package/data-connections.js +3 -2
  33. package/data-credentials.d.ts +1 -1
  34. package/data-credentials.js +3 -2
  35. package/data-files.d.ts +1 -1
  36. package/data-files.js +3 -2
  37. package/docs/examples/fetch-spaces.md +1 -1
  38. package/extensions.d.ts +1 -1
  39. package/extensions.js +3 -2
  40. package/{global.types-CMQsAHYd.d.ts → global.types-Xt6XzwlN.d.ts} +7 -0
  41. package/glossaries.d.ts +10 -8
  42. package/glossaries.js +3 -2
  43. package/groups.d.ts +1 -1
  44. package/groups.js +3 -2
  45. package/identity-providers.d.ts +1 -1
  46. package/identity-providers.js +3 -2
  47. package/index.d.ts +1 -1
  48. package/index.js +7 -6
  49. package/items.d.ts +1 -1
  50. package/items.js +3 -2
  51. package/licenses.d.ts +1 -1
  52. package/licenses.js +3 -2
  53. package/package.json +2 -6
  54. package/qix.d.ts +4 -4
  55. package/qix.js +2 -2
  56. package/quotas.d.ts +1 -1
  57. package/quotas.js +3 -2
  58. package/reload-tasks.d.ts +1 -1
  59. package/reload-tasks.js +3 -2
  60. package/reloads.d.ts +1 -1
  61. package/reloads.js +3 -2
  62. package/roles.d.ts +1 -1
  63. package/roles.js +3 -2
  64. package/spaces.d.ts +1 -1
  65. package/spaces.js +3 -2
  66. package/temp-contents.d.ts +1 -1
  67. package/temp-contents.js +3 -2
  68. package/tenants.d.ts +1 -1
  69. package/tenants.js +3 -2
  70. package/themes.d.ts +1 -1
  71. package/themes.js +3 -2
  72. package/transports.d.ts +1 -1
  73. package/transports.js +3 -2
  74. package/users.d.ts +1 -1
  75. package/users.js +3 -2
  76. package/web-integrations.d.ts +1 -1
  77. package/web-integrations.js +3 -2
  78. package/web-notifications.d.ts +1 -1
  79. package/web-notifications.js +3 -2
  80. package/webhooks.d.ts +1 -1
  81. package/webhooks.js +3 -2
@@ -28,8 +28,13 @@ jobs:
28
28
  VERSION=$(git describe --tags --abbrev=7 --match "v*")
29
29
  VERSION=${VERSION#v}
30
30
  echo "version is $VERSION"
31
- jq --arg version "$VERSION" '.version = $version' package.json >temp.json && mv temp.json package.json
31
+ jq --arg version "$VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
32
32
  cat package.json
33
+ # Set the default user-agent.
34
+ ls ./chunks >/dev/null || (echo "Missing chunks directory!" && exit 1)
35
+ find ./chunks -type f -exec sed -i.bak -e "s;defaultUserAgent = \"qlik-api/latest\";defaultUserAgent = \"qlik-api/$VERSION\";g" -- {} +
36
+ rm -f ./chunks/*.bak
37
+ # Publish npm package
33
38
  npm publish
34
39
  env:
35
40
  NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }}
package/README.md CHANGED
@@ -3,9 +3,6 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@qlik/api.svg)](https://www.npmjs.com/package/@qlik/api)
4
4
  [![License](https://img.shields.io/badge/license-ISC-blue.svg)](https://opensource.org/licenses/ISC)
5
5
 
6
- > **Warning**
7
- > This package is currently in pre-release mode and will likely change and break until the version number 1.0.0 is released.
8
-
9
6
  This package provides a JavaScript API for interacting with Qlik Sense REST APIs including the QIX Engine from a single package that can be used in both Node.js and browser contexts.
10
7
 
11
8
  ## Table of Contents
package/api-keys.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types-CMQsAHYd.js';
1
+ import { A as ApiCallOptions } from './global.types-Xt6XzwlN.js';
2
2
  import './auth-types-Bqw3vbLs.js';
3
3
 
4
4
  type ApiKey = {
package/api-keys.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/W3BAQSQ7.js";
5
- import "./chunks/54UDXFVD.js";
4
+ } from "./chunks/SYGKZE7X.js";
5
+ import "./chunks/BGRBTH7Y.js";
6
+ import "./chunks/S2BIIZLQ.js";
6
7
 
7
8
  // src/public/rest/api-keys.ts
8
9
  var getApiKeys = async (query, options) => invokeFetch("api-keys", {
package/apps.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions, D as DownloadableBlob } from './global.types-CMQsAHYd.js';
1
+ import { A as ApiCallOptions, D as DownloadableBlob } from './global.types-Xt6XzwlN.js';
2
2
  import './auth-types-Bqw3vbLs.js';
3
3
 
4
4
  type Analysis = "breakdown" | "changePoint" | "comparison" | "contribution" | "correlation" | "fact" | "mutualInfo" | "rank" | "spike" | "trend" | "values";
package/apps.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/W3BAQSQ7.js";
5
- import "./chunks/54UDXFVD.js";
4
+ } from "./chunks/SYGKZE7X.js";
5
+ import "./chunks/BGRBTH7Y.js";
6
+ import "./chunks/S2BIIZLQ.js";
6
7
 
7
8
  // src/public/rest/apps.ts
8
9
  var createApp = async (body, options) => invokeFetch("apps", {
package/audits.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types-CMQsAHYd.js';
1
+ import { A as ApiCallOptions } from './global.types-Xt6XzwlN.js';
2
2
  import './auth-types-Bqw3vbLs.js';
3
3
 
4
4
  type ErrorResponse = {
package/audits.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/W3BAQSQ7.js";
5
- import "./chunks/54UDXFVD.js";
4
+ } from "./chunks/SYGKZE7X.js";
5
+ import "./chunks/BGRBTH7Y.js";
6
+ import "./chunks/S2BIIZLQ.js";
6
7
 
7
8
  // src/public/rest/audits.ts
8
9
  var getAudits = async (query, options) => invokeFetch("audits", {
package/auth.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  logout,
5
5
  registerAuthModule,
6
6
  setDefaultHostConfig
7
- } from "./chunks/JK564JXC.js";
8
- import "./chunks/54UDXFVD.js";
7
+ } from "./chunks/BMB4CQGB.js";
8
+ import "./chunks/S2BIIZLQ.js";
9
9
  export {
10
10
  auth_default as default,
11
11
  getAccessToken,
package/automations.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types-CMQsAHYd.js';
1
+ import { A as ApiCallOptions } from './global.types-Xt6XzwlN.js';
2
2
  import './auth-types-Bqw3vbLs.js';
3
3
 
4
4
  type AutomationDetailRequestObject = {
@@ -37,18 +37,32 @@ type AutomationList = {
37
37
  links?: Links;
38
38
  };
39
39
  type AutomationListObject = {
40
+ /** A list of connectors used inside the workspace. */
41
+ readonly connectorIds?: string[];
40
42
  readonly createdAt?: string;
41
43
  description?: string;
44
+ /** Duration of the last run, indicated in seconds. Calculated from start and stop times */
45
+ readonly duration?: number;
46
+ /** A list of endpoints used inside the workspace. */
47
+ readonly endpointIds?: string[];
48
+ readonly executionToken?: string;
42
49
  readonly id?: string;
50
+ lastRun?: RunDetailResponseObject;
43
51
  readonly lastRunAt?: string;
44
52
  readonly lastRunStatus?: "failed" | "finished" | "finished with warnings" | "must stop" | "not started" | "paused" | "running" | "starting" | "stopped";
45
53
  name?: string;
46
54
  readonly ownerId?: string;
47
55
  readonly runMode?: "manual" | "scheduled" | "triggered" | "webhook";
56
+ /** A list of snippets used inside the workspace. */
57
+ readonly snippetIds?: string[];
48
58
  state?: "available" | "unavailable" | "disabled";
49
59
  readonly updatedAt?: string;
60
+ /** The workspace contains the JSON representation of the used blocks */
61
+ readonly workspace?: unknown;
50
62
  };
51
63
  type AutomationUsageObject = {
64
+ /** Duration of the last run, indicated in seconds. Calculated from start and stop times */
65
+ duration?: number;
52
66
  /** The unique identifier for the automation. */
53
67
  guid?: string;
54
68
  /** The name for the automation. */
@@ -131,6 +145,8 @@ type RunList = {
131
145
  type RunListObject = {
132
146
  context?: "test_run" | "editor" | "detail" | "api_sync" | "api_async" | "webhook" | "lookup";
133
147
  readonly createdAt?: string;
148
+ /** Duration of the run, indicated in seconds. Calculated from start and stop times */
149
+ readonly duration?: number;
134
150
  error?: unknown;
135
151
  readonly id?: string;
136
152
  readonly isArchived?: boolean;
@@ -163,6 +179,7 @@ type SettingsObject = {
163
179
  };
164
180
  type UsageList = {
165
181
  data?: UsageObject[];
182
+ links?: Links;
166
183
  };
167
184
  type UsageObject = {
168
185
  automation?: AutomationUsageObject;
@@ -180,12 +197,14 @@ type UsageObject = {
180
197
  * @throws GetAutomationsHttpError
181
198
  */
182
199
  declare const getAutomations: (query: {
200
+ /** Allows to select the actual fields to be returned. When no fields are defined, all are returned. */
201
+ fields?: string;
183
202
  /** Allowed filters: name, runMode, lastRunStatus, ownerId */
184
203
  filter?: string;
185
204
  /** The number of automations to retrieve. */
186
205
  limit?: number;
187
206
  /** The field to sort by, with +- prefix indicating sort order. (?query=-name => sort on the name field using descending order) */
188
- sort?: "id" | "name" | "runMode" | "state" | "createdAt" | "updatedAt" | "lastRunAt" | "lastRunStatus" | "+id" | "+name" | "+runMode" | "+state" | "+createdAt" | "+updatedAt" | "+lastRunAt" | "+lastRunStatus" | "-id" | "-name" | "-runMode" | "-state" | "-createdAt" | "-updatedAt" | "-lastRunAt" | "-lastRunStatus";
207
+ sort?: "id" | "name" | "runMode" | "state" | "createdAt" | "updatedAt" | "lastRunAt" | "lastRunStatus" | "duration" | "+id" | "+name" | "+runMode" | "+state" | "+createdAt" | "+updatedAt" | "+lastRunAt" | "+lastRunStatus" | "-id" | "-name" | "-runMode" | "-state" | "-createdAt" | "-updatedAt" | "-lastRunAt" | "-lastRunStatus" | "+duration" | "-duration";
189
208
  }, options?: ApiCallOptions) => Promise<GetAutomationsHttpResponse>;
190
209
  type GetAutomationsHttpResponse = {
191
210
  data: AutomationList;
@@ -254,8 +273,7 @@ type UpdateAutomationsSettingsHttpError = {
254
273
  status: number;
255
274
  };
256
275
  /**
257
- * **Limitations:**
258
- * * **Maximum 1000 metrics per API call**
276
+ * Retrieves all automation usage for a tenant
259
277
  *
260
278
  * @param query an object with query parameters
261
279
  * @throws GetAutomationsUsageMetricsHttpError
@@ -270,6 +288,8 @@ type GetAutomationsUsageMetricsHttpResponse = {
270
288
  data: UsageList;
271
289
  headers: Headers;
272
290
  status: number;
291
+ prev?: (options?: ApiCallOptions) => Promise<GetAutomationsUsageMetricsHttpResponse>;
292
+ next?: (options?: ApiCallOptions) => Promise<GetAutomationsUsageMetricsHttpResponse>;
273
293
  };
274
294
  type GetAutomationsUsageMetricsHttpError = {
275
295
  data: ErrorResponse;
@@ -293,6 +313,27 @@ type DeleteAutomationHttpError = {
293
313
  headers: Headers;
294
314
  status: number;
295
315
  };
316
+ /**
317
+ * Retrieves an automation
318
+ *
319
+ * @param id The unique identifier for the automation.
320
+ * @param query an object with query parameters
321
+ * @throws GetAutomationWithQueryHttpError
322
+ */
323
+ declare const getAutomationWithQuery: (id: string, query: {
324
+ /** Allows to select the actual fields to be returned. Where the default is all fields */
325
+ fields?: string;
326
+ }, options?: ApiCallOptions) => Promise<GetAutomationWithQueryHttpResponse>;
327
+ type GetAutomationWithQueryHttpResponse = {
328
+ data: AutomationDetailResponseObject;
329
+ headers: Headers;
330
+ status: number;
331
+ };
332
+ type GetAutomationWithQueryHttpError = {
333
+ data: ErrorResponse;
334
+ headers: Headers;
335
+ status: number;
336
+ };
296
337
  /**
297
338
  * Retrieves an automation
298
339
  *
@@ -414,6 +455,8 @@ type MoveAutomationHttpError = {
414
455
  * @throws GetAutomationRunsHttpError
415
456
  */
416
457
  declare const getAutomationRuns: (id: string, query: {
458
+ /** Allows to select the actual fields to be returned. Where the default is all fields */
459
+ fields?: string;
417
460
  /** Allowed filters: status, context, startTime and title */
418
461
  filter?: string;
419
462
  /** The number of runs to retrieve. */
@@ -451,6 +494,28 @@ type QueueAutomationRunHttpError = {
451
494
  headers: Headers;
452
495
  status: number;
453
496
  };
497
+ /**
498
+ * Retrieves a run
499
+ *
500
+ * @param id The unique identifier for the automation.
501
+ * @param runId The unique identifier for the run.
502
+ * @param query an object with query parameters
503
+ * @throws GetAutomationRunWithQueryHttpError
504
+ */
505
+ declare const getAutomationRunWithQuery: (id: string, runId: string, query: {
506
+ /** Allows to select the actual fields to be returned. Where the default is all fields */
507
+ fields?: string;
508
+ }, options?: ApiCallOptions) => Promise<GetAutomationRunWithQueryHttpResponse>;
509
+ type GetAutomationRunWithQueryHttpResponse = {
510
+ data: RunDetailResponseObject;
511
+ headers: Headers;
512
+ status: number;
513
+ };
514
+ type GetAutomationRunWithQueryHttpError = {
515
+ data: ErrorResponse;
516
+ headers: Headers;
517
+ status: number;
518
+ };
454
519
  /**
455
520
  * Retrieves a run
456
521
  *
@@ -562,8 +627,7 @@ interface AutomationsAPI {
562
627
  */
563
628
  updateAutomationsSettings: typeof updateAutomationsSettings;
564
629
  /**
565
- * **Limitations:**
566
- * * **Maximum 1000 metrics per API call**
630
+ * Retrieves all automation usage for a tenant
567
631
  *
568
632
  * @param query an object with query parameters
569
633
  * @throws GetAutomationsUsageMetricsHttpError
@@ -576,6 +640,14 @@ interface AutomationsAPI {
576
640
  * @throws DeleteAutomationHttpError
577
641
  */
578
642
  deleteAutomation: typeof deleteAutomation;
643
+ /**
644
+ * Retrieves an automation
645
+ *
646
+ * @param id The unique identifier for the automation.
647
+ * @param query an object with query parameters
648
+ * @throws GetAutomationWithQueryHttpError
649
+ */
650
+ getAutomationWithQuery: typeof getAutomationWithQuery;
579
651
  /**
580
652
  * Retrieves an automation
581
653
  *
@@ -637,6 +709,15 @@ interface AutomationsAPI {
637
709
  * @throws QueueAutomationRunHttpError
638
710
  */
639
711
  queueAutomationRun: typeof queueAutomationRun;
712
+ /**
713
+ * Retrieves a run
714
+ *
715
+ * @param id The unique identifier for the automation.
716
+ * @param runId The unique identifier for the run.
717
+ * @param query an object with query parameters
718
+ * @throws GetAutomationRunWithQueryHttpError
719
+ */
720
+ getAutomationRunWithQuery: typeof getAutomationRunWithQuery;
640
721
  /**
641
722
  * Retrieves a run
642
723
  *
@@ -679,4 +760,4 @@ interface AutomationsAPI {
679
760
  */
680
761
  declare const automationsExport: AutomationsAPI;
681
762
 
682
- export { type AutomationDetailRequestObject, type AutomationDetailResponseObject, type AutomationList, type AutomationListObject, type AutomationUsageObject, type AutomationsAPI, type CopyAutomationHttpError, type CopyAutomationHttpResponse, type CreateAutomationHttpError, type CreateAutomationHttpResponse, type DeleteAutomationHttpError, type DeleteAutomationHttpResponse, type DisableAutomationHttpError, type DisableAutomationHttpResponse, type EnableAutomationHttpError, type EnableAutomationHttpResponse, type Error, type ErrorResponse, type GetAutomationHttpError, type GetAutomationHttpResponse, type GetAutomationRunDetailsHttpError, type GetAutomationRunDetailsHttpResponse, type GetAutomationRunHttpError, type GetAutomationRunHttpResponse, type GetAutomationRunsHttpError, type GetAutomationRunsHttpResponse, type GetAutomationsHttpError, type GetAutomationsHttpResponse, type GetAutomationsSettingsHttpError, type GetAutomationsSettingsHttpResponse, type GetAutomationsUsageMetricsHttpError, type GetAutomationsUsageMetricsHttpResponse, type Links, type MoveAutomationHttpError, type MoveAutomationHttpResponse, type PaginationLink, type QueueAutomationRunHttpError, type QueueAutomationRunHttpResponse, type RetryAutomationRunHttpError, type RetryAutomationRunHttpResponse, type RunDetailRequestObject, type RunDetailResponseObject, type RunList, type RunListObject, type ScheduleRequestObject, type ScheduleResponseObject, type SettingsObject, type StopAutomationRunHttpError, type StopAutomationRunHttpResponse, type UpdateAutomationHttpError, type UpdateAutomationHttpResponse, type UpdateAutomationsSettingsHttpError, type UpdateAutomationsSettingsHttpResponse, type UsageList, type UsageObject, clearCache, copyAutomation, createAutomation, automationsExport as default, deleteAutomation, disableAutomation, enableAutomation, getAutomation, getAutomationRun, getAutomationRunDetails, getAutomationRuns, getAutomations, getAutomationsSettings, getAutomationsUsageMetrics, moveAutomation, queueAutomationRun, retryAutomationRun, stopAutomationRun, updateAutomation, updateAutomationsSettings };
763
+ export { type AutomationDetailRequestObject, type AutomationDetailResponseObject, type AutomationList, type AutomationListObject, type AutomationUsageObject, type AutomationsAPI, type CopyAutomationHttpError, type CopyAutomationHttpResponse, type CreateAutomationHttpError, type CreateAutomationHttpResponse, type DeleteAutomationHttpError, type DeleteAutomationHttpResponse, type DisableAutomationHttpError, type DisableAutomationHttpResponse, type EnableAutomationHttpError, type EnableAutomationHttpResponse, type Error, type ErrorResponse, type GetAutomationHttpError, type GetAutomationHttpResponse, type GetAutomationRunDetailsHttpError, type GetAutomationRunDetailsHttpResponse, type GetAutomationRunHttpError, type GetAutomationRunHttpResponse, type GetAutomationRunWithQueryHttpError, type GetAutomationRunWithQueryHttpResponse, type GetAutomationRunsHttpError, type GetAutomationRunsHttpResponse, type GetAutomationWithQueryHttpError, type GetAutomationWithQueryHttpResponse, type GetAutomationsHttpError, type GetAutomationsHttpResponse, type GetAutomationsSettingsHttpError, type GetAutomationsSettingsHttpResponse, type GetAutomationsUsageMetricsHttpError, type GetAutomationsUsageMetricsHttpResponse, type Links, type MoveAutomationHttpError, type MoveAutomationHttpResponse, type PaginationLink, type QueueAutomationRunHttpError, type QueueAutomationRunHttpResponse, type RetryAutomationRunHttpError, type RetryAutomationRunHttpResponse, type RunDetailRequestObject, type RunDetailResponseObject, type RunList, type RunListObject, type ScheduleRequestObject, type ScheduleResponseObject, type SettingsObject, type StopAutomationRunHttpError, type StopAutomationRunHttpResponse, type UpdateAutomationHttpError, type UpdateAutomationHttpResponse, type UpdateAutomationsSettingsHttpError, type UpdateAutomationsSettingsHttpResponse, type UsageList, type UsageObject, clearCache, copyAutomation, createAutomation, automationsExport as default, deleteAutomation, disableAutomation, enableAutomation, getAutomation, getAutomationRun, getAutomationRunDetails, getAutomationRunWithQuery, getAutomationRuns, getAutomationWithQuery, getAutomations, getAutomationsSettings, getAutomationsUsageMetrics, moveAutomation, queueAutomationRun, retryAutomationRun, stopAutomationRun, updateAutomation, updateAutomationsSettings };
package/automations.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/W3BAQSQ7.js";
5
- import "./chunks/54UDXFVD.js";
4
+ } from "./chunks/SYGKZE7X.js";
5
+ import "./chunks/BGRBTH7Y.js";
6
+ import "./chunks/S2BIIZLQ.js";
6
7
 
7
8
  // src/public/rest/automations.ts
8
9
  var getAutomations = async (query, options) => invokeFetch("automations", {
@@ -42,6 +43,13 @@ var deleteAutomation = async (id, options) => invokeFetch("automations", {
42
43
  pathVariables: { id },
43
44
  options
44
45
  });
46
+ var getAutomationWithQuery = async (id, query, options) => invokeFetch("automations", {
47
+ method: "get",
48
+ pathTemplate: "/api/v1/automations/{id}",
49
+ pathVariables: { id },
50
+ query,
51
+ options
52
+ });
45
53
  var getAutomation = async (id, options) => invokeFetch("automations", {
46
54
  method: "get",
47
55
  pathTemplate: "/api/v1/automations/{id}",
@@ -99,6 +107,13 @@ var queueAutomationRun = async (id, body, options) => invokeFetch("automations",
99
107
  contentType: "application/json",
100
108
  options
101
109
  });
110
+ var getAutomationRunWithQuery = async (id, runId, query, options) => invokeFetch("automations", {
111
+ method: "get",
112
+ pathTemplate: "/api/v1/automations/{id}/runs/{runId}",
113
+ pathVariables: { id, runId },
114
+ query,
115
+ options
116
+ });
102
117
  var getAutomationRun = async (id, runId, options) => invokeFetch("automations", {
103
118
  method: "get",
104
119
  pathTemplate: "/api/v1/automations/{id}/runs/{runId}",
@@ -133,6 +148,7 @@ var automationsExport = {
133
148
  updateAutomationsSettings,
134
149
  getAutomationsUsageMetrics,
135
150
  deleteAutomation,
151
+ getAutomationWithQuery,
136
152
  getAutomation,
137
153
  updateAutomation,
138
154
  copyAutomation,
@@ -141,6 +157,7 @@ var automationsExport = {
141
157
  moveAutomation,
142
158
  getAutomationRuns,
143
159
  queueAutomationRun,
160
+ getAutomationRunWithQuery,
144
161
  getAutomationRun,
145
162
  getAutomationRunDetails,
146
163
  retryAutomationRun,
@@ -159,7 +176,9 @@ export {
159
176
  getAutomation,
160
177
  getAutomationRun,
161
178
  getAutomationRunDetails,
179
+ getAutomationRunWithQuery,
162
180
  getAutomationRuns,
181
+ getAutomationWithQuery,
163
182
  getAutomations,
164
183
  getAutomationsSettings,
165
184
  getAutomationsUsageMetrics,
package/brands.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions, D as DownloadableBlob } from './global.types-CMQsAHYd.js';
1
+ import { A as ApiCallOptions, D as DownloadableBlob } from './global.types-Xt6XzwlN.js';
2
2
  import './auth-types-Bqw3vbLs.js';
3
3
 
4
4
  /**
package/brands.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/W3BAQSQ7.js";
5
- import "./chunks/54UDXFVD.js";
4
+ } from "./chunks/SYGKZE7X.js";
5
+ import "./chunks/BGRBTH7Y.js";
6
+ import "./chunks/S2BIIZLQ.js";
6
7
 
7
8
  // src/public/rest/brands.ts
8
9
  var getBrands = async (query, options) => invokeFetch("brands", {
@@ -0,0 +1,38 @@
1
+ // src/utils/utils.ts
2
+ import { nanoid } from "nanoid";
3
+ function isBrowserInternal() {
4
+ if (typeof window !== "undefined" && typeof window.document !== "undefined" && typeof self !== "undefined") {
5
+ return true;
6
+ }
7
+ return false;
8
+ }
9
+ function isNodeInternal() {
10
+ if (typeof process !== "undefined" && process.version && process.versions.node) {
11
+ return true;
12
+ }
13
+ return false;
14
+ }
15
+ function getEnvironment() {
16
+ if (isNodeInternal()) {
17
+ return "node";
18
+ }
19
+ if (isBrowserInternal()) {
20
+ return "browser";
21
+ }
22
+ throw new Error("Environment detection failed. Supported environments are either a browser or in a node environment");
23
+ }
24
+ function isBrowser() {
25
+ return getEnvironment() === "browser";
26
+ }
27
+ function isNode() {
28
+ return getEnvironment() === "node";
29
+ }
30
+ function generateRandomString(targetLength) {
31
+ return nanoid(targetLength);
32
+ }
33
+
34
+ export {
35
+ isBrowser,
36
+ isNode,
37
+ generateRandomString
38
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getAuthRuntimeModule
3
- } from "./54UDXFVD.js";
3
+ } from "./S2BIIZLQ.js";
4
4
 
5
5
  // src/public/auth.ts
6
6
  function registerAuthModule(name, authModule) {
@@ -1,4 +1,4 @@
1
- // node_modules/.pnpm/@qlik+runtime-module-loader@0.2.7/node_modules/@qlik/runtime-module-loader/dist/esm/index.js
1
+ // node_modules/.pnpm/@qlik+runtime-module-loader@1.0.2/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);
@@ -1,3 +1,9 @@
1
+ import {
2
+ generateRandomString,
3
+ isBrowser,
4
+ isNode
5
+ } from "./BGRBTH7Y.js";
6
+
1
7
  // src/platform/platform-functions.ts
2
8
  var getPlatform = async (options = {}) => {
3
9
  const isNodeEnvironment = typeof window === "undefined";
@@ -497,39 +503,6 @@ var none_default = {
497
503
  validateHostConfig: (hostConfig) => internalValidateHostConfig(hostConfig, { requiredProps: [], optionalProps: [] })
498
504
  };
499
505
 
500
- // src/utils/utils.ts
501
- import { nanoid } from "nanoid";
502
- function isBrowserInternal() {
503
- if (typeof window !== "undefined" && typeof window.document !== "undefined" && typeof self !== "undefined") {
504
- return true;
505
- }
506
- return false;
507
- }
508
- function isNodeInternal() {
509
- if (typeof process !== "undefined" && process.version && process.versions.node) {
510
- return true;
511
- }
512
- return false;
513
- }
514
- function getEnvironment() {
515
- if (isNodeInternal()) {
516
- return "node";
517
- }
518
- if (isBrowserInternal()) {
519
- return "browser";
520
- }
521
- throw new Error("Environment detection failed. Supported environments are either a browser or in a node environment");
522
- }
523
- function isBrowser() {
524
- return getEnvironment() === "browser";
525
- }
526
- function isNode() {
527
- return getEnvironment() === "node";
528
- }
529
- function generateRandomString(targetLength) {
530
- return nanoid(targetLength);
531
- }
532
-
533
506
  // src/auth/internal/default-auth-modules/oauth/storage-helpers.ts
534
507
  var storagePrefix = "qlik-qmfe-api";
535
508
  function getTopicFromHostConfig(hostConfig) {
@@ -1327,7 +1300,7 @@ async function fetchAndTransformExceptions(input, init) {
1327
1300
  return Promise.reject(new InvokeFetchError(getErrorMessage(e), 0, new Headers(), {}));
1328
1301
  }
1329
1302
  }
1330
- async function performActualHttpFetch(method, completeUrl, unencodedBody, contentType, options, interceptors, authHeaders, credentials) {
1303
+ async function performActualHttpFetch(method, completeUrl, unencodedBody, contentType, options, interceptors, authHeaders, credentials, userAgent) {
1331
1304
  const { body, contentTypeHeader, requestOptions } = encodeBody(unencodedBody, contentType ?? "");
1332
1305
  const headers = {
1333
1306
  ...contentTypeHeader,
@@ -1335,6 +1308,9 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
1335
1308
  ...options?.headers,
1336
1309
  ...getServiceOverrideHeaderFromLocalStorage()
1337
1310
  };
1311
+ if (!headers["User-Agent"] && userAgent) {
1312
+ headers["User-Agent"] = userAgent;
1313
+ }
1338
1314
  const isCrossOrigin = isHostCrossOrigin(options?.hostConfig);
1339
1315
  let request = {
1340
1316
  method,
@@ -1348,7 +1324,9 @@ async function performActualHttpFetch(method, completeUrl, unencodedBody, conten
1348
1324
  // This adds 'duplex: "half"' if we're sending application/octet-stream, needed in node only.
1349
1325
  };
1350
1326
  let fetchTimeoutId;
1351
- if (options?.timeoutMs && options.timeoutMs > 0) {
1327
+ if (options?.signal) {
1328
+ request.signal = options.signal;
1329
+ } else if (options?.timeoutMs && options.timeoutMs > 0) {
1352
1330
  const controller = new AbortController();
1353
1331
  fetchTimeoutId = setTimeout(() => {
1354
1332
  controller.abort();
@@ -1499,7 +1477,17 @@ function invokeFetchWithUrl(api, props, interceptors) {
1499
1477
  interceptors
1500
1478
  );
1501
1479
  }
1502
- function invokeFetchWithUrlAndRetry(api, { method, completeUrl, cacheKey, body, options, authHeaders, credentials, contentType }, performRetry, interceptors) {
1480
+ function invokeFetchWithUrlAndRetry(api, {
1481
+ method,
1482
+ completeUrl,
1483
+ cacheKey,
1484
+ body,
1485
+ options,
1486
+ authHeaders,
1487
+ credentials,
1488
+ contentType,
1489
+ userAgent
1490
+ }, performRetry, interceptors) {
1503
1491
  if (!cache[api]) {
1504
1492
  cache[api] = {};
1505
1493
  }
@@ -1521,7 +1509,8 @@ function invokeFetchWithUrlAndRetry(api, { method, completeUrl, cacheKey, body,
1521
1509
  options,
1522
1510
  interceptors,
1523
1511
  authHeaders,
1524
- credentials
1512
+ credentials,
1513
+ userAgent
1525
1514
  );
1526
1515
  const resultAfterAuthenticationCheck = interceptAuthenticationErrors(
1527
1516
  options?.hostConfig,
@@ -1698,12 +1687,21 @@ function cleanStack(stack) {
1698
1687
  }
1699
1688
 
1700
1689
  // src/invoke-fetch/invoke-fetch-functions.ts
1690
+ var defaultUserAgent = "qmfe-api/latest";
1701
1691
  async function invokeFetch(api, props, interceptors) {
1702
1692
  checkForCrossDomainRequest(props.options?.hostConfig);
1693
+ let userAgent;
1694
+ if (props?.userAgent) {
1695
+ userAgent = props.userAgent;
1696
+ } else if (isBrowser()) {
1697
+ userAgent = `${window.navigator.userAgent} ${defaultUserAgent}`;
1698
+ } else {
1699
+ userAgent = defaultUserAgent;
1700
+ }
1703
1701
  const { completeUrl, cacheKey, authHeaders, credentials } = await getInvokeFetchUrlParams(props);
1704
1702
  return invokeFetchWithUrl(
1705
1703
  api,
1706
- { ...props, method: props.method.toUpperCase(), completeUrl, cacheKey, authHeaders, credentials },
1704
+ { ...props, method: props.method.toUpperCase(), completeUrl, cacheKey, authHeaders, credentials, userAgent },
1707
1705
  interceptors
1708
1706
  );
1709
1707
  }
@@ -1777,8 +1775,6 @@ export {
1777
1775
  setDefaultHostConfig2 as setDefaultHostConfig,
1778
1776
  checkForCrossDomainRequest,
1779
1777
  logout,
1780
- isBrowser,
1781
- generateRandomString,
1782
1778
  InvokeFetchError,
1783
1779
  EncodingError,
1784
1780
  invokeFetch,
@@ -1,17 +1,17 @@
1
1
  // src/public/public-runtime-modules.ts
2
2
  function getAuthRuntimeModule(hostConfig) {
3
3
  const isNode = !!globalThis.process?.argv;
4
- return isNode ? import("./2G2EK3MP.js") : import("./GEU5U7Z5.js").then((mod) => mod.importRuntimeModule("auth@v1", hostConfig));
4
+ return isNode ? import("./TTSM4BX5.js") : import("./F2X7MIT2.js").then((mod) => mod.importRuntimeModule("auth@v1", hostConfig));
5
5
  }
6
6
  async function getQixRuntimeModule(hostConfig) {
7
7
  await getAuthRuntimeModule(hostConfig);
8
8
  const isNode = !!globalThis.process?.argv;
9
- return isNode ? import("./DD5UK3PZ.js") : import("./GEU5U7Z5.js").then((mod) => mod.importRuntimeModule("qix@v1", hostConfig));
9
+ return isNode ? import("./YGESHYCZ.js") : import("./F2X7MIT2.js").then((mod) => mod.importRuntimeModule("qix@v1", hostConfig));
10
10
  }
11
11
  async function getInvokeFetchRuntimeModule(hostConfig) {
12
12
  await getAuthRuntimeModule(hostConfig);
13
13
  const isNode = !!globalThis.process?.argv;
14
- return isNode ? import("./LDQGW22R.js") : import("./GEU5U7Z5.js").then((mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig));
14
+ return isNode ? import("./WEENC3NJ.js") : import("./F2X7MIT2.js").then((mod) => mod.importRuntimeModule("invoke-fetch@v1", hostConfig));
15
15
  }
16
16
 
17
17
  export {
@@ -1,11 +1,23 @@
1
+ import {
2
+ isBrowser
3
+ } from "./BGRBTH7Y.js";
1
4
  import {
2
5
  getInvokeFetchRuntimeModule
3
- } from "./54UDXFVD.js";
6
+ } from "./S2BIIZLQ.js";
4
7
 
5
8
  // src/public/invoke-fetch.ts
9
+ var defaultUserAgent = "qlik-api/1.5.0";
6
10
  async function invokeFetch(api, props) {
7
11
  const hostConfig = props.options?.hostConfig;
8
- return (await getInvokeFetchRuntimeModule(hostConfig)).invokeFetch(api, props);
12
+ let userAgent;
13
+ if (props?.userAgent) {
14
+ userAgent = props.userAgent;
15
+ } else if (isBrowser()) {
16
+ userAgent = `${window.navigator.userAgent} ${defaultUserAgent}`;
17
+ } else {
18
+ userAgent = defaultUserAgent;
19
+ }
20
+ return (await getInvokeFetchRuntimeModule(hostConfig)).invokeFetch(api, { ...props, userAgent });
9
21
  }
10
22
  function clearApiCache(api) {
11
23
  void getInvokeFetchRuntimeModule().then((runtimeModule) => runtimeModule.clearApiCache(api));
@@ -18,7 +18,8 @@ import {
18
18
  toValidEnigmaLocationUrl,
19
19
  toValidLocationUrl,
20
20
  toValidWebsocketLocationUrl
21
- } from "./5GE4XPP3.js";
21
+ } from "./GFJ653I2.js";
22
+ import "./BGRBTH7Y.js";
22
23
  export {
23
24
  AuthorizationError,
24
25
  InvalidAuthTypeError,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getQixRuntimeModule
3
- } from "./54UDXFVD.js";
3
+ } from "./S2BIIZLQ.js";
4
4
 
5
5
  // src/public/qix.ts
6
6
  function openAppSession(appSessionProps) {
@@ -5,7 +5,8 @@ import {
5
5
  invokeFetch,
6
6
  invoke_fetch_default,
7
7
  parseFetchResponse
8
- } from "./5GE4XPP3.js";
8
+ } from "./GFJ653I2.js";
9
+ import "./BGRBTH7Y.js";
9
10
  export {
10
11
  EncodingError,
11
12
  InvokeFetchError,