@qlik/api 1.32.0 → 1.33.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 +10 -10
- package/api-keys.js +64 -50
- package/apps.d.ts +56 -56
- package/apps.js +392 -304
- package/assistants.d.ts +34 -34
- package/assistants.js +257 -201
- package/audits.d.ts +10 -10
- package/audits.js +48 -36
- package/{auth-types-DqfMuSRX.d.ts → auth-types-Cj5bM3Yk.d.ts} +29 -9
- package/auth.d.ts +17 -4
- package/auth.js +4 -2
- package/automation-connections.d.ts +12 -12
- package/automation-connections.js +75 -59
- package/automations.d.ts +27 -27
- package/automations.js +159 -123
- package/automl-deployments.d.ts +4 -4
- package/automl-deployments.js +14 -12
- package/automl-predictions.d.ts +13 -13
- package/automl-predictions.js +56 -44
- package/brands.d.ts +18 -18
- package/brands.js +107 -83
- package/chunks/{YTT2FEVE.js → 33GQY7N7.js} +1 -1
- package/chunks/{M64RLKVG.js → 62DXIH3S.js} +7 -5
- package/chunks/7MMXU6EL.js +86 -0
- package/chunks/{LTNGXTXG.js → GPRUNZV4.js} +3 -3
- package/chunks/{VVD2DPKQ.js → LIEZG7IM.js} +3 -3
- package/chunks/{FKDGGR2O.js → OTIO4SEJ.js} +698 -708
- package/chunks/{UZTIZ4H5.js → RP3EJGHG.js} +74 -74
- package/chunks/{RCLKKVYB.js → SPATCXXU.js} +9 -2
- package/chunks/{LY7RP2HA.js → XF3TPZKZ.js} +23 -8
- package/chunks/{6ZONDHRN.js → YYZCS5PW.js} +11 -4
- package/chunks/{3RGGGGAR.js → ZCTVPXGO.js} +1 -1
- package/collections.d.ts +16 -15
- package/collections.js +98 -76
- package/conditions.d.ts +13 -13
- package/conditions.js +97 -75
- package/consumption.d.ts +4 -4
- package/consumption.js +11 -9
- package/csp-origins.d.ts +9 -9
- package/csp-origins.js +53 -41
- package/csrf-token.d.ts +3 -3
- package/csrf-token.js +10 -8
- package/data-alerts.d.ts +22 -22
- package/data-alerts.js +139 -107
- package/data-assets.d.ts +8 -8
- package/data-assets.js +50 -40
- package/data-connections.d.ts +16 -16
- package/data-connections.js +87 -69
- package/data-credentials.d.ts +11 -11
- package/data-credentials.js +52 -42
- package/data-files.d.ts +18 -18
- package/data-files.js +107 -83
- package/data-qualities.d.ts +6 -6
- package/data-qualities.js +28 -22
- package/data-sets.d.ts +10 -10
- package/data-sets.js +59 -47
- package/data-sources.d.ts +7 -7
- package/data-sources.js +28 -22
- package/data-stores.d.ts +16 -16
- package/data-stores.js +92 -72
- package/dcaas.d.ts +6 -6
- package/dcaas.js +28 -22
- package/di-projects.d.ts +22 -22
- package/di-projects.js +148 -116
- package/direct-access-agents.d.ts +328 -0
- package/direct-access-agents.js +108 -0
- package/encryption.d.ts +12 -12
- package/encryption.js +82 -62
- package/extensions.d.ts +11 -11
- package/extensions.js +61 -47
- package/glossaries.d.ts +33 -33
- package/glossaries.js +221 -173
- package/groups.d.ts +12 -12
- package/groups.js +72 -56
- package/identity-providers.d.ts +11 -11
- package/identity-providers.js +67 -51
- package/index.d.ts +9 -4
- package/index.js +101 -67
- package/interceptors.d.ts +9 -2
- package/interceptors.js +2 -2
- package/invoke-fetch-types-BYCD4pc9.d.ts +98 -0
- package/items.d.ts +14 -13
- package/items.js +71 -55
- package/knowledgebases.d.ts +23 -23
- package/knowledgebases.js +153 -119
- package/licenses.d.ts +13 -13
- package/licenses.js +76 -58
- package/lineage-graphs.d.ts +17 -17
- package/lineage-graphs.js +76 -60
- package/ml.d.ts +100 -52
- package/ml.js +379 -286
- package/notes.d.ts +4 -4
- package/notes.js +19 -15
- package/notifications.d.ts +4 -4
- package/notifications.js +11 -9
- package/oauth-clients.d.ts +14 -14
- package/oauth-clients.js +96 -74
- package/oauth-tokens.d.ts +5 -5
- package/oauth-tokens.js +19 -15
- package/package.json +8 -6
- package/qix.d.ts +145 -4
- package/qix.js +2 -2
- package/questions.d.ts +5 -5
- package/questions.js +22 -18
- package/quotas.d.ts +6 -6
- package/quotas.js +20 -16
- package/reload-tasks.d.ts +8 -8
- package/reload-tasks.js +46 -36
- package/reloads.d.ts +7 -7
- package/reloads.js +36 -28
- package/report-templates.d.ts +10 -10
- package/report-templates.js +64 -50
- package/reports.d.ts +4 -4
- package/reports.js +20 -16
- package/roles.d.ts +8 -8
- package/roles.js +46 -36
- package/sharing-tasks.d.ts +14 -14
- package/sharing-tasks.js +89 -69
- package/spaces.d.ts +22 -22
- package/spaces.js +153 -119
- package/tasks.d.ts +17 -17
- package/tasks.js +90 -70
- package/temp-contents.d.ts +7 -7
- package/temp-contents.js +30 -24
- package/tenants.d.ts +8 -8
- package/tenants.js +57 -45
- package/themes.d.ts +11 -11
- package/themes.js +61 -47
- package/transports.d.ts +8 -8
- package/transports.js +49 -37
- package/ui-config.d.ts +9 -9
- package/ui-config.js +61 -47
- package/users.d.ts +15 -15
- package/users.js +81 -63
- package/web-integrations.d.ts +8 -8
- package/web-integrations.js +46 -36
- package/web-notifications.d.ts +9 -9
- package/web-notifications.js +53 -41
- package/webhooks.d.ts +14 -14
- package/webhooks.js +88 -68
- package/chunks/2ZQ3ZX7F.js +0 -33
- 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/
|
|
5
|
-
import "./chunks/
|
|
6
|
-
import "./chunks/
|
|
4
|
+
} from "./chunks/LIEZG7IM.js";
|
|
5
|
+
import "./chunks/GPRUNZV4.js";
|
|
6
|
+
import "./chunks/7MMXU6EL.js";
|
|
7
7
|
|
|
8
8
|
// src/public/rest/webhooks.ts
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
}
|
package/chunks/2ZQ3ZX7F.js
DELETED
|
@@ -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 };
|