@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.
- package/api-keys.d.ts +1 -1
- package/api-keys.js +2 -2
- package/apps.d.ts +10 -2
- package/apps.js +2 -2
- package/audits.d.ts +1 -1
- package/audits.js +2 -2
- package/auth.js +2 -2
- package/automations.d.ts +1 -1
- package/automations.js +2 -2
- package/brands.d.ts +23 -23
- package/brands.js +2 -2
- package/chunks/{2OQLWLWE.js → 3KD5W26Z.js} +3 -3
- package/chunks/{3FHEUGST.js → 3REGOC54.js} +38 -31
- package/chunks/{JCJIPO2A.js → 3W4PFUMC.js} +1 -1
- package/chunks/7RHSSS4W.js +0 -0
- package/chunks/{LVRC5AWE.js → CUC5USM5.js} +2 -1
- package/chunks/{GVE5ABSG.js → E5TLRYTH.js} +2 -1
- package/chunks/{BUSRKHDX.js → OCV75U5H.js} +107 -10
- package/chunks/{DTGUILK5.js → SMQGR3VM.js} +2 -2
- package/chunks/{4M3Q6QY3.js → UJV2QU2J.js} +43 -23
- package/chunks/{YQLW56LG.js → VXEOAWM6.js} +1 -1
- package/collections.d.ts +1 -1
- package/collections.js +2 -2
- package/csp-origins.d.ts +1 -1
- package/csp-origins.js +2 -2
- package/data-assets.d.ts +1 -1
- package/data-assets.js +2 -2
- package/data-connections.d.ts +2 -2
- package/data-connections.js +2 -2
- package/data-credentials.d.ts +64 -2
- package/data-credentials.js +11 -2
- package/data-files.d.ts +1 -1
- package/data-files.js +2 -2
- package/extensions.d.ts +1 -1
- package/extensions.js +2 -2
- package/{global.types--37uwGji.d.ts → global.types-qsBNouXJ.d.ts} +18 -0
- package/glossaries.d.ts +1 -1
- package/glossaries.js +2 -2
- package/groups.d.ts +1 -1
- package/groups.js +2 -2
- package/identity-providers.d.ts +17 -17
- package/identity-providers.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +6 -5
- package/items.d.ts +1 -1
- package/items.js +2 -2
- package/licenses.d.ts +1 -1
- package/licenses.js +2 -2
- package/package.json +2 -2
- package/qix.d.ts +8 -3
- package/qix.js +2 -2
- package/quotas.d.ts +1 -1
- package/quotas.js +2 -2
- package/reload-tasks.d.ts +1 -1
- package/reload-tasks.js +2 -2
- package/reloads.d.ts +4 -4
- package/reloads.js +2 -2
- package/reports.d.ts +39 -3
- package/reports.js +2 -2
- package/roles.d.ts +1 -1
- package/roles.js +2 -2
- package/spaces.d.ts +3 -1
- package/spaces.js +2 -2
- package/temp-contents.d.ts +1 -1
- package/temp-contents.js +2 -2
- package/tenants.d.ts +25 -16
- package/tenants.js +2 -2
- package/themes.d.ts +1 -1
- package/themes.js +2 -2
- package/transports.d.ts +1 -1
- package/transports.js +2 -2
- package/users.d.ts +2 -2
- package/users.js +2 -2
- package/web-integrations.d.ts +1 -1
- package/web-integrations.js +2 -2
- package/web-notifications.d.ts +1 -1
- package/web-notifications.js +2 -2
- package/webhooks.d.ts +22 -22
- 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
|
|
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
|
|
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
|
|
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 "./
|
|
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.
|
|
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 "./
|
|
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
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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("./
|
|
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
|
|
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);
|
package/collections.d.ts
CHANGED
package/collections.js
CHANGED
package/csp-origins.d.ts
CHANGED
package/csp-origins.js
CHANGED
package/data-assets.d.ts
CHANGED
package/data-assets.js
CHANGED
package/data-connections.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './global.types
|
|
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;
|
package/data-connections.js
CHANGED
package/data-credentials.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import { A as ApiCallOptions } from './global.types
|
|
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 };
|
package/data-credentials.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearApiCache,
|
|
3
3
|
invokeFetch
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import "./chunks/
|
|
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
package/data-files.js
CHANGED
package/extensions.d.ts
CHANGED
package/extensions.js
CHANGED
|
@@ -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