@qlik/api 0.0.1
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/LICENSE +17 -0
- package/README.md +8 -0
- package/api-keys.d.mts +313 -0
- package/api-keys.d.ts +313 -0
- package/api-keys.js +76 -0
- package/api-keys.mjs +76 -0
- package/apps.d.mts +1921 -0
- package/apps.d.ts +1921 -0
- package/apps.js +331 -0
- package/apps.mjs +331 -0
- package/audits.d.mts +262 -0
- package/audits.d.ts +262 -0
- package/audits.js +63 -0
- package/audits.mjs +63 -0
- package/auth-CSVTXOZX.js +36 -0
- package/auth-TE272Q34.mjs +36 -0
- package/auth-types-nnUcWhuU.d.mts +98 -0
- package/auth-types-nnUcWhuU.d.ts +98 -0
- package/auth.d.mts +26 -0
- package/auth.d.ts +26 -0
- package/auth.js +13 -0
- package/auth.mjs +13 -0
- package/automations.d.mts +638 -0
- package/automations.d.ts +638 -0
- package/automations.js +166 -0
- package/automations.mjs +166 -0
- package/brands.d.mts +614 -0
- package/brands.d.ts +614 -0
- package/brands.js +118 -0
- package/brands.mjs +118 -0
- package/chunk-3YE7EI7I.mjs +17 -0
- package/chunk-4ES65KO3.js +57 -0
- package/chunk-4FLMND6T.js +25 -0
- package/chunk-4OMEH5SW.mjs +1337 -0
- package/chunk-CKPJE4IA.mjs +57 -0
- package/chunk-GUQBHY3H.mjs +25 -0
- package/chunk-OULT3V2U.js +17 -0
- package/chunk-WM7FQU2U.mjs +21 -0
- package/chunk-XASXL2NC.js +1337 -0
- package/chunk-ZT4C7KCQ.js +21 -0
- package/collections.d.mts +535 -0
- package/collections.d.ts +535 -0
- package/collections.js +100 -0
- package/collections.mjs +100 -0
- package/csp-origins.d.mts +258 -0
- package/csp-origins.d.ts +258 -0
- package/csp-origins.js +66 -0
- package/csp-origins.mjs +66 -0
- package/data-assets.d.mts +195 -0
- package/data-assets.d.ts +195 -0
- package/data-assets.js +61 -0
- package/data-assets.mjs +61 -0
- package/data-connections.d.mts +527 -0
- package/data-connections.d.ts +527 -0
- package/data-connections.js +96 -0
- package/data-connections.mjs +96 -0
- package/data-credentials.d.mts +188 -0
- package/data-credentials.d.ts +188 -0
- package/data-credentials.js +56 -0
- package/data-credentials.mjs +56 -0
- package/data-files.d.mts +471 -0
- package/data-files.d.ts +471 -0
- package/data-files.js +116 -0
- package/data-files.mjs +116 -0
- package/docs/examples.md +4 -0
- package/enigma-session-4L373ALV.mjs +10196 -0
- package/enigma-session-TEB53FAF.js +10196 -0
- package/esm-4X3DKK5D.js +63 -0
- package/esm-SOWVJKOQ.mjs +63 -0
- package/extensions.d.mts +257 -0
- package/extensions.d.ts +257 -0
- package/extensions.js +74 -0
- package/extensions.mjs +74 -0
- package/global.types-Eto4uYwy.d.mts +102 -0
- package/global.types-hIvp-WdX.d.ts +102 -0
- package/glossaries.d.mts +1041 -0
- package/glossaries.d.ts +1041 -0
- package/glossaries.js +225 -0
- package/glossaries.mjs +225 -0
- package/groups.d.mts +379 -0
- package/groups.d.ts +379 -0
- package/groups.js +83 -0
- package/groups.mjs +83 -0
- package/identity-providers.d.mts +492 -0
- package/identity-providers.d.ts +492 -0
- package/identity-providers.js +80 -0
- package/identity-providers.mjs +80 -0
- package/index.d.mts +142 -0
- package/index.d.ts +142 -0
- package/index.js +678 -0
- package/index.mjs +678 -0
- package/invoke-fetch-MSSJAZ7K.mjs +14 -0
- package/invoke-fetch-PEI54KZO.js +14 -0
- package/items.d.mts +501 -0
- package/items.d.ts +501 -0
- package/items.js +84 -0
- package/items.mjs +84 -0
- package/licenses.d.mts +436 -0
- package/licenses.d.ts +436 -0
- package/licenses.js +87 -0
- package/licenses.mjs +87 -0
- package/package.json +264 -0
- package/qix-EU7PXRZ6.mjs +573 -0
- package/qix-RLTISYTB.js +573 -0
- package/qix.d.mts +11543 -0
- package/qix.d.ts +11543 -0
- package/qix.js +9 -0
- package/qix.mjs +9 -0
- package/quotas.d.mts +105 -0
- package/quotas.d.ts +105 -0
- package/quotas.js +31 -0
- package/quotas.mjs +31 -0
- package/reload-tasks.d.mts +222 -0
- package/reload-tasks.d.ts +222 -0
- package/reload-tasks.js +59 -0
- package/reload-tasks.mjs +59 -0
- package/reloads.d.mts +189 -0
- package/reloads.d.ts +189 -0
- package/reloads.js +44 -0
- package/reloads.mjs +44 -0
- package/roles.d.mts +150 -0
- package/roles.d.ts +150 -0
- package/roles.js +30 -0
- package/roles.mjs +30 -0
- package/spaces.d.mts +524 -0
- package/spaces.d.ts +524 -0
- package/spaces.js +118 -0
- package/spaces.mjs +118 -0
- package/temp-contents.d.mts +222 -0
- package/temp-contents.d.ts +222 -0
- package/temp-contents.js +60 -0
- package/temp-contents.mjs +60 -0
- package/tenants.d.mts +276 -0
- package/tenants.d.ts +276 -0
- package/tenants.js +68 -0
- package/tenants.mjs +68 -0
- package/themes.d.mts +235 -0
- package/themes.d.ts +235 -0
- package/themes.js +74 -0
- package/themes.mjs +74 -0
- package/transports.d.mts +298 -0
- package/transports.d.ts +298 -0
- package/transports.js +62 -0
- package/transports.mjs +62 -0
- package/users.d.mts +544 -0
- package/users.d.ts +544 -0
- package/users.js +99 -0
- package/users.mjs +99 -0
- package/web-integrations.d.mts +246 -0
- package/web-integrations.d.ts +246 -0
- package/web-integrations.js +59 -0
- package/web-integrations.mjs +59 -0
- package/web-notifications.d.mts +220 -0
- package/web-notifications.d.ts +220 -0
- package/web-notifications.js +66 -0
- package/web-notifications.mjs +66 -0
- package/webhooks.d.mts +422 -0
- package/webhooks.d.ts +422 -0
- package/webhooks.js +100 -0
- package/webhooks.mjs +100 -0
package/webhooks.d.ts
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
|
|
2
|
+
import './auth-types-nnUcWhuU.js';
|
|
3
|
+
|
|
4
|
+
type Delivery = {
|
|
5
|
+
/** The name of the triggering event-type */
|
|
6
|
+
eventType: string;
|
|
7
|
+
/** The delivery's unique identifier */
|
|
8
|
+
id: string;
|
|
9
|
+
request?: {
|
|
10
|
+
/** The sent body/payload of the delivery */
|
|
11
|
+
body?: unknown;
|
|
12
|
+
/** Headers sent for this delivery */
|
|
13
|
+
headers?: unknown;
|
|
14
|
+
/** URL used for this delivery */
|
|
15
|
+
url?: string;
|
|
16
|
+
};
|
|
17
|
+
response?: {
|
|
18
|
+
/** The received body of the delivery */
|
|
19
|
+
body?: string;
|
|
20
|
+
/** Headers received for this delivery */
|
|
21
|
+
headers?: unknown;
|
|
22
|
+
/** The HTTP status code of the response */
|
|
23
|
+
statusCode?: number;
|
|
24
|
+
};
|
|
25
|
+
/** The status of delivery */
|
|
26
|
+
status: "success" | "fail";
|
|
27
|
+
/** The status message of the delivery */
|
|
28
|
+
statusMessage?: string;
|
|
29
|
+
/** The UTC timestamp when the delivery was triggered */
|
|
30
|
+
triggeredAt: string;
|
|
31
|
+
/** The unique webhook identifier that the delivery is for */
|
|
32
|
+
webhookId: string;
|
|
33
|
+
};
|
|
34
|
+
type DeliveryList = {
|
|
35
|
+
data?: Delivery[];
|
|
36
|
+
links?: {
|
|
37
|
+
next?: Link;
|
|
38
|
+
prev?: Link;
|
|
39
|
+
self?: Link;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type Error = {
|
|
43
|
+
/** The unique code for the error */
|
|
44
|
+
code: string;
|
|
45
|
+
/** May be used to provide additional details */
|
|
46
|
+
detail?: string;
|
|
47
|
+
/** A summary of what went wrong */
|
|
48
|
+
title: string;
|
|
49
|
+
};
|
|
50
|
+
type ErrorResponse = {
|
|
51
|
+
errors?: Error[];
|
|
52
|
+
/** A way to trace the source of the error. */
|
|
53
|
+
traceId?: string;
|
|
54
|
+
};
|
|
55
|
+
type EventType = {
|
|
56
|
+
/** Description of the event type */
|
|
57
|
+
description?: string;
|
|
58
|
+
/** Specifies which levels that are supported for this event type */
|
|
59
|
+
levels?: string[];
|
|
60
|
+
/** Name of the event type */
|
|
61
|
+
name?: string;
|
|
62
|
+
/** Title of the event type */
|
|
63
|
+
title?: string;
|
|
64
|
+
};
|
|
65
|
+
type EventTypes = {
|
|
66
|
+
data?: EventType[];
|
|
67
|
+
};
|
|
68
|
+
type Link = {
|
|
69
|
+
/** URL to a resource request */
|
|
70
|
+
href: string;
|
|
71
|
+
};
|
|
72
|
+
type WebhookBase = {
|
|
73
|
+
/** The UTC timestamp when the webhook was created */
|
|
74
|
+
readonly createdAt?: string;
|
|
75
|
+
/** The id of the user that created the webhook */
|
|
76
|
+
readonly createdByUserId?: string;
|
|
77
|
+
/** The reason for creating the webhook */
|
|
78
|
+
description?: string;
|
|
79
|
+
/** The reason for the webhook to be disabled */
|
|
80
|
+
readonly disabledReason?: string;
|
|
81
|
+
/** The unique code for the reason */
|
|
82
|
+
readonly disabledReasonCode?: string;
|
|
83
|
+
/** Whether the webhook is active and sending requests */
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
/** Types of events for which the webhook should trigger. */
|
|
86
|
+
eventTypes?: string[];
|
|
87
|
+
/** Filter that should match for a webhook to be triggered.
|
|
88
|
+
// Supported common attribute names are 'id', 'spaceId' and 'topLevelResourceId', beside the common attributes the "com.qlik.v1.app.reload.finished" event also supports "data.status" that could be either "ok" or "error" but can't be used together with other event types.
|
|
89
|
+
// Supported attribute operators are 'eq' and 'ne'.
|
|
90
|
+
// Supported logical operators are 'and' and 'or'.
|
|
91
|
+
// Note that attribute values must be valid JSON strings, hence they're enclosed with double quotes
|
|
92
|
+
// For more detailed information regarding the SCIM filter syntax (RFC7644) used please follow the link to external documentation. */
|
|
93
|
+
filter?: string;
|
|
94
|
+
/** Additional headers in the post request */
|
|
95
|
+
headers?: unknown;
|
|
96
|
+
/** The webhook's unique identifier */
|
|
97
|
+
readonly id?: string;
|
|
98
|
+
/** Defines at what level the webhook should operate: for all resources belonging to a tenant or restricted to only those accessible by the webhook-creator. */
|
|
99
|
+
level?: "tenant" | "user";
|
|
100
|
+
/** The name for the webhook */
|
|
101
|
+
name: string;
|
|
102
|
+
/** The id of the user that owns the webhook, only applicable for user level webhooks */
|
|
103
|
+
ownerId?: string;
|
|
104
|
+
/** String used as secret for calculating HMAC hash sent as header */
|
|
105
|
+
secret?: string;
|
|
106
|
+
/** The UTC timestamp when the webhook was last updated */
|
|
107
|
+
readonly updatedAt?: string;
|
|
108
|
+
/** The id of the user that last updated the webhook */
|
|
109
|
+
readonly updatedByUserId?: string;
|
|
110
|
+
/** Target URL for webhook HTTPS requests */
|
|
111
|
+
url: string;
|
|
112
|
+
};
|
|
113
|
+
type WebhookList = {
|
|
114
|
+
data?: WebhookResponse[];
|
|
115
|
+
links?: {
|
|
116
|
+
next?: Link;
|
|
117
|
+
prev?: Link;
|
|
118
|
+
self?: Link;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
type WebhookPatch = {
|
|
122
|
+
/** The operation to be performed */
|
|
123
|
+
op: "add" | "remove" | "replace";
|
|
124
|
+
/** The path for the given resource field to patch */
|
|
125
|
+
path: "/name" | "/description" | "/url" | "/eventTypes" | "/headers" | "/enabled" | "/secret";
|
|
126
|
+
/** The value to be used for this operation. */
|
|
127
|
+
value?: boolean | number | unknown | string;
|
|
128
|
+
};
|
|
129
|
+
type WebhookPost = WebhookBase & {
|
|
130
|
+
/** String that indicates from where the webhook was created and its purpose */
|
|
131
|
+
origin?: "api" | "automations" | "management-console";
|
|
132
|
+
};
|
|
133
|
+
type WebhookResponse = WebhookBase & {
|
|
134
|
+
/** String that indicates from where the webhook was created and its purpose */
|
|
135
|
+
readonly origin?: "api" | "automations" | "management-console";
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Retrieves all webhooks entries for a tenant
|
|
139
|
+
* @param query an object with query parameters
|
|
140
|
+
* @throws GetWebhooksHttpError
|
|
141
|
+
*/
|
|
142
|
+
declare const getWebhooks: (query: {
|
|
143
|
+
/** Filter resources by user that created it */
|
|
144
|
+
createdByUserId?: string;
|
|
145
|
+
/** Filter resources by enabled true/false */
|
|
146
|
+
enabled?: boolean;
|
|
147
|
+
/** Filter resources by event-type */
|
|
148
|
+
eventType?: string;
|
|
149
|
+
/** Filter resources by level that user has access to (either user or level) */
|
|
150
|
+
level?: string;
|
|
151
|
+
/** Maximum number of webhooks to retrieve */
|
|
152
|
+
limit?: number;
|
|
153
|
+
/** Filter resources by name (wildcard and case insensitive) */
|
|
154
|
+
name?: string;
|
|
155
|
+
/** Cursor to the next page */
|
|
156
|
+
next?: string;
|
|
157
|
+
/** Filter resources by user that owns it, only applicable for user level webhooks */
|
|
158
|
+
ownerId?: string;
|
|
159
|
+
/** Cursor to previous next page */
|
|
160
|
+
prev?: string;
|
|
161
|
+
/** Field to sort by, prefix with -/+ to indicate order */
|
|
162
|
+
sort?: "name" | "+name" | "-name" | "url" | "+url" | "-url" | "createdAt" | "+createdAt" | "-createdAt" | "updatedAt" | "+updatedAt" | "-updatedAt";
|
|
163
|
+
/** Filter resources by user that last updated the webhook */
|
|
164
|
+
updatedByUserId?: string;
|
|
165
|
+
/** Filter resources by url (wildcard and case insensitive) */
|
|
166
|
+
url?: string;
|
|
167
|
+
}, options?: ApiCallOptions) => Promise<GetWebhooksHttpResponse>;
|
|
168
|
+
type GetWebhooksHttpResponse = {
|
|
169
|
+
data: WebhookList;
|
|
170
|
+
headers: Headers;
|
|
171
|
+
status: number;
|
|
172
|
+
prev?: (options?: ApiCallOptions) => Promise<GetWebhooksHttpResponse>;
|
|
173
|
+
next?: (options?: ApiCallOptions) => Promise<GetWebhooksHttpResponse>;
|
|
174
|
+
};
|
|
175
|
+
type GetWebhooksHttpError = {
|
|
176
|
+
data: ErrorResponse;
|
|
177
|
+
headers: Headers;
|
|
178
|
+
status: number;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Creates a new webhook
|
|
182
|
+
* @param body an object with the body content
|
|
183
|
+
* @throws CreateWebhookHttpError
|
|
184
|
+
*/
|
|
185
|
+
declare const createWebhook: (body: WebhookPost, options?: ApiCallOptions) => Promise<CreateWebhookHttpResponse>;
|
|
186
|
+
type CreateWebhookHttpResponse = {
|
|
187
|
+
data: WebhookResponse;
|
|
188
|
+
headers: Headers;
|
|
189
|
+
status: number;
|
|
190
|
+
};
|
|
191
|
+
type CreateWebhookHttpError = {
|
|
192
|
+
data: ErrorResponse;
|
|
193
|
+
headers: Headers;
|
|
194
|
+
status: number;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* List of event-types that are possible to subscribe to.
|
|
198
|
+
* @throws GetWebhookEventTypesHttpError
|
|
199
|
+
*/
|
|
200
|
+
declare const getWebhookEventTypes: (options?: ApiCallOptions) => Promise<GetWebhookEventTypesHttpResponse>;
|
|
201
|
+
type GetWebhookEventTypesHttpResponse = {
|
|
202
|
+
data: EventTypes;
|
|
203
|
+
headers: Headers;
|
|
204
|
+
status: number;
|
|
205
|
+
};
|
|
206
|
+
type GetWebhookEventTypesHttpError = {
|
|
207
|
+
data: ErrorResponse;
|
|
208
|
+
headers: Headers;
|
|
209
|
+
status: number;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Deletes a specific webhook
|
|
213
|
+
* @param id The webhook's unique identifier.
|
|
214
|
+
* @throws DeleteWebhookHttpError
|
|
215
|
+
*/
|
|
216
|
+
declare const deleteWebhook: (id: string, options?: ApiCallOptions) => Promise<DeleteWebhookHttpResponse>;
|
|
217
|
+
type DeleteWebhookHttpResponse = {
|
|
218
|
+
data: void;
|
|
219
|
+
headers: Headers;
|
|
220
|
+
status: number;
|
|
221
|
+
};
|
|
222
|
+
type DeleteWebhookHttpError = {
|
|
223
|
+
data: ErrorResponse;
|
|
224
|
+
headers: Headers;
|
|
225
|
+
status: number;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Returns details for a specific webhook
|
|
229
|
+
* @param id The webhook's unique identifier.
|
|
230
|
+
* @throws GetWebhookHttpError
|
|
231
|
+
*/
|
|
232
|
+
declare const getWebhook: (id: string, options?: ApiCallOptions) => Promise<GetWebhookHttpResponse>;
|
|
233
|
+
type GetWebhookHttpResponse = {
|
|
234
|
+
data: WebhookResponse;
|
|
235
|
+
headers: Headers;
|
|
236
|
+
status: number;
|
|
237
|
+
};
|
|
238
|
+
type GetWebhookHttpError = {
|
|
239
|
+
data: ErrorResponse;
|
|
240
|
+
headers: Headers;
|
|
241
|
+
status: number;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Patches a webhook
|
|
245
|
+
* @param id The webhook's unique identifier.
|
|
246
|
+
* @param body an object with the body content
|
|
247
|
+
* @throws PatchWebhookHttpError
|
|
248
|
+
*/
|
|
249
|
+
declare const patchWebhook: (id: string, body: WebhookPatch[], options?: ApiCallOptions) => Promise<PatchWebhookHttpResponse>;
|
|
250
|
+
type PatchWebhookHttpResponse = {
|
|
251
|
+
data: void;
|
|
252
|
+
headers: Headers;
|
|
253
|
+
status: number;
|
|
254
|
+
};
|
|
255
|
+
type PatchWebhookHttpError = {
|
|
256
|
+
data: ErrorResponse;
|
|
257
|
+
headers: Headers;
|
|
258
|
+
status: number;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Updates a webhook
|
|
262
|
+
* @param id The webhook's unique identifier.
|
|
263
|
+
* @param body an object with the body content
|
|
264
|
+
* @throws UpdateWebhookHttpError
|
|
265
|
+
*/
|
|
266
|
+
declare const updateWebhook: (id: string, body: WebhookBase, options?: ApiCallOptions) => Promise<UpdateWebhookHttpResponse>;
|
|
267
|
+
type UpdateWebhookHttpResponse = {
|
|
268
|
+
data: WebhookResponse;
|
|
269
|
+
headers: Headers;
|
|
270
|
+
status: number;
|
|
271
|
+
};
|
|
272
|
+
type UpdateWebhookHttpError = {
|
|
273
|
+
data: ErrorResponse;
|
|
274
|
+
headers: Headers;
|
|
275
|
+
status: number;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Returns deliveries for a specific webhook
|
|
279
|
+
* @param id The webhook's unique identifier.
|
|
280
|
+
* @param query an object with query parameters
|
|
281
|
+
* @throws GetWebhookDeliveriesHttpError
|
|
282
|
+
*/
|
|
283
|
+
declare const getWebhookDeliveries: (id: string, query: {
|
|
284
|
+
/** Filter resources by event-type */
|
|
285
|
+
eventType?: string;
|
|
286
|
+
/** Maximum number of deliveries to retrieve */
|
|
287
|
+
limit?: number;
|
|
288
|
+
/** Cursor to the next page */
|
|
289
|
+
next?: string;
|
|
290
|
+
/** Cursor to previous next page */
|
|
291
|
+
prev?: string;
|
|
292
|
+
/** Field to sort by, prefix with -/+ to indicate order */
|
|
293
|
+
sort?: "status" | "+status" | "-status" | "triggeredAt" | "+triggeredAt" | "-triggeredAt";
|
|
294
|
+
/** Filter resources by status (success or fail) */
|
|
295
|
+
status?: "success" | "fail";
|
|
296
|
+
}, options?: ApiCallOptions) => Promise<GetWebhookDeliveriesHttpResponse>;
|
|
297
|
+
type GetWebhookDeliveriesHttpResponse = {
|
|
298
|
+
data: DeliveryList;
|
|
299
|
+
headers: Headers;
|
|
300
|
+
status: number;
|
|
301
|
+
prev?: (options?: ApiCallOptions) => Promise<GetWebhookDeliveriesHttpResponse>;
|
|
302
|
+
next?: (options?: ApiCallOptions) => Promise<GetWebhookDeliveriesHttpResponse>;
|
|
303
|
+
};
|
|
304
|
+
type GetWebhookDeliveriesHttpError = {
|
|
305
|
+
data: ErrorResponse;
|
|
306
|
+
headers: Headers;
|
|
307
|
+
status: number;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Returns details for a specific delivery
|
|
311
|
+
* @param id The webhook's unique identifier.
|
|
312
|
+
* @param deliveryId The delivery's unique identifier.
|
|
313
|
+
* @throws GetWebhookDeliveryHttpError
|
|
314
|
+
*/
|
|
315
|
+
declare const getWebhookDelivery: (id: string, deliveryId: string, options?: ApiCallOptions) => Promise<GetWebhookDeliveryHttpResponse>;
|
|
316
|
+
type GetWebhookDeliveryHttpResponse = {
|
|
317
|
+
data: Delivery;
|
|
318
|
+
headers: Headers;
|
|
319
|
+
status: number;
|
|
320
|
+
};
|
|
321
|
+
type GetWebhookDeliveryHttpError = {
|
|
322
|
+
data: ErrorResponse;
|
|
323
|
+
headers: Headers;
|
|
324
|
+
status: number;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Resend the delivery with the same payload
|
|
328
|
+
* @param id The webhook's unique identifier.
|
|
329
|
+
* @param deliveryId The delivery's unique identifier.
|
|
330
|
+
* @throws ResendWebhookDeliveryHttpError
|
|
331
|
+
*/
|
|
332
|
+
declare const resendWebhookDelivery: (id: string, deliveryId: string, options?: ApiCallOptions) => Promise<ResendWebhookDeliveryHttpResponse>;
|
|
333
|
+
type ResendWebhookDeliveryHttpResponse = {
|
|
334
|
+
data: Delivery;
|
|
335
|
+
headers: Headers;
|
|
336
|
+
status: number;
|
|
337
|
+
};
|
|
338
|
+
type ResendWebhookDeliveryHttpError = {
|
|
339
|
+
data: ErrorResponse;
|
|
340
|
+
headers: Headers;
|
|
341
|
+
status: number;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Clears the cache for webhooks api requests.
|
|
345
|
+
*/
|
|
346
|
+
declare function clearCache(): void;
|
|
347
|
+
interface WebhooksAPI {
|
|
348
|
+
/**
|
|
349
|
+
* Retrieves all webhooks entries for a tenant
|
|
350
|
+
* @param query an object with query parameters
|
|
351
|
+
* @throws GetWebhooksHttpError
|
|
352
|
+
*/
|
|
353
|
+
getWebhooks: typeof getWebhooks;
|
|
354
|
+
/**
|
|
355
|
+
* Creates a new webhook
|
|
356
|
+
* @param body an object with the body content
|
|
357
|
+
* @throws CreateWebhookHttpError
|
|
358
|
+
*/
|
|
359
|
+
createWebhook: typeof createWebhook;
|
|
360
|
+
/**
|
|
361
|
+
* List of event-types that are possible to subscribe to.
|
|
362
|
+
* @throws GetWebhookEventTypesHttpError
|
|
363
|
+
*/
|
|
364
|
+
getWebhookEventTypes: typeof getWebhookEventTypes;
|
|
365
|
+
/**
|
|
366
|
+
* Deletes a specific webhook
|
|
367
|
+
* @param id The webhook's unique identifier.
|
|
368
|
+
* @throws DeleteWebhookHttpError
|
|
369
|
+
*/
|
|
370
|
+
deleteWebhook: typeof deleteWebhook;
|
|
371
|
+
/**
|
|
372
|
+
* Returns details for a specific webhook
|
|
373
|
+
* @param id The webhook's unique identifier.
|
|
374
|
+
* @throws GetWebhookHttpError
|
|
375
|
+
*/
|
|
376
|
+
getWebhook: typeof getWebhook;
|
|
377
|
+
/**
|
|
378
|
+
* Patches a webhook
|
|
379
|
+
* @param id The webhook's unique identifier.
|
|
380
|
+
* @param body an object with the body content
|
|
381
|
+
* @throws PatchWebhookHttpError
|
|
382
|
+
*/
|
|
383
|
+
patchWebhook: typeof patchWebhook;
|
|
384
|
+
/**
|
|
385
|
+
* Updates a webhook
|
|
386
|
+
* @param id The webhook's unique identifier.
|
|
387
|
+
* @param body an object with the body content
|
|
388
|
+
* @throws UpdateWebhookHttpError
|
|
389
|
+
*/
|
|
390
|
+
updateWebhook: typeof updateWebhook;
|
|
391
|
+
/**
|
|
392
|
+
* Returns deliveries for a specific webhook
|
|
393
|
+
* @param id The webhook's unique identifier.
|
|
394
|
+
* @param query an object with query parameters
|
|
395
|
+
* @throws GetWebhookDeliveriesHttpError
|
|
396
|
+
*/
|
|
397
|
+
getWebhookDeliveries: typeof getWebhookDeliveries;
|
|
398
|
+
/**
|
|
399
|
+
* Returns details for a specific delivery
|
|
400
|
+
* @param id The webhook's unique identifier.
|
|
401
|
+
* @param deliveryId The delivery's unique identifier.
|
|
402
|
+
* @throws GetWebhookDeliveryHttpError
|
|
403
|
+
*/
|
|
404
|
+
getWebhookDelivery: typeof getWebhookDelivery;
|
|
405
|
+
/**
|
|
406
|
+
* Resend the delivery with the same payload
|
|
407
|
+
* @param id The webhook's unique identifier.
|
|
408
|
+
* @param deliveryId The delivery's unique identifier.
|
|
409
|
+
* @throws ResendWebhookDeliveryHttpError
|
|
410
|
+
*/
|
|
411
|
+
resendWebhookDelivery: typeof resendWebhookDelivery;
|
|
412
|
+
/**
|
|
413
|
+
* Clears the cache for webhooks api requests.
|
|
414
|
+
*/
|
|
415
|
+
clearCache: typeof clearCache;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Functions for the webhooks api
|
|
419
|
+
*/
|
|
420
|
+
declare const webhooksExport: WebhooksAPI;
|
|
421
|
+
|
|
422
|
+
export { type CreateWebhookHttpError, type CreateWebhookHttpResponse, type DeleteWebhookHttpError, type DeleteWebhookHttpResponse, type Delivery, type DeliveryList, type Error, type ErrorResponse, type EventType, type EventTypes, type GetWebhookDeliveriesHttpError, type GetWebhookDeliveriesHttpResponse, type GetWebhookDeliveryHttpError, type GetWebhookDeliveryHttpResponse, type GetWebhookEventTypesHttpError, type GetWebhookEventTypesHttpResponse, type GetWebhookHttpError, type GetWebhookHttpResponse, type GetWebhooksHttpError, type GetWebhooksHttpResponse, type Link, type PatchWebhookHttpError, type PatchWebhookHttpResponse, type ResendWebhookDeliveryHttpError, type ResendWebhookDeliveryHttpResponse, type UpdateWebhookHttpError, type UpdateWebhookHttpResponse, type WebhookBase, type WebhookList, type WebhookPatch, type WebhookPost, type WebhookResponse, type WebhooksAPI, clearCache, createWebhook, webhooksExport as default, deleteWebhook, getWebhook, getWebhookDeliveries, getWebhookDelivery, getWebhookEventTypes, getWebhooks, patchWebhook, resendWebhookDelivery, updateWebhook };
|
package/webhooks.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkOULT3V2Ujs = require('./chunk-OULT3V2U.js');
|
|
5
|
+
require('./chunk-ZT4C7KCQ.js');
|
|
6
|
+
|
|
7
|
+
// src/public/rest/webhooks.ts
|
|
8
|
+
var getWebhooks = async (query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
9
|
+
method: "get",
|
|
10
|
+
pathTemplate: "/api/v1/webhooks",
|
|
11
|
+
query,
|
|
12
|
+
options
|
|
13
|
+
});
|
|
14
|
+
var createWebhook = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
15
|
+
method: "post",
|
|
16
|
+
pathTemplate: "/api/v1/webhooks",
|
|
17
|
+
body,
|
|
18
|
+
options
|
|
19
|
+
});
|
|
20
|
+
var getWebhookEventTypes = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
21
|
+
method: "get",
|
|
22
|
+
pathTemplate: "/api/v1/webhooks/event-types",
|
|
23
|
+
options
|
|
24
|
+
});
|
|
25
|
+
var deleteWebhook = async (id, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
26
|
+
method: "delete",
|
|
27
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
28
|
+
pathVariables: { id },
|
|
29
|
+
options
|
|
30
|
+
});
|
|
31
|
+
var getWebhook = async (id, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
32
|
+
method: "get",
|
|
33
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
34
|
+
pathVariables: { id },
|
|
35
|
+
options
|
|
36
|
+
});
|
|
37
|
+
var patchWebhook = async (id, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
38
|
+
method: "patch",
|
|
39
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
40
|
+
pathVariables: { id },
|
|
41
|
+
body,
|
|
42
|
+
options
|
|
43
|
+
});
|
|
44
|
+
var updateWebhook = async (id, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
45
|
+
method: "put",
|
|
46
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
47
|
+
pathVariables: { id },
|
|
48
|
+
body,
|
|
49
|
+
options
|
|
50
|
+
});
|
|
51
|
+
var getWebhookDeliveries = async (id, query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
52
|
+
method: "get",
|
|
53
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries",
|
|
54
|
+
pathVariables: { id },
|
|
55
|
+
query,
|
|
56
|
+
options
|
|
57
|
+
});
|
|
58
|
+
var getWebhookDelivery = async (id, deliveryId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
59
|
+
method: "get",
|
|
60
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}",
|
|
61
|
+
pathVariables: { id, deliveryId },
|
|
62
|
+
options
|
|
63
|
+
});
|
|
64
|
+
var resendWebhookDelivery = async (id, deliveryId, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "webhooks", {
|
|
65
|
+
method: "post",
|
|
66
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}/actions/resend",
|
|
67
|
+
pathVariables: { id, deliveryId },
|
|
68
|
+
options
|
|
69
|
+
});
|
|
70
|
+
function clearCache() {
|
|
71
|
+
return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "webhooks");
|
|
72
|
+
}
|
|
73
|
+
var webhooksExport = {
|
|
74
|
+
getWebhooks,
|
|
75
|
+
createWebhook,
|
|
76
|
+
getWebhookEventTypes,
|
|
77
|
+
deleteWebhook,
|
|
78
|
+
getWebhook,
|
|
79
|
+
patchWebhook,
|
|
80
|
+
updateWebhook,
|
|
81
|
+
getWebhookDeliveries,
|
|
82
|
+
getWebhookDelivery,
|
|
83
|
+
resendWebhookDelivery,
|
|
84
|
+
clearCache
|
|
85
|
+
};
|
|
86
|
+
var webhooks_default = webhooksExport;
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
exports.clearCache = clearCache; exports.createWebhook = createWebhook; exports.default = webhooks_default; exports.deleteWebhook = deleteWebhook; exports.getWebhook = getWebhook; exports.getWebhookDeliveries = getWebhookDeliveries; exports.getWebhookDelivery = getWebhookDelivery; exports.getWebhookEventTypes = getWebhookEventTypes; exports.getWebhooks = getWebhooks; exports.patchWebhook = patchWebhook; exports.resendWebhookDelivery = resendWebhookDelivery; exports.updateWebhook = updateWebhook;
|
package/webhooks.mjs
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clearApiCache,
|
|
3
|
+
invokeFetch
|
|
4
|
+
} from "./chunk-3YE7EI7I.mjs";
|
|
5
|
+
import "./chunk-WM7FQU2U.mjs";
|
|
6
|
+
|
|
7
|
+
// src/public/rest/webhooks.ts
|
|
8
|
+
var getWebhooks = async (query, options) => invokeFetch("webhooks", {
|
|
9
|
+
method: "get",
|
|
10
|
+
pathTemplate: "/api/v1/webhooks",
|
|
11
|
+
query,
|
|
12
|
+
options
|
|
13
|
+
});
|
|
14
|
+
var createWebhook = async (body, options) => invokeFetch("webhooks", {
|
|
15
|
+
method: "post",
|
|
16
|
+
pathTemplate: "/api/v1/webhooks",
|
|
17
|
+
body,
|
|
18
|
+
options
|
|
19
|
+
});
|
|
20
|
+
var getWebhookEventTypes = async (options) => invokeFetch("webhooks", {
|
|
21
|
+
method: "get",
|
|
22
|
+
pathTemplate: "/api/v1/webhooks/event-types",
|
|
23
|
+
options
|
|
24
|
+
});
|
|
25
|
+
var deleteWebhook = async (id, options) => invokeFetch("webhooks", {
|
|
26
|
+
method: "delete",
|
|
27
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
28
|
+
pathVariables: { id },
|
|
29
|
+
options
|
|
30
|
+
});
|
|
31
|
+
var getWebhook = async (id, options) => invokeFetch("webhooks", {
|
|
32
|
+
method: "get",
|
|
33
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
34
|
+
pathVariables: { id },
|
|
35
|
+
options
|
|
36
|
+
});
|
|
37
|
+
var patchWebhook = async (id, body, options) => invokeFetch("webhooks", {
|
|
38
|
+
method: "patch",
|
|
39
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
40
|
+
pathVariables: { id },
|
|
41
|
+
body,
|
|
42
|
+
options
|
|
43
|
+
});
|
|
44
|
+
var updateWebhook = async (id, body, options) => invokeFetch("webhooks", {
|
|
45
|
+
method: "put",
|
|
46
|
+
pathTemplate: "/api/v1/webhooks/{id}",
|
|
47
|
+
pathVariables: { id },
|
|
48
|
+
body,
|
|
49
|
+
options
|
|
50
|
+
});
|
|
51
|
+
var getWebhookDeliveries = async (id, query, options) => invokeFetch("webhooks", {
|
|
52
|
+
method: "get",
|
|
53
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries",
|
|
54
|
+
pathVariables: { id },
|
|
55
|
+
query,
|
|
56
|
+
options
|
|
57
|
+
});
|
|
58
|
+
var getWebhookDelivery = async (id, deliveryId, options) => invokeFetch("webhooks", {
|
|
59
|
+
method: "get",
|
|
60
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}",
|
|
61
|
+
pathVariables: { id, deliveryId },
|
|
62
|
+
options
|
|
63
|
+
});
|
|
64
|
+
var resendWebhookDelivery = async (id, deliveryId, options) => invokeFetch("webhooks", {
|
|
65
|
+
method: "post",
|
|
66
|
+
pathTemplate: "/api/v1/webhooks/{id}/deliveries/{deliveryId}/actions/resend",
|
|
67
|
+
pathVariables: { id, deliveryId },
|
|
68
|
+
options
|
|
69
|
+
});
|
|
70
|
+
function clearCache() {
|
|
71
|
+
return clearApiCache("webhooks");
|
|
72
|
+
}
|
|
73
|
+
var webhooksExport = {
|
|
74
|
+
getWebhooks,
|
|
75
|
+
createWebhook,
|
|
76
|
+
getWebhookEventTypes,
|
|
77
|
+
deleteWebhook,
|
|
78
|
+
getWebhook,
|
|
79
|
+
patchWebhook,
|
|
80
|
+
updateWebhook,
|
|
81
|
+
getWebhookDeliveries,
|
|
82
|
+
getWebhookDelivery,
|
|
83
|
+
resendWebhookDelivery,
|
|
84
|
+
clearCache
|
|
85
|
+
};
|
|
86
|
+
var webhooks_default = webhooksExport;
|
|
87
|
+
export {
|
|
88
|
+
clearCache,
|
|
89
|
+
createWebhook,
|
|
90
|
+
webhooks_default as default,
|
|
91
|
+
deleteWebhook,
|
|
92
|
+
getWebhook,
|
|
93
|
+
getWebhookDeliveries,
|
|
94
|
+
getWebhookDelivery,
|
|
95
|
+
getWebhookEventTypes,
|
|
96
|
+
getWebhooks,
|
|
97
|
+
patchWebhook,
|
|
98
|
+
resendWebhookDelivery,
|
|
99
|
+
updateWebhook
|
|
100
|
+
};
|