@qlik/api 1.21.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 (79) hide show
  1. package/api-keys.d.ts +1 -1
  2. package/api-keys.js +2 -2
  3. package/apps.d.ts +10 -2
  4. package/apps.js +2 -2
  5. package/audits.d.ts +1 -1
  6. package/audits.js +2 -2
  7. package/auth.js +2 -2
  8. package/automations.d.ts +1 -1
  9. package/automations.js +2 -2
  10. package/brands.d.ts +23 -23
  11. package/brands.js +2 -2
  12. package/chunks/{2OQLWLWE.js → 3KD5W26Z.js} +3 -3
  13. package/chunks/{3FHEUGST.js → 3REGOC54.js} +38 -31
  14. package/chunks/{JCJIPO2A.js → 3W4PFUMC.js} +1 -1
  15. package/chunks/7RHSSS4W.js +0 -0
  16. package/chunks/{LVRC5AWE.js → CUC5USM5.js} +2 -1
  17. package/chunks/{GVE5ABSG.js → E5TLRYTH.js} +2 -1
  18. package/chunks/{BUSRKHDX.js → OCV75U5H.js} +107 -10
  19. package/chunks/{DTGUILK5.js → SMQGR3VM.js} +2 -2
  20. package/chunks/{4M3Q6QY3.js → UJV2QU2J.js} +43 -23
  21. package/chunks/{YQLW56LG.js → VXEOAWM6.js} +1 -1
  22. package/collections.d.ts +1 -1
  23. package/collections.js +2 -2
  24. package/csp-origins.d.ts +1 -1
  25. package/csp-origins.js +2 -2
  26. package/data-assets.d.ts +1 -1
  27. package/data-assets.js +2 -2
  28. package/data-connections.d.ts +2 -2
  29. package/data-connections.js +2 -2
  30. package/data-credentials.d.ts +64 -2
  31. package/data-credentials.js +11 -2
  32. package/data-files.d.ts +1 -1
  33. package/data-files.js +2 -2
  34. package/extensions.d.ts +1 -1
  35. package/extensions.js +2 -2
  36. package/{global.types--37uwGji.d.ts → global.types-qsBNouXJ.d.ts} +18 -0
  37. package/glossaries.d.ts +1 -1
  38. package/glossaries.js +2 -2
  39. package/groups.d.ts +1 -1
  40. package/groups.js +2 -2
  41. package/identity-providers.d.ts +17 -17
  42. package/identity-providers.js +2 -2
  43. package/index.d.ts +1 -1
  44. package/index.js +6 -5
  45. package/items.d.ts +1 -1
  46. package/items.js +2 -2
  47. package/licenses.d.ts +1 -1
  48. package/licenses.js +2 -2
  49. package/package.json +2 -2
  50. package/qix.d.ts +8 -3
  51. package/qix.js +2 -2
  52. package/quotas.d.ts +1 -1
  53. package/quotas.js +2 -2
  54. package/reload-tasks.d.ts +1 -1
  55. package/reload-tasks.js +2 -2
  56. package/reloads.d.ts +4 -4
  57. package/reloads.js +2 -2
  58. package/reports.d.ts +39 -3
  59. package/reports.js +2 -2
  60. package/roles.d.ts +1 -1
  61. package/roles.js +2 -2
  62. package/spaces.d.ts +3 -1
  63. package/spaces.js +2 -2
  64. package/temp-contents.d.ts +1 -1
  65. package/temp-contents.js +2 -2
  66. package/tenants.d.ts +25 -16
  67. package/tenants.js +2 -2
  68. package/themes.d.ts +1 -1
  69. package/themes.js +2 -2
  70. package/transports.d.ts +1 -1
  71. package/transports.js +2 -2
  72. package/users.d.ts +2 -2
  73. package/users.js +2 -2
  74. package/web-integrations.d.ts +1 -1
  75. package/web-integrations.js +2 -2
  76. package/web-notifications.d.ts +1 -1
  77. package/web-notifications.js +2 -2
  78. package/webhooks.d.ts +22 -22
  79. package/webhooks.js +2 -2
@@ -565,9 +565,22 @@ function clearStoredAnonymousTokens(hostConfig) {
565
565
  }
