@qlik/api 1.32.0 → 1.34.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 (142) hide show
  1. package/api-keys.d.ts +13 -12
  2. package/api-keys.js +64 -50
  3. package/apps.d.ts +56 -56
  4. package/apps.js +392 -304
  5. package/assistants.d.ts +34 -34
  6. package/assistants.js +257 -201
  7. package/audits.d.ts +10 -10
  8. package/audits.js +48 -36
  9. package/{auth-types-DqfMuSRX.d.ts → auth-types-Cj5bM3Yk.d.ts} +29 -9
  10. package/auth.d.ts +17 -4
  11. package/auth.js +4 -2
  12. package/automation-connections.d.ts +12 -12
  13. package/automation-connections.js +75 -59
  14. package/automations.d.ts +29 -29
  15. package/automations.js +159 -123
  16. package/automl-deployments.d.ts +4 -4
  17. package/automl-deployments.js +14 -12
  18. package/automl-predictions.d.ts +13 -13
  19. package/automl-predictions.js +56 -44
  20. package/brands.d.ts +18 -18
  21. package/brands.js +107 -83
  22. package/chunks/{LY7RP2HA.js → 4V6T7Y4L.js} +26 -8
  23. package/chunks/{RCLKKVYB.js → 6C6WMV7V.js} +9 -2
  24. package/chunks/{VVD2DPKQ.js → 6WNP7HZQ.js} +3 -3
  25. package/chunks/7MMXU6EL.js +86 -0
  26. package/chunks/{6ZONDHRN.js → EEE42MLS.js} +11 -4
  27. package/chunks/{FKDGGR2O.js → I2HA7WJB.js} +1362 -1366
  28. package/chunks/{M64RLKVG.js → M7AINAXZ.js} +7 -5
  29. package/chunks/{LTNGXTXG.js → QAOVZB27.js} +3 -3
  30. package/chunks/{YTT2FEVE.js → QZKOA6VR.js} +1 -1
  31. package/chunks/{UZTIZ4H5.js → VUYZKBT5.js} +74 -74
  32. package/chunks/{3RGGGGAR.js → ZCTVPXGO.js} +1 -1
  33. package/collections.d.ts +16 -15
  34. package/collections.js +98 -76
  35. package/conditions.d.ts +13 -13
  36. package/conditions.js +97 -75
  37. package/consumption.d.ts +4 -4
  38. package/consumption.js +11 -9
  39. package/csp-origins.d.ts +9 -9
  40. package/csp-origins.js +53 -41
  41. package/csrf-token.d.ts +3 -3
  42. package/csrf-token.js +10 -8
  43. package/data-alerts.d.ts +22 -22
  44. package/data-alerts.js +139 -107
  45. package/data-assets.d.ts +8 -8
  46. package/data-assets.js +50 -40
  47. package/data-connections.d.ts +16 -16
  48. package/data-connections.js +87 -69
  49. package/data-credentials.d.ts +11 -11
  50. package/data-credentials.js +52 -42
  51. package/data-files.d.ts +18 -18
  52. package/data-files.js +107 -83
  53. package/data-qualities.d.ts +6 -6
  54. package/data-qualities.js +28 -22
  55. package/data-sets.d.ts +10 -10
  56. package/data-sets.js +59 -47
  57. package/data-sources.d.ts +7 -7
  58. package/data-sources.js +28 -22
  59. package/data-stores.d.ts +16 -16
  60. package/data-stores.js +92 -72
  61. package/dcaas.d.ts +6 -6
  62. package/dcaas.js +28 -22
  63. package/di-projects.d.ts +22 -22
  64. package/di-projects.js +148 -116
  65. package/direct-access-agents.d.ts +328 -0
  66. package/direct-access-agents.js +108 -0
  67. package/encryption.d.ts +12 -12
  68. package/encryption.js +82 -62
  69. package/extensions.d.ts +11 -11
  70. package/extensions.js +61 -47
  71. package/glossaries.d.ts +33 -33
  72. package/glossaries.js +221 -173
  73. package/groups.d.ts +12 -12
  74. package/groups.js +72 -56
  75. package/identity-providers.d.ts +11 -11
  76. package/identity-providers.js +67 -51
  77. package/index.d.ts +9 -4
  78. package/index.js +102 -67
  79. package/interceptors.d.ts +9 -2
  80. package/interceptors.js +2 -2
  81. package/invoke-fetch-types-BYCD4pc9.d.ts +98 -0
  82. package/items.d.ts +14 -13
  83. package/items.js +71 -55
  84. package/knowledgebases.d.ts +23 -23
  85. package/knowledgebases.js +153 -119
  86. package/licenses.d.ts +16 -14
  87. package/licenses.js +76 -58
  88. package/lineage-graphs.d.ts +17 -17
  89. package/lineage-graphs.js +76 -60
  90. package/ml.d.ts +238 -60
  91. package/ml.js +391 -286
  92. package/notes.d.ts +4 -4
  93. package/notes.js +19 -15
  94. package/notifications.d.ts +4 -4
  95. package/notifications.js +11 -9
  96. package/oauth-clients.d.ts +14 -14
  97. package/oauth-clients.js +96 -74
  98. package/oauth-tokens.d.ts +5 -5
  99. package/oauth-tokens.js +19 -15
  100. package/package.json +8 -6
  101. package/qix.d.ts +145 -4
  102. package/qix.js +2 -2
  103. package/questions.d.ts +5 -5
  104. package/questions.js +22 -18
  105. package/quotas.d.ts +6 -6
  106. package/quotas.js +20 -16
  107. package/reload-tasks.d.ts +8 -8
  108. package/reload-tasks.js +46 -36
  109. package/reloads.d.ts +7 -7
  110. package/reloads.js +36 -28
  111. package/report-templates.d.ts +10 -10
  112. package/report-templates.js +64 -50
  113. package/reports.d.ts +4 -4
  114. package/reports.js +20 -16
  115. package/roles.d.ts +8 -8
  116. package/roles.js +46 -36
  117. package/sharing-tasks.d.ts +14 -14
  118. package/sharing-tasks.js +89 -69
  119. package/spaces.d.ts +27 -23
  120. package/spaces.js +153 -119
  121. package/tasks.d.ts +17 -17
  122. package/tasks.js +90 -70
  123. package/temp-contents.d.ts +7 -7
  124. package/temp-contents.js +30 -24
  125. package/tenants.d.ts +8 -8
  126. package/tenants.js +57 -45
  127. package/themes.d.ts +11 -11
  128. package/themes.js +61 -47
  129. package/transports.d.ts +8 -8
  130. package/transports.js +49 -37
  131. package/ui-config.d.ts +9 -9
  132. package/ui-config.js +61 -47
  133. package/users.d.ts +15 -15
  134. package/users.js +81 -63
  135. package/web-integrations.d.ts +8 -8
  136. package/web-integrations.js +46 -36
  137. package/web-notifications.d.ts +9 -9
  138. package/web-notifications.js +53 -41
  139. package/webhooks.d.ts +14 -14
  140. package/webhooks.js +88 -68
  141. package/chunks/2ZQ3ZX7F.js +0 -33
  142. package/invoke-fetch-types-Cq7bjkqn.d.ts +0 -243
