@qlik/api 0.0.15 → 0.1.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/README.md +1 -1
- package/api-keys.js +25 -25
- package/apps.js +97 -97
- package/audits.js +23 -23
- package/auth.js +14 -14
- package/automations.js +47 -47
- package/brands.js +35 -35
- package/chunks/4HB3TAEO.js +4 -4
- package/chunks/{EHAANYDL.mjs → 4V5AAWUI.js} +3 -3
- package/chunks/{O4EAKEIN.mjs → D62LI5YU.js} +1 -1
- package/chunks/{6WX5AGKQ.mjs → L2BJNKLV.js} +2 -2
- package/chunks/{3YV6X7S6.mjs → LHCJKIEO.js} +1 -1
- package/chunks/OPRGGO4C.js +8 -8
- package/chunks/{HHOVS7QC.mjs → RNLZBOJU.js} +3 -3
- package/chunks/{BYD63JCG.mjs → SIU6HO6B.js} +5 -3
- package/chunks/{6AD3HYSF.mjs → TFSRDRRS.js} +1 -1
- package/chunks/{HOCTJESP.mjs → VK2CODYY.js} +2 -2
- package/chunks/{UKVTBYP6.mjs → XOVMZWDC.js} +2 -2
- package/collections.js +33 -33
- package/csp-origins.js +23 -23
- package/data-assets.js +21 -21
- package/data-connections.d.ts +97 -61
- package/data-connections.js +29 -29
- package/data-credentials.d.ts +3 -2
- package/data-credentials.js +19 -19
- package/data-files.js +35 -35
- package/docs/authentication.md +5 -5
- package/docs/examples/fetch-spaces.md +1 -15
- package/docs/examples/open-without-data.md +1 -1
- package/docs/examples/show-sheet-list.md +1 -1
- package/docs/features.md +1 -1
- package/extensions.js +25 -25
- package/glossaries.js +59 -59
- package/groups.d.ts +0 -3
- package/groups.js +27 -27
- package/identity-providers.js +27 -27
- package/index.js +53 -53
- package/items.js +27 -27
- package/licenses.js +29 -29
- package/package.json +36 -232
- package/qix.d.ts +1 -1
- package/qix.js +10 -10
- package/quotas.js +15 -15
- package/reload-tasks.js +21 -21
- package/reloads.js +19 -19
- package/roles.js +15 -15
- package/spaces.js +35 -35
- package/temp-contents.js +17 -17
- package/tenants.js +23 -23
- package/themes.js +25 -25
- package/transports.js +23 -23
- package/users.d.ts +1 -3
- package/users.js +31 -31
- package/web-integrations.js +21 -21
- package/web-notifications.js +23 -23
- package/webhooks.js +31 -31
- package/api-keys.d.mts +0 -336
- package/api-keys.mjs +0 -80
- package/apps.d.mts +0 -2431
- package/apps.mjs +0 -398
- package/audits.d.mts +0 -286
- package/audits.mjs +0 -64
- package/auth-types-nnUcWhuU.d.mts +0 -98
- package/auth.d.mts +0 -26
- package/auth.mjs +0 -14
- package/automations.d.mts +0 -682
- package/automations.mjs +0 -173
- package/brands.d.mts +0 -670
- package/brands.mjs +0 -123
- package/chunks/2YWCEGTS.js +0 -21
- package/chunks/34ZKUFEA.js +0 -41
- package/chunks/4WHZ4EIW.js +0 -57
- package/chunks/B4VPD3ZT.js +0 -574
- package/chunks/BM4OSDRZ.js +0 -17
- package/chunks/DCXUEDOW.mjs +0 -67
- package/chunks/MTAQE4WC.js +0 -10411
- package/chunks/PLOSYUG2.js +0 -25
- package/chunks/URIW2U5M.js +0 -17
- package/chunks/VSY5YIQY.mjs +0 -11
- package/chunks/WOYJLK4Y.js +0 -1623
- package/collections.d.mts +0 -581
- package/collections.mjs +0 -114
- package/csp-origins.d.mts +0 -273
- package/csp-origins.mjs +0 -69
- package/data-assets.d.mts +0 -205
- package/data-assets.mjs +0 -66
- package/data-connections.d.mts +0 -558
- package/data-connections.mjs +0 -103
- package/data-credentials.d.mts +0 -203
- package/data-credentials.mjs +0 -59
- package/data-files.d.mts +0 -562
- package/data-files.mjs +0 -123
- package/extensions.d.mts +0 -293
- package/extensions.mjs +0 -77
- package/global.types-5iFvFJvX.d.mts +0 -115
- package/glossaries.d.mts +0 -1173
- package/glossaries.mjs +0 -237
- package/groups.d.mts +0 -434
- package/groups.mjs +0 -88
- package/identity-providers.d.mts +0 -550
- package/identity-providers.mjs +0 -83
- package/index.d.mts +0 -142
- package/index.mjs +0 -716
- package/items.d.mts +0 -535
- package/items.mjs +0 -87
- package/licenses.d.mts +0 -459
- package/licenses.mjs +0 -92
- package/qix.d.mts +0 -11629
- package/qix.mjs +0 -10
- package/quotas.d.mts +0 -112
- package/quotas.mjs +0 -32
- package/reload-tasks.d.mts +0 -227
- package/reload-tasks.mjs +0 -62
- package/reloads.d.mts +0 -207
- package/reloads.mjs +0 -46
- package/roles.d.mts +0 -175
- package/roles.mjs +0 -31
- package/spaces.d.mts +0 -562
- package/spaces.mjs +0 -124
- package/temp-contents.d.mts +0 -167
- package/temp-contents.mjs +0 -41
- package/tenants.d.mts +0 -300
- package/tenants.mjs +0 -73
- package/themes.d.mts +0 -268
- package/themes.mjs +0 -77
- package/transports.d.mts +0 -319
- package/transports.mjs +0 -65
- package/users.d.mts +0 -631
- package/users.mjs +0 -104
- package/web-integrations.d.mts +0 -274
- package/web-integrations.mjs +0 -62
- package/web-notifications.d.mts +0 -250
- package/web-notifications.mjs +0 -69
- package/webhooks.d.mts +0 -445
- package/webhooks.mjs +0 -104
package/data-connections.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
clearApiCache,
|
|
3
|
+
invokeFetch
|
|
4
|
+
} from "./chunks/LHCJKIEO.js";
|
|
5
|
+
import "./chunks/4V5AAWUI.js";
|
|
6
|
+
import "./chunks/4HB3TAEO.js";
|
|
7
7
|
|
|
8
8
|
// src/public/rest/data-connections.ts
|
|
9
|
-
var getDataConnections = async (query, options) =>
|
|
9
|
+
var getDataConnections = async (query, options) => invokeFetch("data-connections", {
|
|
10
10
|
method: "get",
|
|
11
11
|
pathTemplate: "/api/v1/data-connections",
|
|
12
12
|
query,
|
|
13
13
|
options
|
|
14
14
|
});
|
|
15
|
-
var createDataConnection = async (body, options) =>
|
|
15
|
+
var createDataConnection = async (body, options) => invokeFetch("data-connections", {
|
|
16
16
|
method: "post",
|
|
17
17
|
pathTemplate: "/api/v1/data-connections",
|
|
18
18
|
body,
|
|
19
19
|
contentType: "application/json",
|
|
20
20
|
options
|
|
21
21
|
});
|
|
22
|
-
var deleteDataConnections = async (body, options) =>
|
|
22
|
+
var deleteDataConnections = async (body, options) => invokeFetch("data-connections", {
|
|
23
23
|
method: "post",
|
|
24
24
|
pathTemplate: "/api/v1/data-connections/actions/delete",
|
|
25
25
|
body,
|
|
26
26
|
contentType: "application/json",
|
|
27
27
|
options
|
|
28
28
|
});
|
|
29
|
-
var duplicateDataAConnection = async (body, options) =>
|
|
29
|
+
var duplicateDataAConnection = async (body, options) => invokeFetch("data-connections", {
|
|
30
30
|
method: "post",
|
|
31
31
|
pathTemplate: "/api/v1/data-connections/actions/duplicate",
|
|
32
32
|
body,
|
|
33
33
|
contentType: "application/json",
|
|
34
34
|
options
|
|
35
35
|
});
|
|
36
|
-
var updateDataConnections = async (body, options) =>
|
|
36
|
+
var updateDataConnections = async (body, options) => invokeFetch("data-connections", {
|
|
37
37
|
method: "post",
|
|
38
38
|
pathTemplate: "/api/v1/data-connections/actions/update",
|
|
39
39
|
body,
|
|
40
40
|
contentType: "application/json",
|
|
41
41
|
options
|
|
42
42
|
});
|
|
43
|
-
var deleteDataConnection = async (qID, query, options) =>
|
|
43
|
+
var deleteDataConnection = async (qID, query, options) => invokeFetch("data-connections", {
|
|
44
44
|
method: "delete",
|
|
45
45
|
pathTemplate: "/api/v1/data-connections/{qID}",
|
|
46
46
|
pathVariables: { qID },
|
|
47
47
|
query,
|
|
48
48
|
options
|
|
49
49
|
});
|
|
50
|
-
var getDataConnection = async (qID, query, options) =>
|
|
50
|
+
var getDataConnection = async (qID, query, options) => invokeFetch("data-connections", {
|
|
51
51
|
method: "get",
|
|
52
52
|
pathTemplate: "/api/v1/data-connections/{qID}",
|
|
53
53
|
pathVariables: { qID },
|
|
54
54
|
query,
|
|
55
55
|
options
|
|
56
56
|
});
|
|
57
|
-
var patchDataConnection = async (qID, query, body, options) =>
|
|
57
|
+
var patchDataConnection = async (qID, query, body, options) => invokeFetch("data-connections", {
|
|
58
58
|
method: "patch",
|
|
59
59
|
pathTemplate: "/api/v1/data-connections/{qID}",
|
|
60
60
|
pathVariables: { qID },
|
|
@@ -63,7 +63,7 @@ var patchDataConnection = async (qID, query, body, options) => _URIW2U5Mjs.invok
|
|
|
63
63
|
contentType: "application/json",
|
|
64
64
|
options
|
|
65
65
|
});
|
|
66
|
-
var updateDataConnection = async (qID, query, body, options) =>
|
|
66
|
+
var updateDataConnection = async (qID, query, body, options) => invokeFetch("data-connections", {
|
|
67
67
|
method: "put",
|
|
68
68
|
pathTemplate: "/api/v1/data-connections/{qID}",
|
|
69
69
|
pathVariables: { qID },
|
|
@@ -73,7 +73,7 @@ var updateDataConnection = async (qID, query, body, options) => _URIW2U5Mjs.invo
|
|
|
73
73
|
options
|
|
74
74
|
});
|
|
75
75
|
function clearCache() {
|
|
76
|
-
return
|
|
76
|
+
return clearApiCache("data-connections");
|
|
77
77
|
}
|
|
78
78
|
var dataConnectionsExport = {
|
|
79
79
|
getDataConnections,
|
|
@@ -88,16 +88,16 @@ var dataConnectionsExport = {
|
|
|
88
88
|
clearCache
|
|
89
89
|
};
|
|
90
90
|
var data_connections_default = dataConnectionsExport;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
91
|
+
export {
|
|
92
|
+
clearCache,
|
|
93
|
+
createDataConnection,
|
|
94
|
+
data_connections_default as default,
|
|
95
|
+
deleteDataConnection,
|
|
96
|
+
deleteDataConnections,
|
|
97
|
+
duplicateDataAConnection,
|
|
98
|
+
getDataConnection,
|
|
99
|
+
getDataConnections,
|
|
100
|
+
patchDataConnection,
|
|
101
|
+
updateDataConnection,
|
|
102
|
+
updateDataConnections
|
|
103
|
+
};
|
package/data-credentials.d.ts
CHANGED
|
@@ -26,11 +26,11 @@ type CredentialCreate = {
|
|
|
26
26
|
datasourceID?: string;
|
|
27
27
|
/** UUID of the credential */
|
|
28
28
|
qID?: string;
|
|
29
|
-
/**
|
|
29
|
+
/** Name of the credential */
|
|
30
30
|
qName: string;
|
|
31
31
|
/** Password */
|
|
32
32
|
qPassword: string;
|
|
33
|
-
/** Type of credential */
|
|
33
|
+
/** Type of credential (i.e. connector provider of the corresponding connection) */
|
|
34
34
|
qType: string;
|
|
35
35
|
/** User name */
|
|
36
36
|
qUsername: string;
|
|
@@ -49,6 +49,7 @@ type Errors = Error[];
|
|
|
49
49
|
type Link = {
|
|
50
50
|
/** Link to cirrent query */
|
|
51
51
|
self: {
|
|
52
|
+
/** URL pointing to the resource */
|
|
52
53
|
href: string;
|
|
53
54
|
};
|
|
54
55
|
};
|
package/data-credentials.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
clearApiCache,
|
|
3
|
+
invokeFetch
|
|
4
|
+
} from "./chunks/LHCJKIEO.js";
|
|
5
|
+
import "./chunks/4V5AAWUI.js";
|
|
6
|
+
import "./chunks/4HB3TAEO.js";
|
|
7
7
|
|
|
8
8
|
// src/public/rest/data-credentials.ts
|
|
9
|
-
var deleteDataCredential = async (qID, query, options) =>
|
|
9
|
+
var deleteDataCredential = async (qID, query, options) => invokeFetch("data-credentials", {
|
|
10
10
|
method: "delete",
|
|
11
11
|
pathTemplate: "/api/v1/data-credentials/{qID}",
|
|
12
12
|
pathVariables: { qID },
|
|
13
13
|
query,
|
|
14
14
|
options
|
|
15
15
|
});
|
|
16
|
-
var getDataCredential = async (qID, query, options) =>
|
|
16
|
+
var getDataCredential = async (qID, query, options) => invokeFetch("data-credentials", {
|
|
17
17
|
method: "get",
|
|
18
18
|
pathTemplate: "/api/v1/data-credentials/{qID}",
|
|
19
19
|
pathVariables: { qID },
|
|
20
20
|
query,
|
|
21
21
|
options
|
|
22
22
|
});
|
|
23
|
-
var patchDataCredential = async (qID, query, body, options) =>
|
|
23
|
+
var patchDataCredential = async (qID, query, body, options) => invokeFetch("data-credentials", {
|
|
24
24
|
method: "patch",
|
|
25
25
|
pathTemplate: "/api/v1/data-credentials/{qID}",
|
|
26
26
|
pathVariables: { qID },
|
|
@@ -29,7 +29,7 @@ var patchDataCredential = async (qID, query, body, options) => _URIW2U5Mjs.invok
|
|
|
29
29
|
contentType: "application/json",
|
|
30
30
|
options
|
|
31
31
|
});
|
|
32
|
-
var updateDataCredential = async (qID, query, body, options) =>
|
|
32
|
+
var updateDataCredential = async (qID, query, body, options) => invokeFetch("data-credentials", {
|
|
33
33
|
method: "put",
|
|
34
34
|
pathTemplate: "/api/v1/data-credentials/{qID}",
|
|
35
35
|
pathVariables: { qID },
|
|
@@ -39,7 +39,7 @@ var updateDataCredential = async (qID, query, body, options) => _URIW2U5Mjs.invo
|
|
|
39
39
|
options
|
|
40
40
|
});
|
|
41
41
|
function clearCache() {
|
|
42
|
-
return
|
|
42
|
+
return clearApiCache("data-credentials");
|
|
43
43
|
}
|
|
44
44
|
var dataCredentialsExport = {
|
|
45
45
|
deleteDataCredential,
|
|
@@ -49,11 +49,11 @@ var dataCredentialsExport = {
|
|
|
49
49
|
clearCache
|
|
50
50
|
};
|
|
51
51
|
var data_credentials_default = dataCredentialsExport;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
export {
|
|
53
|
+
clearCache,
|
|
54
|
+
data_credentials_default as default,
|
|
55
|
+
deleteDataCredential,
|
|
56
|
+
getDataCredential,
|
|
57
|
+
patchDataCredential,
|
|
58
|
+
updateDataCredential
|
|
59
|
+
};
|
package/data-files.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
clearApiCache,
|
|
3
|
+
invokeFetch
|
|
4
|
+
} from "./chunks/LHCJKIEO.js";
|
|
5
|
+
import "./chunks/4V5AAWUI.js";
|
|
6
|
+
import "./chunks/4HB3TAEO.js";
|
|
7
7
|
|
|
8
8
|
// src/public/rest/data-files.ts
|
|
9
|
-
var getDataFiles = async (query, options) =>
|
|
9
|
+
var getDataFiles = async (query, options) => invokeFetch("data-files", {
|
|
10
10
|
method: "get",
|
|
11
11
|
pathTemplate: "/api/v1/data-files",
|
|
12
12
|
query,
|
|
13
13
|
options
|
|
14
14
|
});
|
|
15
|
-
var uploadDataFile = async (body, options) =>
|
|
15
|
+
var uploadDataFile = async (body, options) => invokeFetch("data-files", {
|
|
16
16
|
method: "post",
|
|
17
17
|
pathTemplate: "/api/v1/data-files",
|
|
18
18
|
body,
|
|
19
19
|
contentType: "multipart/form-data",
|
|
20
20
|
options
|
|
21
21
|
});
|
|
22
|
-
var moveDataFiles = async (body, options) =>
|
|
22
|
+
var moveDataFiles = async (body, options) => invokeFetch("data-files", {
|
|
23
23
|
method: "post",
|
|
24
24
|
pathTemplate: "/api/v1/data-files/actions/change-space",
|
|
25
25
|
body,
|
|
26
26
|
contentType: "application/json",
|
|
27
27
|
options
|
|
28
28
|
});
|
|
29
|
-
var deleteDataFiles = async (body, options) =>
|
|
29
|
+
var deleteDataFiles = async (body, options) => invokeFetch("data-files", {
|
|
30
30
|
method: "post",
|
|
31
31
|
pathTemplate: "/api/v1/data-files/actions/delete",
|
|
32
32
|
body,
|
|
33
33
|
contentType: "application/json",
|
|
34
34
|
options
|
|
35
35
|
});
|
|
36
|
-
var getDataFilesConnections = async (query, options) =>
|
|
36
|
+
var getDataFilesConnections = async (query, options) => invokeFetch("data-files", {
|
|
37
37
|
method: "get",
|
|
38
38
|
pathTemplate: "/api/v1/data-files/connections",
|
|
39
39
|
query,
|
|
40
40
|
options
|
|
41
41
|
});
|
|
42
|
-
var getDataFileConnection = async (id, options) =>
|
|
42
|
+
var getDataFileConnection = async (id, options) => invokeFetch("data-files", {
|
|
43
43
|
method: "get",
|
|
44
44
|
pathTemplate: "/api/v1/data-files/connections/{id}",
|
|
45
45
|
pathVariables: { id },
|
|
46
46
|
options
|
|
47
47
|
});
|
|
48
|
-
var getDataFilesQuotas = async (options) =>
|
|
48
|
+
var getDataFilesQuotas = async (options) => invokeFetch("data-files", {
|
|
49
49
|
method: "get",
|
|
50
50
|
pathTemplate: "/api/v1/data-files/quotas",
|
|
51
51
|
options
|
|
52
52
|
});
|
|
53
|
-
var deleteDataFile = async (id, options) =>
|
|
53
|
+
var deleteDataFile = async (id, options) => invokeFetch("data-files", {
|
|
54
54
|
method: "delete",
|
|
55
55
|
pathTemplate: "/api/v1/data-files/{id}",
|
|
56
56
|
pathVariables: { id },
|
|
57
57
|
options
|
|
58
58
|
});
|
|
59
|
-
var getDataFile = async (id, options) =>
|
|
59
|
+
var getDataFile = async (id, options) => invokeFetch("data-files", {
|
|
60
60
|
method: "get",
|
|
61
61
|
pathTemplate: "/api/v1/data-files/{id}",
|
|
62
62
|
pathVariables: { id },
|
|
63
63
|
options
|
|
64
64
|
});
|
|
65
|
-
var reuploadDataFile = async (id, body, options) =>
|
|
65
|
+
var reuploadDataFile = async (id, body, options) => invokeFetch("data-files", {
|
|
66
66
|
method: "put",
|
|
67
67
|
pathTemplate: "/api/v1/data-files/{id}",
|
|
68
68
|
pathVariables: { id },
|
|
@@ -70,7 +70,7 @@ var reuploadDataFile = async (id, body, options) => _URIW2U5Mjs.invokeFetch.call
|
|
|
70
70
|
contentType: "multipart/form-data",
|
|
71
71
|
options
|
|
72
72
|
});
|
|
73
|
-
var changeDataFileOwner = async (id, body, options) =>
|
|
73
|
+
var changeDataFileOwner = async (id, body, options) => invokeFetch("data-files", {
|
|
74
74
|
method: "post",
|
|
75
75
|
pathTemplate: "/api/v1/data-files/{id}/actions/change-owner",
|
|
76
76
|
pathVariables: { id },
|
|
@@ -78,7 +78,7 @@ var changeDataFileOwner = async (id, body, options) => _URIW2U5Mjs.invokeFetch.c
|
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
options
|
|
80
80
|
});
|
|
81
|
-
var moveDataFile = async (id, body, options) =>
|
|
81
|
+
var moveDataFile = async (id, body, options) => invokeFetch("data-files", {
|
|
82
82
|
method: "post",
|
|
83
83
|
pathTemplate: "/api/v1/data-files/{id}/actions/change-space",
|
|
84
84
|
pathVariables: { id },
|
|
@@ -87,7 +87,7 @@ var moveDataFile = async (id, body, options) => _URIW2U5Mjs.invokeFetch.call(voi
|
|
|
87
87
|
options
|
|
88
88
|
});
|
|
89
89
|
function clearCache() {
|
|
90
|
-
return
|
|
90
|
+
return clearApiCache("data-files");
|
|
91
91
|
}
|
|
92
92
|
var dataFilesExport = {
|
|
93
93
|
getDataFiles,
|
|
@@ -105,19 +105,19 @@ var dataFilesExport = {
|
|
|
105
105
|
clearCache
|
|
106
106
|
};
|
|
107
107
|
var data_files_default = dataFilesExport;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
export {
|
|
109
|
+
changeDataFileOwner,
|
|
110
|
+
clearCache,
|
|
111
|
+
data_files_default as default,
|
|
112
|
+
deleteDataFile,
|
|
113
|
+
deleteDataFiles,
|
|
114
|
+
getDataFile,
|
|
115
|
+
getDataFileConnection,
|
|
116
|
+
getDataFiles,
|
|
117
|
+
getDataFilesConnections,
|
|
118
|
+
getDataFilesQuotas,
|
|
119
|
+
moveDataFile,
|
|
120
|
+
moveDataFiles,
|
|
121
|
+
reuploadDataFile,
|
|
122
|
+
uploadDataFile
|
|
123
|
+
};
|
package/docs/authentication.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
◁ [Back to overview](../README.md)
|
|
4
4
|
|
|
5
|
-
When integrating a
|
|
5
|
+
When integrating a third-party solution with Qlik Cloud Services users always have to authenticate with Qlik's backend services to interact with them. Authentication with `@qlik/api` works seamlessly and uses the same authentication mechanisms as those in the `@qlik/embed` libraries. The general idea is to provide a capable yet simple-to-use authentication api that works out of the box for most users. There are a few authentication options so that users can use what suits them best.
|
|
6
6
|
|
|
7
7
|
## The Host Config
|
|
8
8
|
|
|
@@ -95,7 +95,7 @@ const authModule = {
|
|
|
95
95
|
|
|
96
96
|
### Oauth2
|
|
97
97
|
|
|
98
|
-
Uses a `clientId` from an oauth client created by a Qlik tenant
|
|
98
|
+
Uses a `clientId` from an oauth client created by a Qlik tenant administrator. And optionally a `clientSecret`. A user will go through a login flow to get hold of an access token that is valid for 6 hours. This token will be used as query parameters for api requests. If a `clientSecret` is used a refresh token will also be received. This can be used to refresh the access token and is valid for 30 days. The user can select where these tokens should be stored (only in a browser). Either in local storage or session storage (default).
|
|
99
99
|
|
|
100
100
|
```ts
|
|
101
101
|
type Oauth2AuthConfig = {
|
|
@@ -114,7 +114,7 @@ type Oauth2AuthConfig = {
|
|
|
114
114
|
};
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
When using OAuth2 in a browser
|
|
117
|
+
When using OAuth2 in a browser it is recommended to set up a "redirect page" which is handy to use for pointing the redirection of an oauth login flow when fetching the access tokens. An oauth server will ask the client to redirect back to the hosting application after login is completed. In a single page application context this can potentially be any URL, so use this html template and use it for redirections.
|
|
118
118
|
|
|
119
119
|
```html
|
|
120
120
|
<!doctype html>
|
|
@@ -133,7 +133,7 @@ When using OAuth2 in a browser we recommend setting up a "redirect page" which i
|
|
|
133
133
|
|
|
134
134
|
### Cookie
|
|
135
135
|
|
|
136
|
-
Uses a `webIntegrationId` created by a tenant
|
|
136
|
+
Uses a `webIntegrationId` created by a tenant administrator. Will get the a CSRF token and append to api calls when necessary. To use this method in an integration scenario it is required that third-party cookies are allowed.
|
|
137
137
|
|
|
138
138
|
```ts
|
|
139
139
|
type CookieAuthConfig = {
|
|
@@ -148,7 +148,7 @@ type CookieAuthConfig = {
|
|
|
148
148
|
|
|
149
149
|
### Windows Cookie
|
|
150
150
|
|
|
151
|
-
Will do the necessary actions
|
|
151
|
+
Will do the necessary actions to communicate with a Qlik Sense Enterprise for Windows server. This includes fetching an XrfKey from the Qlik Sense Server Repository Service. To use this method in an integration scenario it is required that third-party cookies are allowed.
|
|
152
152
|
|
|
153
153
|
```ts
|
|
154
154
|
type WindowsCookieAuthConfig = {
|
|
@@ -25,16 +25,8 @@ async function main() {
|
|
|
25
25
|
await main();
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Run the code with
|
|
29
|
-
|
|
30
|
-
```shell
|
|
31
|
-
node fetch-spaces.mjs
|
|
32
|
-
```
|
|
33
|
-
|
|
34
28
|
## NodeJS using Oauth2
|
|
35
29
|
|
|
36
|
-
Create a file `fetch-spaces.mjs` and add the following:
|
|
37
|
-
|
|
38
30
|
```typescript
|
|
39
31
|
import { auth, spaces } from "@qlik/api";
|
|
40
32
|
|
|
@@ -55,12 +47,6 @@ async function main() {
|
|
|
55
47
|
await main();
|
|
56
48
|
```
|
|
57
49
|
|
|
58
|
-
Run the code with
|
|
59
|
-
|
|
60
|
-
```shell
|
|
61
|
-
node fetch-spaces.mjs
|
|
62
|
-
```
|
|
63
|
-
|
|
64
50
|
## Browser using cookies
|
|
65
51
|
|
|
66
52
|
When using a browser you can load the library files from a CDN provider. It is also possible to use npm and a bundler to get the code into your application. In the html below we are making an api call to fetch the spaces from a tenant and we add the names of the spaces as div elements in the dom.
|
|
@@ -77,7 +63,7 @@ When using a browser you can load the library files from a CDN provider. It is a
|
|
|
77
63
|
<!-- Spaces will be addeed here -->
|
|
78
64
|
</div>
|
|
79
65
|
<script type="module">
|
|
80
|
-
import { auth, spaces } from "https://cdn.jsdelivr.net/npm/@qlik/api/index.
|
|
66
|
+
import { auth, spaces } from "https://cdn.jsdelivr.net/npm/@qlik/api/index.js";
|
|
81
67
|
|
|
82
68
|
auth.setDefaultHostConfig({
|
|
83
69
|
host: "your-tenant.region.qlikcloud.com",
|
|
@@ -52,7 +52,7 @@ When using a browser you can load the library files from a CDN provider. It is a
|
|
|
52
52
|
<!-- Sheets will be addeed here -->
|
|
53
53
|
</div>
|
|
54
54
|
<script type="module">
|
|
55
|
-
import { auth, qix } from "https://cdn.jsdelivr.net/npm/@qlik/api/index.
|
|
55
|
+
import { auth, qix } from "https://cdn.jsdelivr.net/npm/@qlik/api/index.js";
|
|
56
56
|
auth.setDefaultHostConfig({
|
|
57
57
|
host: "your-tenant.region.qlikcloud.com",
|
|
58
58
|
authType: "cookie",
|
package/docs/features.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Typed API Calls
|
|
11
11
|
|
|
12
|
-
Each API comes with full typescript support which will greatly help the developer experience. Use the types to understand how the API works by going into the type definition. In most editors (
|
|
12
|
+
Each API comes with full typescript support which will greatly help the developer experience. Use the types to understand how the API works by going into the type definition. In most editors (for example vscode) you can CMD+click (mac) or CTRL+click (windows) on an api-call to see the type definition of parameters, return structures etc etc.
|
|
13
13
|
|
|
14
14
|
## Caching
|
|
15
15
|
|
package/extensions.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
clearApiCache,
|
|
3
|
+
invokeFetch
|
|
4
|
+
} from "./chunks/LHCJKIEO.js";
|
|
5
|
+
import "./chunks/4V5AAWUI.js";
|
|
6
|
+
import "./chunks/4HB3TAEO.js";
|
|
7
7
|
|
|
8
8
|
// src/public/rest/extensions.ts
|
|
9
|
-
var getExtensions = async (options) =>
|
|
9
|
+
var getExtensions = async (options) => invokeFetch("extensions", {
|
|
10
10
|
method: "get",
|
|
11
11
|
pathTemplate: "/api/v1/extensions",
|
|
12
12
|
options
|
|
13
13
|
});
|
|
14
|
-
var uploadExtension = async (body, options) =>
|
|
14
|
+
var uploadExtension = async (body, options) => invokeFetch("extensions", {
|
|
15
15
|
method: "post",
|
|
16
16
|
pathTemplate: "/api/v1/extensions",
|
|
17
17
|
body,
|
|
18
18
|
contentType: "multipart/form-data",
|
|
19
19
|
options
|
|
20
20
|
});
|
|
21
|
-
var deleteExtension = async (id, options) =>
|
|
21
|
+
var deleteExtension = async (id, options) => invokeFetch("extensions", {
|
|
22
22
|
method: "delete",
|
|
23
23
|
pathTemplate: "/api/v1/extensions/{id}",
|
|
24
24
|
pathVariables: { id },
|
|
25
25
|
options
|
|
26
26
|
});
|
|
27
|
-
var getExtension = async (id, options) =>
|
|
27
|
+
var getExtension = async (id, options) => invokeFetch("extensions", {
|
|
28
28
|
method: "get",
|
|
29
29
|
pathTemplate: "/api/v1/extensions/{id}",
|
|
30
30
|
pathVariables: { id },
|
|
31
31
|
options
|
|
32
32
|
});
|
|
33
|
-
var patchExtension = async (id, body, options) =>
|
|
33
|
+
var patchExtension = async (id, body, options) => invokeFetch("extensions", {
|
|
34
34
|
method: "patch",
|
|
35
35
|
pathTemplate: "/api/v1/extensions/{id}",
|
|
36
36
|
pathVariables: { id },
|
|
@@ -38,20 +38,20 @@ var patchExtension = async (id, body, options) => _URIW2U5Mjs.invokeFetch.call(v
|
|
|
38
38
|
contentType: "multipart/form-data",
|
|
39
39
|
options
|
|
40
40
|
});
|
|
41
|
-
var downloadExtension = async (id, options) =>
|
|
41
|
+
var downloadExtension = async (id, options) => invokeFetch("extensions", {
|
|
42
42
|
method: "get",
|
|
43
43
|
pathTemplate: "/api/v1/extensions/{id}/file",
|
|
44
44
|
pathVariables: { id },
|
|
45
45
|
options
|
|
46
46
|
});
|
|
47
|
-
var downloadFileFromExtension = async (id, filepath, options) =>
|
|
47
|
+
var downloadFileFromExtension = async (id, filepath, options) => invokeFetch("extensions", {
|
|
48
48
|
method: "get",
|
|
49
49
|
pathTemplate: "/api/v1/extensions/{id}/file/{filepath}",
|
|
50
50
|
pathVariables: { id, filepath },
|
|
51
51
|
options
|
|
52
52
|
});
|
|
53
53
|
function clearCache() {
|
|
54
|
-
return
|
|
54
|
+
return clearApiCache("extensions");
|
|
55
55
|
}
|
|
56
56
|
var extensionsExport = {
|
|
57
57
|
getExtensions,
|
|
@@ -64,14 +64,14 @@ var extensionsExport = {
|
|
|
64
64
|
clearCache
|
|
65
65
|
};
|
|
66
66
|
var extensions_default = extensionsExport;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
export {
|
|
68
|
+
clearCache,
|
|
69
|
+
extensions_default as default,
|
|
70
|
+
deleteExtension,
|
|
71
|
+
downloadExtension,
|
|
72
|
+
downloadFileFromExtension,
|
|
73
|
+
getExtension,
|
|
74
|
+
getExtensions,
|
|
75
|
+
patchExtension,
|
|
76
|
+
uploadExtension
|
|
77
|
+
};
|