@qlik/api 2.2.0 → 2.3.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.
Files changed (232) hide show
  1. package/analytics/change-stores.d.ts +386 -0
  2. package/analytics/change-stores.js +123 -0
  3. package/analytics.d.ts +14 -0
  4. package/analytics.js +13 -0
  5. package/api-keys.d.ts +362 -3
  6. package/api-keys.js +2 -3
  7. package/apps.d.ts +2673 -3
  8. package/apps.js +2 -3
  9. package/assistants.d.ts +1370 -3
  10. package/assistants.js +2 -3
  11. package/audits.d.ts +318 -3
  12. package/audits.js +4 -4
  13. package/auth-types.d.ts +1 -1
  14. package/auth-types.js +1 -2
  15. package/auth.d.ts +94 -2
  16. package/auth.js +63 -3
  17. package/automation-connections.d.ts +366 -3
  18. package/automation-connections.js +2 -3
  19. package/automation-connectors.d.ts +84 -3
  20. package/automation-connectors.js +2 -3
  21. package/automations.d.ts +805 -3
  22. package/automations.js +2 -3
  23. package/automl-deployments.d.ts +101 -3
  24. package/automl-deployments.js +2 -3
  25. package/automl-predictions.d.ts +238 -3
  26. package/automl-predictions.js +2 -3
  27. package/banners.d.ts +184 -3
  28. package/banners.js +2 -3
  29. package/brands.d.ts +670 -3
  30. package/brands.js +2 -3
  31. package/chunks/auth-XusKk8IA.js +32 -0
  32. package/chunks/{chunk-EtTptKIv.js → chunk-D3vHIbds.js} +2 -2
  33. package/chunks/{dist-gXLIqDJW.js → dist-n3iOVn1W.js} +4 -4
  34. package/chunks/{auth-functions-BmZgZYSs.js → interceptors-2VSXImC9.js} +498 -146
  35. package/chunks/{invoke-fetch-PcVIxLW4.js → invoke-fetch-CckTK7bh.js} +3 -3
  36. package/chunks/{invoke-fetch-CucBpA1C.js → invoke-fetch-D9lpiAb-.js} +1 -5
  37. package/chunks/{public-runtime-modules-Dwjzb3l8.js → public-runtime-modules-BqxAMJ9M.js} +7 -7
  38. package/chunks/{qix-DI5o5XF4.d.ts → qix-CrqXv44x.d.ts} +6 -2
  39. package/chunks/{qix-DjxuPCX0.js → qix-DpvHvpx7.js} +11 -10
  40. package/chunks/{qix-chunk-entrypoint-tmTo-kpa.js → qix-chunk-entrypoint-BXZPnE6J.js} +48 -50
  41. package/collections.d.ts +582 -3
  42. package/collections.js +2 -3
  43. package/conditions.d.ts +662 -3
  44. package/conditions.js +2 -3
  45. package/consumption.d.ts +182 -3
  46. package/consumption.js +2 -3
  47. package/core/ip-policies.d.ts +328 -4
  48. package/core/ip-policies.js +108 -5
  49. package/core.d.ts +13 -4
  50. package/core.js +3 -4
  51. package/csp-origins.d.ts +273 -3
  52. package/csp-origins.js +2 -3
  53. package/csrf-token.d.ts +62 -3
  54. package/csrf-token.js +2 -3
  55. package/data-alerts.d.ts +1004 -3
  56. package/data-alerts.js +2 -3
  57. package/data-assets.d.ts +207 -3
  58. package/data-assets.js +2 -3
  59. package/data-connections.d.ts +678 -3
  60. package/data-connections.js +2 -3
  61. package/data-credentials.d.ts +292 -3
  62. package/data-credentials.js +2 -3
  63. package/data-files.d.ts +860 -3
  64. package/data-files.js +2 -3
  65. package/data-qualities.d.ts +175 -3
  66. package/data-qualities.js +2 -3
  67. package/data-sets.d.ts +424 -3
  68. package/data-sets.js +2 -3
  69. package/data-sources.d.ts +348 -3
  70. package/data-sources.js +2 -3
  71. package/data-stores.d.ts +537 -3
  72. package/data-stores.js +2 -3
  73. package/dcaas.d.ts +192 -3
  74. package/dcaas.js +2 -3
  75. package/di-projects.d.ts +812 -4
  76. package/di-projects.js +25 -4
  77. package/direct-access-agents.d.ts +710 -4
  78. package/direct-access-agents.js +37 -5
  79. package/docs/authentication.md +1 -1
  80. package/encryption.d.ts +372 -3
  81. package/encryption.js +2 -3
  82. package/extensions.d.ts +295 -3
  83. package/extensions.js +2 -3
  84. package/global-types.d.ts +1 -1
  85. package/global-types.js +0 -2
  86. package/glossaries.d.ts +1223 -3
  87. package/glossaries.js +2 -3
  88. package/groups.d.ts +510 -3
  89. package/groups.js +2 -3
  90. package/identity-providers.d.ts +711 -3
  91. package/identity-providers.js +2 -3
  92. package/index.d.ts +78 -69
  93. package/index.js +28 -10
  94. package/interceptors.d.ts +52 -3
  95. package/interceptors.js +1 -2
  96. package/invoke-fetch-types.d.ts +1 -1
  97. package/items.d.ts +536 -3
  98. package/items.js +2 -3
  99. package/knowledgebases.d.ts +976 -3
  100. package/knowledgebases.js +2 -3
  101. package/licenses.d.ts +663 -3
  102. package/licenses.js +2 -3
  103. package/lineage-graphs.d.ts +704 -3
  104. package/lineage-graphs.js +2 -3
  105. package/ml.d.ts +2808 -3
  106. package/ml.js +2 -3
  107. package/notes.d.ts +110 -3
  108. package/notes.js +2 -3
  109. package/notifications.d.ts +98 -3
  110. package/notifications.js +2 -3
  111. package/oauth-callback.iife.js +1151 -0
  112. package/oauth-clients.d.ts +562 -3
  113. package/oauth-clients.js +2 -3
  114. package/oauth-tokens.d.ts +126 -3
  115. package/oauth-tokens.js +2 -3
  116. package/package.json +5 -4
  117. package/qix.d.ts +3 -3
  118. package/qix.js +38 -3
  119. package/questions.d.ts +364 -3
  120. package/questions.js +2 -3
  121. package/quotas.d.ts +112 -3
  122. package/quotas.js +2 -3
  123. package/reload-tasks.d.ts +249 -3
  124. package/reload-tasks.js +2 -3
  125. package/reloads.d.ts +260 -3
  126. package/reloads.js +2 -3
  127. package/report-templates.d.ts +287 -3
  128. package/report-templates.js +2 -3
  129. package/reports.d.ts +863 -3
  130. package/reports.js +2 -3
  131. package/roles.d.ts +312 -3
  132. package/roles.js +2 -3
  133. package/sharing-tasks.d.ts +1164 -3
  134. package/sharing-tasks.js +2 -3
  135. package/spaces.d.ts +779 -3
  136. package/spaces.js +2 -3
  137. package/tasks.d.ts +564 -3
  138. package/tasks.js +2 -3
  139. package/temp-contents.d.ts +167 -3
  140. package/temp-contents.js +2 -3
  141. package/tenants.d.ts +360 -3
  142. package/tenants.js +2 -3
  143. package/themes.d.ts +270 -3
  144. package/themes.js +2 -3
  145. package/transports.d.ts +435 -4
  146. package/transports.js +20 -5
  147. package/ui-config.d.ts +274 -3
  148. package/ui-config.js +2 -3
  149. package/users.d.ts +674 -3
  150. package/users.js +2 -3
  151. package/web-integrations.d.ts +294 -3
  152. package/web-integrations.js +2 -3
  153. package/web-notifications.d.ts +273 -3
  154. package/web-notifications.js +2 -3
  155. package/webhooks.d.ts +505 -3
  156. package/webhooks.js +2 -3
  157. package/chunks/api-keys-D6Rqaov4.d.ts +0 -365
  158. package/chunks/apps-BwpXUGDb.d.ts +0 -2673
  159. package/chunks/assistants-wh6Qe7l6.d.ts +0 -1366
  160. package/chunks/audits-DakwzT97.d.ts +0 -316
  161. package/chunks/auth-6mptVm5Q.d.ts +0 -95
  162. package/chunks/auth-Cle0_tmz.js +0 -32
  163. package/chunks/auth-D11iO7ZV.js +0 -65
  164. package/chunks/automation-connections-k2G_n9rj.d.ts +0 -366
  165. package/chunks/automation-connectors-J5OE-1P0.d.ts +0 -84
  166. package/chunks/automations-BGy83EBO.d.ts +0 -797
  167. package/chunks/automl-deployments-CWEpX2pk.d.ts +0 -101
  168. package/chunks/automl-predictions-BNIjRhBm.d.ts +0 -238
  169. package/chunks/banners-CgBRnZGv.d.ts +0 -184
  170. package/chunks/brands-DCgk6Gqx.d.ts +0 -671
  171. package/chunks/collections-BpYjcpIY.d.ts +0 -582
  172. package/chunks/conditions-CJJG7Uph.d.ts +0 -662
  173. package/chunks/consumption-DerFk437.d.ts +0 -182
  174. package/chunks/core-DQXNZdnf.d.ts +0 -12
  175. package/chunks/csp-origins-3NJlh_n9.d.ts +0 -273
  176. package/chunks/csrf-token-DoaoOQzH.d.ts +0 -63
  177. package/chunks/data-alerts-CILSEFbQ.d.ts +0 -1004
  178. package/chunks/data-assets-CJDcssoX.d.ts +0 -207
  179. package/chunks/data-connections-VSB13K6g.d.ts +0 -678
  180. package/chunks/data-credentials-ChEp_hyU.d.ts +0 -292
  181. package/chunks/data-files-CVzn9M6V.d.ts +0 -860
  182. package/chunks/data-qualities-DBrot957.d.ts +0 -176
  183. package/chunks/data-sets-CFzxgWnO.d.ts +0 -424
  184. package/chunks/data-sources-IsAaof_C.d.ts +0 -346
  185. package/chunks/data-stores-DFOPdgfz.d.ts +0 -537
  186. package/chunks/dcaas-qyv7YlrN.d.ts +0 -192
  187. package/chunks/di-projects-DVQTxASr.d.ts +0 -777
  188. package/chunks/direct-access-agents-B77OhzZi.d.ts +0 -580
  189. package/chunks/encryption-BjA6xbCO.d.ts +0 -372
  190. package/chunks/extensions-OO0WtInj.d.ts +0 -294
  191. package/chunks/glossaries-CIX7-KT_.d.ts +0 -1213
  192. package/chunks/groups-C86-UG7S.d.ts +0 -511
  193. package/chunks/identity-providers-h0dKNxGZ.d.ts +0 -711
  194. package/chunks/interceptors-Csx2tEi5.d.ts +0 -52
  195. package/chunks/interceptors-DTYm37AU.js +0 -104
  196. package/chunks/ip-policies-CKRIlbP7.d.ts +0 -327
  197. package/chunks/ip-policies-DXlf172B.js +0 -108
  198. package/chunks/items-C-jzqvFW.d.ts +0 -536
  199. package/chunks/knowledgebases-CyQtVcZN.d.ts +0 -977
  200. package/chunks/licenses-xzjnkitW.d.ts +0 -663
  201. package/chunks/lineage-graphs-CViCCzKy.d.ts +0 -697
  202. package/chunks/ml-Abt2MUva.d.ts +0 -2809
  203. package/chunks/notes-BZxuyDgt.d.ts +0 -111
  204. package/chunks/notifications-Bd_gp4jU.d.ts +0 -99
  205. package/chunks/oauth-clients-B5QPr4IM.d.ts +0 -563
  206. package/chunks/oauth-tokens-1b7V8182.d.ts +0 -127
  207. package/chunks/qix-CYQsLyGQ.js +0 -40
  208. package/chunks/questions-BVp0tvNs.d.ts +0 -364
  209. package/chunks/quotas-CfAebRJd.d.ts +0 -113
  210. package/chunks/reload-tasks-DfwUTetn.d.ts +0 -249
  211. package/chunks/reloads-CwmagnFx.d.ts +0 -260
  212. package/chunks/report-templates-DjQYj5dn.d.ts +0 -287
  213. package/chunks/reports-DzNC6Uq3.d.ts +0 -861
  214. package/chunks/roles-BYFIY6E7.d.ts +0 -312
  215. package/chunks/sharing-tasks-BMGIQ-FO.d.ts +0 -1164
  216. package/chunks/spaces-BK823t-b.d.ts +0 -780
  217. package/chunks/tasks-COKDfShO.d.ts +0 -564
  218. package/chunks/temp-contents-zDomB-g6.d.ts +0 -168
  219. package/chunks/tenants-Bhn86519.d.ts +0 -361
  220. package/chunks/themes-v9NbhiBo.d.ts +0 -269
  221. package/chunks/transports-CqEiFxD3.d.ts +0 -362
  222. package/chunks/ui-config-Crs0mVMp.d.ts +0 -274
  223. package/chunks/users-BSOBU_fg.d.ts +0 -675
  224. package/chunks/web-integrations-MisPAHod.d.ts +0 -295
  225. package/chunks/web-notifications-DVy6FHYh.d.ts +0 -274
  226. package/chunks/webhooks-Dr4EiXqy.d.ts +0 -505
  227. /package/chunks/{auth-types-E99tzdN0.d.ts → auth-types-YrlH_R9f.d.ts} +0 -0
  228. /package/chunks/{auth-types-JehqruDP.js → auth-types-h43TVDpB.js} +0 -0
  229. /package/chunks/{global-types-CrOvI33z.js → global-types-CEVAJebk.js} +0 -0
  230. /package/chunks/{invoke-fetch-CbU2Dgqr.d.ts → invoke-fetch-C1Z0RJYU.d.ts} +0 -0
  231. /package/chunks/{utils-BnC4lrlq.js → utils-vv-xFm06.js} +0 -0
  232. /package/chunks/{websocket-errors-DSbO6kDZ.js → websocket-errors-CRTDTtBL.js} +0 -0
