@mobilerun/sdk 5.1.0 → 5.2.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/CHANGELOG.md +41 -0
- package/client.d.mts +4 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -16
- package/client.d.ts.map +1 -1
- package/client.js +0 -12
- package/client.js.map +1 -1
- package/client.mjs +1 -13
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +12 -7
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +12 -7
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +0 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +0 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/carriers.d.mts +0 -3
- package/resources/carriers.d.mts.map +1 -1
- package/resources/carriers.d.ts +0 -3
- package/resources/carriers.d.ts.map +1 -1
- package/resources/carriers.js +0 -3
- package/resources/carriers.js.map +1 -1
- package/resources/carriers.mjs +0 -3
- package/resources/carriers.mjs.map +1 -1
- package/resources/connect/countries.d.mts +8 -3
- package/resources/connect/countries.d.mts.map +1 -1
- package/resources/connect/countries.d.ts +8 -3
- package/resources/connect/countries.d.ts.map +1 -1
- package/resources/connect/countries.js +6 -1
- package/resources/connect/countries.js.map +1 -1
- package/resources/connect/countries.mjs +6 -1
- package/resources/connect/countries.mjs.map +1 -1
- package/resources/connect/proxies.d.mts +11 -9
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +11 -9
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +7 -5
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +7 -5
- package/resources/connect/proxies.mjs.map +1 -1
- package/resources/connect/users.d.mts +7 -2
- package/resources/connect/users.d.mts.map +1 -1
- package/resources/connect/users.d.ts +7 -2
- package/resources/connect/users.d.ts.map +1 -1
- package/resources/connect/users.js +7 -2
- package/resources/connect/users.js.map +1 -1
- package/resources/connect/users.mjs +7 -2
- package/resources/connect/users.mjs.map +1 -1
- package/resources/credentials/credentials.d.mts +3 -4
- package/resources/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/credentials.d.ts +3 -4
- package/resources/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/credentials.js +3 -4
- package/resources/credentials/credentials.js.map +1 -1
- package/resources/credentials/credentials.mjs +3 -4
- package/resources/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.mts +14 -7
- package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.ts +14 -7
- package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.js +7 -6
- package/resources/credentials/packages/credentials/credentials.js.map +1 -1
- package/resources/credentials/packages/credentials/credentials.mjs +7 -6
- package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.mts +8 -6
- package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.ts +8 -6
- package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/fields.js +8 -6
- package/resources/credentials/packages/credentials/fields.js.map +1 -1
- package/resources/credentials/packages/credentials/fields.mjs +8 -6
- package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
- package/resources/credentials/packages/packages.d.mts +5 -5
- package/resources/credentials/packages/packages.d.mts.map +1 -1
- package/resources/credentials/packages/packages.d.ts +5 -5
- package/resources/credentials/packages/packages.d.ts.map +1 -1
- package/resources/credentials/packages/packages.js +5 -5
- package/resources/credentials/packages/packages.js.map +1 -1
- package/resources/credentials/packages/packages.mjs +5 -5
- package/resources/credentials/packages/packages.mjs.map +1 -1
- package/resources/devices/actions.d.mts +10 -5
- package/resources/devices/actions.d.mts.map +1 -1
- package/resources/devices/actions.d.ts +10 -5
- package/resources/devices/actions.d.ts.map +1 -1
- package/resources/devices/actions.js +10 -5
- package/resources/devices/actions.js.map +1 -1
- package/resources/devices/actions.mjs +10 -5
- package/resources/devices/actions.mjs.map +1 -1
- package/resources/devices/apps.d.mts +38 -5
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +38 -5
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/apps.js +21 -5
- package/resources/devices/apps.js.map +1 -1
- package/resources/devices/apps.mjs +21 -5
- package/resources/devices/apps.mjs.map +1 -1
- package/resources/devices/devices.d.mts +76 -14
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +76 -14
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +28 -12
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +28 -12
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/esim.d.mts +6 -4
- package/resources/devices/esim.d.mts.map +1 -1
- package/resources/devices/esim.d.ts +6 -4
- package/resources/devices/esim.d.ts.map +1 -1
- package/resources/devices/esim.js +6 -4
- package/resources/devices/esim.js.map +1 -1
- package/resources/devices/esim.mjs +6 -4
- package/resources/devices/esim.mjs.map +1 -1
- package/resources/devices/files.d.mts +7 -4
- package/resources/devices/files.d.mts.map +1 -1
- package/resources/devices/files.d.ts +7 -4
- package/resources/devices/files.d.ts.map +1 -1
- package/resources/devices/files.js +7 -4
- package/resources/devices/files.js.map +1 -1
- package/resources/devices/files.mjs +7 -4
- package/resources/devices/files.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +5 -3
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +5 -3
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/keyboard.js +5 -3
- package/resources/devices/keyboard.js.map +1 -1
- package/resources/devices/keyboard.mjs +5 -3
- package/resources/devices/keyboard.mjs.map +1 -1
- package/resources/devices/language.d.mts +4 -2
- package/resources/devices/language.d.mts.map +1 -1
- package/resources/devices/language.d.ts +4 -2
- package/resources/devices/language.d.ts.map +1 -1
- package/resources/devices/language.js +4 -2
- package/resources/devices/language.js.map +1 -1
- package/resources/devices/language.mjs +4 -2
- package/resources/devices/language.mjs.map +1 -1
- package/resources/devices/location.d.mts +4 -2
- package/resources/devices/location.d.mts.map +1 -1
- package/resources/devices/location.d.ts +4 -2
- package/resources/devices/location.d.ts.map +1 -1
- package/resources/devices/location.js +4 -2
- package/resources/devices/location.js.map +1 -1
- package/resources/devices/location.mjs +4 -2
- package/resources/devices/location.mjs.map +1 -1
- package/resources/devices/packages.d.mts +2 -1
- package/resources/devices/packages.d.mts.map +1 -1
- package/resources/devices/packages.d.ts +2 -1
- package/resources/devices/packages.d.ts.map +1 -1
- package/resources/devices/packages.js +2 -1
- package/resources/devices/packages.js.map +1 -1
- package/resources/devices/packages.mjs +2 -1
- package/resources/devices/packages.mjs.map +1 -1
- package/resources/devices/proxy.d.mts +29 -3
- package/resources/devices/proxy.d.mts.map +1 -1
- package/resources/devices/proxy.d.ts +29 -3
- package/resources/devices/proxy.d.ts.map +1 -1
- package/resources/devices/proxy.js +7 -3
- package/resources/devices/proxy.js.map +1 -1
- package/resources/devices/proxy.mjs +7 -3
- package/resources/devices/proxy.mjs.map +1 -1
- package/resources/devices/state.d.mts +7 -3
- package/resources/devices/state.d.mts.map +1 -1
- package/resources/devices/state.d.ts +7 -3
- package/resources/devices/state.d.ts.map +1 -1
- package/resources/devices/state.js +6 -3
- package/resources/devices/state.js.map +1 -1
- package/resources/devices/state.mjs +6 -3
- package/resources/devices/state.mjs.map +1 -1
- package/resources/devices/tasks.d.mts +4 -12
- package/resources/devices/tasks.d.mts.map +1 -1
- package/resources/devices/tasks.d.ts +4 -12
- package/resources/devices/tasks.d.ts.map +1 -1
- package/resources/devices/tasks.js +2 -4
- package/resources/devices/tasks.js.map +1 -1
- package/resources/devices/tasks.mjs +2 -4
- package/resources/devices/tasks.mjs.map +1 -1
- package/resources/devices/timezone.d.mts +4 -2
- package/resources/devices/timezone.d.mts.map +1 -1
- package/resources/devices/timezone.d.ts +4 -2
- package/resources/devices/timezone.d.ts.map +1 -1
- package/resources/devices/timezone.js +4 -2
- package/resources/devices/timezone.js.map +1 -1
- package/resources/devices/timezone.mjs +4 -2
- package/resources/devices/timezone.mjs.map +1 -1
- package/resources/hooks.d.mts +0 -239
- package/resources/hooks.d.mts.map +1 -1
- package/resources/hooks.d.ts +0 -239
- package/resources/hooks.d.ts.map +1 -1
- package/resources/hooks.js +0 -57
- package/resources/hooks.js.map +1 -1
- package/resources/hooks.mjs +0 -57
- package/resources/hooks.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/profiles.d.mts +69 -6
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +69 -6
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/proxies.d.mts +14 -8
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +14 -8
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +14 -8
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +14 -8
- package/resources/proxies.mjs.map +1 -1
- package/resources/shared.d.mts +14 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +14 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/tasks/tasks.d.mts +159 -64
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +159 -64
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js +10 -2
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs +10 -2
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/webhooks/deliveries.d.mts +38 -4
- package/resources/webhooks/deliveries.d.mts.map +1 -1
- package/resources/webhooks/deliveries.d.ts +38 -4
- package/resources/webhooks/deliveries.d.ts.map +1 -1
- package/resources/webhooks/deliveries.js +15 -4
- package/resources/webhooks/deliveries.js.map +1 -1
- package/resources/webhooks/deliveries.mjs +15 -4
- package/resources/webhooks/deliveries.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +67 -9
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +67 -9
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +26 -8
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +26 -8
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/workflows/action-catalog.d.mts +5 -2
- package/resources/workflows/action-catalog.d.mts.map +1 -1
- package/resources/workflows/action-catalog.d.ts +5 -2
- package/resources/workflows/action-catalog.d.ts.map +1 -1
- package/resources/workflows/action-catalog.js +5 -2
- package/resources/workflows/action-catalog.js.map +1 -1
- package/resources/workflows/action-catalog.mjs +5 -2
- package/resources/workflows/action-catalog.mjs.map +1 -1
- package/resources/workflows/actions/actions.d.mts +15 -5
- package/resources/workflows/actions/actions.d.mts.map +1 -1
- package/resources/workflows/actions/actions.d.ts +15 -5
- package/resources/workflows/actions/actions.d.ts.map +1 -1
- package/resources/workflows/actions/actions.js +10 -5
- package/resources/workflows/actions/actions.js.map +1 -1
- package/resources/workflows/actions/actions.mjs +10 -5
- package/resources/workflows/actions/actions.mjs.map +1 -1
- package/resources/workflows/actions/services.d.mts +5 -2
- package/resources/workflows/actions/services.d.mts.map +1 -1
- package/resources/workflows/actions/services.d.ts +5 -2
- package/resources/workflows/actions/services.d.ts.map +1 -1
- package/resources/workflows/actions/services.js +5 -2
- package/resources/workflows/actions/services.js.map +1 -1
- package/resources/workflows/actions/services.mjs +5 -2
- package/resources/workflows/actions/services.mjs.map +1 -1
- package/resources/workflows/events/catalog.d.mts +0 -51
- package/resources/workflows/events/catalog.d.mts.map +1 -1
- package/resources/workflows/events/catalog.d.ts +0 -51
- package/resources/workflows/events/catalog.d.ts.map +1 -1
- package/resources/workflows/events/catalog.js +0 -12
- package/resources/workflows/events/catalog.js.map +1 -1
- package/resources/workflows/events/catalog.mjs +0 -12
- package/resources/workflows/events/catalog.mjs.map +1 -1
- package/resources/workflows/events/events.d.mts +10 -20
- package/resources/workflows/events/events.d.mts.map +1 -1
- package/resources/workflows/events/events.d.ts +10 -20
- package/resources/workflows/events/events.d.ts.map +1 -1
- package/resources/workflows/events/events.js.map +1 -1
- package/resources/workflows/events/events.mjs +1 -1
- package/resources/workflows/events/events.mjs.map +1 -1
- package/resources/workflows/events/index.d.mts +1 -1
- package/resources/workflows/events/index.d.mts.map +1 -1
- package/resources/workflows/events/index.d.ts +1 -1
- package/resources/workflows/events/index.d.ts.map +1 -1
- package/resources/workflows/events/index.js.map +1 -1
- package/resources/workflows/events/index.mjs +1 -1
- package/resources/workflows/events/index.mjs.map +1 -1
- package/resources/workflows/executions.d.mts +43 -5
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +43 -5
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +8 -3
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +8 -3
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +12 -4
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +12 -4
- package/resources/workflows/flows/actions.d.ts.map +1 -1
- package/resources/workflows/flows/actions.js +12 -4
- package/resources/workflows/flows/actions.js.map +1 -1
- package/resources/workflows/flows/actions.mjs +12 -4
- package/resources/workflows/flows/actions.mjs.map +1 -1
- package/resources/workflows/flows/flows.d.mts +33 -7
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +33 -7
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +18 -6
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +18 -6
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +75 -63
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +75 -63
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/triggers.js +12 -5
- package/resources/workflows/triggers.js.map +1 -1
- package/resources/workflows/triggers.mjs +12 -5
- package/resources/workflows/triggers.mjs.map +1 -1
- package/resources/workflows/workflows.d.mts +15 -0
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +15 -0
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +8 -46
- package/src/resources/apps.ts +16 -8
- package/src/resources/carriers.ts +0 -3
- package/src/resources/connect/countries.ts +8 -3
- package/src/resources/connect/proxies.ts +11 -9
- package/src/resources/connect/users.ts +7 -2
- package/src/resources/credentials/credentials.ts +3 -4
- package/src/resources/credentials/packages/credentials/credentials.ts +16 -7
- package/src/resources/credentials/packages/credentials/fields.ts +8 -6
- package/src/resources/credentials/packages/packages.ts +5 -5
- package/src/resources/devices/actions.ts +10 -5
- package/src/resources/devices/apps.ts +41 -5
- package/src/resources/devices/devices.ts +97 -15
- package/src/resources/devices/esim.ts +6 -4
- package/src/resources/devices/files.ts +7 -4
- package/src/resources/devices/keyboard.ts +5 -3
- package/src/resources/devices/language.ts +4 -2
- package/src/resources/devices/location.ts +4 -2
- package/src/resources/devices/packages.ts +2 -1
- package/src/resources/devices/proxy.ts +32 -3
- package/src/resources/devices/state.ts +8 -3
- package/src/resources/devices/tasks.ts +4 -15
- package/src/resources/devices/timezone.ts +4 -2
- package/src/resources/hooks.ts +1 -333
- package/src/resources/index.ts +4 -17
- package/src/resources/profiles.ts +105 -6
- package/src/resources/proxies.ts +14 -8
- package/src/resources/shared.ts +17 -0
- package/src/resources/tasks/tasks.ts +198 -78
- package/src/resources/webhooks/deliveries.ts +43 -4
- package/src/resources/webhooks/webhooks.ts +79 -9
- package/src/resources/workflows/action-catalog.ts +5 -2
- package/src/resources/workflows/actions/actions.ts +17 -5
- package/src/resources/workflows/actions/services.ts +5 -2
- package/src/resources/workflows/events/catalog.ts +1 -84
- package/src/resources/workflows/events/events.ts +14 -36
- package/src/resources/workflows/events/index.ts +1 -7
- package/src/resources/workflows/executions.ts +50 -5
- package/src/resources/workflows/flows/actions.ts +12 -4
- package/src/resources/workflows/flows/flows.ts +41 -7
- package/src/resources/workflows/triggers.ts +92 -75
- package/src/resources/workflows/workflows.ts +21 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,7 +4,10 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
5
|
export declare class Deliveries extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Returns a paginated feed of webhook deliveries across all of your subscriptions,
|
|
8
|
+
* with the originating endpoint URL included on each record. Results can be
|
|
9
|
+
* filtered by delivery status (pending, success, skipped, or dead), by a `since`
|
|
10
|
+
* timestamp, and by `eventId` (exact match against the originating event id).
|
|
8
11
|
*
|
|
9
12
|
* @example
|
|
10
13
|
* ```ts
|
|
@@ -13,7 +16,10 @@ export declare class Deliveries extends APIResource {
|
|
|
13
16
|
*/
|
|
14
17
|
list(query?: DeliveryListParams | null | undefined, options?: RequestOptions): APIPromise<DeliveryListResponse>;
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
19
|
+
* Returns a paginated list of deliveries for a single webhook subscription,
|
|
20
|
+
* identified by its id. Each record reports the event, delivery status, attempt
|
|
21
|
+
* count, and the last response code or error. Results can be filtered by `eventId`
|
|
22
|
+
* (exact match against the originating event id).
|
|
17
23
|
*
|
|
18
24
|
* @example
|
|
19
25
|
* ```ts
|
|
@@ -25,7 +31,9 @@ export declare class Deliveries extends APIResource {
|
|
|
25
31
|
*/
|
|
26
32
|
listForWebhook(id: string, query?: DeliveryListForWebhookParams | null | undefined, options?: RequestOptions): APIPromise<DeliveryListForWebhookResponse>;
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
34
|
+
* Returns a single delivery for a webhook subscription along with the full list of
|
|
35
|
+
* captured attempt records. Each attempt includes the request URL, method, headers
|
|
36
|
+
* and body, whether it was signed, and the response status, headers, and snippet.
|
|
29
37
|
*
|
|
30
38
|
* @example
|
|
31
39
|
* ```ts
|
|
@@ -38,7 +46,10 @@ export declare class Deliveries extends APIResource {
|
|
|
38
46
|
*/
|
|
39
47
|
retrieveAttempts(deliveryID: string, params: DeliveryRetrieveAttemptsParams, options?: RequestOptions): APIPromise<DeliveryRetrieveAttemptsResponse>;
|
|
40
48
|
/**
|
|
41
|
-
*
|
|
49
|
+
* Returns aggregate delivery statistics across all of your webhooks, including the
|
|
50
|
+
* total count, a breakdown by status (pending, success, skipped, dead), and the
|
|
51
|
+
* overall success rate. An optional `since` timestamp narrows the reporting
|
|
52
|
+
* window.
|
|
42
53
|
*
|
|
43
54
|
* @example
|
|
44
55
|
* ```ts
|
|
@@ -57,6 +68,11 @@ export declare namespace DeliveryListResponse {
|
|
|
57
68
|
attempts: number;
|
|
58
69
|
completedAt: string | null;
|
|
59
70
|
createdAt: string;
|
|
71
|
+
/**
|
|
72
|
+
* Id of the parent endpoint's creator. Null when the endpoint row is gone or its
|
|
73
|
+
* creator was never recorded.
|
|
74
|
+
*/
|
|
75
|
+
createdBy: string | null;
|
|
60
76
|
durationMs: number | null;
|
|
61
77
|
endpointId: string;
|
|
62
78
|
endpointUrl: string;
|
|
@@ -80,6 +96,11 @@ export declare namespace DeliveryListForWebhookResponse {
|
|
|
80
96
|
attempts: number;
|
|
81
97
|
completedAt: string | null;
|
|
82
98
|
createdAt: string;
|
|
99
|
+
/**
|
|
100
|
+
* Id of the parent endpoint's creator. Null when the endpoint row is gone or its
|
|
101
|
+
* creator was never recorded.
|
|
102
|
+
*/
|
|
103
|
+
createdBy: string | null;
|
|
83
104
|
durationMs: number | null;
|
|
84
105
|
endpointId: string;
|
|
85
106
|
eventId: string;
|
|
@@ -101,6 +122,11 @@ export declare namespace DeliveryRetrieveAttemptsResponse {
|
|
|
101
122
|
attempts: Array<Data.Attempt>;
|
|
102
123
|
completedAt: string | null;
|
|
103
124
|
createdAt: string;
|
|
125
|
+
/**
|
|
126
|
+
* Id of the parent endpoint's creator. Null when the endpoint row is gone or its
|
|
127
|
+
* creator was never recorded.
|
|
128
|
+
*/
|
|
129
|
+
createdBy: string | null;
|
|
104
130
|
durationMs: number | null;
|
|
105
131
|
endpointId: string;
|
|
106
132
|
eventId: string;
|
|
@@ -152,12 +178,20 @@ export declare namespace DeliveryStatsResponse {
|
|
|
152
178
|
}
|
|
153
179
|
}
|
|
154
180
|
export interface DeliveryListParams {
|
|
181
|
+
/**
|
|
182
|
+
* Exact text match against the originating event id.
|
|
183
|
+
*/
|
|
184
|
+
eventId?: string;
|
|
155
185
|
page?: number;
|
|
156
186
|
pageSize?: number;
|
|
157
187
|
since?: string;
|
|
158
188
|
status?: 'pending' | 'success' | 'skipped' | 'dead';
|
|
159
189
|
}
|
|
160
190
|
export interface DeliveryListForWebhookParams {
|
|
191
|
+
/**
|
|
192
|
+
* Exact text match against the originating event id.
|
|
193
|
+
*/
|
|
194
|
+
eventId?: string;
|
|
161
195
|
page?: number;
|
|
162
196
|
pageSize?: number;
|
|
163
197
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/deliveries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAA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UAAU,CAAC;IAClC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -6,7 +6,10 @@ const resource_1 = require("../../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
7
|
class Deliveries extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Returns a paginated feed of webhook deliveries across all of your subscriptions,
|
|
10
|
+
* with the originating endpoint URL included on each record. Results can be
|
|
11
|
+
* filtered by delivery status (pending, success, skipped, or dead), by a `since`
|
|
12
|
+
* timestamp, and by `eventId` (exact match against the originating event id).
|
|
10
13
|
*
|
|
11
14
|
* @example
|
|
12
15
|
* ```ts
|
|
@@ -17,7 +20,10 @@ class Deliveries extends resource_1.APIResource {
|
|
|
17
20
|
return this._client.get('/webhooks/deliveries', { query, ...options });
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* Returns a paginated list of deliveries for a single webhook subscription,
|
|
24
|
+
* identified by its id. Each record reports the event, delivery status, attempt
|
|
25
|
+
* count, and the last response code or error. Results can be filtered by `eventId`
|
|
26
|
+
* (exact match against the originating event id).
|
|
21
27
|
*
|
|
22
28
|
* @example
|
|
23
29
|
* ```ts
|
|
@@ -31,7 +37,9 @@ class Deliveries extends resource_1.APIResource {
|
|
|
31
37
|
return this._client.get((0, path_1.path) `/webhooks/${id}/deliveries`, { query, ...options });
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* Returns a single delivery for a webhook subscription along with the full list of
|
|
41
|
+
* captured attempt records. Each attempt includes the request URL, method, headers
|
|
42
|
+
* and body, whether it was signed, and the response status, headers, and snippet.
|
|
35
43
|
*
|
|
36
44
|
* @example
|
|
37
45
|
* ```ts
|
|
@@ -47,7 +55,10 @@ class Deliveries extends resource_1.APIResource {
|
|
|
47
55
|
return this._client.get((0, path_1.path) `/webhooks/${id}/deliveries/${deliveryID}`, options);
|
|
48
56
|
}
|
|
49
57
|
/**
|
|
50
|
-
*
|
|
58
|
+
* Returns aggregate delivery statistics across all of your webhooks, including the
|
|
59
|
+
* total count, a breakdown by status (pending, success, skipped, dead), and the
|
|
60
|
+
* overall success rate. An optional `since` timestamp narrows the reporting
|
|
61
|
+
* window.
|
|
51
62
|
*
|
|
52
63
|
* @example
|
|
53
64
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/resources/webhooks/deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IACzC
|
|
1
|
+
{"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/resources/webhooks/deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,EAAU,EACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CACd,UAAkB,EAClB,MAAsC,EACtC,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CACH,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAjFD,gCAiFC"}
|
|
@@ -3,7 +3,10 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
export class Deliveries extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns a paginated feed of webhook deliveries across all of your subscriptions,
|
|
7
|
+
* with the originating endpoint URL included on each record. Results can be
|
|
8
|
+
* filtered by delivery status (pending, success, skipped, or dead), by a `since`
|
|
9
|
+
* timestamp, and by `eventId` (exact match against the originating event id).
|
|
7
10
|
*
|
|
8
11
|
* @example
|
|
9
12
|
* ```ts
|
|
@@ -14,7 +17,10 @@ export class Deliveries extends APIResource {
|
|
|
14
17
|
return this._client.get('/webhooks/deliveries', { query, ...options });
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
|
-
*
|
|
20
|
+
* Returns a paginated list of deliveries for a single webhook subscription,
|
|
21
|
+
* identified by its id. Each record reports the event, delivery status, attempt
|
|
22
|
+
* count, and the last response code or error. Results can be filtered by `eventId`
|
|
23
|
+
* (exact match against the originating event id).
|
|
18
24
|
*
|
|
19
25
|
* @example
|
|
20
26
|
* ```ts
|
|
@@ -28,7 +34,9 @@ export class Deliveries extends APIResource {
|
|
|
28
34
|
return this._client.get(path `/webhooks/${id}/deliveries`, { query, ...options });
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
31
|
-
*
|
|
37
|
+
* Returns a single delivery for a webhook subscription along with the full list of
|
|
38
|
+
* captured attempt records. Each attempt includes the request URL, method, headers
|
|
39
|
+
* and body, whether it was signed, and the response status, headers, and snippet.
|
|
32
40
|
*
|
|
33
41
|
* @example
|
|
34
42
|
* ```ts
|
|
@@ -44,7 +52,10 @@ export class Deliveries extends APIResource {
|
|
|
44
52
|
return this._client.get(path `/webhooks/${id}/deliveries/${deliveryID}`, options);
|
|
45
53
|
}
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* Returns aggregate delivery statistics across all of your webhooks, including the
|
|
56
|
+
* total count, a breakdown by status (pending, success, skipped, dead), and the
|
|
57
|
+
* overall success rate. An optional `since` timestamp narrows the reporting
|
|
58
|
+
* window.
|
|
48
59
|
*
|
|
49
60
|
* @example
|
|
50
61
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliveries.mjs","sourceRoot":"","sources":["../../src/resources/webhooks/deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"deliveries.mjs","sourceRoot":"","sources":["../../src/resources/webhooks/deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,EAAU,EACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CACd,UAAkB,EAClB,MAAsC,EACtC,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CACH,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
|
@@ -7,7 +7,10 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Webhooks extends APIResource {
|
|
8
8
|
deliveries: DeliveriesAPI.Deliveries;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Creates a webhook subscription with a delivery URL and an optional list of event
|
|
11
|
+
* types to subscribe to (defaults to all when omitted). The response includes the
|
|
12
|
+
* generated signing secret, which is returned only once at creation time and
|
|
13
|
+
* cannot be retrieved later.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
@@ -18,7 +21,9 @@ export declare class Webhooks extends APIResource {
|
|
|
18
21
|
*/
|
|
19
22
|
create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* Returns a single webhook subscription by id, including its URL, subscribed event
|
|
25
|
+
* types, state, and system-observed delivery health. The signing secret is never
|
|
26
|
+
* included.
|
|
22
27
|
*
|
|
23
28
|
* @example
|
|
24
29
|
* ```ts
|
|
@@ -29,7 +34,10 @@ export declare class Webhooks extends APIResource {
|
|
|
29
34
|
*/
|
|
30
35
|
retrieve(id: string, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
* Updates a webhook subscription. Any combination of the subscribed event types,
|
|
38
|
+
* state (ACTIVE or DISABLED), and description may be changed, and at least one
|
|
39
|
+
* field must be supplied. Setting state to ACTIVE re-enables a subscription that
|
|
40
|
+
* was auto-blocked after sustained delivery failures.
|
|
33
41
|
*
|
|
34
42
|
* @example
|
|
35
43
|
* ```ts
|
|
@@ -40,7 +48,10 @@ export declare class Webhooks extends APIResource {
|
|
|
40
48
|
*/
|
|
41
49
|
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
|
|
42
50
|
/**
|
|
43
|
-
*
|
|
51
|
+
* Returns a paginated list of your webhook subscriptions, optionally filtered by
|
|
52
|
+
* status (active, failing, blocked, or disabled) and/or by `search` (a
|
|
53
|
+
* case-insensitive substring match against the URL or description). The response
|
|
54
|
+
* also includes per-status counts across all of your subscriptions.
|
|
44
55
|
*
|
|
45
56
|
* @example
|
|
46
57
|
* ```ts
|
|
@@ -49,7 +60,8 @@ export declare class Webhooks extends APIResource {
|
|
|
49
60
|
*/
|
|
50
61
|
list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
51
62
|
/**
|
|
52
|
-
*
|
|
63
|
+
* Deletes a webhook subscription so it stops receiving deliveries. Returns 204 No
|
|
64
|
+
* Content on success.
|
|
53
65
|
*
|
|
54
66
|
* @example
|
|
55
67
|
* ```ts
|
|
@@ -60,7 +72,9 @@ export declare class Webhooks extends APIResource {
|
|
|
60
72
|
*/
|
|
61
73
|
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
62
74
|
/**
|
|
63
|
-
*
|
|
75
|
+
* Returns the catalog of event types that webhook subscriptions can subscribe to,
|
|
76
|
+
* grouped by source. Use the returned type identifiers as the `eventTypes` values
|
|
77
|
+
* when creating or updating a webhook.
|
|
64
78
|
*
|
|
65
79
|
* @example
|
|
66
80
|
* ```ts
|
|
@@ -69,7 +83,9 @@ export declare class Webhooks extends APIResource {
|
|
|
69
83
|
*/
|
|
70
84
|
eventTypes(options?: RequestOptions): APIPromise<WebhookEventTypesResponse>;
|
|
71
85
|
/**
|
|
72
|
-
*
|
|
86
|
+
* Generates a new signing secret for the webhook subscription and returns it once
|
|
87
|
+
* in the response. The previous secret is replaced immediately, so any signature
|
|
88
|
+
* verification on your endpoint must be updated to use the new value.
|
|
73
89
|
*
|
|
74
90
|
* @example
|
|
75
91
|
* ```ts
|
|
@@ -80,7 +96,9 @@ export declare class Webhooks extends APIResource {
|
|
|
80
96
|
*/
|
|
81
97
|
rotateSecret(id: string, options?: RequestOptions): APIPromise<WebhookRotateSecretResponse>;
|
|
82
98
|
/**
|
|
83
|
-
*
|
|
99
|
+
* Sends a single test payload to the webhook subscription URL to verify
|
|
100
|
+
* connectivity. The response reports whether the attempt succeeded along with the
|
|
101
|
+
* returned HTTP status code or error, if any.
|
|
84
102
|
*
|
|
85
103
|
* @example
|
|
86
104
|
* ```ts
|
|
@@ -100,6 +118,10 @@ export declare namespace WebhookCreateResponse {
|
|
|
100
118
|
blockedAt: string | null;
|
|
101
119
|
blockedReason: string | null;
|
|
102
120
|
createdAt: string;
|
|
121
|
+
/**
|
|
122
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
123
|
+
*/
|
|
124
|
+
createdBy: string | null;
|
|
103
125
|
description: string | null;
|
|
104
126
|
eventTypes: Array<string>;
|
|
105
127
|
/**
|
|
@@ -126,6 +148,10 @@ export declare namespace WebhookRetrieveResponse {
|
|
|
126
148
|
blockedAt: string | null;
|
|
127
149
|
blockedReason: string | null;
|
|
128
150
|
createdAt: string;
|
|
151
|
+
/**
|
|
152
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
153
|
+
*/
|
|
154
|
+
createdBy: string | null;
|
|
129
155
|
description: string | null;
|
|
130
156
|
eventTypes: Array<string>;
|
|
131
157
|
/**
|
|
@@ -148,6 +174,10 @@ export declare namespace WebhookUpdateResponse {
|
|
|
148
174
|
blockedAt: string | null;
|
|
149
175
|
blockedReason: string | null;
|
|
150
176
|
createdAt: string;
|
|
177
|
+
/**
|
|
178
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
179
|
+
*/
|
|
180
|
+
createdBy: string | null;
|
|
151
181
|
description: string | null;
|
|
152
182
|
eventTypes: Array<string>;
|
|
153
183
|
/**
|
|
@@ -179,6 +209,10 @@ export declare namespace WebhookListResponse {
|
|
|
179
209
|
blockedAt: string | null;
|
|
180
210
|
blockedReason: string | null;
|
|
181
211
|
createdAt: string;
|
|
212
|
+
/**
|
|
213
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
214
|
+
*/
|
|
215
|
+
createdBy: string | null;
|
|
182
216
|
description: string | null;
|
|
183
217
|
eventTypes: Array<string>;
|
|
184
218
|
/**
|
|
@@ -197,7 +231,7 @@ export interface WebhookEventTypesResponse {
|
|
|
197
231
|
}
|
|
198
232
|
export declare namespace WebhookEventTypesResponse {
|
|
199
233
|
interface Data {
|
|
200
|
-
schemaVersion:
|
|
234
|
+
schemaVersion: 1;
|
|
201
235
|
sources: Array<Data.Source>;
|
|
202
236
|
}
|
|
203
237
|
namespace Data {
|
|
@@ -208,8 +242,16 @@ export declare namespace WebhookEventTypesResponse {
|
|
|
208
242
|
namespace Source {
|
|
209
243
|
interface Event {
|
|
210
244
|
description: string;
|
|
245
|
+
surfaces: Event.Surfaces;
|
|
211
246
|
type: string;
|
|
212
247
|
}
|
|
248
|
+
namespace Event {
|
|
249
|
+
interface Surfaces {
|
|
250
|
+
feed: boolean;
|
|
251
|
+
toast: boolean;
|
|
252
|
+
webhook: boolean;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
213
255
|
}
|
|
214
256
|
}
|
|
215
257
|
}
|
|
@@ -222,6 +264,10 @@ export declare namespace WebhookRotateSecretResponse {
|
|
|
222
264
|
blockedAt: string | null;
|
|
223
265
|
blockedReason: string | null;
|
|
224
266
|
createdAt: string;
|
|
267
|
+
/**
|
|
268
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
269
|
+
*/
|
|
270
|
+
createdBy: string | null;
|
|
225
271
|
description: string | null;
|
|
226
272
|
eventTypes: Array<string>;
|
|
227
273
|
/**
|
|
@@ -260,8 +306,20 @@ export interface WebhookUpdateParams {
|
|
|
260
306
|
state?: 'ACTIVE' | 'DISABLED';
|
|
261
307
|
}
|
|
262
308
|
export interface WebhookListParams {
|
|
309
|
+
/**
|
|
310
|
+
* Only include webhooks created by this actor id. Mutually exclusive with `mine`.
|
|
311
|
+
*/
|
|
312
|
+
createdBy?: string;
|
|
313
|
+
/**
|
|
314
|
+
* When true, only include webhooks created by you (not just owned by your org).
|
|
315
|
+
*/
|
|
316
|
+
mine?: 'true' | 'false';
|
|
263
317
|
page?: number;
|
|
264
318
|
pageSize?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Case-insensitive substring match against the URL or description.
|
|
321
|
+
*/
|
|
322
|
+
search?: string;
|
|
265
323
|
status?: 'active' | 'failing' | 'blocked' | 'disabled';
|
|
266
324
|
}
|
|
267
325
|
export declare namespace Webhooks {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAA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KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -7,7 +7,10 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class Webhooks extends APIResource {
|
|
8
8
|
deliveries: DeliveriesAPI.Deliveries;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Creates a webhook subscription with a delivery URL and an optional list of event
|
|
11
|
+
* types to subscribe to (defaults to all when omitted). The response includes the
|
|
12
|
+
* generated signing secret, which is returned only once at creation time and
|
|
13
|
+
* cannot be retrieved later.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
@@ -18,7 +21,9 @@ export declare class Webhooks extends APIResource {
|
|
|
18
21
|
*/
|
|
19
22
|
create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* Returns a single webhook subscription by id, including its URL, subscribed event
|
|
25
|
+
* types, state, and system-observed delivery health. The signing secret is never
|
|
26
|
+
* included.
|
|
22
27
|
*
|
|
23
28
|
* @example
|
|
24
29
|
* ```ts
|
|
@@ -29,7 +34,10 @@ export declare class Webhooks extends APIResource {
|
|
|
29
34
|
*/
|
|
30
35
|
retrieve(id: string, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
* Updates a webhook subscription. Any combination of the subscribed event types,
|
|
38
|
+
* state (ACTIVE or DISABLED), and description may be changed, and at least one
|
|
39
|
+
* field must be supplied. Setting state to ACTIVE re-enables a subscription that
|
|
40
|
+
* was auto-blocked after sustained delivery failures.
|
|
33
41
|
*
|
|
34
42
|
* @example
|
|
35
43
|
* ```ts
|
|
@@ -40,7 +48,10 @@ export declare class Webhooks extends APIResource {
|
|
|
40
48
|
*/
|
|
41
49
|
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
|
|
42
50
|
/**
|
|
43
|
-
*
|
|
51
|
+
* Returns a paginated list of your webhook subscriptions, optionally filtered by
|
|
52
|
+
* status (active, failing, blocked, or disabled) and/or by `search` (a
|
|
53
|
+
* case-insensitive substring match against the URL or description). The response
|
|
54
|
+
* also includes per-status counts across all of your subscriptions.
|
|
44
55
|
*
|
|
45
56
|
* @example
|
|
46
57
|
* ```ts
|
|
@@ -49,7 +60,8 @@ export declare class Webhooks extends APIResource {
|
|
|
49
60
|
*/
|
|
50
61
|
list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
51
62
|
/**
|
|
52
|
-
*
|
|
63
|
+
* Deletes a webhook subscription so it stops receiving deliveries. Returns 204 No
|
|
64
|
+
* Content on success.
|
|
53
65
|
*
|
|
54
66
|
* @example
|
|
55
67
|
* ```ts
|
|
@@ -60,7 +72,9 @@ export declare class Webhooks extends APIResource {
|
|
|
60
72
|
*/
|
|
61
73
|
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
62
74
|
/**
|
|
63
|
-
*
|
|
75
|
+
* Returns the catalog of event types that webhook subscriptions can subscribe to,
|
|
76
|
+
* grouped by source. Use the returned type identifiers as the `eventTypes` values
|
|
77
|
+
* when creating or updating a webhook.
|
|
64
78
|
*
|
|
65
79
|
* @example
|
|
66
80
|
* ```ts
|
|
@@ -69,7 +83,9 @@ export declare class Webhooks extends APIResource {
|
|
|
69
83
|
*/
|
|
70
84
|
eventTypes(options?: RequestOptions): APIPromise<WebhookEventTypesResponse>;
|
|
71
85
|
/**
|
|
72
|
-
*
|
|
86
|
+
* Generates a new signing secret for the webhook subscription and returns it once
|
|
87
|
+
* in the response. The previous secret is replaced immediately, so any signature
|
|
88
|
+
* verification on your endpoint must be updated to use the new value.
|
|
73
89
|
*
|
|
74
90
|
* @example
|
|
75
91
|
* ```ts
|
|
@@ -80,7 +96,9 @@ export declare class Webhooks extends APIResource {
|
|
|
80
96
|
*/
|
|
81
97
|
rotateSecret(id: string, options?: RequestOptions): APIPromise<WebhookRotateSecretResponse>;
|
|
82
98
|
/**
|
|
83
|
-
*
|
|
99
|
+
* Sends a single test payload to the webhook subscription URL to verify
|
|
100
|
+
* connectivity. The response reports whether the attempt succeeded along with the
|
|
101
|
+
* returned HTTP status code or error, if any.
|
|
84
102
|
*
|
|
85
103
|
* @example
|
|
86
104
|
* ```ts
|
|
@@ -100,6 +118,10 @@ export declare namespace WebhookCreateResponse {
|
|
|
100
118
|
blockedAt: string | null;
|
|
101
119
|
blockedReason: string | null;
|
|
102
120
|
createdAt: string;
|
|
121
|
+
/**
|
|
122
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
123
|
+
*/
|
|
124
|
+
createdBy: string | null;
|
|
103
125
|
description: string | null;
|
|
104
126
|
eventTypes: Array<string>;
|
|
105
127
|
/**
|
|
@@ -126,6 +148,10 @@ export declare namespace WebhookRetrieveResponse {
|
|
|
126
148
|
blockedAt: string | null;
|
|
127
149
|
blockedReason: string | null;
|
|
128
150
|
createdAt: string;
|
|
151
|
+
/**
|
|
152
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
153
|
+
*/
|
|
154
|
+
createdBy: string | null;
|
|
129
155
|
description: string | null;
|
|
130
156
|
eventTypes: Array<string>;
|
|
131
157
|
/**
|
|
@@ -148,6 +174,10 @@ export declare namespace WebhookUpdateResponse {
|
|
|
148
174
|
blockedAt: string | null;
|
|
149
175
|
blockedReason: string | null;
|
|
150
176
|
createdAt: string;
|
|
177
|
+
/**
|
|
178
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
179
|
+
*/
|
|
180
|
+
createdBy: string | null;
|
|
151
181
|
description: string | null;
|
|
152
182
|
eventTypes: Array<string>;
|
|
153
183
|
/**
|
|
@@ -179,6 +209,10 @@ export declare namespace WebhookListResponse {
|
|
|
179
209
|
blockedAt: string | null;
|
|
180
210
|
blockedReason: string | null;
|
|
181
211
|
createdAt: string;
|
|
212
|
+
/**
|
|
213
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
214
|
+
*/
|
|
215
|
+
createdBy: string | null;
|
|
182
216
|
description: string | null;
|
|
183
217
|
eventTypes: Array<string>;
|
|
184
218
|
/**
|
|
@@ -197,7 +231,7 @@ export interface WebhookEventTypesResponse {
|
|
|
197
231
|
}
|
|
198
232
|
export declare namespace WebhookEventTypesResponse {
|
|
199
233
|
interface Data {
|
|
200
|
-
schemaVersion:
|
|
234
|
+
schemaVersion: 1;
|
|
201
235
|
sources: Array<Data.Source>;
|
|
202
236
|
}
|
|
203
237
|
namespace Data {
|
|
@@ -208,8 +242,16 @@ export declare namespace WebhookEventTypesResponse {
|
|
|
208
242
|
namespace Source {
|
|
209
243
|
interface Event {
|
|
210
244
|
description: string;
|
|
245
|
+
surfaces: Event.Surfaces;
|
|
211
246
|
type: string;
|
|
212
247
|
}
|
|
248
|
+
namespace Event {
|
|
249
|
+
interface Surfaces {
|
|
250
|
+
feed: boolean;
|
|
251
|
+
toast: boolean;
|
|
252
|
+
webhook: boolean;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
213
255
|
}
|
|
214
256
|
}
|
|
215
257
|
}
|
|
@@ -222,6 +264,10 @@ export declare namespace WebhookRotateSecretResponse {
|
|
|
222
264
|
blockedAt: string | null;
|
|
223
265
|
blockedReason: string | null;
|
|
224
266
|
createdAt: string;
|
|
267
|
+
/**
|
|
268
|
+
* Id of the actor who created this endpoint. Null when no creator was recorded.
|
|
269
|
+
*/
|
|
270
|
+
createdBy: string | null;
|
|
225
271
|
description: string | null;
|
|
226
272
|
eventTypes: Array<string>;
|
|
227
273
|
/**
|
|
@@ -260,8 +306,20 @@ export interface WebhookUpdateParams {
|
|
|
260
306
|
state?: 'ACTIVE' | 'DISABLED';
|
|
261
307
|
}
|
|
262
308
|
export interface WebhookListParams {
|
|
309
|
+
/**
|
|
310
|
+
* Only include webhooks created by this actor id. Mutually exclusive with `mine`.
|
|
311
|
+
*/
|
|
312
|
+
createdBy?: string;
|
|
313
|
+
/**
|
|
314
|
+
* When true, only include webhooks created by you (not just owned by your org).
|
|
315
|
+
*/
|
|
316
|
+
mine?: 'true' | 'false';
|
|
263
317
|
page?: number;
|
|
264
318
|
pageSize?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Case-insensitive substring match against the URL or description.
|
|
321
|
+
*/
|
|
322
|
+
search?: string;
|
|
265
323
|
status?: 'active' | 'failing' | 'blocked' | 'disabled';
|
|
266
324
|
}
|
|
267
325
|
export declare namespace Webhooks {
|