566
566
 
567
567
  // src/auth/internal/default-auth-modules/oauth/oauth-utils.ts
568
+ function toPerformInteractiveLoginFunction(performInteractiveLogin) {
569
+ if (typeof performInteractiveLogin === "string") {
570
+ const fn = lookupInteractiveLoginFn(performInteractiveLogin);
571
+ if (!fn) {
572
+ throw new Error(`No such function: ${performInteractiveLogin}`);
573
+ }
574
+ return fn;
575
+ }
576
+ return performInteractiveLogin;
577
+ }
568
578
  function lookupGetAccessFn(getAccessToken2) {
569
579
  return globalThis[getAccessToken2];
570
580
  }
581
+ function lookupInteractiveLoginFn(name) {
582
+ return globalThis[name];
583
+ }
571
584
  function handlePossibleErrors(data) {
572
585
  if (data.errors) {
573
586
  throw new AuthorizationError(data.errors);
@@ -598,6 +611,21 @@ async function sha256(message) {
598
611
  const hashBase64 = byteArrayToBase64(hashArray);
599
612
  return hashBase64.replaceAll(/\+/g, "-").replaceAll(/\//g, "_").replace(/=+$/, "");
600
613
  }
614
+ async function createInteractiveLoginUrl(hostConfig, redirectUri, state, verifier) {
615
+ const clientId = hostConfig.clientId || "";
616
+ const locationUrl = toValidLocationUrl(hostConfig);
617
+ const codeChallenge = await sha256(verifier);
618
+ const queryParams = {
619
+ response_type: "code",
620
+ client_id: clientId,
621
+ redirect_uri: redirectUri,
622
+ scope: hostConfig.scope || "user_default",
623
+ state,
624
+ code_challenge: codeChallenge,
625
+ code_challenge_method: "S256"
626
+ };
627
+ return `${locationUrl}/oauth/authorize?${toQueryString(queryParams)}`;
628
+ }
601
629
  async function startFullPageLoginFlow(hostConfig) {
602
630
  const clientId = hostConfig.clientId || "";
603
631
  const locationUrl = toValidLocationUrl(hostConfig);
@@ -773,6 +801,39 @@ async function getOAuthTokensForBrowser(hostConfig) {
773
801
  refreshToken: void 0,
774
802
  errors: void 0
775
803
  };
804
+ } catch (error) {
805
+ return errorMessageToAuthData("Could not fetch access token using custom function");
806
+ }
807
+ }
808
+ if (hostConfig.performInteractiveLogin) {
809
+ let usedRedirectUri;
810
+ try {
811
+ const verifier2 = generateRandomString(128);
812
+ const originalState = generateRandomString(43);
813
+ const { code: code2, state } = extractCodeAndState(
814
+ await toPerformInteractiveLoginFunction(hostConfig.performInteractiveLogin)({
815
+ getLoginUrl: async ({ redirectUri }) => {
816
+ usedRedirectUri = redirectUri;
817
+ return createInteractiveLoginUrl(hostConfig, redirectUri, originalState, verifier2);
818
+ }
819
+ })
820
+ );
821
+ if (!usedRedirectUri) {
822
+ return errorMessageToAuthData("No redirect uri provided");
823
+ }
824
+ if (originalState !== state) {
825
+ return errorMessageToAuthData("State returned by custom interactive login function does not match original");
826
+ }
827
+ if (!code2) {
828
+ return errorMessageToAuthData("No code found in response from custom interactive login function");
829
+ }
830
+ const tokenResponse = await exchangeCodeAndVerifierForAccessTokenData(
831
+ hostConfig,
832
+ code2,
833
+ verifier2,
834
+ usedRedirectUri
835
+ );
836
+ return tokenResponse;
776
837
  } catch (error) {
777
838
  return {
778
839
  accessToken: void 0,
@@ -781,7 +842,7 @@ async function getOAuthTokensForBrowser(hostConfig) {
781
842
  {
782
843
  code: "",
783
844
  status: 401,
784
- title: "Could not fetch access token using custom function",
845
+ title: "Could not perform custom interactive login",
785
846
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
786
847
  detail: `${error}`
787
848
  }
@@ -808,6 +869,10 @@ async function getOAuthTokensForBrowser(hostConfig) {
808
869
  if (oauthTokens) {
809
870
  return oauthTokens;
810
871
  }
872
+ if (hostConfig.performInteractiveLogin) {
873
+ return new Promise(() => {
874
+ });
875
+ }
811
876
  if (hostConfig.authRedirectUserConfirmation) {
812
877
  await hostConfig.authRedirectUserConfirmation();
813
878
  }
@@ -856,6 +921,30 @@ async function refreshAccessToken(hostConfig) {
856
921
  }
857
922
  }
858
923
  }
924
+ function extractCodeAndState(input) {
925
+ if (typeof input === "string") {
926
+ const queryParams = new URLSearchParams(new URL(input).search);
927
+ return {
928
+ code: queryParams.get("code") || "",
929
+ state: queryParams.get("state") || ""
930
+ };
931
+ }
932
+ return input;
933
+ }
934
+ function errorMessageToAuthData(message) {
935
+ return {
936
+ accessToken: void 0,
937
+ refreshToken: void 0,
938
+ errors: [
939
+ {
940
+ code: "",
941
+ status: 401,
942
+ title: message,
943
+ detail: ""
944
+ }
945
+ ]
946
+ };
947
+ }
859
948
 
860
949
  // src/auth/internal/default-auth-modules/oauth/temporary-token.ts
861
950
  async function exchangeAccessTokenForTemporaryToken(hostConfig, accessToken, purpose) {
@@ -1250,6 +1339,12 @@ async function handleAuthenticationError6({
1250
1339
  };
1251
1340
  }
1252
1341
  if (isBrowser()) {
1342
+ if (hostConfig.performInteractiveLogin) {
1343
+ clearStoredOauthTokens(hostConfig);
1344
+ return {
1345
+ retry: true
1346
+ };
1347
+ }
1253
1348
  if (hostConfig.authRedirectUserConfirmation) {
1254
1349
  await hostConfig.authRedirectUserConfirmation();
1255
1350
  }
@@ -1279,7 +1374,8 @@ var oauth_default = {
1279
1374
  "subject",
1280
1375
  "userId",
1281
1376
  "noCache",
1282
- "getAccessToken"
1377
+ "getAccessToken",
1378
+ "performInteractiveLogin"
1283
1379
  ]
1284
1380
  })
1285
1381
  };
@@ -1307,10 +1403,10 @@ function getXrfKey(hostConfig) {
1307
1403
  }
1308
1404
 
1309
1405
  // src/auth/internal/default-auth-modules/windows-cookie.ts
1310
- function getRestCallAuthParams7({
1406
+ async function getRestCallAuthParams7({
1311
1407
  hostConfig
1312
1408
  }) {
1313
- return Promise.resolve({
1409
+ return {
1314
1410
  headers: {
1315
1411
  "X-Qlik-XrfKey": getXrfKey(hostConfig)
1316
1412
  },
@@ -1318,16 +1414,17 @@ function getRestCallAuthParams7({
1318
1414
  xrfkey: getXrfKey(hostConfig)
1319
1415
  },
1320
1416
  credentials: getCredentialsForCookieAuth(hostConfig)
1321
- });
1417
+ };
1322
1418
  }
1323
- function getWebSocketAuthParams7({
1419
+ async function getWebSocketAuthParams7({
1324
1420
  hostConfig
1325
1421
  }) {
1326
- return Promise.resolve({
1422
+ return {
1327
1423
  queryParams: {
1328
- xrfkey: getXrfKey(hostConfig)
1424
+ xrfkey: getXrfKey(hostConfig),
1425
+ "qlik-csrf-token": await getCsrfToken(hostConfig, true)
1329
1426
  }
1330
- });
1427
+ };
1331
1428
  }
1332
1429
  async function handleAuthenticationError7({
1333
1430
  hostConfig
@@ -1983,6 +2080,7 @@ async function parseFetchResponse(fetchResponse, url) {
1983
2080
  case "application/octet-stream":
1984
2081
  case "application/zip":
1985
2082
  case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
2083
+ case "application/pdf":
1986
2084
  resultData = toDownloadableBlob(await fetchResponse.blob());
1987
2085
  break;
1988
2086
  case "text/event-stream":
@@ -2049,6 +2147,5 @@ export {
2049
2147
  clearApiCache,
2050
2148
  parseFetchResponse,
2051
2149
  invoke_fetch_default,
2052
- getCsrfToken,
2053
2150
  auth_default
2054
2151
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getInvokeFetchRuntimeModule
3
- } from "./2OQLWLWE.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.21.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,8 @@ import {
4
4
  invokeFetch,
5
5
  isWindows,
6
6
  toValidWebsocketLocationUrl
7
- } from "./BUSRKHDX.js";
7
+ } from "./OCV75U5H.js";
8
+ import "./7RHSSS4W.js";
8
9
  import {
9
10
  isBrowser
10
11
  } from "./2ZQ3ZX7F.js";
@@ -86,19 +87,27 @@ function toGlobalAppSessionId({
86
87
  identity,
87
88
  hostConfig,
88
89
  withoutData,
89
- useReloadEngine
90
+ useReloadEngine,
91
+ ttlSeconds,
92
+ workloadType
90
93
  }) {
91
94
  const locationUrl = toValidWebsocketLocationUrl(hostConfig);
92
95
  let url = `${locationUrl}/${appId}`;
93
96
  if (identity) {
94
97
  url += `/${identity}`;
95
98
  }
99
+ if (ttlSeconds !== void 0 && ttlSeconds >= 0) {
100
+ url += `/ttl/${ttlSeconds}`;
101
+ }
96
102
  if (useReloadEngine) {
97
103
  url += "/useReloadEngine";
98
104
  }
99
105
  if (withoutData) {
100
106
  url += "/withoutData";
101
107
  }
108
+ if (workloadType) {
109
+ url += `?workloadType=${workloadType}`;
110
+ }
102
111
  return url;
103
112
  }
104
113
  async function runPendingInitialActions(initialActionsForApp, sharedSession, doc) {
@@ -109,7 +118,7 @@ async function runPendingInitialActions(initialActionsForApp, sharedSession, doc
109
118
  }
110
119
  }
111
120
  }
112
- async function addInitialSharedSessionCreationAction(openAppSessionProps, action) {
121
+ function addInitialSharedSessionCreationAction(openAppSessionProps, action) {
113
122
  const key = toGlobalAppSessionId(openAppSessionProps);
114
123
  let initialActionArray = initialActions[key];
115
124
  if (!initialActionArray) {
@@ -118,11 +127,18 @@ async function addInitialSharedSessionCreationAction(openAppSessionProps, action
118
127
  initialActionArray.push(action);
119
128
  const existingSharedSession = sharedSessions[key];
120
129
  if (existingSharedSession) {
121
- const doc = await existingSharedSession.docPromise;
122
- if (doc) {
123
- runPendingInitialActions(initialActionArray, existingSharedSession, doc);
124
- }
130
+ existingSharedSession.docPromise.then((doc) => {
131
+ if (doc) {
132
+ runPendingInitialActions(initialActionArray, existingSharedSession, doc);
133
+ }
134
+ });
125
135
  }
136
+ return () => {
137
+ const index = initialActionArray.indexOf(action);
138
+ if (index > -1) {
139
+ initialActionArray.splice(index, 1);
140
+ }
141
+ };
126
142
  }
127
143
  function listenForWindowsAuthenticationInformation(session) {
128
144
  let resolveAuthSuggestedInWebsocket;
@@ -145,7 +161,7 @@ function listenForWindowsAuthenticationInformation(session) {
145
161
  return authSuggestedInWebsocket;
146
162
  }
147
163
  async function createAndSetupEnigmaSession(props, canRetry) {
148
- const { createEnigmaSession } = await import("./3FHEUGST.js");
164
+ const { createEnigmaSession } = await import("./3REGOC54.js");
149
165
  const session = await createEnigmaSession(props);
150
166
  setupSessionListeners(session, props);
151
167
  let global;
@@ -439,7 +455,18 @@ function resumeShouldRejectPromiseIfNotReattached(bool) {
439
455
  }
440
456
  async function checkConnectivity(hostConfig) {
441
457
  let status = "online";
442
- 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) {
443
470
  const fetchErr = err;
444
471
  switch (fetchErr.status) {
445
472
  case 0:
@@ -449,16 +476,7 @@ async function checkConnectivity(hostConfig) {
449
476
  status = "unauthorized";
450
477
  break;
451
478
  }
452
- };
453
- const method = "get";
454
- const options = {
455
- hostConfig,
456
- timeoutMs: 2e3,
457
- noCache: true
458
- };
459
- const fetchRoot = invokeFetch("", { method, pathTemplate: "", options }).catch(catchFunc);
460
- const fetchMe = invokeFetch("", { method, pathTemplate: "/api/v1/users/me", options }).catch(catchFunc);
461
- await Promise.all([fetchRoot, fetchMe]);
479
+ }
462
480
  return Promise.resolve(status);
463
481
  }
464
482
  async function sessionResumeWithRetry(session, hostConfig) {
@@ -566,14 +584,16 @@ function getExternalSession(externalApp, appSessionProps) {
566
584
  }
567
585
 
568
586
  // src/qix/qix-functions.ts
569
- async function createSessionApp() {
587
+ async function createSessionApp(ttlSeconds, workloadType) {
570
588
  let sharedSession;
571
589
  if ((await getPlatform()).isCloud) {
572
- sharedSession = await getOrCreateSharedSession({ appId: `SessionApp_${Date.now()}` });
590
+ sharedSession = await getOrCreateSharedSession({ appId: `SessionApp_${Date.now()}`, ttlSeconds, workloadType });
573
591
  } else {
574
592
  sharedSession = await getOrCreateSharedSession({
575
593
  appId: `%3Ftransient%3D/identity/${Date.now()}`,
576
- useSessionApp: true
594
+ useSessionApp: true,
595
+ ttlSeconds,
596
+ workloadType
577
597
  });
578
598
  }
579
599
  let alreadyClosed = false;
@@ -657,7 +677,7 @@ function useAppHook(react) {
657
677
  };
658
678
  }
659
679
  function addInitialAppAction(openAppSessionProps, action) {
660
- addInitialSharedSessionCreationAction(openAppSessionProps, action);
680
+ return addInitialSharedSessionCreationAction(openAppSessionProps, action);
661
681
  }
662
682
  function onWebSocketEvent(fn) {
663
683
  return globalOnWebSocketEvent(fn);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getQixRuntimeModule
3
- } from "./2OQLWLWE.js";
3
+ } from "./3KD5W26Z.js";
4
4
 
5
5
  // src/public/qix.ts
6
6
  function openAppSession(appSessionProps) {
package/collections.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type CollectionByIdPatch = {
package/collections.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type CSPEntry = {
package/csp-origins.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.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
package/data-assets.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type BatchIdDto = {
package/data-assets.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-assets.ts
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type ActionDeleteRequest = {
@@ -300,7 +300,7 @@ declare const getDataConnections: (query: {
300
300
  dataName?: string;
301
301
  /** Returns extended list of properties (e.g. encrypted credential string) when set to true. */
302
302
  extended?: boolean;
303
- /** Filtering resources by properties (filterable properties only) using SCIM filter string. Note the filter string only applies to connections managed by data-connections service, i.e. filtering doesn't apply to DataFile connections. */
303
+ /** Filtering resources by properties (filterable properties only) using SCIM filter string. Note the filter string only applies to connections managed by data-connections service, i.e. filtering doesn't apply to DataFile connections. When filtering on datetime property (e.g. created, updated), datetime should be in RFC3339 format. */
304
304
  filter?: string;
305
305
  /** Base Qri (encrypted) will be returned when the query is set to true, default is false */
306
306
  includeQris?: boolean;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-connections.ts
@@ -1,7 +1,22 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
+ type ActionFilterOrphanRequest = {
5
+ /** Filtering on datasource ID of credentials */
6
+ datasourceID?: string;
7
+ /** Filtering on separate status of credentials: * 0 - embedded credential * 1 - separated credential */
8
+ qSeparated?: 0 | 1;
9
+ /** Filtering on type of credentials */
10
+ qType?: string;
11
+ };
12
+ type ActionFilterOrphanResponse = {
13
+ /** Number of orphan credentials found */
14
+ count: number;
15
+ data: OrphanCredentialResItem[];
16
+ };
4
17
  type Credential = {
18
+ /** Datetime when the credential was created */
19
+ created?: string;
5
20
  /** ID datasource that the credential is created for */
6
21
  datasourceID?: string;
7
22
  links?: Link;
@@ -15,6 +30,8 @@ type Credential = {
15
30
  qReferenceKey?: string;
16
31
  /** Type of credential */
17
32
  qType: string;
33
+ /** Datetime when the credential was last updated */
34
+ updated?: string;
18
35
  };
19
36
  /**
20
37
  * Credential
@@ -53,6 +70,27 @@ type Link = {
53
70
  href: string;
54
71
  };
55
72
  };
73
+ /**
74
+ * Orphan credential
75
+ */
76
+ type OrphanCredentialResItem = {
77
+ /** Datetime when the credential was created */
78
+ created: string;
79
+ /** ID datasource that the credential is created for */
80
+ datasourceID?: string;
81
+ /** UUID of the credential */
82
+ qID: string;
83
+ /** Name of the credential */
84
+ qName: string;
85
+ /** Type of credential (i.e. connector provider of the corresponding connection) */
86
+ qType: string;
87
+ /** Tenant ID of the credential's owner */
88
+ tenant?: string;
89
+ /** Datetime when the credential was last updated */
90
+ updated: string;
91
+ /** User ID of the credential's owner */
92
+ user?: string;
93
+ };
56
94
  type PatchRequest = {
57
95
  patchData: {
58
96
  /** Operation type */
@@ -66,6 +104,23 @@ type PatchRequest = {
66
104
  type ResponseErrors = {
67
105
  errors?: Errors;
68
106
  };
107
+ /**
108
+ * Gets list of orphan data credentials (i.e. credentials that are not associated to any data connection) filtering on properties defined in request body
109
+ *
110
+ * @param body an object with the body content
111
+ * @throws FilterOrphanedDataCredentialsHttpError
112
+ */
113
+ declare const filterOrphanedDataCredentials: (body: ActionFilterOrphanRequest, options?: ApiCallOptions) => Promise<FilterOrphanedDataCredentialsHttpResponse>;
114
+ type FilterOrphanedDataCredentialsHttpResponse = {
115
+ data: ActionFilterOrphanResponse;
116
+ headers: Headers;
117
+ status: number;
118
+ };
119
+ type FilterOrphanedDataCredentialsHttpError = {
120
+ data: ResponseErrors;
121
+ headers: Headers;
122
+ status: number;
123
+ };
69
124
  /**
70
125
  * Deletes the specified credential by ID (or by name when type=credentialname is set in query)
71
126
  *
@@ -157,6 +212,13 @@ type UpdateDataCredentialHttpError = {
157
212
  */
158
213
  declare function clearCache(): void;
159
214
  interface DataCredentialsAPI {
215
+ /**
216
+ * Gets list of orphan data credentials (i.e. credentials that are not associated to any data connection) filtering on properties defined in request body
217
+ *
218
+ * @param body an object with the body content
219
+ * @throws FilterOrphanedDataCredentialsHttpError
220
+ */
221
+ filterOrphanedDataCredentials: typeof filterOrphanedDataCredentials;
160
222
  /**
161
223
  * Deletes the specified credential by ID (or by name when type=credentialname is set in query)
162
224
  *
@@ -201,4 +263,4 @@ interface DataCredentialsAPI {
201
263
  */
202
264
  declare const dataCredentialsExport: DataCredentialsAPI;
203
265
 
204
- export { type Credential, type CredentialCreate, type DataCredentialsAPI, type DeleteDataCredentialHttpError, type DeleteDataCredentialHttpResponse, type Error, type Errors, type GetDataCredentialHttpError, type GetDataCredentialHttpResponse, type Link, type PatchDataCredentialHttpError, type PatchDataCredentialHttpResponse, type PatchRequest, type ResponseErrors, type UpdateDataCredentialHttpError, type UpdateDataCredentialHttpResponse, clearCache, dataCredentialsExport as default, deleteDataCredential, getDataCredential, patchDataCredential, updateDataCredential };
266
+ export { type ActionFilterOrphanRequest, type ActionFilterOrphanResponse, type Credential, type CredentialCreate, type DataCredentialsAPI, type DeleteDataCredentialHttpError, type DeleteDataCredentialHttpResponse, type Error, type Errors, type FilterOrphanedDataCredentialsHttpError, type FilterOrphanedDataCredentialsHttpResponse, type GetDataCredentialHttpError, type GetDataCredentialHttpResponse, type Link, type OrphanCredentialResItem, type PatchDataCredentialHttpError, type PatchDataCredentialHttpResponse, type PatchRequest, type ResponseErrors, type UpdateDataCredentialHttpError, type UpdateDataCredentialHttpResponse, clearCache, dataCredentialsExport as default, deleteDataCredential, filterOrphanedDataCredentials, getDataCredential, patchDataCredential, updateDataCredential };
@@ -1,11 +1,18 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-credentials.ts
9
+ var filterOrphanedDataCredentials = async (body, options) => invokeFetch("data-credentials", {
10
+ method: "post",
11
+ pathTemplate: "/api/v1/data-credentials/actions/filter-orphan",
12
+ body,
13
+ contentType: "application/json",
14
+ options
15
+ });
9
16
  var deleteDataCredential = async (qID, query, options) => invokeFetch("data-credentials", {
10
17
  method: "delete",
11
18
  pathTemplate: "/api/v1/data-credentials/{qID}",
@@ -42,6 +49,7 @@ function clearCache() {
42
49
  return clearApiCache("data-credentials");
43
50
  }
44
51
  var dataCredentialsExport = {
52
+ filterOrphanedDataCredentials,
45
53
  deleteDataCredential,
46
54
  getDataCredential,
47
55
  patchDataCredential,
@@ -53,6 +61,7 @@ export {
53
61
  clearCache,
54
62
  data_credentials_default as default,
55
63
  deleteDataCredential,
64
+ filterOrphanedDataCredentials,
56
65
  getDataCredential,
57
66
  patchDataCredential,
58
67
  updateDataCredential
package/data-files.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  type BatchChangeSpaceItem = {
package/data-files.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/data-files.ts
package/extensions.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  /**
package/extensions.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/DTGUILK5.js";
5
- import "./chunks/2OQLWLWE.js";
4
+ } from "./chunks/SMQGR3VM.js";
5
+ import "./chunks/3KD5W26Z.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/extensions.ts
@@ -68,6 +68,18 @@ type WindowsCookieAuthConfig = {
68
68
  /** If set to false the `credentials` property will be set to same-origin */
69
69
  crossSiteCookies?: boolean;
70
70
  };
71
+ type PerformInteractiveLoginFn = (props: {
72
+ /**
73
+ * 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.
74
+ * Note that the redirectUri needs to be registered in the oauth configuration.
75
+ */
76
+ getLoginUrl: (props: {
77
+ redirectUri: string;
78
+ }) => Promise<string>;
79
+ }) => Promise<{
80
+ code: string;
81
+ state: string;
82
+ } | string>;
71
83
  /** OAuth2 Auth Configuration for a HostConfig */
72
84
  type Oauth2AuthConfig = {
73
85
  /** client id of oauth client created by tenant admin */
@@ -101,6 +113,12 @@ type Oauth2AuthConfig = {
101
113
  * Typically used together with the `noCache` since caching is done on the browser side.
102
114
  */
103
115
  userId?: string;
116
+ /**
117
+ * Can be used to customize the login flow, for instance if the login page should be shown in another browser tab/window.
118
+ * The function is asynchronous and when the loging flow is finished it should return the code and state provided in the
119
+ * query of the oauth redirect callback. The code and state can either be provided as an object or as the entire callback url.
120
+ */
121
+ performInteractiveLogin?: PerformInteractiveLoginFn;
104
122
  };
105
123
  /** Anonymous Auth Configuration for a HostConfig - used when embedding UI's linked to an anonymous tenant/app */
106
124
  type AnonymousAuthConfig = {
package/glossaries.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiCallOptions } from './global.types--37uwGji.js';
1
+ import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
2
2
  import './auth-types-PkN9CAF_.js';
3
3
 
4
4
  /**