package/webhooks.d.ts CHANGED
@@ -1,4 +1,506 @@
1
- import "./chunks/auth-types-E99tzdN0.js";
2
- import "./chunks/invoke-fetch-CbU2Dgqr.js";
3
- import { A as WebhookPatch, B as getWebhookDelivery, C as PatchWebhookHttpResponse, D as UpdateWebhookHttpResponse, E as UpdateWebhookHttpError, F as clearCache, G as updateWebhook, H as getWebhooks, I as createWebhook, K as webhooksExport, L as deleteWebhook, M as WebhookResponse, N as WebhookResponseBase, O as WebhookBase, P as WebhooksAPI, R as getWebhook, S as PatchWebhookHttpError, T as ResendWebhookDeliveryHttpResponse, U as patchWebhook, V as getWebhookEventTypes, W as resendWebhookDelivery, _ as GetWebhookHttpError, a as Delivery, b as GetWebhooksHttpResponse, c as ErrorResponse, d as GetWebhookDeliveriesHttpError, f as GetWebhookDeliveriesHttpResponse, g as GetWebhookEventTypesHttpResponse, h as GetWebhookEventTypesHttpError, i as DeleteWebhookHttpResponse, j as WebhookPost, k as WebhookList, l as EventType, m as GetWebhookDeliveryHttpResponse, n as CreateWebhookHttpResponse, o as DeliveryList, p as GetWebhookDeliveryHttpError, r as DeleteWebhookHttpError, s as Error, t as CreateWebhookHttpError, u as EventTypes, v as GetWebhookHttpResponse, w as ResendWebhookDeliveryHttpError, x as Link, y as GetWebhooksHttpError, z as getWebhookDeliveries } from "./chunks/webhooks-Dr4EiXqy.js";
1
+ import { y as ApiCallOptions } from "./chunks/auth-types-YrlH_R9f.js";
2
+ import "./chunks/invoke-fetch-C1Z0RJYU.js";
3
+
4
+ //#region src/public/rest/webhooks.d.ts
5
+ type Delivery = {
6
+ /** The name of the triggering event-type. */
7
+ eventType: string;
8
+ /** The delivery's unique identifier. */
9
+ id: string;
10
+ /** Request details for the delivery. */
11
+ request?: {
12
+ /** The sent body/payload of the delivery. */
13
+ body?: unknown;
14
+ /** Headers sent for this delivery, values of encryptedHeaders are omitted as such "**OMITTED**". */
15
+ headers?: Record<string, string>;
16
+ /** URL used for this delivery. */
17
+ url?: string;
18
+ };
19
+ /** Response details for the delivery. */
20
+ response?: {
21
+ /** The received body of the delivery. */
22
+ body?: string;
23
+ /** Headers received for this delivery, values of encryptedHeaders are omitted as such "**OMITTED**". */
24
+ headers?: Record<string, string>;
25
+ /** The HTTP status code of the response. */
26
+ statusCode?: number;
27
+ };
28
+ /** The status of delivery. */
29
+ status: "success" | "fail";
30
+ /** The status message of the delivery. */
31
+ statusMessage?: string;
32
+ /** The UTC timestamp when the delivery was triggered. */
33
+ triggeredAt: string;
34
+ /** The unique webhook identifier that the delivery is for. */
35
+ webhookId: string;
36
+ };
37
+ type DeliveryList = {
38
+ data?: Delivery[];
39
+ links?: {
40
+ next?: Link;
41
+ prev?: Link;
42
+ self?: Link;
43
+ };
44
+ };
45
+ type Error = {
46
+ /** The unique code for the error. */
47
+ code: string;
48
+ /** May be used to provide additional details. */
49
+ detail?: string;
50
+ /** A summary of what went wrong. */
51
+ title: string;
52
+ };
53
+ type ErrorResponse = {
54
+ errors?: Error[];
55
+ /** A way to trace the source of the error. */
56
+ traceId?: string;
57
+ };
58
+ type EventType = {
59
+ /** Description of the event type. */
60
+ description?: string;
61
+ /** Specifies which levels that are supported for this event type. */
62
+ levels?: string[];
63
+ /** Name of the event type. */
64
+ name?: string;
65
+ /** Title of the event type. */
66
+ title?: string;
67
+ };
68
+ type EventTypes = {
69
+ data?: EventType[];
70
+ };
71
+ type Link = {
72
+ /** URL to a resource request. */
73
+ href: string;
74
+ };
75
+ type WebhookBase = {
76
+ /** If enabled the certificate chain of the configured URL will be checked for revocation before sending the webhook. */
77
+ checkCertificateRevocation?: boolean;
78
+ /** The UTC timestamp when the webhook was created. */
79
+ readonly createdAt?: string;
80
+ /** The id of the user that created the webhook. */
81
+ readonly createdByUserId?: string;
82
+ /** The reason for creating the webhook. */
83
+ description?: string;
84
+ /** The reason for the webhook to be disabled. */
85
+ readonly disabledReason?: string;
86
+ /** The unique code for the reason. */
87
+ readonly disabledReasonCode?: string;
88
+ /** If enabled the webhook will be sent as a CloudEvent, once enabled for a webhook it cannot be disabled. */
89
+ enableCloudEventDelivery?: boolean;
90
+ /** Whether the webhook is active and sending requests. */
91
+ enabled?: boolean;
92
+ /** These headers are persisted encrypted and decrypted to be sent as normal headers in post request (webhook delivery), in case of URL change these headers will need to be re-entered. Note: duplicate headers are not allowed and are case-insensitive. */
93
+ encryptedHeaders?: Record<string, string>;
94
+ /** Types of events for which the webhook should trigger. Retrieve available types from `/v1/webhooks/event-types`. */
95
+ eventTypes?: string[];
96
+ /** Filter that should match for a webhook to be triggered.
97
+ * 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.
98
+ * Supported attribute operators are 'eq' and 'ne'.
99
+ * Supported logical operators are 'and' and 'or'.
100
+ * Note that attribute values must be valid JSON strings, hence they're enclosed with double quotes.
101
+ * For more detailed information regarding the SCIM filter syntax (RFC7644) used please follow the link to external documentation. */
102
+ filter?: string;
103
+ /** Additional headers in the post request (webhook delivery). Note: duplicate headers are not allowed and are case-insensitive. */
104
+ headers?: Record<string, string>;
105
+ /** The webhook's unique identifier. */
106
+ readonly id?: string;
107
+ /** 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. */
108
+ level?: "tenant" | "user";
109
+ /** The name for the webhook. */
110
+ name: string;
111
+ /** The id of the user that owns the webhook, only applicable for user level webhooks. */
112
+ ownerId?: string;
113
+ /** String used as secret for calculating HMAC hash sent as header. */
114
+ secret?: string;
115
+ /** The UTC timestamp when the webhook was last updated. */
116
+ readonly updatedAt?: string;
117
+ /** The id of the user that last updated the webhook. */
118
+ readonly updatedByUserId?: string;
119
+ /** Target URL for webhook HTTPS requests. */
120
+ url: string;
121
+ };
122
+ type WebhookList = {
123
+ data?: WebhookResponse[];
124
+ links?: {
125
+ next?: Link;
126
+ prev?: Link;
127
+ self?: Link;
128
+ };
129
+ };
130
+ /**
131
+ * A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902
132
+ */
133
+ type WebhookPatch = {
134
+ /** The operation to be performed. */
135
+ op: "add" | "remove" | "replace";
136
+ /** The path for the given resource field to patch. */
137
+ path: "/name" | "/description" | "/url" | "/eventTypes" | "/headers" | "/enabled" | "/secret" | "/encryptedHeaders" | "/enableCloudEventDelivery";
138
+ /** The value to be used for this operation. */
139
+ value?: boolean | number | unknown | string;
140
+ };
141
+ type WebhookPost = WebhookBase & {
142
+ /** Indicates from where the webhook was created and its purpose. */
143
+ origin?: "api" | "automations" | "management-console";
144
+ };
145
+ type WebhookResponse = WebhookResponseBase & {
146
+ /** Indicates from where the webhook was created and its purpose. */
147
+ readonly origin?: "api" | "automations" | "management-console";
148
+ };
149
+ type WebhookResponseBase = {
150
+ /** If enabled the certificate chain of the configured URL will be checked for revocation before sending the webhook. */
151
+ checkCertificateRevocation?: boolean;
152
+ /** The UTC timestamp when the webhook was created. */
153
+ readonly createdAt?: string;
154
+ /** The id of the user that created the webhook. */
155
+ readonly createdByUserId?: string;
156
+ /** The reason for creating the webhook. */
157
+ description?: string;
158
+ /** The reason for the webhook to be disabled. */
159
+ readonly disabledReason?: string;
160
+ /** The unique code for the reason. */
161
+ readonly disabledReasonCode?: string;
162
+ /** If enabled the webhook will be sent as a CloudEvent, once enabled for a webhook it cannot be disabled. */
163
+ enableCloudEventDelivery?: boolean;
164
+ /** Whether the webhook is active and sending requests. */
165
+ enabled?: boolean;
166
+ /** Additional encrypted headers in the post request. */
167
+ encryptedHeaders?: string[];
168
+ /** Types of events for which the webhook should trigger. Retrieve available types from `/v1/webhooks/event-types`. */
169
+ eventTypes?: string[];
170
+ /** Filter that should match for a webhook to be triggered.
171
+ * 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.
172
+ * Supported attribute operators are 'eq' and 'ne'.
173
+ * Supported logical operators are 'and' and 'or'.
174
+ * Note that attribute values must be valid JSON strings, hence they're enclosed with double quotes.
175
+ * For more detailed information regarding the SCIM filter syntax (RFC7644) used please follow the link to external documentation. */
176
+ filter?: string;
177
+ /** Additional headers in the post request. */
178
+ headers?: Record<string, string>;
179
+ /** The webhook's unique identifier. */
180
+ readonly id?: string;
181
+ /** 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. */
182
+ level?: "tenant" | "user";
183
+ /** The name for the webhook. */
184
+ name: string;
185
+ /** The id of the user that owns the webhook, only applicable for user level webhooks. */
186
+ ownerId?: string;
187
+ /** @deprecated
188
+ * String used as secret for calculating HMAC hash sent as header. */
189
+ secret?: string;
190
+ /** Provides status of the string used as secret for calculating HMAC hash sent as header is already added or not. */
191
+ secretKeyAdded?: boolean;
192
+ /** The UTC timestamp when the webhook was last updated. */
193
+ readonly updatedAt?: string;
194
+ /** The id of the user that last updated the webhook. */
195
+ readonly updatedByUserId?: string;
196
+ /** Target URL for webhook HTTPS requests. */
197
+ url: string;
198
+ };
199
+ /**
200
+ * Retrieves all webhooks entries for a tenant that the user has access to. Users assigned the `TenantAdmin` role can retrieve all webhooks. A user can have up to 150 webhooks at one time.
201
+ *
202
+ * @param query an object with query parameters
203
+ * @throws GetWebhooksHttpError
204
+ */
205
+ declare function getWebhooks(query: {
206
+ /** Filter resources by user that created it. */
207
+ createdByUserId?: string;
208
+ /** Filter resources by enabled true/false. */
209
+ enabled?: boolean;
210
+ /** Filter resources by event-type/types, a single webhook item can have multiple event-types. */
211
+ eventTypes?: string;
212
+ /** Filter resources by level that user has access to (either user or level). */
213
+ level?: string;
214
+ /** Maximum number of webhooks to retrieve. */
215
+ limit?: number;
216
+ /** Filter resources by name (wildcard and case insensitive). */
217
+ name?: string;
218
+ /** Cursor to the next page. */
219
+ next?: string;
220
+ /** Filter resources by origins, supports multiorigin. */
221
+ origins?: "api" | "automations" | "management-console";
222
+ /** Filter resources by user that owns it, only applicable for user level webhooks. */
223
+ ownerId?: string;
224
+ /** Cursor to the previous page. */
225
+ prev?: string;
226
+ /** Field to sort by, prefix with -/+ to indicate order. */
227
+ sort?: "name" | "+name" | "-name" | "url" | "+url" | "-url" | "createdAt" | "+createdAt" | "-createdAt" | "updatedAt" | "+updatedAt" | "-updatedAt";
228
+ /** Filter resources by user that last updated the webhook. */
229
+ updatedByUserId?: string;
230
+ /** Filter resources by URL (wildcard and case insensitive). */
231
+ url?: string;
232
+ }, options?: ApiCallOptions): Promise<GetWebhooksHttpResponse>;
233
+ type GetWebhooksHttpResponse = {
234
+ data: WebhookList;
235
+ headers: Headers;
236
+ status: 200;
237
+ prev?: (options?: ApiCallOptions) => Promise<GetWebhooksHttpResponse>;
238
+ next?: (options?: ApiCallOptions) => Promise<GetWebhooksHttpResponse>;
239
+ };
240
+ type GetWebhooksHttpError = {
241
+ data: ErrorResponse;
242
+ headers: Headers;
243
+ status: 400 | 401 | 403 | 500 | 503;
244
+ };
245
+ /**
246
+ * Creates a new webhook. User must be assigned the `TenantAdmin` role to create `tenant` level webhooks.
247
+ *
248
+ * @param body an object with the body content
249
+ * @throws CreateWebhookHttpError
250
+ */
251
+ declare function createWebhook(body: WebhookPost, options?: ApiCallOptions): Promise<CreateWebhookHttpResponse>;
252
+ type CreateWebhookHttpResponse = {
253
+ data: WebhookResponse;
254
+ headers: Headers;
255
+ status: 201;
256
+ };
257
+ type CreateWebhookHttpError = {
258
+ data: ErrorResponse;
259
+ headers: Headers;
260
+ status: 400 | 401 | 403 | 500 | 503;
261
+ };
262
+ /**
263
+ * Lists event-types that are possible to subscribe to.
264
+ *
265
+ * @throws GetWebhookEventTypesHttpError
266
+ */
267
+ declare function getWebhookEventTypes(options?: ApiCallOptions): Promise<GetWebhookEventTypesHttpResponse>;
268
+ type GetWebhookEventTypesHttpResponse = {
269
+ data: EventTypes;
270
+ headers: Headers;
271
+ status: 200;
272
+ };
273
+ type GetWebhookEventTypesHttpError = {
274
+ data: ErrorResponse;
275
+ headers: Headers;
276
+ status: 401 | 500 | 503;
277
+ };
278
+ /**
279
+ * Deletes a specific webhook.
280
+ *
281
+ * @param id The webhook's unique identifier.
282
+ * @throws DeleteWebhookHttpError
283
+ */
284
+ declare function deleteWebhook(id: string, options?: ApiCallOptions): Promise<DeleteWebhookHttpResponse>;
285
+ type DeleteWebhookHttpResponse = {
286
+ data: void;
287
+ headers: Headers;
288
+ status: 204;
289
+ };
290
+ type DeleteWebhookHttpError = {
291
+ data: ErrorResponse;
292
+ headers: Headers;
293
+ status: 400 | 401 | 403 | 404 | 500 | 503;
294
+ };
295
+ /**
296
+ * Returns details for a specific webhook.
297
+ *
298
+ * @param id The webhook's unique identifier.
299
+ * @throws GetWebhookHttpError
300
+ */
301
+ declare function getWebhook(id: string, options?: ApiCallOptions): Promise<GetWebhookHttpResponse>;
302
+ type GetWebhookHttpResponse = {
303
+ data: WebhookResponse;
304
+ headers: Headers;
305
+ status: 200;
306
+ };
307
+ type GetWebhookHttpError = {
308
+ data: ErrorResponse;
309
+ headers: Headers;
310
+ status: 400 | 401 | 403 | 404 | 500 | 503;
311
+ };
312
+ /**
313
+ * Patches a webhook to update one or more properties.
314
+ *
315
+ * @param id The webhook's unique identifier.
316
+ * @param body an object with the body content
317
+ * @throws PatchWebhookHttpError
318
+ */
319
+ declare function patchWebhook(id: string, body: WebhookPatch[], options?: ApiCallOptions): Promise<PatchWebhookHttpResponse>;
320
+ type PatchWebhookHttpResponse = {
321
+ data: void;
322
+ headers: Headers;
323
+ status: 204;
324
+ };
325
+ type PatchWebhookHttpError = {
326
+ data: ErrorResponse;
327
+ headers: Headers;
328
+ status: 400 | 401 | 403 | 404 | 500 | 503;
329
+ };
330
+ /**
331
+ * Updates a webhook, any omitted fields will be cleared, returns updated webhook.
332
+ *
333
+ * @param id The webhook's unique identifier.
334
+ * @param body an object with the body content
335
+ * @throws UpdateWebhookHttpError
336
+ */
337
+ declare function updateWebhook(id: string, body: WebhookBase, options?: ApiCallOptions): Promise<UpdateWebhookHttpResponse>;
338
+ type UpdateWebhookHttpResponse = {
339
+ data: WebhookResponse;
340
+ headers: Headers;
341
+ status: 200;
342
+ };
343
+ type UpdateWebhookHttpError = {
344
+ data: ErrorResponse;
345
+ headers: Headers;
346
+ status: 400 | 401 | 403 | 404 | 500 | 503;
347
+ };
348
+ /**
349
+ * Returns deliveries for a specific webhook. Delivery history is stored for 1 week.
350
+ *
351
+ * @param id The webhook's unique identifier.
352
+ * @param query an object with query parameters
353
+ * @throws GetWebhookDeliveriesHttpError
354
+ */
355
+ declare function getWebhookDeliveries(id: string, query: {
356
+ /** Filter resources by event-type. */
357
+ eventType?: string;
358
+ /** Maximum number of deliveries to retrieve. */
359
+ limit?: number;
360
+ /** Cursor to the next page. */
361
+ next?: string;
362
+ /** Cursor to the previous page. */
363
+ prev?: string;
364
+ /** Field to sort by, prefix with -/+ to indicate order. */
365
+ sort?: "status" | "+status" | "-status" | "triggeredAt" | "+triggeredAt" | "-triggeredAt";
366
+ /** Filter resources by status (success or fail). */
367
+ status?: "success" | "fail";
368
+ }, options?: ApiCallOptions): Promise<GetWebhookDeliveriesHttpResponse>;
369
+ type GetWebhookDeliveriesHttpResponse = {
370
+ data: DeliveryList;
371
+ headers: Headers;
372
+ status: 200;
373
+ prev?: (options?: ApiCallOptions) => Promise<GetWebhookDeliveriesHttpResponse>;
374
+ next?: (options?: ApiCallOptions) => Promise<GetWebhookDeliveriesHttpResponse>;
375
+ };
376
+ type GetWebhookDeliveriesHttpError = {
377
+ data: ErrorResponse;
378
+ headers: Headers;
379
+ status: 400 | 401 | 403 | 404 | 500 | 503;
380
+ };
381
+ /**
382
+ * Returns details for a specific delivery.
383
+ *
384
+ * @param id The webhook's unique identifier.
385
+ * @param deliveryId The delivery's unique identifier.
386
+ * @throws GetWebhookDeliveryHttpError
387
+ */
388
+ declare function getWebhookDelivery(id: string, deliveryId: string, options?: ApiCallOptions): Promise<GetWebhookDeliveryHttpResponse>;
389
+ type GetWebhookDeliveryHttpResponse = {
390
+ data: Delivery;
391
+ headers: Headers;
392
+ status: 200;
393
+ };
394
+ type GetWebhookDeliveryHttpError = {
395
+ data: ErrorResponse;
396
+ headers: Headers;
397
+ status: 400 | 401 | 403 | 404 | 500 | 503;
398
+ };
399
+ /**
400
+ * Resends the delivery with the same payload.
401
+ *
402
+ * @param id The webhook's unique identifier.
403
+ * @param deliveryId The delivery's unique identifier.
404
+ * @throws ResendWebhookDeliveryHttpError
405
+ */
406
+ declare function resendWebhookDelivery(id: string, deliveryId: string, options?: ApiCallOptions): Promise<ResendWebhookDeliveryHttpResponse>;
407
+ type ResendWebhookDeliveryHttpResponse = {
408
+ data: Delivery;
409
+ headers: Headers;
410
+ status: 201;
411
+ };
412
+ type ResendWebhookDeliveryHttpError = {
413
+ data: ErrorResponse;
414
+ headers: Headers;
415
+ status: 401 | 404 | 500 | 503;
416
+ };
417
+ /**
418
+ * Clears the cache for webhooks api requests.
419
+ */
420
+ declare function clearCache(): void;
421
+ type WebhooksAPI = {
422
+ /**
423
+ * Retrieves all webhooks entries for a tenant that the user has access to. Users assigned the `TenantAdmin` role can retrieve all webhooks. A user can have up to 150 webhooks at one time.
424
+ *
425
+ * @param query an object with query parameters
426
+ * @throws GetWebhooksHttpError
427
+ */
428
+ getWebhooks: typeof getWebhooks;
429
+ /**
430
+ * Creates a new webhook. User must be assigned the `TenantAdmin` role to create `tenant` level webhooks.
431
+ *
432
+ * @param body an object with the body content
433
+ * @throws CreateWebhookHttpError
434
+ */
435
+ createWebhook: typeof createWebhook;
436
+ /**
437
+ * Lists event-types that are possible to subscribe to.
438
+ *
439
+ * @throws GetWebhookEventTypesHttpError
440
+ */
441
+ getWebhookEventTypes: typeof getWebhookEventTypes;
442
+ /**
443
+ * Deletes a specific webhook.
444
+ *
445
+ * @param id The webhook's unique identifier.
446
+ * @throws DeleteWebhookHttpError
447
+ */
448
+ deleteWebhook: typeof deleteWebhook;
449
+ /**
450
+ * Returns details for a specific webhook.
451
+ *
452
+ * @param id The webhook's unique identifier.
453
+ * @throws GetWebhookHttpError
454
+ */
455
+ getWebhook: typeof getWebhook;
456
+ /**
457
+ * Patches a webhook to update one or more properties.
458
+ *
459
+ * @param id The webhook's unique identifier.
460
+ * @param body an object with the body content
461
+ * @throws PatchWebhookHttpError
462
+ */
463
+ patchWebhook: typeof patchWebhook;
464
+ /**
465
+ * Updates a webhook, any omitted fields will be cleared, returns updated webhook.
466
+ *
467
+ * @param id The webhook's unique identifier.
468
+ * @param body an object with the body content
469
+ * @throws UpdateWebhookHttpError
470
+ */
471
+ updateWebhook: typeof updateWebhook;
472
+ /**
473
+ * Returns deliveries for a specific webhook. Delivery history is stored for 1 week.
474
+ *
475
+ * @param id The webhook's unique identifier.
476
+ * @param query an object with query parameters
477
+ * @throws GetWebhookDeliveriesHttpError
478
+ */
479
+ getWebhookDeliveries: typeof getWebhookDeliveries;
480
+ /**
481
+ * Returns details for a specific delivery.
482
+ *
483
+ * @param id The webhook's unique identifier.
484
+ * @param deliveryId The delivery's unique identifier.
485
+ * @throws GetWebhookDeliveryHttpError
486
+ */
487
+ getWebhookDelivery: typeof getWebhookDelivery;
488
+ /**
489
+ * Resends the delivery with the same payload.
490
+ *
491
+ * @param id The webhook's unique identifier.
492
+ * @param deliveryId The delivery's unique identifier.
493
+ * @throws ResendWebhookDeliveryHttpError
494
+ */
495
+ resendWebhookDelivery: typeof resendWebhookDelivery;
496
+ /**
497
+ * Clears the cache for webhooks api requests.
498
+ */
499
+ clearCache: typeof clearCache;
500
+ };
501
+ /**
502
+ * Functions for the webhooks api
503
+ */
504
+ declare const webhooksExport: WebhooksAPI;
505
+ //#endregion
4
506
  export { CreateWebhookHttpError, CreateWebhookHttpResponse, DeleteWebhookHttpError, DeleteWebhookHttpResponse, Delivery, DeliveryList, Error, ErrorResponse, EventType, EventTypes, GetWebhookDeliveriesHttpError, GetWebhookDeliveriesHttpResponse, GetWebhookDeliveryHttpError, GetWebhookDeliveryHttpResponse, GetWebhookEventTypesHttpError, GetWebhookEventTypesHttpResponse, GetWebhookHttpError, GetWebhookHttpResponse, GetWebhooksHttpError, GetWebhooksHttpResponse, Link, PatchWebhookHttpError, PatchWebhookHttpResponse, ResendWebhookDeliveryHttpError, ResendWebhookDeliveryHttpResponse, UpdateWebhookHttpError, UpdateWebhookHttpResponse, WebhookBase, WebhookList, WebhookPatch, WebhookPost, WebhookResponse, WebhookResponseBase, WebhooksAPI, clearCache, createWebhook, webhooksExport as default, deleteWebhook, getWebhook, getWebhookDeliveries, getWebhookDelivery, getWebhookEventTypes, getWebhooks, patchWebhook, resendWebhookDelivery, updateWebhook };
package/webhooks.js CHANGED
@@ -1,6 +1,5 @@
1
- import "./chunks/utils-BnC4lrlq.js";
2
- import "./chunks/public-runtime-modules-Dwjzb3l8.js";
3
- import { n as invokeFetch, t as clearApiCache } from "./chunks/invoke-fetch-PcVIxLW4.js";
1
+ import "./chunks/public-runtime-modules-BqxAMJ9M.js";
2
+ import { n as invokeFetch, t as clearApiCache } from "./chunks/invoke-fetch-CckTK7bh.js";
4
3
 
5
4
  //#region src/public/rest/webhooks.ts
6
5
  /**