@sentdm/sentdm 0.34.0 → 0.35.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 +8 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- 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 +132 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +132 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +3 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +3 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- package/resources/profiles/campaigns.mjs.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 +2006 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +770 -169
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +770 -169
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +151 -52
- package/src/resources/messages.ts +230 -27
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +1006 -283
- 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
|
@@ -3,7 +3,11 @@ import * as WebhooksAPI from "./webhooks.mjs";
|
|
|
3
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Delivery reports and inbound messages, pushed to you.
|
|
7
|
+
*
|
|
8
|
+
* Subscribe an endpoint to the event types you care about — `GET /v3/webhooks/event-types` lists them — and we POST each one as it happens, retrying on failure. Polling `GET /v3/messages/{id}` works and does not scale.
|
|
9
|
+
*
|
|
10
|
+
* **Verify the signature.** Every delivery is signed with your endpoint's secret; an unverified endpoint is one anybody can post to. `rotate-secret` replaces it, `test` sends a specimen event, and `GET /v3/webhooks/{id}/events` shows what we tried to deliver and what your endpoint answered — which is the first place to look when something appears to be missing.
|
|
7
11
|
*/
|
|
8
12
|
export declare class Webhooks extends APIResource {
|
|
9
13
|
/**
|
|
@@ -11,32 +15,32 @@ export declare class Webhooks extends APIResource {
|
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
* ```ts
|
|
14
|
-
* const
|
|
18
|
+
* const webhook = await client.webhooks.create();
|
|
15
19
|
* ```
|
|
16
20
|
*/
|
|
17
|
-
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<
|
|
21
|
+
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
|
|
18
22
|
/**
|
|
19
23
|
* Retrieves a single webhook by ID for the authenticated customer.
|
|
20
24
|
*
|
|
21
25
|
* @example
|
|
22
26
|
* ```ts
|
|
23
|
-
* const
|
|
27
|
+
* const webhook = await client.webhooks.retrieve(
|
|
24
28
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
25
29
|
* );
|
|
26
30
|
* ```
|
|
27
31
|
*/
|
|
28
|
-
retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
29
33
|
/**
|
|
30
34
|
* Updates an existing webhook for the authenticated customer.
|
|
31
35
|
*
|
|
32
36
|
* @example
|
|
33
37
|
* ```ts
|
|
34
|
-
* const
|
|
38
|
+
* const webhook = await client.webhooks.update(
|
|
35
39
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
36
40
|
* );
|
|
37
41
|
* ```
|
|
38
42
|
*/
|
|
39
|
-
update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<
|
|
43
|
+
update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
|
|
40
44
|
/**
|
|
41
45
|
* Retrieves a paginated list of webhooks for the authenticated customer.
|
|
42
46
|
*
|
|
@@ -109,74 +113,12 @@ export declare class Webhooks extends APIResource {
|
|
|
109
113
|
*
|
|
110
114
|
* @example
|
|
111
115
|
* ```ts
|
|
112
|
-
* const
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* );
|
|
116
|
+
* const response = await client.webhooks.toggleStatus(
|
|
117
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
118
|
+
* );
|
|
116
119
|
* ```
|
|
117
120
|
*/
|
|
118
|
-
toggleStatus(id: string, params: WebhookToggleStatusParams, options?: RequestOptions): APIPromise<
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Request and response metadata
|
|
122
|
-
*/
|
|
123
|
-
export interface APIMeta {
|
|
124
|
-
/**
|
|
125
|
-
* Unique identifier for this request (for tracing and support)
|
|
126
|
-
*/
|
|
127
|
-
request_id?: string;
|
|
128
|
-
/**
|
|
129
|
-
* Server timestamp when the response was generated
|
|
130
|
-
*/
|
|
131
|
-
timestamp?: string;
|
|
132
|
-
/**
|
|
133
|
-
* API version used for this request
|
|
134
|
-
*/
|
|
135
|
-
version?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Standard API response envelope for all v3 endpoints
|
|
139
|
-
*/
|
|
140
|
-
export interface APIResponseWebhook {
|
|
141
|
-
/**
|
|
142
|
-
* The response data (null if error)
|
|
143
|
-
*/
|
|
144
|
-
data?: WebhookResponse | null;
|
|
145
|
-
/**
|
|
146
|
-
* Error information
|
|
147
|
-
*/
|
|
148
|
-
error?: ErrorDetail | null;
|
|
149
|
-
/**
|
|
150
|
-
* Request and response metadata
|
|
151
|
-
*/
|
|
152
|
-
meta?: APIMeta;
|
|
153
|
-
/**
|
|
154
|
-
* Indicates whether the request was successful
|
|
155
|
-
*/
|
|
156
|
-
success?: boolean;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Error information
|
|
160
|
-
*/
|
|
161
|
-
export interface ErrorDetail {
|
|
162
|
-
/**
|
|
163
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
164
|
-
*/
|
|
165
|
-
code?: string;
|
|
166
|
-
/**
|
|
167
|
-
* Additional validation error details (field-level errors)
|
|
168
|
-
*/
|
|
169
|
-
details?: {
|
|
170
|
-
[key: string]: Array<string>;
|
|
171
|
-
} | null;
|
|
172
|
-
/**
|
|
173
|
-
* URL to documentation about this error
|
|
174
|
-
*/
|
|
175
|
-
doc_url?: string | null;
|
|
176
|
-
/**
|
|
177
|
-
* Human-readable error message
|
|
178
|
-
*/
|
|
179
|
-
message?: string;
|
|
121
|
+
toggleStatus(id: string, params: WebhookToggleStatusParams, options?: RequestOptions): APIPromise<WebhookToggleStatusResponse>;
|
|
180
122
|
}
|
|
181
123
|
/**
|
|
182
124
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
@@ -324,57 +266,6 @@ export interface MessageEventPayload {
|
|
|
324
266
|
*/
|
|
325
267
|
updated_at?: string;
|
|
326
268
|
}
|
|
327
|
-
export interface MutationRequest {
|
|
328
|
-
/**
|
|
329
|
-
* Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
330
|
-
* for testing integrations without actual execution
|
|
331
|
-
*/
|
|
332
|
-
sandbox?: boolean;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Pagination metadata for list responses
|
|
336
|
-
*/
|
|
337
|
-
export interface PaginationMeta {
|
|
338
|
-
/**
|
|
339
|
-
* Cursor-based pagination pointers
|
|
340
|
-
*/
|
|
341
|
-
cursors?: PaginationMeta.Cursors | null;
|
|
342
|
-
/**
|
|
343
|
-
* Whether there are more pages after this one
|
|
344
|
-
*/
|
|
345
|
-
has_more?: boolean;
|
|
346
|
-
/**
|
|
347
|
-
* Current page number (1-indexed)
|
|
348
|
-
*/
|
|
349
|
-
page?: number;
|
|
350
|
-
/**
|
|
351
|
-
* Number of items per page
|
|
352
|
-
*/
|
|
353
|
-
page_size?: number;
|
|
354
|
-
/**
|
|
355
|
-
* Total number of items across all pages
|
|
356
|
-
*/
|
|
357
|
-
total_count?: number;
|
|
358
|
-
/**
|
|
359
|
-
* Total number of pages
|
|
360
|
-
*/
|
|
361
|
-
total_pages?: number;
|
|
362
|
-
}
|
|
363
|
-
export declare namespace PaginationMeta {
|
|
364
|
-
/**
|
|
365
|
-
* Cursor-based pagination pointers
|
|
366
|
-
*/
|
|
367
|
-
interface Cursors {
|
|
368
|
-
/**
|
|
369
|
-
* Cursor to fetch the next page
|
|
370
|
-
*/
|
|
371
|
-
after?: string | null;
|
|
372
|
-
/**
|
|
373
|
-
* Cursor to fetch the previous page
|
|
374
|
-
*/
|
|
375
|
-
before?: string | null;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
269
|
/**
|
|
379
270
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
380
271
|
* this shape and varies only in Payload.
|
|
@@ -447,48 +338,289 @@ export interface TemplateEventPayload {
|
|
|
447
338
|
*/
|
|
448
339
|
whatsapp_template_id?: string;
|
|
449
340
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Standard API response envelope for all v3 endpoints
|
|
343
|
+
*/
|
|
344
|
+
export interface WebhookCreateResponse {
|
|
345
|
+
/**
|
|
346
|
+
* The response data (null if error)
|
|
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;
|
|
457
361
|
}
|
|
458
|
-
export
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
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
|
+
}
|
|
475
429
|
}
|
|
476
430
|
/**
|
|
477
431
|
* Standard API response envelope for all v3 endpoints
|
|
478
432
|
*/
|
|
479
|
-
export interface
|
|
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 {
|
|
480
452
|
/**
|
|
481
453
|
* The response data (null if error)
|
|
482
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
|
+
*/
|
|
483
615
|
data?: WebhookListResponse.Data | null;
|
|
484
616
|
/**
|
|
485
617
|
* Error information
|
|
486
618
|
*/
|
|
487
|
-
error?:
|
|
619
|
+
error?: WebhookListResponse.Error | null;
|
|
488
620
|
/**
|
|
489
621
|
* Request and response metadata
|
|
490
622
|
*/
|
|
491
|
-
meta?:
|
|
623
|
+
meta?: WebhookListResponse.Meta;
|
|
492
624
|
/**
|
|
493
625
|
* Indicates whether the request was successful
|
|
494
626
|
*/
|
|
@@ -496,14 +628,126 @@ export interface WebhookListResponse {
|
|
|
496
628
|
}
|
|
497
629
|
export declare namespace WebhookListResponse {
|
|
498
630
|
/**
|
|
499
|
-
*
|
|
631
|
+
* A paginated list of webhooks.
|
|
500
632
|
*/
|
|
501
633
|
interface Data {
|
|
502
634
|
/**
|
|
503
635
|
* Pagination metadata for list responses
|
|
504
636
|
*/
|
|
505
|
-
pagination?:
|
|
506
|
-
|
|
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
|
|
714
|
+
*/
|
|
715
|
+
interface Error {
|
|
716
|
+
/**
|
|
717
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
718
|
+
*/
|
|
719
|
+
code?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Additional validation error details (field-level errors)
|
|
722
|
+
*/
|
|
723
|
+
details?: {
|
|
724
|
+
[key: string]: Array<string>;
|
|
725
|
+
} | null;
|
|
726
|
+
/**
|
|
727
|
+
* URL to documentation about this error
|
|
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;
|
|
507
751
|
}
|
|
508
752
|
}
|
|
509
753
|
/**
|
|
@@ -511,17 +755,17 @@ export declare namespace WebhookListResponse {
|
|
|
511
755
|
*/
|
|
512
756
|
export interface WebhookListEventTypesResponse {
|
|
513
757
|
/**
|
|
514
|
-
* The
|
|
758
|
+
* The webhook event types a customer can subscribe to.
|
|
515
759
|
*/
|
|
516
760
|
data?: WebhookListEventTypesResponse.Data | null;
|
|
517
761
|
/**
|
|
518
762
|
* Error information
|
|
519
763
|
*/
|
|
520
|
-
error?:
|
|
764
|
+
error?: WebhookListEventTypesResponse.Error | null;
|
|
521
765
|
/**
|
|
522
766
|
* Request and response metadata
|
|
523
767
|
*/
|
|
524
|
-
meta?:
|
|
768
|
+
meta?: WebhookListEventTypesResponse.Meta;
|
|
525
769
|
/**
|
|
526
770
|
* Indicates whether the request was successful
|
|
527
771
|
*/
|
|
@@ -529,10 +773,111 @@ export interface WebhookListEventTypesResponse {
|
|
|
529
773
|
}
|
|
530
774
|
export declare namespace WebhookListEventTypesResponse {
|
|
531
775
|
/**
|
|
532
|
-
* The
|
|
776
|
+
* The webhook event types a customer can subscribe to.
|
|
533
777
|
*/
|
|
534
778
|
interface Data {
|
|
535
|
-
|
|
779
|
+
/**
|
|
780
|
+
* The event_types on this page.
|
|
781
|
+
*/
|
|
782
|
+
event_types?: Array<Data.EventType>;
|
|
783
|
+
/**
|
|
784
|
+
* Pagination metadata for list responses
|
|
785
|
+
*/
|
|
786
|
+
pagination?: Data.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;
|
|
536
881
|
}
|
|
537
882
|
}
|
|
538
883
|
/**
|
|
@@ -540,17 +885,17 @@ export declare namespace WebhookListEventTypesResponse {
|
|
|
540
885
|
*/
|
|
541
886
|
export interface WebhookListEventsResponse {
|
|
542
887
|
/**
|
|
543
|
-
*
|
|
888
|
+
* A paginated list of webhook delivery records.
|
|
544
889
|
*/
|
|
545
890
|
data?: WebhookListEventsResponse.Data | null;
|
|
546
891
|
/**
|
|
547
892
|
* Error information
|
|
548
893
|
*/
|
|
549
|
-
error?:
|
|
894
|
+
error?: WebhookListEventsResponse.Error | null;
|
|
550
895
|
/**
|
|
551
896
|
* Request and response metadata
|
|
552
897
|
*/
|
|
553
|
-
meta?:
|
|
898
|
+
meta?: WebhookListEventsResponse.Meta;
|
|
554
899
|
/**
|
|
555
900
|
* Indicates whether the request was successful
|
|
556
901
|
*/
|
|
@@ -558,14 +903,17 @@ export interface WebhookListEventsResponse {
|
|
|
558
903
|
}
|
|
559
904
|
export declare namespace WebhookListEventsResponse {
|
|
560
905
|
/**
|
|
561
|
-
*
|
|
906
|
+
* A paginated list of webhook delivery records.
|
|
562
907
|
*/
|
|
563
908
|
interface Data {
|
|
909
|
+
/**
|
|
910
|
+
* The events on this page.
|
|
911
|
+
*/
|
|
564
912
|
events?: Array<Data.Event>;
|
|
565
913
|
/**
|
|
566
914
|
* Pagination metadata for list responses
|
|
567
915
|
*/
|
|
568
|
-
pagination?:
|
|
916
|
+
pagination?: Data.Pagination;
|
|
569
917
|
}
|
|
570
918
|
namespace Data {
|
|
571
919
|
interface Event {
|
|
@@ -587,6 +935,90 @@ export declare namespace WebhookListEventsResponse {
|
|
|
587
935
|
processing_started_at?: string | null;
|
|
588
936
|
response_body?: string | null;
|
|
589
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;
|
|
590
1022
|
}
|
|
591
1023
|
}
|
|
592
1024
|
/**
|
|
@@ -600,11 +1032,11 @@ export interface WebhookRotateSecretResponse {
|
|
|
600
1032
|
/**
|
|
601
1033
|
* Error information
|
|
602
1034
|
*/
|
|
603
|
-
error?:
|
|
1035
|
+
error?: WebhookRotateSecretResponse.Error | null;
|
|
604
1036
|
/**
|
|
605
1037
|
* Request and response metadata
|
|
606
1038
|
*/
|
|
607
|
-
meta?:
|
|
1039
|
+
meta?: WebhookRotateSecretResponse.Meta;
|
|
608
1040
|
/**
|
|
609
1041
|
* Indicates whether the request was successful
|
|
610
1042
|
*/
|
|
@@ -617,6 +1049,46 @@ export declare namespace WebhookRotateSecretResponse {
|
|
|
617
1049
|
interface Data {
|
|
618
1050
|
signing_secret?: string;
|
|
619
1051
|
}
|
|
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
|
+
}
|
|
620
1092
|
}
|
|
621
1093
|
/**
|
|
622
1094
|
* Standard API response envelope for all v3 endpoints
|
|
@@ -629,11 +1101,11 @@ export interface WebhookTestResponse {
|
|
|
629
1101
|
/**
|
|
630
1102
|
* Error information
|
|
631
1103
|
*/
|
|
632
|
-
error?:
|
|
1104
|
+
error?: WebhookTestResponse.Error | null;
|
|
633
1105
|
/**
|
|
634
1106
|
* Request and response metadata
|
|
635
1107
|
*/
|
|
636
|
-
meta?:
|
|
1108
|
+
meta?: WebhookTestResponse.Meta;
|
|
637
1109
|
/**
|
|
638
1110
|
* Indicates whether the request was successful
|
|
639
1111
|
*/
|
|
@@ -647,6 +1119,135 @@ export declare namespace WebhookTestResponse {
|
|
|
647
1119
|
message?: string;
|
|
648
1120
|
success?: boolean;
|
|
649
1121
|
}
|
|
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
|
+
}
|
|
650
1251
|
}
|
|
651
1252
|
export interface WebhookCreateParams {
|
|
652
1253
|
/**
|
|
@@ -869,6 +1470,6 @@ export interface WebhookToggleStatusParams {
|
|
|
869
1470
|
'x-profile-id'?: string;
|
|
870
1471
|
}
|
|
871
1472
|
export declare namespace Webhooks {
|
|
872
|
-
export { type
|
|
1473
|
+
export { type InboundMessageEvent as InboundMessageEvent, type InboundMessageEventPayload as InboundMessageEventPayload, type MessageEvent as MessageEvent, type MessageEventPayload as MessageEventPayload, type TemplateEvent as TemplateEvent, type TemplateEventPayload as TemplateEventPayload, type WebhookCreateResponse as WebhookCreateResponse, type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookListResponse as WebhookListResponse, type WebhookListEventTypesResponse as WebhookListEventTypesResponse, type WebhookListEventsResponse as WebhookListEventsResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookToggleStatusResponse as WebhookToggleStatusResponse, 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, };
|
|
873
1474
|
}
|
|
874
1475
|
//# sourceMappingURL=webhooks.d.mts.map
|