package/webhooks.js CHANGED
@@ -1,76 +1,96 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/VVD2DPKQ.js";
5
- import "./chunks/LTNGXTXG.js";
6
- import "./chunks/2ZQ3ZX7F.js";
4
+ } from "./chunks/6WNP7HZQ.js";
5
+ import "./chunks/QAOVZB27.js";
6
+ import "./chunks/7MMXU6EL.js";
7
7
 
8
8
  // src/public/rest/webhooks.ts
9
- var getWebhooks = async (query, options) => invokeFetch("webhooks", {
10
- method: "get",
11
- pathTemplate: "/api/v1/webhooks",
12
- query,
13
- options
14
- });
15
- var createWebhook = async (body, options) => invokeFetch("webhooks", {
16
- method: "post",
17
- pathTemplate: "/api/v1/webhooks",
18
- body,
19
- contentType: "application/json",
20
- options
21
- });
22
- var getWebhookEventTypes = async (options) => invokeFetch("webhooks", {
23
- method: "get",
24
- pathTemplate: "/api/v1/webhooks/event-types",
25
- options
26
- });
27
- var deleteWebhook = async (id, options) => invokeFetch("webhooks", {
28
- method: "delete",
29
- pathTemplate: "/api/v1/webhooks/{id}",
30
- pathVariables: { id },
31
- options
32
- });
33
- var getWebhook = async (id, options) => invokeFetch("webhooks", {
34
- method: "get",
35
- pathTemplate: "/api/v1/webhooks/{id}",
36
- pathVariables: { id },
37
- options
38
- });
39
- var patchWebhook = async (id, body, options) => invokeFetch("webhooks", {
40
- method: "patch",
41
- pathTemplate: "/api/v1/webhooks/{id}",
42
- pathVariables: { id },
43
- body,
44
- contentType: "application/json",
45
- options
46
- });
47
- var updateWebhook = async (id, body, options) => invokeFetch("webhooks", {
48
- method: "put",
49
- pathTemplate: "/api/v1/webhooks/{id}",
50
- pathVariables: { id },
51
- body,
52
- contentType: "application/json",
53
- options
54
- });
55
- var getWebhookDeliveries = async (id, query, options) => invokeFetch("webhooks", {
56
- method: "get",
57
- pathTemplate: "/api/v1/webhooks/{id}/deliveries",
58
- pathVariables: { id },
59
- query,
60
- options
61
- });
62
- var getWebhookDelivery = async (id, deliveryId, options) => invokeFetch("webhooks", {
63
- method: "get",
64
- pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}",
65
- pathVariables: { id, deliveryId },
66
- options
67
- });
68
- var resendWebhookDelivery = async (id, deliveryId, options) => invokeFetch("webhooks", {
69
- method: "post",
70
- pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}/actions/resend",
71
- pathVariables: { id, deliveryId },
72
- options
73
- });
9
+ async function getWebhooks(query, options) {
10
+ return invokeFetch("webhooks", {
11
+ method: "get",
12
+ pathTemplate: "/api/v1/webhooks",
13
+ query,
14
+ options
15
+ });
16
+ }
17
+ async function createWebhook(body, options) {
18
+ return invokeFetch("webhooks", {
19
+ method: "post",
20
+ pathTemplate: "/api/v1/webhooks",
21
+ body,
22
+ contentType: "application/json",
23
+ options
24
+ });
25
+ }
26
+ async function getWebhookEventTypes(options) {
27
+ return invokeFetch("webhooks", {
28
+ method: "get",
29
+ pathTemplate: "/api/v1/webhooks/event-types",
30
+ options
31
+ });
32
+ }
33
+ async function deleteWebhook(id, options) {
34
+ return invokeFetch("webhooks", {
35
+ method: "delete",
36
+ pathTemplate: "/api/v1/webhooks/{id}",
37
+ pathVariables: { id },
38
+ options
39
+ });
40
+ }
41
+ async function getWebhook(id, options) {
42
+ return invokeFetch("webhooks", {
43
+ method: "get",
44
+ pathTemplate: "/api/v1/webhooks/{id}",
45
+ pathVariables: { id },
46
+ options
47
+ });
48
+ }
49
+ async function patchWebhook(id, body, options) {
50
+ return invokeFetch("webhooks", {
51
+ method: "patch",
52
+ pathTemplate: "/api/v1/webhooks/{id}",
53
+ pathVariables: { id },
54
+ body,
55
+ contentType: "application/json",
56
+ options
57
+ });
58
+ }
59
+ async function updateWebhook(id, body, options) {
60
+ return invokeFetch("webhooks", {
61
+ method: "put",
62
+ pathTemplate: "/api/v1/webhooks/{id}",
63
+ pathVariables: { id },
64
+ body,
65
+ contentType: "application/json",
66
+ options
67
+ });
68
+ }
69
+ async function getWebhookDeliveries(id, query, options) {
70
+ return invokeFetch("webhooks", {
71
+ method: "get",
72
+ pathTemplate: "/api/v1/webhooks/{id}/deliveries",
73
+ pathVariables: { id },
74
+ query,
75
+ options
76
+ });
77
+ }
78
+ async function getWebhookDelivery(id, deliveryId, options) {
79
+ return invokeFetch("webhooks", {
80
+ method: "get",
81
+ pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}",
82
+ pathVariables: { id, deliveryId },
83
+ options
84
+ });
85
+ }
86
+ async function resendWebhookDelivery(id, deliveryId, options) {
87
+ return invokeFetch("webhooks", {
88
+ method: "post",
89
+ pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}/actions/resend",
90
+ pathVariables: { id, deliveryId },
91
+ options
92
+ });
93
+ }
74
94
  function clearCache() {
75
95
  return clearApiCache("webhooks");
76
96
  }
