@sentdm/sentdm 0.36.0 → 0.38.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 +24 -0
- package/README.md +31 -0
- package/client.d.mts +28 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -14
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +164 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +164 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +212 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +202 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +11 -1
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +3 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -0
- package/resources/contacts.d.mts +79 -626
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +79 -626
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +12 -11
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +12 -11
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +72 -346
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +72 -346
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +16 -13
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +16 -13
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +48 -129
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +48 -129
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +8 -171
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +8 -171
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +3 -42
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +3 -42
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +149 -544
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +149 -544
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +411 -1821
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +411 -1821
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +87 -532
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +87 -532
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +11 -10
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +11 -10
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +47 -437
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +47 -437
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +192 -856
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +192 -856
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +23 -19
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +23 -19
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +124 -45
- package/src/core/pagination.ts +428 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/contacts.ts +89 -726
- package/src/resources/conversations.ts +99 -427
- package/src/resources/index.ts +31 -23
- package/src/resources/me.ts +59 -148
- package/src/resources/messages.ts +8 -194
- package/src/resources/numbers.ts +3 -47
- package/src/resources/profiles/campaigns.ts +174 -673
- package/src/resources/profiles/index.ts +14 -6
- package/src/resources/profiles/profiles.ts +529 -2216
- package/src/resources/templates.ts +110 -629
- package/src/resources/users.ts +48 -505
- package/src/resources/webhooks.ts +307 -1091
- 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
package/resources/webhooks.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as WebhooksAPI from "./webhooks.mjs";
|
|
3
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { PagePromise, WebhookEventsPage, type WebhookEventsPageParams, WebhooksPage, type WebhooksPageParams } from "../core/pagination.mjs";
|
|
4
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* Delivery reports and inbound messages, pushed to you.
|
|
@@ -15,44 +16,44 @@ export declare class Webhooks extends APIResource {
|
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```ts
|
|
18
|
-
* const
|
|
19
|
+
* const apiResponseWebhook = await client.webhooks.create();
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<
|
|
22
|
+
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<APIResponseWebhook>;
|
|
22
23
|
/**
|
|
23
24
|
* Retrieves a single webhook by ID for the authenticated customer.
|
|
24
25
|
*
|
|
25
26
|
* @example
|
|
26
27
|
* ```ts
|
|
27
|
-
* const
|
|
28
|
+
* const apiResponseWebhook = await client.webhooks.retrieve(
|
|
28
29
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
29
30
|
* );
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
33
|
+
retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseWebhook>;
|
|
33
34
|
/**
|
|
34
35
|
* Updates an existing webhook for the authenticated customer.
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
38
|
-
* const
|
|
39
|
+
* const apiResponseWebhook = await client.webhooks.update(
|
|
39
40
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
40
41
|
* );
|
|
41
42
|
* ```
|
|
42
43
|
*/
|
|
43
|
-
update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<
|
|
44
|
+
update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<APIResponseWebhook>;
|
|
44
45
|
/**
|
|
45
46
|
* Retrieves a paginated list of webhooks for the authenticated customer.
|
|
46
47
|
*
|
|
47
48
|
* @example
|
|
48
49
|
* ```ts
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* }
|
|
50
|
+
* // Automatically fetches more pages as needed.
|
|
51
|
+
* for await (const webhookResponse of client.webhooks.list()) {
|
|
52
|
+
* // ...
|
|
53
|
+
* }
|
|
53
54
|
* ```
|
|
54
55
|
*/
|
|
55
|
-
list(params
|
|
56
|
+
list(params?: WebhookListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookResponsesWebhooksPage, WebhookResponse>;
|
|
56
57
|
/**
|
|
57
58
|
* Deletes a webhook for the authenticated customer.
|
|
58
59
|
*
|
|
@@ -78,13 +79,15 @@ export declare class Webhooks extends APIResource {
|
|
|
78
79
|
*
|
|
79
80
|
* @example
|
|
80
81
|
* ```ts
|
|
81
|
-
*
|
|
82
|
+
* // Automatically fetches more pages as needed.
|
|
83
|
+
* for await (const webhookListEventsResponse of client.webhooks.listEvents(
|
|
82
84
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
+
* )) {
|
|
86
|
+
* // ...
|
|
87
|
+
* }
|
|
85
88
|
* ```
|
|
86
89
|
*/
|
|
87
|
-
listEvents(id: string, params
|
|
90
|
+
listEvents(id: string, params?: WebhookListEventsParams | null | undefined, options?: RequestOptions): PagePromise<WebhookListEventsResponsesWebhookEventsPage, WebhookListEventsResponse>;
|
|
88
91
|
/**
|
|
89
92
|
* Generates a new signing secret for the specified webhook. The old secret is
|
|
90
93
|
* immediately invalidated.
|
|
@@ -113,12 +116,76 @@ export declare class Webhooks extends APIResource {
|
|
|
113
116
|
*
|
|
114
117
|
* @example
|
|
115
118
|
* ```ts
|
|
116
|
-
* const
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
+
* const apiResponseWebhook =
|
|
120
|
+
* await client.webhooks.toggleStatus(
|
|
121
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
122
|
+
* );
|
|
119
123
|
* ```
|
|
120
124
|
*/
|
|
121
|
-
toggleStatus(id: string, params: WebhookToggleStatusParams, options?: RequestOptions): APIPromise<
|
|
125
|
+
toggleStatus(id: string, params: WebhookToggleStatusParams, options?: RequestOptions): APIPromise<APIResponseWebhook>;
|
|
126
|
+
}
|
|
127
|
+
export type WebhookResponsesWebhooksPage = WebhooksPage<WebhookResponse>;
|
|
128
|
+
export type WebhookListEventsResponsesWebhookEventsPage = WebhookEventsPage<WebhookListEventsResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Request and response metadata
|
|
131
|
+
*/
|
|
132
|
+
export interface APIMeta {
|
|
133
|
+
/**
|
|
134
|
+
* Unique identifier for this request (for tracing and support)
|
|
135
|
+
*/
|
|
136
|
+
request_id?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Server timestamp when the response was generated
|
|
139
|
+
*/
|
|
140
|
+
timestamp?: string;
|
|
141
|
+
/**
|
|
142
|
+
* API version used for this request
|
|
143
|
+
*/
|
|
144
|
+
version?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Standard API response envelope for all v3 endpoints
|
|
148
|
+
*/
|
|
149
|
+
export interface APIResponseWebhook {
|
|
150
|
+
/**
|
|
151
|
+
* The response data (null if error)
|
|
152
|
+
*/
|
|
153
|
+
data?: WebhookResponse | null;
|
|
154
|
+
/**
|
|
155
|
+
* Error information
|
|
156
|
+
*/
|
|
157
|
+
error?: ErrorDetail | null;
|
|
158
|
+
/**
|
|
159
|
+
* Request and response metadata
|
|
160
|
+
*/
|
|
161
|
+
meta?: APIMeta;
|
|
162
|
+
/**
|
|
163
|
+
* Indicates whether the request was successful
|
|
164
|
+
*/
|
|
165
|
+
success?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Error information
|
|
169
|
+
*/
|
|
170
|
+
export interface ErrorDetail {
|
|
171
|
+
/**
|
|
172
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
173
|
+
*/
|
|
174
|
+
code?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Additional validation error details (field-level errors)
|
|
177
|
+
*/
|
|
178
|
+
details?: {
|
|
179
|
+
[key: string]: Array<string>;
|
|
180
|
+
} | null;
|
|
181
|
+
/**
|
|
182
|
+
* URL to documentation about this error
|
|
183
|
+
*/
|
|
184
|
+
doc_url?: string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Human-readable error message
|
|
187
|
+
*/
|
|
188
|
+
message?: string;
|
|
122
189
|
}
|
|
123
190
|
/**
|
|
124
191
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
@@ -266,6 +333,57 @@ export interface MessageEventPayload {
|
|
|
266
333
|
*/
|
|
267
334
|
updated_at?: string;
|
|
268
335
|
}
|
|
336
|
+
export interface MutationRequest {
|
|
337
|
+
/**
|
|
338
|
+
* Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
339
|
+
* for testing integrations without actual execution
|
|
340
|
+
*/
|
|
341
|
+
sandbox?: boolean;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Pagination metadata for list responses
|
|
345
|
+
*/
|
|
346
|
+
export interface PaginationMeta {
|
|
347
|
+
/**
|
|
348
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
349
|
+
*/
|
|
350
|
+
cursors?: PaginationMeta.Cursors | null;
|
|
351
|
+
/**
|
|
352
|
+
* Whether there are more pages after this one
|
|
353
|
+
*/
|
|
354
|
+
has_more?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Current page number (1-indexed)
|
|
357
|
+
*/
|
|
358
|
+
page?: number;
|
|
359
|
+
/**
|
|
360
|
+
* Number of items per page
|
|
361
|
+
*/
|
|
362
|
+
page_size?: number;
|
|
363
|
+
/**
|
|
364
|
+
* Total number of items across all pages
|
|
365
|
+
*/
|
|
366
|
+
total_count?: number;
|
|
367
|
+
/**
|
|
368
|
+
* Total number of pages
|
|
369
|
+
*/
|
|
370
|
+
total_pages?: number;
|
|
371
|
+
}
|
|
372
|
+
export declare namespace PaginationMeta {
|
|
373
|
+
/**
|
|
374
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
375
|
+
*/
|
|
376
|
+
interface Cursors {
|
|
377
|
+
/**
|
|
378
|
+
* Cursor to fetch the next page.
|
|
379
|
+
*/
|
|
380
|
+
after?: string | null;
|
|
381
|
+
/**
|
|
382
|
+
* Cursor to fetch the previous page.
|
|
383
|
+
*/
|
|
384
|
+
before?: string | null;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
269
387
|
/**
|
|
270
388
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
271
389
|
* this shape and varies only in Payload.
|
|
@@ -338,417 +456,36 @@ export interface TemplateEventPayload {
|
|
|
338
456
|
*/
|
|
339
457
|
template_name?: string;
|
|
340
458
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
data?: WebhookCreateResponse.Data | null;
|
|
349
|
-
/**
|
|
350
|
-
* Error information
|
|
351
|
-
*/
|
|
352
|
-
error?: WebhookCreateResponse.Error | null;
|
|
353
|
-
/**
|
|
354
|
-
* Request and response metadata
|
|
355
|
-
*/
|
|
356
|
-
meta?: WebhookCreateResponse.Meta;
|
|
357
|
-
/**
|
|
358
|
-
* Indicates whether the request was successful
|
|
359
|
-
*/
|
|
360
|
-
success?: boolean;
|
|
361
|
-
}
|
|
362
|
-
export declare namespace WebhookCreateResponse {
|
|
363
|
-
/**
|
|
364
|
-
* The response data (null if error)
|
|
365
|
-
*/
|
|
366
|
-
interface Data {
|
|
367
|
-
id?: string;
|
|
368
|
-
consecutive_failures?: number;
|
|
369
|
-
created_at?: string;
|
|
370
|
-
/**
|
|
371
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
372
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
373
|
-
*/
|
|
374
|
-
customer_id?: string;
|
|
375
|
-
display_name?: string;
|
|
376
|
-
endpoint_url?: string;
|
|
377
|
-
event_filters?: {
|
|
378
|
-
[key: string]: Array<string>;
|
|
379
|
-
} | null;
|
|
380
|
-
event_types?: Array<string>;
|
|
381
|
-
is_active?: boolean;
|
|
382
|
-
last_delivery_attempt_at?: string | null;
|
|
383
|
-
last_successful_delivery_at?: string | null;
|
|
384
|
-
retry_count?: number;
|
|
385
|
-
signing_secret?: string | null;
|
|
386
|
-
timeout_seconds?: number;
|
|
387
|
-
updated_at?: string | null;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Error information
|
|
391
|
-
*/
|
|
392
|
-
interface Error {
|
|
393
|
-
/**
|
|
394
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
395
|
-
*/
|
|
396
|
-
code?: string;
|
|
397
|
-
/**
|
|
398
|
-
* Additional validation error details (field-level errors)
|
|
399
|
-
*/
|
|
400
|
-
details?: {
|
|
401
|
-
[key: string]: Array<string>;
|
|
402
|
-
} | null;
|
|
403
|
-
/**
|
|
404
|
-
* URL to documentation about this error
|
|
405
|
-
*/
|
|
406
|
-
doc_url?: string | null;
|
|
407
|
-
/**
|
|
408
|
-
* Human-readable error message
|
|
409
|
-
*/
|
|
410
|
-
message?: string;
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Request and response metadata
|
|
414
|
-
*/
|
|
415
|
-
interface Meta {
|
|
416
|
-
/**
|
|
417
|
-
* Unique identifier for this request (for tracing and support)
|
|
418
|
-
*/
|
|
419
|
-
request_id?: string;
|
|
420
|
-
/**
|
|
421
|
-
* Server timestamp when the response was generated
|
|
422
|
-
*/
|
|
423
|
-
timestamp?: string;
|
|
424
|
-
/**
|
|
425
|
-
* API version used for this request
|
|
426
|
-
*/
|
|
427
|
-
version?: string;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Standard API response envelope for all v3 endpoints
|
|
432
|
-
*/
|
|
433
|
-
export interface WebhookRetrieveResponse {
|
|
434
|
-
/**
|
|
435
|
-
* The response data (null if error)
|
|
436
|
-
*/
|
|
437
|
-
data?: WebhookRetrieveResponse.Data | null;
|
|
438
|
-
/**
|
|
439
|
-
* Error information
|
|
440
|
-
*/
|
|
441
|
-
error?: WebhookRetrieveResponse.Error | null;
|
|
442
|
-
/**
|
|
443
|
-
* Request and response metadata
|
|
444
|
-
*/
|
|
445
|
-
meta?: WebhookRetrieveResponse.Meta;
|
|
446
|
-
/**
|
|
447
|
-
* Indicates whether the request was successful
|
|
448
|
-
*/
|
|
449
|
-
success?: boolean;
|
|
450
|
-
}
|
|
451
|
-
export declare namespace WebhookRetrieveResponse {
|
|
452
|
-
/**
|
|
453
|
-
* The response data (null if error)
|
|
454
|
-
*/
|
|
455
|
-
interface Data {
|
|
456
|
-
id?: string;
|
|
457
|
-
consecutive_failures?: number;
|
|
458
|
-
created_at?: string;
|
|
459
|
-
/**
|
|
460
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
461
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
462
|
-
*/
|
|
463
|
-
customer_id?: string;
|
|
464
|
-
display_name?: string;
|
|
465
|
-
endpoint_url?: string;
|
|
466
|
-
event_filters?: {
|
|
467
|
-
[key: string]: Array<string>;
|
|
468
|
-
} | null;
|
|
469
|
-
event_types?: Array<string>;
|
|
470
|
-
is_active?: boolean;
|
|
471
|
-
last_delivery_attempt_at?: string | null;
|
|
472
|
-
last_successful_delivery_at?: string | null;
|
|
473
|
-
retry_count?: number;
|
|
474
|
-
signing_secret?: string | null;
|
|
475
|
-
timeout_seconds?: number;
|
|
476
|
-
updated_at?: string | null;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Error information
|
|
480
|
-
*/
|
|
481
|
-
interface Error {
|
|
482
|
-
/**
|
|
483
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
484
|
-
*/
|
|
485
|
-
code?: string;
|
|
486
|
-
/**
|
|
487
|
-
* Additional validation error details (field-level errors)
|
|
488
|
-
*/
|
|
489
|
-
details?: {
|
|
490
|
-
[key: string]: Array<string>;
|
|
491
|
-
} | null;
|
|
492
|
-
/**
|
|
493
|
-
* URL to documentation about this error
|
|
494
|
-
*/
|
|
495
|
-
doc_url?: string | null;
|
|
496
|
-
/**
|
|
497
|
-
* Human-readable error message
|
|
498
|
-
*/
|
|
499
|
-
message?: string;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Request and response metadata
|
|
503
|
-
*/
|
|
504
|
-
interface Meta {
|
|
505
|
-
/**
|
|
506
|
-
* Unique identifier for this request (for tracing and support)
|
|
507
|
-
*/
|
|
508
|
-
request_id?: string;
|
|
509
|
-
/**
|
|
510
|
-
* Server timestamp when the response was generated
|
|
511
|
-
*/
|
|
512
|
-
timestamp?: string;
|
|
513
|
-
/**
|
|
514
|
-
* API version used for this request
|
|
515
|
-
*/
|
|
516
|
-
version?: string;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* Standard API response envelope for all v3 endpoints
|
|
521
|
-
*/
|
|
522
|
-
export interface WebhookUpdateResponse {
|
|
523
|
-
/**
|
|
524
|
-
* The response data (null if error)
|
|
525
|
-
*/
|
|
526
|
-
data?: WebhookUpdateResponse.Data | null;
|
|
527
|
-
/**
|
|
528
|
-
* Error information
|
|
529
|
-
*/
|
|
530
|
-
error?: WebhookUpdateResponse.Error | null;
|
|
531
|
-
/**
|
|
532
|
-
* Request and response metadata
|
|
533
|
-
*/
|
|
534
|
-
meta?: WebhookUpdateResponse.Meta;
|
|
535
|
-
/**
|
|
536
|
-
* Indicates whether the request was successful
|
|
537
|
-
*/
|
|
538
|
-
success?: boolean;
|
|
539
|
-
}
|
|
540
|
-
export declare namespace WebhookUpdateResponse {
|
|
541
|
-
/**
|
|
542
|
-
* The response data (null if error)
|
|
543
|
-
*/
|
|
544
|
-
interface Data {
|
|
545
|
-
id?: string;
|
|
546
|
-
consecutive_failures?: number;
|
|
547
|
-
created_at?: string;
|
|
548
|
-
/**
|
|
549
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
550
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
551
|
-
*/
|
|
552
|
-
customer_id?: string;
|
|
553
|
-
display_name?: string;
|
|
554
|
-
endpoint_url?: string;
|
|
555
|
-
event_filters?: {
|
|
556
|
-
[key: string]: Array<string>;
|
|
557
|
-
} | null;
|
|
558
|
-
event_types?: Array<string>;
|
|
559
|
-
is_active?: boolean;
|
|
560
|
-
last_delivery_attempt_at?: string | null;
|
|
561
|
-
last_successful_delivery_at?: string | null;
|
|
562
|
-
retry_count?: number;
|
|
563
|
-
signing_secret?: string | null;
|
|
564
|
-
timeout_seconds?: number;
|
|
565
|
-
updated_at?: string | null;
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Error information
|
|
569
|
-
*/
|
|
570
|
-
interface Error {
|
|
571
|
-
/**
|
|
572
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
573
|
-
*/
|
|
574
|
-
code?: string;
|
|
575
|
-
/**
|
|
576
|
-
* Additional validation error details (field-level errors)
|
|
577
|
-
*/
|
|
578
|
-
details?: {
|
|
579
|
-
[key: string]: Array<string>;
|
|
580
|
-
} | null;
|
|
581
|
-
/**
|
|
582
|
-
* URL to documentation about this error
|
|
583
|
-
*/
|
|
584
|
-
doc_url?: string | null;
|
|
585
|
-
/**
|
|
586
|
-
* Human-readable error message
|
|
587
|
-
*/
|
|
588
|
-
message?: string;
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* Request and response metadata
|
|
592
|
-
*/
|
|
593
|
-
interface Meta {
|
|
594
|
-
/**
|
|
595
|
-
* Unique identifier for this request (for tracing and support)
|
|
596
|
-
*/
|
|
597
|
-
request_id?: string;
|
|
598
|
-
/**
|
|
599
|
-
* Server timestamp when the response was generated
|
|
600
|
-
*/
|
|
601
|
-
timestamp?: string;
|
|
602
|
-
/**
|
|
603
|
-
* API version used for this request
|
|
604
|
-
*/
|
|
605
|
-
version?: string;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* Standard API response envelope for all v3 endpoints
|
|
610
|
-
*/
|
|
611
|
-
export interface WebhookListResponse {
|
|
612
|
-
/**
|
|
613
|
-
* A paginated list of webhooks.
|
|
614
|
-
*/
|
|
615
|
-
data?: WebhookListResponse.Data | null;
|
|
616
|
-
/**
|
|
617
|
-
* Error information
|
|
618
|
-
*/
|
|
619
|
-
error?: WebhookListResponse.Error | null;
|
|
620
|
-
/**
|
|
621
|
-
* Request and response metadata
|
|
622
|
-
*/
|
|
623
|
-
meta?: WebhookListResponse.Meta;
|
|
624
|
-
/**
|
|
625
|
-
* Indicates whether the request was successful
|
|
626
|
-
*/
|
|
627
|
-
success?: boolean;
|
|
459
|
+
export interface WebhookEventType {
|
|
460
|
+
description?: string | null;
|
|
461
|
+
display_name?: string;
|
|
462
|
+
event_type?: string | null;
|
|
463
|
+
is_active?: boolean;
|
|
464
|
+
name?: string;
|
|
465
|
+
sub_types?: Array<WebhookEventType> | null;
|
|
628
466
|
}
|
|
629
|
-
export
|
|
467
|
+
export interface WebhookResponse {
|
|
468
|
+
id?: string;
|
|
469
|
+
consecutive_failures?: number;
|
|
470
|
+
created_at?: string;
|
|
630
471
|
/**
|
|
631
|
-
*
|
|
632
|
-
|
|
633
|
-
interface Data {
|
|
634
|
-
/**
|
|
635
|
-
* Pagination metadata for list responses
|
|
636
|
-
*/
|
|
637
|
-
pagination?: Data.Pagination;
|
|
638
|
-
/**
|
|
639
|
-
* The webhooks on this page.
|
|
640
|
-
*/
|
|
641
|
-
webhooks?: Array<Data.Webhook>;
|
|
642
|
-
}
|
|
643
|
-
namespace Data {
|
|
644
|
-
/**
|
|
645
|
-
* Pagination metadata for list responses
|
|
646
|
-
*/
|
|
647
|
-
interface Pagination {
|
|
648
|
-
/**
|
|
649
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
650
|
-
*/
|
|
651
|
-
cursors?: Pagination.Cursors | null;
|
|
652
|
-
/**
|
|
653
|
-
* Whether there are more pages after this one
|
|
654
|
-
*/
|
|
655
|
-
has_more?: boolean;
|
|
656
|
-
/**
|
|
657
|
-
* Current page number (1-indexed)
|
|
658
|
-
*/
|
|
659
|
-
page?: number;
|
|
660
|
-
/**
|
|
661
|
-
* Number of items per page
|
|
662
|
-
*/
|
|
663
|
-
page_size?: number;
|
|
664
|
-
/**
|
|
665
|
-
* Total number of items across all pages
|
|
666
|
-
*/
|
|
667
|
-
total_count?: number;
|
|
668
|
-
/**
|
|
669
|
-
* Total number of pages
|
|
670
|
-
*/
|
|
671
|
-
total_pages?: number;
|
|
672
|
-
}
|
|
673
|
-
namespace Pagination {
|
|
674
|
-
/**
|
|
675
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
676
|
-
*/
|
|
677
|
-
interface Cursors {
|
|
678
|
-
/**
|
|
679
|
-
* Cursor to fetch the next page.
|
|
680
|
-
*/
|
|
681
|
-
after?: string | null;
|
|
682
|
-
/**
|
|
683
|
-
* Cursor to fetch the previous page.
|
|
684
|
-
*/
|
|
685
|
-
before?: string | null;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
interface Webhook {
|
|
689
|
-
id?: string;
|
|
690
|
-
consecutive_failures?: number;
|
|
691
|
-
created_at?: string;
|
|
692
|
-
/**
|
|
693
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
694
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
695
|
-
*/
|
|
696
|
-
customer_id?: string;
|
|
697
|
-
display_name?: string;
|
|
698
|
-
endpoint_url?: string;
|
|
699
|
-
event_filters?: {
|
|
700
|
-
[key: string]: Array<string>;
|
|
701
|
-
} | null;
|
|
702
|
-
event_types?: Array<string>;
|
|
703
|
-
is_active?: boolean;
|
|
704
|
-
last_delivery_attempt_at?: string | null;
|
|
705
|
-
last_successful_delivery_at?: string | null;
|
|
706
|
-
retry_count?: number;
|
|
707
|
-
signing_secret?: string | null;
|
|
708
|
-
timeout_seconds?: number;
|
|
709
|
-
updated_at?: string | null;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Error information
|
|
472
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
473
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
714
474
|
*/
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
doc_url?: string | null;
|
|
730
|
-
/**
|
|
731
|
-
* Human-readable error message
|
|
732
|
-
*/
|
|
733
|
-
message?: string;
|
|
734
|
-
}
|
|
735
|
-
/**
|
|
736
|
-
* Request and response metadata
|
|
737
|
-
*/
|
|
738
|
-
interface Meta {
|
|
739
|
-
/**
|
|
740
|
-
* Unique identifier for this request (for tracing and support)
|
|
741
|
-
*/
|
|
742
|
-
request_id?: string;
|
|
743
|
-
/**
|
|
744
|
-
* Server timestamp when the response was generated
|
|
745
|
-
*/
|
|
746
|
-
timestamp?: string;
|
|
747
|
-
/**
|
|
748
|
-
* API version used for this request
|
|
749
|
-
*/
|
|
750
|
-
version?: string;
|
|
751
|
-
}
|
|
475
|
+
customer_id?: string;
|
|
476
|
+
display_name?: string;
|
|
477
|
+
endpoint_url?: string;
|
|
478
|
+
event_filters?: {
|
|
479
|
+
[key: string]: Array<string>;
|
|
480
|
+
} | null;
|
|
481
|
+
event_types?: Array<string>;
|
|
482
|
+
is_active?: boolean;
|
|
483
|
+
last_delivery_attempt_at?: string | null;
|
|
484
|
+
last_successful_delivery_at?: string | null;
|
|
485
|
+
retry_count?: number;
|
|
486
|
+
signing_secret?: string | null;
|
|
487
|
+
timeout_seconds?: number;
|
|
488
|
+
updated_at?: string | null;
|
|
752
489
|
}
|
|
753
490
|
/**
|
|
754
491
|
* Standard API response envelope for all v3 endpoints
|
|
@@ -761,11 +498,11 @@ export interface WebhookListEventTypesResponse {
|
|
|
761
498
|
/**
|
|
762
499
|
* Error information
|
|
763
500
|
*/
|
|
764
|
-
error?:
|
|
501
|
+
error?: ErrorDetail | null;
|
|
765
502
|
/**
|
|
766
503
|
* Request and response metadata
|
|
767
504
|
*/
|
|
768
|
-
meta?:
|
|
505
|
+
meta?: APIMeta;
|
|
769
506
|
/**
|
|
770
507
|
* Indicates whether the request was successful
|
|
771
508
|
*/
|
|
@@ -779,247 +516,31 @@ export declare namespace WebhookListEventTypesResponse {
|
|
|
779
516
|
/**
|
|
780
517
|
* The event_types on this page.
|
|
781
518
|
*/
|
|
782
|
-
event_types?: Array<
|
|
519
|
+
event_types?: Array<WebhooksAPI.WebhookEventType>;
|
|
783
520
|
/**
|
|
784
521
|
* Pagination metadata for list responses
|
|
785
522
|
*/
|
|
786
|
-
pagination?:
|
|
787
|
-
}
|
|
788
|
-
namespace Data {
|
|
789
|
-
interface EventType {
|
|
790
|
-
description?: string | null;
|
|
791
|
-
display_name?: string;
|
|
792
|
-
event_type?: string | null;
|
|
793
|
-
is_active?: boolean;
|
|
794
|
-
name?: string;
|
|
795
|
-
sub_types?: Array<unknown> | null;
|
|
796
|
-
}
|
|
797
|
-
/**
|
|
798
|
-
* Pagination metadata for list responses
|
|
799
|
-
*/
|
|
800
|
-
interface Pagination {
|
|
801
|
-
/**
|
|
802
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
803
|
-
*/
|
|
804
|
-
cursors?: Pagination.Cursors | null;
|
|
805
|
-
/**
|
|
806
|
-
* Whether there are more pages after this one
|
|
807
|
-
*/
|
|
808
|
-
has_more?: boolean;
|
|
809
|
-
/**
|
|
810
|
-
* Current page number (1-indexed)
|
|
811
|
-
*/
|
|
812
|
-
page?: number;
|
|
813
|
-
/**
|
|
814
|
-
* Number of items per page
|
|
815
|
-
*/
|
|
816
|
-
page_size?: number;
|
|
817
|
-
/**
|
|
818
|
-
* Total number of items across all pages
|
|
819
|
-
*/
|
|
820
|
-
total_count?: number;
|
|
821
|
-
/**
|
|
822
|
-
* Total number of pages
|
|
823
|
-
*/
|
|
824
|
-
total_pages?: number;
|
|
825
|
-
}
|
|
826
|
-
namespace Pagination {
|
|
827
|
-
/**
|
|
828
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
829
|
-
*/
|
|
830
|
-
interface Cursors {
|
|
831
|
-
/**
|
|
832
|
-
* Cursor to fetch the next page.
|
|
833
|
-
*/
|
|
834
|
-
after?: string | null;
|
|
835
|
-
/**
|
|
836
|
-
* Cursor to fetch the previous page.
|
|
837
|
-
*/
|
|
838
|
-
before?: string | null;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Error information
|
|
844
|
-
*/
|
|
845
|
-
interface Error {
|
|
846
|
-
/**
|
|
847
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
848
|
-
*/
|
|
849
|
-
code?: string;
|
|
850
|
-
/**
|
|
851
|
-
* Additional validation error details (field-level errors)
|
|
852
|
-
*/
|
|
853
|
-
details?: {
|
|
854
|
-
[key: string]: Array<string>;
|
|
855
|
-
} | null;
|
|
856
|
-
/**
|
|
857
|
-
* URL to documentation about this error
|
|
858
|
-
*/
|
|
859
|
-
doc_url?: string | null;
|
|
860
|
-
/**
|
|
861
|
-
* Human-readable error message
|
|
862
|
-
*/
|
|
863
|
-
message?: string;
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Request and response metadata
|
|
867
|
-
*/
|
|
868
|
-
interface Meta {
|
|
869
|
-
/**
|
|
870
|
-
* Unique identifier for this request (for tracing and support)
|
|
871
|
-
*/
|
|
872
|
-
request_id?: string;
|
|
873
|
-
/**
|
|
874
|
-
* Server timestamp when the response was generated
|
|
875
|
-
*/
|
|
876
|
-
timestamp?: string;
|
|
877
|
-
/**
|
|
878
|
-
* API version used for this request
|
|
879
|
-
*/
|
|
880
|
-
version?: string;
|
|
523
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
881
524
|
}
|
|
882
525
|
}
|
|
883
|
-
/**
|
|
884
|
-
* Standard API response envelope for all v3 endpoints
|
|
885
|
-
*/
|
|
886
526
|
export interface WebhookListEventsResponse {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
*
|
|
897
|
-
*/
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
export declare namespace WebhookListEventsResponse {
|
|
905
|
-
/**
|
|
906
|
-
* A paginated list of webhook delivery records.
|
|
907
|
-
*/
|
|
908
|
-
interface Data {
|
|
909
|
-
/**
|
|
910
|
-
* The events on this page.
|
|
911
|
-
*/
|
|
912
|
-
events?: Array<Data.Event>;
|
|
913
|
-
/**
|
|
914
|
-
* Pagination metadata for list responses
|
|
915
|
-
*/
|
|
916
|
-
pagination?: Data.Pagination;
|
|
917
|
-
}
|
|
918
|
-
namespace Data {
|
|
919
|
-
interface Event {
|
|
920
|
-
id?: string;
|
|
921
|
-
created_at?: string;
|
|
922
|
-
delivery_attempts?: number;
|
|
923
|
-
delivery_status?: string;
|
|
924
|
-
error_message?: string | null;
|
|
925
|
-
/**
|
|
926
|
-
* The exact event body that was delivered, or attempted, for this record. One of
|
|
927
|
-
* the three webhook envelopes: a message status change, an inbound message, or a
|
|
928
|
-
* template status change. Read field and event to tell which, the same way your
|
|
929
|
-
* endpoint does.
|
|
930
|
-
*/
|
|
931
|
-
event_data?: WebhooksAPI.MessageEvent | WebhooksAPI.InboundMessageEvent | WebhooksAPI.TemplateEvent;
|
|
932
|
-
event_type?: string;
|
|
933
|
-
http_status_code?: number | null;
|
|
934
|
-
processing_completed_at?: string | null;
|
|
935
|
-
processing_started_at?: string | null;
|
|
936
|
-
response_body?: string | null;
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
* Pagination metadata for list responses
|
|
940
|
-
*/
|
|
941
|
-
interface Pagination {
|
|
942
|
-
/**
|
|
943
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
944
|
-
*/
|
|
945
|
-
cursors?: Pagination.Cursors | null;
|
|
946
|
-
/**
|
|
947
|
-
* Whether there are more pages after this one
|
|
948
|
-
*/
|
|
949
|
-
has_more?: boolean;
|
|
950
|
-
/**
|
|
951
|
-
* Current page number (1-indexed)
|
|
952
|
-
*/
|
|
953
|
-
page?: number;
|
|
954
|
-
/**
|
|
955
|
-
* Number of items per page
|
|
956
|
-
*/
|
|
957
|
-
page_size?: number;
|
|
958
|
-
/**
|
|
959
|
-
* Total number of items across all pages
|
|
960
|
-
*/
|
|
961
|
-
total_count?: number;
|
|
962
|
-
/**
|
|
963
|
-
* Total number of pages
|
|
964
|
-
*/
|
|
965
|
-
total_pages?: number;
|
|
966
|
-
}
|
|
967
|
-
namespace Pagination {
|
|
968
|
-
/**
|
|
969
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
970
|
-
*/
|
|
971
|
-
interface Cursors {
|
|
972
|
-
/**
|
|
973
|
-
* Cursor to fetch the next page.
|
|
974
|
-
*/
|
|
975
|
-
after?: string | null;
|
|
976
|
-
/**
|
|
977
|
-
* Cursor to fetch the previous page.
|
|
978
|
-
*/
|
|
979
|
-
before?: string | null;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* Error information
|
|
985
|
-
*/
|
|
986
|
-
interface Error {
|
|
987
|
-
/**
|
|
988
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
989
|
-
*/
|
|
990
|
-
code?: string;
|
|
991
|
-
/**
|
|
992
|
-
* Additional validation error details (field-level errors)
|
|
993
|
-
*/
|
|
994
|
-
details?: {
|
|
995
|
-
[key: string]: Array<string>;
|
|
996
|
-
} | null;
|
|
997
|
-
/**
|
|
998
|
-
* URL to documentation about this error
|
|
999
|
-
*/
|
|
1000
|
-
doc_url?: string | null;
|
|
1001
|
-
/**
|
|
1002
|
-
* Human-readable error message
|
|
1003
|
-
*/
|
|
1004
|
-
message?: string;
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* Request and response metadata
|
|
1008
|
-
*/
|
|
1009
|
-
interface Meta {
|
|
1010
|
-
/**
|
|
1011
|
-
* Unique identifier for this request (for tracing and support)
|
|
1012
|
-
*/
|
|
1013
|
-
request_id?: string;
|
|
1014
|
-
/**
|
|
1015
|
-
* Server timestamp when the response was generated
|
|
1016
|
-
*/
|
|
1017
|
-
timestamp?: string;
|
|
1018
|
-
/**
|
|
1019
|
-
* API version used for this request
|
|
1020
|
-
*/
|
|
1021
|
-
version?: string;
|
|
1022
|
-
}
|
|
527
|
+
id?: string;
|
|
528
|
+
created_at?: string;
|
|
529
|
+
delivery_attempts?: number;
|
|
530
|
+
delivery_status?: string;
|
|
531
|
+
error_message?: string | null;
|
|
532
|
+
/**
|
|
533
|
+
* The exact event body that was delivered, or attempted, for this record. One of
|
|
534
|
+
* the three webhook envelopes: a message status change, an inbound message, or a
|
|
535
|
+
* template status change. Read field and event to tell which, the same way your
|
|
536
|
+
* endpoint does.
|
|
537
|
+
*/
|
|
538
|
+
event_data?: MessageEvent | InboundMessageEvent | TemplateEvent;
|
|
539
|
+
event_type?: string;
|
|
540
|
+
http_status_code?: number | null;
|
|
541
|
+
processing_completed_at?: string | null;
|
|
542
|
+
processing_started_at?: string | null;
|
|
543
|
+
response_body?: string | null;
|
|
1023
544
|
}
|
|
1024
545
|
/**
|
|
1025
546
|
* Standard API response envelope for all v3 endpoints
|
|
@@ -1032,11 +553,11 @@ export interface WebhookRotateSecretResponse {
|
|
|
1032
553
|
/**
|
|
1033
554
|
* Error information
|
|
1034
555
|
*/
|
|
1035
|
-
error?:
|
|
556
|
+
error?: ErrorDetail | null;
|
|
1036
557
|
/**
|
|
1037
558
|
* Request and response metadata
|
|
1038
559
|
*/
|
|
1039
|
-
meta?:
|
|
560
|
+
meta?: APIMeta;
|
|
1040
561
|
/**
|
|
1041
562
|
* Indicates whether the request was successful
|
|
1042
563
|
*/
|
|
@@ -1049,46 +570,6 @@ export declare namespace WebhookRotateSecretResponse {
|
|
|
1049
570
|
interface Data {
|
|
1050
571
|
signing_secret?: string;
|
|
1051
572
|
}
|
|
1052
|
-
/**
|
|
1053
|
-
* Error information
|
|
1054
|
-
*/
|
|
1055
|
-
interface Error {
|
|
1056
|
-
/**
|
|
1057
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1058
|
-
*/
|
|
1059
|
-
code?: string;
|
|
1060
|
-
/**
|
|
1061
|
-
* Additional validation error details (field-level errors)
|
|
1062
|
-
*/
|
|
1063
|
-
details?: {
|
|
1064
|
-
[key: string]: Array<string>;
|
|
1065
|
-
} | null;
|
|
1066
|
-
/**
|
|
1067
|
-
* URL to documentation about this error
|
|
1068
|
-
*/
|
|
1069
|
-
doc_url?: string | null;
|
|
1070
|
-
/**
|
|
1071
|
-
* Human-readable error message
|
|
1072
|
-
*/
|
|
1073
|
-
message?: string;
|
|
1074
|
-
}
|
|
1075
|
-
/**
|
|
1076
|
-
* Request and response metadata
|
|
1077
|
-
*/
|
|
1078
|
-
interface Meta {
|
|
1079
|
-
/**
|
|
1080
|
-
* Unique identifier for this request (for tracing and support)
|
|
1081
|
-
*/
|
|
1082
|
-
request_id?: string;
|
|
1083
|
-
/**
|
|
1084
|
-
* Server timestamp when the response was generated
|
|
1085
|
-
*/
|
|
1086
|
-
timestamp?: string;
|
|
1087
|
-
/**
|
|
1088
|
-
* API version used for this request
|
|
1089
|
-
*/
|
|
1090
|
-
version?: string;
|
|
1091
|
-
}
|
|
1092
573
|
}
|
|
1093
574
|
/**
|
|
1094
575
|
* Standard API response envelope for all v3 endpoints
|
|
@@ -1101,11 +582,11 @@ export interface WebhookTestResponse {
|
|
|
1101
582
|
/**
|
|
1102
583
|
* Error information
|
|
1103
584
|
*/
|
|
1104
|
-
error?:
|
|
585
|
+
error?: ErrorDetail | null;
|
|
1105
586
|
/**
|
|
1106
587
|
* Request and response metadata
|
|
1107
588
|
*/
|
|
1108
|
-
meta?:
|
|
589
|
+
meta?: APIMeta;
|
|
1109
590
|
/**
|
|
1110
591
|
* Indicates whether the request was successful
|
|
1111
592
|
*/
|
|
@@ -1119,135 +600,6 @@ export declare namespace WebhookTestResponse {
|
|
|
1119
600
|
message?: string;
|
|
1120
601
|
success?: boolean;
|
|
1121
602
|
}
|
|
1122
|
-
/**
|
|
1123
|
-
* Error information
|
|
1124
|
-
*/
|
|
1125
|
-
interface Error {
|
|
1126
|
-
/**
|
|
1127
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1128
|
-
*/
|
|
1129
|
-
code?: string;
|
|
1130
|
-
/**
|
|
1131
|
-
* Additional validation error details (field-level errors)
|
|
1132
|
-
*/
|
|
1133
|
-
details?: {
|
|
1134
|
-
[key: string]: Array<string>;
|
|
1135
|
-
} | null;
|
|
1136
|
-
/**
|
|
1137
|
-
* URL to documentation about this error
|
|
1138
|
-
*/
|
|
1139
|
-
doc_url?: string | null;
|
|
1140
|
-
/**
|
|
1141
|
-
* Human-readable error message
|
|
1142
|
-
*/
|
|
1143
|
-
message?: string;
|
|
1144
|
-
}
|
|
1145
|
-
/**
|
|
1146
|
-
* Request and response metadata
|
|
1147
|
-
*/
|
|
1148
|
-
interface Meta {
|
|
1149
|
-
/**
|
|
1150
|
-
* Unique identifier for this request (for tracing and support)
|
|
1151
|
-
*/
|
|
1152
|
-
request_id?: string;
|
|
1153
|
-
/**
|
|
1154
|
-
* Server timestamp when the response was generated
|
|
1155
|
-
*/
|
|
1156
|
-
timestamp?: string;
|
|
1157
|
-
/**
|
|
1158
|
-
* API version used for this request
|
|
1159
|
-
*/
|
|
1160
|
-
version?: string;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* Standard API response envelope for all v3 endpoints
|
|
1165
|
-
*/
|
|
1166
|
-
export interface WebhookToggleStatusResponse {
|
|
1167
|
-
/**
|
|
1168
|
-
* The response data (null if error)
|
|
1169
|
-
*/
|
|
1170
|
-
data?: WebhookToggleStatusResponse.Data | null;
|
|
1171
|
-
/**
|
|
1172
|
-
* Error information
|
|
1173
|
-
*/
|
|
1174
|
-
error?: WebhookToggleStatusResponse.Error | null;
|
|
1175
|
-
/**
|
|
1176
|
-
* Request and response metadata
|
|
1177
|
-
*/
|
|
1178
|
-
meta?: WebhookToggleStatusResponse.Meta;
|
|
1179
|
-
/**
|
|
1180
|
-
* Indicates whether the request was successful
|
|
1181
|
-
*/
|
|
1182
|
-
success?: boolean;
|
|
1183
|
-
}
|
|
1184
|
-
export declare namespace WebhookToggleStatusResponse {
|
|
1185
|
-
/**
|
|
1186
|
-
* The response data (null if error)
|
|
1187
|
-
*/
|
|
1188
|
-
interface Data {
|
|
1189
|
-
id?: string;
|
|
1190
|
-
consecutive_failures?: number;
|
|
1191
|
-
created_at?: string;
|
|
1192
|
-
/**
|
|
1193
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
1194
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
1195
|
-
*/
|
|
1196
|
-
customer_id?: string;
|
|
1197
|
-
display_name?: string;
|
|
1198
|
-
endpoint_url?: string;
|
|
1199
|
-
event_filters?: {
|
|
1200
|
-
[key: string]: Array<string>;
|
|
1201
|
-
} | null;
|
|
1202
|
-
event_types?: Array<string>;
|
|
1203
|
-
is_active?: boolean;
|
|
1204
|
-
last_delivery_attempt_at?: string | null;
|
|
1205
|
-
last_successful_delivery_at?: string | null;
|
|
1206
|
-
retry_count?: number;
|
|
1207
|
-
signing_secret?: string | null;
|
|
1208
|
-
timeout_seconds?: number;
|
|
1209
|
-
updated_at?: string | null;
|
|
1210
|
-
}
|
|
1211
|
-
/**
|
|
1212
|
-
* Error information
|
|
1213
|
-
*/
|
|
1214
|
-
interface Error {
|
|
1215
|
-
/**
|
|
1216
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1217
|
-
*/
|
|
1218
|
-
code?: string;
|
|
1219
|
-
/**
|
|
1220
|
-
* Additional validation error details (field-level errors)
|
|
1221
|
-
*/
|
|
1222
|
-
details?: {
|
|
1223
|
-
[key: string]: Array<string>;
|
|
1224
|
-
} | null;
|
|
1225
|
-
/**
|
|
1226
|
-
* URL to documentation about this error
|
|
1227
|
-
*/
|
|
1228
|
-
doc_url?: string | null;
|
|
1229
|
-
/**
|
|
1230
|
-
* Human-readable error message
|
|
1231
|
-
*/
|
|
1232
|
-
message?: string;
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* Request and response metadata
|
|
1236
|
-
*/
|
|
1237
|
-
interface Meta {
|
|
1238
|
-
/**
|
|
1239
|
-
* Unique identifier for this request (for tracing and support)
|
|
1240
|
-
*/
|
|
1241
|
-
request_id?: string;
|
|
1242
|
-
/**
|
|
1243
|
-
* Server timestamp when the response was generated
|
|
1244
|
-
*/
|
|
1245
|
-
timestamp?: string;
|
|
1246
|
-
/**
|
|
1247
|
-
* API version used for this request
|
|
1248
|
-
*/
|
|
1249
|
-
version?: string;
|
|
1250
|
-
}
|
|
1251
603
|
}
|
|
1252
604
|
export interface WebhookCreateParams {
|
|
1253
605
|
/**
|
|
@@ -1346,15 +698,7 @@ export interface WebhookUpdateParams {
|
|
|
1346
698
|
*/
|
|
1347
699
|
'x-profile-id'?: string;
|
|
1348
700
|
}
|
|
1349
|
-
export interface WebhookListParams {
|
|
1350
|
-
/**
|
|
1351
|
-
* Query param
|
|
1352
|
-
*/
|
|
1353
|
-
page: number;
|
|
1354
|
-
/**
|
|
1355
|
-
* Query param
|
|
1356
|
-
*/
|
|
1357
|
-
page_size: number;
|
|
701
|
+
export interface WebhookListParams extends WebhooksPageParams {
|
|
1358
702
|
/**
|
|
1359
703
|
* Query param
|
|
1360
704
|
*/
|
|
@@ -1384,15 +728,7 @@ export interface WebhookListEventTypesParams {
|
|
|
1384
728
|
*/
|
|
1385
729
|
'x-profile-id'?: string;
|
|
1386
730
|
}
|
|
1387
|
-
export interface WebhookListEventsParams {
|
|
1388
|
-
/**
|
|
1389
|
-
* Query param
|
|
1390
|
-
*/
|
|
1391
|
-
page: number;
|
|
1392
|
-
/**
|
|
1393
|
-
* Query param
|
|
1394
|
-
*/
|
|
1395
|
-
page_size: number;
|
|
731
|
+
export interface WebhookListEventsParams extends WebhookEventsPageParams {
|
|
1396
732
|
/**
|
|
1397
733
|
* Query param
|
|
1398
734
|
*/
|
|
@@ -1470,6 +806,6 @@ export interface WebhookToggleStatusParams {
|
|
|
1470
806
|
'x-profile-id'?: string;
|
|
1471
807
|
}
|
|
1472
808
|
export declare namespace Webhooks {
|
|
1473
|
-
export { type InboundMessageEvent as InboundMessageEvent, type InboundMessageEventPayload as InboundMessageEventPayload, type MessageEvent as MessageEvent, type MessageEventPayload as MessageEventPayload, type
|
|
809
|
+
export { type APIMeta as APIMeta, type APIResponseWebhook as APIResponseWebhook, type ErrorDetail as ErrorDetail, type InboundMessageEvent as InboundMessageEvent, type InboundMessageEventPayload as InboundMessageEventPayload, type MessageEvent as MessageEvent, type MessageEventPayload as MessageEventPayload, type MutationRequest as MutationRequest, type PaginationMeta as PaginationMeta, type TemplateEvent as TemplateEvent, type TemplateEventPayload as TemplateEventPayload, type WebhookEventType as WebhookEventType, type WebhookResponse as WebhookResponse, type WebhookListEventTypesResponse as WebhookListEventTypesResponse, type WebhookListEventsResponse as WebhookListEventsResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookResponsesWebhooksPage as WebhookResponsesWebhooksPage, type WebhookListEventsResponsesWebhookEventsPage as WebhookListEventsResponsesWebhookEventsPage, type WebhookCreateParams as WebhookCreateParams, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookListEventTypesParams as WebhookListEventTypesParams, type WebhookListEventsParams as WebhookListEventsParams, type WebhookRotateSecretParams as WebhookRotateSecretParams, type WebhookTestParams as WebhookTestParams, type WebhookToggleStatusParams as WebhookToggleStatusParams, };
|
|
1474
810
|
}
|
|
1475
811
|
//# sourceMappingURL=webhooks.d.mts.map
|