@@ -1,33 +0,0 @@
1
- // src/utils/utils.ts
2
- function isBrowserInternal() {
3
- if (typeof window !== "undefined" && typeof window.document !== "undefined" && typeof self !== "undefined") {
4
- return true;
5
- }
6
- return false;
7
- }
8
- function isNodeInternal() {
9
- if (typeof process !== "undefined" && process.version && process.versions.node) {
10
- return true;
11
- }
12
- return false;
13
- }
14
- function getEnvironment() {
15
- if (isNodeInternal()) {
16
- return "node";
17
- }
18
- if (isBrowserInternal()) {
19
- return "browser";
20
- }
21
- throw new Error("Environment detection failed. Supported environments are either a browser or in a node environment");
22
- }
23
- function isBrowser() {
24
- return getEnvironment() === "browser";
25
- }
26
- function isNode() {
27
- return getEnvironment() === "node";
28
- }
29
-
30
- export {
31
- isBrowser,
32
- isNode
33
- };
@@ -1,243 +0,0 @@
1
- import { H as HostConfig } from './auth-types-DqfMuSRX.js';
2
-
3
- /** ApiKey Auth Configuration for a HostConfig */
4
- type ApiKeyAuthConfig = {
5
- /** api key created by a developer role on a tenant */
6
- apiKey: string;
7
- };
8
- /** Cookie Auth Configuration for a HostConfig */
9
- type CookieAuthConfig = {
10
- /** Web Integration Id created by tenant admin */
11
- webIntegrationId?: string;
12
- /** If set to false the `credentials` property will be set to same-origin */
13
- crossSiteCookies?: boolean;
14
- /** Set to true if browser is running in anonymous mode, which is detected if there's a eac token in the url */
15
- anonymousMode?: boolean;
16
- };
17
- /** WindowsCookie Auth Configuration for a HostConfig */
18
- type WindowsCookieAuthConfig = {
19
- /** location of the login page, auth module will redirect to this page when an unauthenticated api call is made */
20
- loginUri?: string;
21
- /** If set to false the `credentials` property will be set to same-origin */
22
- crossSiteCookies?: boolean;
23
- };
24
- type PerformInteractiveLoginFn = (props: {
25
- /**
26
- * Returns the url to the login page. The redirectUri parameter property is used to tell the login page where to redirect the browser after the login has succeeded.
27
- * Note that the redirectUri needs to be registered in the oauth configuration.
28
- */
29
- getLoginUrl: (props: {
30
- redirectUri: string;
31
- }) => Promise<string>;
32
- }) => Promise<{
33
- code: string;
34
- state: string;
35
- } | string>;
36
- /** OAuth2 Auth Configuration for a HostConfig */
37
- type Oauth2AuthConfig = {
38
- /** client id of oauth client created by tenant admin */
39
- clientId: string;
40
- /** client id of oauth client created by tenant admin */
41
- clientSecret?: string;
42
- /** location of where the client should be redirected after getting hold of the access token */
43
- redirectUri?: string;
44
- /** If set, store the access token in either local or session storage, otherwise not stored */
45
- accessTokenStorage?: "session" | "local";
46
- /** A string with comma separated values of oauth2 scopes https://oauth.net/2/scope defaults to "user_default" */
47
- scope?: string;
48
- /**
49
- * A custom function that can be used on the client side to fetch an oauth access token from a custom backend.
50
- * Typically used in oauth impersonation.
51
- */
52
- getAccessToken?: string | (() => Promise<string>);
53
- /**
54
- * If set to true no caching or storing of the access token is done.
55
- * This is typically used on the serverside with impersonation so that a client always gets a fresh token.
56
- * Caching is in that case handled on the client side.
57
- */
58
- noCache?: boolean;
59
- /**
60
- * Can be used on the serverside to impersonate a specific user when authenticating using a client secret.
61
- * Typically used together with the `noCache` since caching is done on the browser side.
62
- */
63
- subject?: string;
64
- /**
65
- * Can be used on the serverside to impersonate a specific user when authenticating using a client secret.
66
- * Typically used together with the `noCache` since caching is done on the browser side.
67
- */
68
- userId?: string;
69
- /**
70
- * Can be used to customize the login flow, for instance if the login page should be shown in another browser tab/window.
71
- * The function is asynchronous and when the loging flow is finished it should return the code and state provided in the
72
- * query of the oauth redirect callback. The code and state can either be provided as an object or as the entire callback url.
73
- */
74
- performInteractiveLogin?: PerformInteractiveLoginFn;
75
- };
76
- /** Anonymous Auth Configuration for a HostConfig - used when embedding UI's linked to an anonymous tenant/app */
77
- type AnonymousAuthConfig = {
78
- /**
79
- * Experimental and unsupported
80
- */
81
- accessCode: string;
82
- /** client id of oauth client created by tenant admin */
83
- clientId: string;
84
- };
85
- /** Used to reference a registered host config as a single string */
86
- type ReferenceConfig = {
87
- /** The name of the registered host config to reference */
88
- reference: string;
89
- };
90
- declare global {
91
- /**
92
- * QlikAuthModules is a global interface that can be extended to add custom auth modules.
93
- */
94
- interface QlikAuthModules {
95
- apikey: {
96
- config: ApiKeyAuthConfig;
97
- };
98
- oauth2: {
99
- config: Oauth2AuthConfig;
100
- };
101
- cookie: {
102
- config: CookieAuthConfig;
103
- };
104
- anonymous: {
105
- config: AnonymousAuthConfig;
106
- };
107
- windowscookie: {
108
- config: WindowsCookieAuthConfig;
109
- };
110
- reference: {
111
- config: ReferenceConfig;
112
- };
113
- none: {
114
- config: object;
115
- };
116
- }
117
- /**
118
- * Property set on the window when the user is logging out.
119
- * This prevents unnecessary redirect calls when pending requests
120
- * resolved.
121
- */
122
- var loggingOut: boolean;
123
- /**
124
- * Attaching cache to the window so it can be viewed from the devtool.
125
- * Do not use this for anything!
126
- */
127
- var __API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Record<string, Record<string, CacheEntry> | undefined>;
128
- /**
129
- * QlikMain object defined in https://github.com/qlik-trial/main-web-container/blob/main/src/main.ts
130
- */
131
- var QlikMain: {
132
- resourceNeedsCredentials: (resourcesUrl: string) => boolean;
133
- applyFeatureOverrides: (featureFlags: Record<string, boolean>) => Promise<void>;
134
- } | undefined;
135
- }
136
-
137
- /** The typical base return type of a fetch call */
138
- type InvokeFetchResponse = {
139
- status: number;
140
- headers: Headers;
141
- data: unknown;
142
- prev?: () => Promise<InvokeFetchResponse>;
143
- next?: () => Promise<InvokeFetchResponse>;
144
- };
145
- /** An entry in the cache for one specific cacheKey */
146
- type CacheEntry = {
147
- lastPulled: number;
148
- /** last time the cache was accessed and prevented an api call */
149
- lastHit: Date | null;
150
- /** number of times the cache has been hit by a client */
151
- hitCount: number;
152
- /** the url path of the cache hit. Useful to determine how many different qmfes are accessing the cache key */
153
- accessedPaths: Set<string>;
154
- value: Promise<unknown>;
155
- };
156
- /** Additional options for an api call done with invoke-fetch */
157
- type ApiCallOptions = {
158
- /** Additional headers to pass on to the request. */
159
- headers?: Record<string, string>;
160
- /** if set to true the call will not use a cached result */
161
- noCache?: boolean;
162
- /**
163
- * Only used cached results whose age in milliseconds are less than that or equal to `maxCacheAge`.
164
- */
165
- maxCacheAge?: number | undefined;
166
- /**
167
- * Only results cached on or after the `ifCachedSince` timestamp are used.
168
- */
169
- useCacheIfAfter?: Date;
170
- /**
171
- * Specify the host configif the api call is a cross-domain request. Typically used in embedding and mashups
172
- */
173
- hostConfig?: HostConfig;
174
- /**
175
- * Set the amount of time to wait for a response.
176
- * If the timeout is exceeded the request is aborted.
177
- * If both timeoutMs and signal is present, timeoutMs will have no effect, as
178
- * there is already an abort-signal specified.
179
- */
180
- timeoutMs?: number;
181
- /**
182
- * An abort-signal lets you abort an ongoing fetch request. The abort-signal is created
183
- * by taking the .signal property of an AbortController.
184
- */
185
- signal?: AbortSignal;
186
- /**
187
- * Ensure that the request is kept alive even if the page that initiated it is unloaded
188
- * before the request is completed.
189
- */
190
- keepalive?: boolean;
191
- /**
192
- * Options for progress-reporting. Specify any combination of the callbacks `onUpload`
193
- * and `onDownload`. Progress will be reported continuously.
194
- */
195
- progress?: ProgressOptions;
196
- };
197
- type InvokeFetchProperties = {
198
- /** http method */
199
- method: string;
200
- /** data passed to api call */
201
- body?: unknown;
202
- /** additional api call options */
203
- options?: ApiCallOptions;
204
- /** override default RequestInit options */
205
- requestInitOverrides?: RequestInit;
206
- /** path to api endpoint, can be in a template format e.g. /api/v1/space/{spaceId} */
207
- pathTemplate: string;
208
- /** path variables to be used in the path template */
209
- pathVariables?: Record<string, string>;
210
- /** additional query to url */
211
- query?: Record<string, unknown>;
212
- /** specify what content-type to send, if omitted "application/json" is assumed */
213
- contentType?: string;
214
- /** override the default user-agent with this value. This will also override any browser's UA. */
215
- userAgent?: string;
216
- };
217
- type DownloadableBlob = Blob & {
218
- /** download the blob in a using the specified filename */
219
- download: (filename: string) => Promise<void>;
220
- };
221
- /** The callback options for reporting progress. */
222
- type ProgressOptions = {
223
- /** upload callback, called repeatedly when upload-progress is available */
224
- onUpload?: (event: PartialProgressEvent) => void;
225
- /** download callback, called repeatedly when upload-progress is available */
226
- onDownload?: (event: PartialProgressEvent) => void;
227
- };
228
- /** Represents the current upload or download progress a API-call.
229
- *
230
- * It contains the number of loaded bytes and, if computable, the total payload size.
231
- * If the total size cannot be determined, `total` will be undefined.
232
- *
233
- *
234
- * See MDN: {@link https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent}
235
- */
236
- type PartialProgressEvent = {
237
- /** Number of bytes currently loaded. */
238
- loaded: ProgressEvent["loaded"];
239
- /** The total size of the payload, if computable. */
240
- total?: ProgressEvent["total"];
241
- };
242
-
243
- export type { ApiCallOptions as A, DownloadableBlob as D, InvokeFetchResponse as I, InvokeFetchProperties as a };