@sentdm/sentdm 0.34.0 → 0.36.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 +15 -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 +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -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 +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- 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 +186 -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 +964 -241
- 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
|
@@ -8,7 +8,11 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Delivery reports and inbound messages, pushed to you.
|
|
12
|
+
*
|
|
13
|
+
* 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.
|
|
14
|
+
*
|
|
15
|
+
* **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.
|
|
12
16
|
*/
|
|
13
17
|
export class Webhooks extends APIResource {
|
|
14
18
|
/**
|
|
@@ -16,10 +20,10 @@ export class Webhooks extends APIResource {
|
|
|
16
20
|
*
|
|
17
21
|
* @example
|
|
18
22
|
* ```ts
|
|
19
|
-
* const
|
|
23
|
+
* const webhook = await client.webhooks.create();
|
|
20
24
|
* ```
|
|
21
25
|
*/
|
|
22
|
-
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<
|
|
26
|
+
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse> {
|
|
23
27
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
24
28
|
return this._client.post('/v3/webhooks', {
|
|
25
29
|
body,
|
|
@@ -39,7 +43,7 @@ export class Webhooks extends APIResource {
|
|
|
39
43
|
*
|
|
40
44
|
* @example
|
|
41
45
|
* ```ts
|
|
42
|
-
* const
|
|
46
|
+
* const webhook = await client.webhooks.retrieve(
|
|
43
47
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
44
48
|
* );
|
|
45
49
|
* ```
|
|
@@ -48,7 +52,7 @@ export class Webhooks extends APIResource {
|
|
|
48
52
|
id: string,
|
|
49
53
|
params: WebhookRetrieveParams | null | undefined = {},
|
|
50
54
|
options?: RequestOptions,
|
|
51
|
-
): APIPromise<
|
|
55
|
+
): APIPromise<WebhookRetrieveResponse> {
|
|
52
56
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
53
57
|
return this._client.get(path`/v3/webhooks/${id}`, {
|
|
54
58
|
...options,
|
|
@@ -64,12 +68,16 @@ export class Webhooks extends APIResource {
|
|
|
64
68
|
*
|
|
65
69
|
* @example
|
|
66
70
|
* ```ts
|
|
67
|
-
* const
|
|
71
|
+
* const webhook = await client.webhooks.update(
|
|
68
72
|
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
69
73
|
* );
|
|
70
74
|
* ```
|
|
71
75
|
*/
|
|
72
|
-
update(
|
|
76
|
+
update(
|
|
77
|
+
id: string,
|
|
78
|
+
params: WebhookUpdateParams,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): APIPromise<WebhookUpdateResponse> {
|
|
73
81
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
74
82
|
return this._client.put(path`/v3/webhooks/${id}`, {
|
|
75
83
|
body,
|
|
@@ -241,17 +249,16 @@ export class Webhooks extends APIResource {
|
|
|
241
249
|
*
|
|
242
250
|
* @example
|
|
243
251
|
* ```ts
|
|
244
|
-
* const
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* );
|
|
252
|
+
* const response = await client.webhooks.toggleStatus(
|
|
253
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
254
|
+
* );
|
|
248
255
|
* ```
|
|
249
256
|
*/
|
|
250
257
|
toggleStatus(
|
|
251
258
|
id: string,
|
|
252
259
|
params: WebhookToggleStatusParams,
|
|
253
260
|
options?: RequestOptions,
|
|
254
|
-
): APIPromise<
|
|
261
|
+
): APIPromise<WebhookToggleStatusResponse> {
|
|
255
262
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
256
263
|
return this._client.patch(path`/v3/webhooks/${id}/toggle-status`, {
|
|
257
264
|
body,
|
|
@@ -267,76 +274,6 @@ export class Webhooks extends APIResource {
|
|
|
267
274
|
}
|
|
268
275
|
}
|
|
269
276
|
|
|
270
|
-
/**
|
|
271
|
-
* Request and response metadata
|
|
272
|
-
*/
|
|
273
|
-
export interface APIMeta {
|
|
274
|
-
/**
|
|
275
|
-
* Unique identifier for this request (for tracing and support)
|
|
276
|
-
*/
|
|
277
|
-
request_id?: string;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Server timestamp when the response was generated
|
|
281
|
-
*/
|
|
282
|
-
timestamp?: string;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* API version used for this request
|
|
286
|
-
*/
|
|
287
|
-
version?: string;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Standard API response envelope for all v3 endpoints
|
|
292
|
-
*/
|
|
293
|
-
export interface APIResponseWebhook {
|
|
294
|
-
/**
|
|
295
|
-
* The response data (null if error)
|
|
296
|
-
*/
|
|
297
|
-
data?: WebhookResponse | null;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Error information
|
|
301
|
-
*/
|
|
302
|
-
error?: ErrorDetail | null;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Request and response metadata
|
|
306
|
-
*/
|
|
307
|
-
meta?: APIMeta;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Indicates whether the request was successful
|
|
311
|
-
*/
|
|
312
|
-
success?: boolean;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Error information
|
|
317
|
-
*/
|
|
318
|
-
export interface ErrorDetail {
|
|
319
|
-
/**
|
|
320
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
321
|
-
*/
|
|
322
|
-
code?: string;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Additional validation error details (field-level errors)
|
|
326
|
-
*/
|
|
327
|
-
details?: { [key: string]: Array<string> } | null;
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* URL to documentation about this error
|
|
331
|
-
*/
|
|
332
|
-
doc_url?: string | null;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Human-readable error message
|
|
336
|
-
*/
|
|
337
|
-
message?: string;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
277
|
/**
|
|
341
278
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
342
279
|
* this shape and varies only in Payload.
|
|
@@ -374,6 +311,16 @@ export interface InboundMessageEvent {
|
|
|
374
311
|
* numbers.
|
|
375
312
|
*/
|
|
376
313
|
export interface InboundMessageEventPayload {
|
|
314
|
+
/**
|
|
315
|
+
* The contact's number in E.164 format, meaning the number the message came from.
|
|
316
|
+
*/
|
|
317
|
+
inbound_number: string;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ).
|
|
321
|
+
*/
|
|
322
|
+
received_at: string;
|
|
323
|
+
|
|
377
324
|
/**
|
|
378
325
|
* The account the message belongs to.
|
|
379
326
|
*/
|
|
@@ -384,11 +331,6 @@ export interface InboundMessageEventPayload {
|
|
|
384
331
|
*/
|
|
385
332
|
channel?: string;
|
|
386
333
|
|
|
387
|
-
/**
|
|
388
|
-
* The contact's number in E.164 format, meaning the number the message came from.
|
|
389
|
-
*/
|
|
390
|
-
inbound_number?: string;
|
|
391
|
-
|
|
392
334
|
/**
|
|
393
335
|
* The inbound message.
|
|
394
336
|
*/
|
|
@@ -399,11 +341,6 @@ export interface InboundMessageEventPayload {
|
|
|
399
341
|
*/
|
|
400
342
|
outbound_number?: string;
|
|
401
343
|
|
|
402
|
-
/**
|
|
403
|
-
* When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ).
|
|
404
|
-
*/
|
|
405
|
-
received_at?: string;
|
|
406
|
-
|
|
407
344
|
/**
|
|
408
345
|
* The message body. Sent as null when the inbound message carried no text, for
|
|
409
346
|
* example a media-only message. The field is always present, so read it and check
|
|
@@ -457,6 +394,13 @@ export interface MessageEvent {
|
|
|
457
394
|
* status.
|
|
458
395
|
*/
|
|
459
396
|
export interface MessageEventPayload {
|
|
397
|
+
/**
|
|
398
|
+
* The status the message just reached, for example SENT, DELIVERED, or FAILED.
|
|
399
|
+
* Sent means dispatched and delivered means confirmed, so treat them as distinct
|
|
400
|
+
* outcomes.
|
|
401
|
+
*/
|
|
402
|
+
message_status: string;
|
|
403
|
+
|
|
460
404
|
/**
|
|
461
405
|
* The account the message belongs to.
|
|
462
406
|
*/
|
|
@@ -479,13 +423,6 @@ export interface MessageEventPayload {
|
|
|
479
423
|
*/
|
|
480
424
|
message_id?: string;
|
|
481
425
|
|
|
482
|
-
/**
|
|
483
|
-
* The status the message just reached, for example SENT, DELIVERED, or FAILED.
|
|
484
|
-
* Sent means dispatched and delivered means confirmed, so treat them as distinct
|
|
485
|
-
* outcomes.
|
|
486
|
-
*/
|
|
487
|
-
message_status?: string;
|
|
488
|
-
|
|
489
426
|
/**
|
|
490
427
|
* The recipient's number in E.164 format.
|
|
491
428
|
*/
|
|
@@ -508,66 +445,6 @@ export interface MessageEventPayload {
|
|
|
508
445
|
updated_at?: string;
|
|
509
446
|
}
|
|
510
447
|
|
|
511
|
-
export interface MutationRequest {
|
|
512
|
-
/**
|
|
513
|
-
* Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
514
|
-
* for testing integrations without actual execution
|
|
515
|
-
*/
|
|
516
|
-
sandbox?: boolean;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Pagination metadata for list responses
|
|
521
|
-
*/
|
|
522
|
-
export interface PaginationMeta {
|
|
523
|
-
/**
|
|
524
|
-
* Cursor-based pagination pointers
|
|
525
|
-
*/
|
|
526
|
-
cursors?: PaginationMeta.Cursors | null;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Whether there are more pages after this one
|
|
530
|
-
*/
|
|
531
|
-
has_more?: boolean;
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Current page number (1-indexed)
|
|
535
|
-
*/
|
|
536
|
-
page?: number;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Number of items per page
|
|
540
|
-
*/
|
|
541
|
-
page_size?: number;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Total number of items across all pages
|
|
545
|
-
*/
|
|
546
|
-
total_count?: number;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* Total number of pages
|
|
550
|
-
*/
|
|
551
|
-
total_pages?: number;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export namespace PaginationMeta {
|
|
555
|
-
/**
|
|
556
|
-
* Cursor-based pagination pointers
|
|
557
|
-
*/
|
|
558
|
-
export interface Cursors {
|
|
559
|
-
/**
|
|
560
|
-
* Cursor to fetch the next page
|
|
561
|
-
*/
|
|
562
|
-
after?: string | null;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* Cursor to fetch the previous page
|
|
566
|
-
*/
|
|
567
|
-
before?: string | null;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
448
|
/**
|
|
572
449
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
573
450
|
* this shape and varies only in Payload.
|
|
@@ -605,6 +482,17 @@ export interface TemplateEvent {
|
|
|
605
482
|
* changes, so you can react without polling.
|
|
606
483
|
*/
|
|
607
484
|
export interface TemplateEventPayload {
|
|
485
|
+
/**
|
|
486
|
+
* The review status the template just reached, for example APPROVED or REJECTED.
|
|
487
|
+
*/
|
|
488
|
+
status: string;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* The template's identifier with Meta, assigned when the template is submitted for
|
|
492
|
+
* review.
|
|
493
|
+
*/
|
|
494
|
+
whatsapp_template_id: string;
|
|
495
|
+
|
|
608
496
|
/**
|
|
609
497
|
* The account the template belongs to.
|
|
610
498
|
*/
|
|
@@ -631,11 +519,6 @@ export interface TemplateEventPayload {
|
|
|
631
519
|
*/
|
|
632
520
|
reason?: string | null;
|
|
633
521
|
|
|
634
|
-
/**
|
|
635
|
-
* The review status the template just reached, for example APPROVED or REJECTED.
|
|
636
|
-
*/
|
|
637
|
-
status?: string;
|
|
638
|
-
|
|
639
522
|
/**
|
|
640
523
|
* The template in Sent.
|
|
641
524
|
*/
|
|
@@ -645,76 +528,137 @@ export interface TemplateEventPayload {
|
|
|
645
528
|
* The template's display name.
|
|
646
529
|
*/
|
|
647
530
|
template_name?: string;
|
|
531
|
+
}
|
|
648
532
|
|
|
533
|
+
/**
|
|
534
|
+
* Standard API response envelope for all v3 endpoints
|
|
535
|
+
*/
|
|
536
|
+
export interface WebhookCreateResponse {
|
|
649
537
|
/**
|
|
650
|
-
* The
|
|
651
|
-
|
|
538
|
+
* The response data (null if error)
|
|
539
|
+
*/
|
|
540
|
+
data?: WebhookCreateResponse.Data | null;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Error information
|
|
544
|
+
*/
|
|
545
|
+
error?: WebhookCreateResponse.Error | null;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Request and response metadata
|
|
549
|
+
*/
|
|
550
|
+
meta?: WebhookCreateResponse.Meta;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Indicates whether the request was successful
|
|
652
554
|
*/
|
|
653
|
-
|
|
555
|
+
success?: boolean;
|
|
654
556
|
}
|
|
655
557
|
|
|
656
|
-
export
|
|
657
|
-
|
|
558
|
+
export namespace WebhookCreateResponse {
|
|
559
|
+
/**
|
|
560
|
+
* The response data (null if error)
|
|
561
|
+
*/
|
|
562
|
+
export interface Data {
|
|
563
|
+
id?: string;
|
|
658
564
|
|
|
659
|
-
|
|
565
|
+
consecutive_failures?: number;
|
|
660
566
|
|
|
661
|
-
|
|
567
|
+
created_at?: string;
|
|
662
568
|
|
|
663
|
-
|
|
569
|
+
/**
|
|
570
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
571
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
572
|
+
*/
|
|
573
|
+
customer_id?: string;
|
|
664
574
|
|
|
665
|
-
|
|
575
|
+
display_name?: string;
|
|
666
576
|
|
|
667
|
-
|
|
668
|
-
}
|
|
577
|
+
endpoint_url?: string;
|
|
669
578
|
|
|
670
|
-
|
|
671
|
-
id?: string;
|
|
579
|
+
event_filters?: { [key: string]: Array<string> } | null;
|
|
672
580
|
|
|
673
|
-
|
|
581
|
+
event_types?: Array<string>;
|
|
674
582
|
|
|
675
|
-
|
|
583
|
+
is_active?: boolean;
|
|
676
584
|
|
|
677
|
-
|
|
585
|
+
last_delivery_attempt_at?: string | null;
|
|
678
586
|
|
|
679
|
-
|
|
587
|
+
last_successful_delivery_at?: string | null;
|
|
680
588
|
|
|
681
|
-
|
|
589
|
+
retry_count?: number;
|
|
682
590
|
|
|
683
|
-
|
|
591
|
+
signing_secret?: string | null;
|
|
684
592
|
|
|
685
|
-
|
|
593
|
+
timeout_seconds?: number;
|
|
686
594
|
|
|
687
|
-
|
|
595
|
+
updated_at?: string | null;
|
|
596
|
+
}
|
|
688
597
|
|
|
689
|
-
|
|
598
|
+
/**
|
|
599
|
+
* Error information
|
|
600
|
+
*/
|
|
601
|
+
export interface Error {
|
|
602
|
+
/**
|
|
603
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
604
|
+
*/
|
|
605
|
+
code?: string;
|
|
690
606
|
|
|
691
|
-
|
|
607
|
+
/**
|
|
608
|
+
* Additional validation error details (field-level errors)
|
|
609
|
+
*/
|
|
610
|
+
details?: { [key: string]: Array<string> } | null;
|
|
692
611
|
|
|
693
|
-
|
|
612
|
+
/**
|
|
613
|
+
* URL to documentation about this error
|
|
614
|
+
*/
|
|
615
|
+
doc_url?: string | null;
|
|
694
616
|
|
|
695
|
-
|
|
617
|
+
/**
|
|
618
|
+
* Human-readable error message
|
|
619
|
+
*/
|
|
620
|
+
message?: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Request and response metadata
|
|
625
|
+
*/
|
|
626
|
+
export interface Meta {
|
|
627
|
+
/**
|
|
628
|
+
* Unique identifier for this request (for tracing and support)
|
|
629
|
+
*/
|
|
630
|
+
request_id?: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Server timestamp when the response was generated
|
|
634
|
+
*/
|
|
635
|
+
timestamp?: string;
|
|
696
636
|
|
|
697
|
-
|
|
637
|
+
/**
|
|
638
|
+
* API version used for this request
|
|
639
|
+
*/
|
|
640
|
+
version?: string;
|
|
641
|
+
}
|
|
698
642
|
}
|
|
699
643
|
|
|
700
644
|
/**
|
|
701
645
|
* Standard API response envelope for all v3 endpoints
|
|
702
646
|
*/
|
|
703
|
-
export interface
|
|
647
|
+
export interface WebhookRetrieveResponse {
|
|
704
648
|
/**
|
|
705
649
|
* The response data (null if error)
|
|
706
650
|
*/
|
|
707
|
-
data?:
|
|
651
|
+
data?: WebhookRetrieveResponse.Data | null;
|
|
708
652
|
|
|
709
653
|
/**
|
|
710
654
|
* Error information
|
|
711
655
|
*/
|
|
712
|
-
error?:
|
|
656
|
+
error?: WebhookRetrieveResponse.Error | null;
|
|
713
657
|
|
|
714
658
|
/**
|
|
715
659
|
* Request and response metadata
|
|
716
660
|
*/
|
|
717
|
-
meta?:
|
|
661
|
+
meta?: WebhookRetrieveResponse.Meta;
|
|
718
662
|
|
|
719
663
|
/**
|
|
720
664
|
* Indicates whether the request was successful
|
|
@@ -722,72 +666,110 @@ export interface WebhookListResponse {
|
|
|
722
666
|
success?: boolean;
|
|
723
667
|
}
|
|
724
668
|
|
|
725
|
-
export namespace
|
|
669
|
+
export namespace WebhookRetrieveResponse {
|
|
726
670
|
/**
|
|
727
671
|
* The response data (null if error)
|
|
728
672
|
*/
|
|
729
673
|
export interface Data {
|
|
674
|
+
id?: string;
|
|
675
|
+
|
|
676
|
+
consecutive_failures?: number;
|
|
677
|
+
|
|
678
|
+
created_at?: string;
|
|
679
|
+
|
|
730
680
|
/**
|
|
731
|
-
*
|
|
681
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
682
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
732
683
|
*/
|
|
733
|
-
|
|
684
|
+
customer_id?: string;
|
|
734
685
|
|
|
735
|
-
|
|
736
|
-
}
|
|
737
|
-
}
|
|
686
|
+
display_name?: string;
|
|
738
687
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
688
|
+
endpoint_url?: string;
|
|
689
|
+
|
|
690
|
+
event_filters?: { [key: string]: Array<string> } | null;
|
|
691
|
+
|
|
692
|
+
event_types?: Array<string>;
|
|
693
|
+
|
|
694
|
+
is_active?: boolean;
|
|
695
|
+
|
|
696
|
+
last_delivery_attempt_at?: string | null;
|
|
697
|
+
|
|
698
|
+
last_successful_delivery_at?: string | null;
|
|
699
|
+
|
|
700
|
+
retry_count?: number;
|
|
701
|
+
|
|
702
|
+
signing_secret?: string | null;
|
|
703
|
+
|
|
704
|
+
timeout_seconds?: number;
|
|
705
|
+
|
|
706
|
+
updated_at?: string | null;
|
|
707
|
+
}
|
|
747
708
|
|
|
748
709
|
/**
|
|
749
710
|
* Error information
|
|
750
711
|
*/
|
|
751
|
-
|
|
712
|
+
export interface Error {
|
|
713
|
+
/**
|
|
714
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
715
|
+
*/
|
|
716
|
+
code?: string;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Additional validation error details (field-level errors)
|
|
720
|
+
*/
|
|
721
|
+
details?: { [key: string]: Array<string> } | null;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* URL to documentation about this error
|
|
725
|
+
*/
|
|
726
|
+
doc_url?: string | null;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Human-readable error message
|
|
730
|
+
*/
|
|
731
|
+
message?: string;
|
|
732
|
+
}
|
|
752
733
|
|
|
753
734
|
/**
|
|
754
735
|
* Request and response metadata
|
|
755
736
|
*/
|
|
756
|
-
|
|
737
|
+
export interface Meta {
|
|
738
|
+
/**
|
|
739
|
+
* Unique identifier for this request (for tracing and support)
|
|
740
|
+
*/
|
|
741
|
+
request_id?: string;
|
|
757
742
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
}
|
|
743
|
+
/**
|
|
744
|
+
* Server timestamp when the response was generated
|
|
745
|
+
*/
|
|
746
|
+
timestamp?: string;
|
|
763
747
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
export interface Data {
|
|
769
|
-
event_types?: Array<WebhooksAPI.WebhookEventType>;
|
|
748
|
+
/**
|
|
749
|
+
* API version used for this request
|
|
750
|
+
*/
|
|
751
|
+
version?: string;
|
|
770
752
|
}
|
|
771
753
|
}
|
|
772
754
|
|
|
773
755
|
/**
|
|
774
756
|
* Standard API response envelope for all v3 endpoints
|
|
775
757
|
*/
|
|
776
|
-
export interface
|
|
758
|
+
export interface WebhookUpdateResponse {
|
|
777
759
|
/**
|
|
778
760
|
* The response data (null if error)
|
|
779
761
|
*/
|
|
780
|
-
data?:
|
|
762
|
+
data?: WebhookUpdateResponse.Data | null;
|
|
781
763
|
|
|
782
764
|
/**
|
|
783
765
|
* Error information
|
|
784
766
|
*/
|
|
785
|
-
error?:
|
|
767
|
+
error?: WebhookUpdateResponse.Error | null;
|
|
786
768
|
|
|
787
769
|
/**
|
|
788
770
|
* Request and response metadata
|
|
789
771
|
*/
|
|
790
|
-
meta?:
|
|
772
|
+
meta?: WebhookUpdateResponse.Meta;
|
|
791
773
|
|
|
792
774
|
/**
|
|
793
775
|
* Indicates whether the request was successful
|
|
@@ -795,18 +777,464 @@ export interface WebhookListEventsResponse {
|
|
|
795
777
|
success?: boolean;
|
|
796
778
|
}
|
|
797
779
|
|
|
798
|
-
export namespace
|
|
780
|
+
export namespace WebhookUpdateResponse {
|
|
799
781
|
/**
|
|
800
782
|
* The response data (null if error)
|
|
801
783
|
*/
|
|
802
784
|
export interface Data {
|
|
803
|
-
|
|
785
|
+
id?: string;
|
|
786
|
+
|
|
787
|
+
consecutive_failures?: number;
|
|
788
|
+
|
|
789
|
+
created_at?: string;
|
|
804
790
|
|
|
805
791
|
/**
|
|
806
|
-
*
|
|
792
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
793
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
807
794
|
*/
|
|
808
|
-
|
|
809
|
-
|
|
795
|
+
customer_id?: string;
|
|
796
|
+
|
|
797
|
+
display_name?: string;
|
|
798
|
+
|
|
799
|
+
endpoint_url?: string;
|
|
800
|
+
|
|
801
|
+
event_filters?: { [key: string]: Array<string> } | null;
|
|
802
|
+
|
|
803
|
+
event_types?: Array<string>;
|
|
804
|
+
|
|
805
|
+
is_active?: boolean;
|
|
806
|
+
|
|
807
|
+
last_delivery_attempt_at?: string | null;
|
|
808
|
+
|
|
809
|
+
last_successful_delivery_at?: string | null;
|
|
810
|
+
|
|
811
|
+
retry_count?: number;
|
|
812
|
+
|
|
813
|
+
signing_secret?: string | null;
|
|
814
|
+
|
|
815
|
+
timeout_seconds?: number;
|
|
816
|
+
|
|
817
|
+
updated_at?: string | null;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Error information
|
|
822
|
+
*/
|
|
823
|
+
export interface Error {
|
|
824
|
+
/**
|
|
825
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
826
|
+
*/
|
|
827
|
+
code?: string;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Additional validation error details (field-level errors)
|
|
831
|
+
*/
|
|
832
|
+
details?: { [key: string]: Array<string> } | null;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* URL to documentation about this error
|
|
836
|
+
*/
|
|
837
|
+
doc_url?: string | null;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Human-readable error message
|
|
841
|
+
*/
|
|
842
|
+
message?: string;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Request and response metadata
|
|
847
|
+
*/
|
|
848
|
+
export interface Meta {
|
|
849
|
+
/**
|
|
850
|
+
* Unique identifier for this request (for tracing and support)
|
|
851
|
+
*/
|
|
852
|
+
request_id?: string;
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Server timestamp when the response was generated
|
|
856
|
+
*/
|
|
857
|
+
timestamp?: string;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* API version used for this request
|
|
861
|
+
*/
|
|
862
|
+
version?: string;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Standard API response envelope for all v3 endpoints
|
|
868
|
+
*/
|
|
869
|
+
export interface WebhookListResponse {
|
|
870
|
+
/**
|
|
871
|
+
* A paginated list of webhooks.
|
|
872
|
+
*/
|
|
873
|
+
data?: WebhookListResponse.Data | null;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Error information
|
|
877
|
+
*/
|
|
878
|
+
error?: WebhookListResponse.Error | null;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Request and response metadata
|
|
882
|
+
*/
|
|
883
|
+
meta?: WebhookListResponse.Meta;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Indicates whether the request was successful
|
|
887
|
+
*/
|
|
888
|
+
success?: boolean;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export namespace WebhookListResponse {
|
|
892
|
+
/**
|
|
893
|
+
* A paginated list of webhooks.
|
|
894
|
+
*/
|
|
895
|
+
export interface Data {
|
|
896
|
+
/**
|
|
897
|
+
* Pagination metadata for list responses
|
|
898
|
+
*/
|
|
899
|
+
pagination?: Data.Pagination;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* The webhooks on this page.
|
|
903
|
+
*/
|
|
904
|
+
webhooks?: Array<Data.Webhook>;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
export namespace Data {
|
|
908
|
+
/**
|
|
909
|
+
* Pagination metadata for list responses
|
|
910
|
+
*/
|
|
911
|
+
export interface Pagination {
|
|
912
|
+
/**
|
|
913
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
914
|
+
*/
|
|
915
|
+
cursors?: Pagination.Cursors | null;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Whether there are more pages after this one
|
|
919
|
+
*/
|
|
920
|
+
has_more?: boolean;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Current page number (1-indexed)
|
|
924
|
+
*/
|
|
925
|
+
page?: number;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Number of items per page
|
|
929
|
+
*/
|
|
930
|
+
page_size?: number;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Total number of items across all pages
|
|
934
|
+
*/
|
|
935
|
+
total_count?: number;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Total number of pages
|
|
939
|
+
*/
|
|
940
|
+
total_pages?: number;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export namespace Pagination {
|
|
944
|
+
/**
|
|
945
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
946
|
+
*/
|
|
947
|
+
export interface Cursors {
|
|
948
|
+
/**
|
|
949
|
+
* Cursor to fetch the next page.
|
|
950
|
+
*/
|
|
951
|
+
after?: string | null;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Cursor to fetch the previous page.
|
|
955
|
+
*/
|
|
956
|
+
before?: string | null;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export interface Webhook {
|
|
961
|
+
id?: string;
|
|
962
|
+
|
|
963
|
+
consecutive_failures?: number;
|
|
964
|
+
|
|
965
|
+
created_at?: string;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
969
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
970
|
+
*/
|
|
971
|
+
customer_id?: string;
|
|
972
|
+
|
|
973
|
+
display_name?: string;
|
|
974
|
+
|
|
975
|
+
endpoint_url?: string;
|
|
976
|
+
|
|
977
|
+
event_filters?: { [key: string]: Array<string> } | null;
|
|
978
|
+
|
|
979
|
+
event_types?: Array<string>;
|
|
980
|
+
|
|
981
|
+
is_active?: boolean;
|
|
982
|
+
|
|
983
|
+
last_delivery_attempt_at?: string | null;
|
|
984
|
+
|
|
985
|
+
last_successful_delivery_at?: string | null;
|
|
986
|
+
|
|
987
|
+
retry_count?: number;
|
|
988
|
+
|
|
989
|
+
signing_secret?: string | null;
|
|
990
|
+
|
|
991
|
+
timeout_seconds?: number;
|
|
992
|
+
|
|
993
|
+
updated_at?: string | null;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Error information
|
|
999
|
+
*/
|
|
1000
|
+
export interface Error {
|
|
1001
|
+
/**
|
|
1002
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1003
|
+
*/
|
|
1004
|
+
code?: string;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Additional validation error details (field-level errors)
|
|
1008
|
+
*/
|
|
1009
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* URL to documentation about this error
|
|
1013
|
+
*/
|
|
1014
|
+
doc_url?: string | null;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Human-readable error message
|
|
1018
|
+
*/
|
|
1019
|
+
message?: string;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Request and response metadata
|
|
1024
|
+
*/
|
|
1025
|
+
export interface Meta {
|
|
1026
|
+
/**
|
|
1027
|
+
* Unique identifier for this request (for tracing and support)
|
|
1028
|
+
*/
|
|
1029
|
+
request_id?: string;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Server timestamp when the response was generated
|
|
1033
|
+
*/
|
|
1034
|
+
timestamp?: string;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* API version used for this request
|
|
1038
|
+
*/
|
|
1039
|
+
version?: string;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Standard API response envelope for all v3 endpoints
|
|
1045
|
+
*/
|
|
1046
|
+
export interface WebhookListEventTypesResponse {
|
|
1047
|
+
/**
|
|
1048
|
+
* The webhook event types a customer can subscribe to.
|
|
1049
|
+
*/
|
|
1050
|
+
data?: WebhookListEventTypesResponse.Data | null;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Error information
|
|
1054
|
+
*/
|
|
1055
|
+
error?: WebhookListEventTypesResponse.Error | null;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Request and response metadata
|
|
1059
|
+
*/
|
|
1060
|
+
meta?: WebhookListEventTypesResponse.Meta;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Indicates whether the request was successful
|
|
1064
|
+
*/
|
|
1065
|
+
success?: boolean;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
export namespace WebhookListEventTypesResponse {
|
|
1069
|
+
/**
|
|
1070
|
+
* The webhook event types a customer can subscribe to.
|
|
1071
|
+
*/
|
|
1072
|
+
export interface Data {
|
|
1073
|
+
/**
|
|
1074
|
+
* The event_types on this page.
|
|
1075
|
+
*/
|
|
1076
|
+
event_types?: Array<Data.EventType>;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Pagination metadata for list responses
|
|
1080
|
+
*/
|
|
1081
|
+
pagination?: Data.Pagination;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
export namespace Data {
|
|
1085
|
+
export interface EventType {
|
|
1086
|
+
description?: string | null;
|
|
1087
|
+
|
|
1088
|
+
display_name?: string;
|
|
1089
|
+
|
|
1090
|
+
event_type?: string | null;
|
|
1091
|
+
|
|
1092
|
+
is_active?: boolean;
|
|
1093
|
+
|
|
1094
|
+
name?: string;
|
|
1095
|
+
|
|
1096
|
+
sub_types?: Array<unknown> | null;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Pagination metadata for list responses
|
|
1101
|
+
*/
|
|
1102
|
+
export interface Pagination {
|
|
1103
|
+
/**
|
|
1104
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
1105
|
+
*/
|
|
1106
|
+
cursors?: Pagination.Cursors | null;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Whether there are more pages after this one
|
|
1110
|
+
*/
|
|
1111
|
+
has_more?: boolean;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Current page number (1-indexed)
|
|
1115
|
+
*/
|
|
1116
|
+
page?: number;
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Number of items per page
|
|
1120
|
+
*/
|
|
1121
|
+
page_size?: number;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Total number of items across all pages
|
|
1125
|
+
*/
|
|
1126
|
+
total_count?: number;
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Total number of pages
|
|
1130
|
+
*/
|
|
1131
|
+
total_pages?: number;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
export namespace Pagination {
|
|
1135
|
+
/**
|
|
1136
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
1137
|
+
*/
|
|
1138
|
+
export interface Cursors {
|
|
1139
|
+
/**
|
|
1140
|
+
* Cursor to fetch the next page.
|
|
1141
|
+
*/
|
|
1142
|
+
after?: string | null;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Cursor to fetch the previous page.
|
|
1146
|
+
*/
|
|
1147
|
+
before?: string | null;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Error information
|
|
1154
|
+
*/
|
|
1155
|
+
export interface Error {
|
|
1156
|
+
/**
|
|
1157
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1158
|
+
*/
|
|
1159
|
+
code?: string;
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Additional validation error details (field-level errors)
|
|
1163
|
+
*/
|
|
1164
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* URL to documentation about this error
|
|
1168
|
+
*/
|
|
1169
|
+
doc_url?: string | null;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Human-readable error message
|
|
1173
|
+
*/
|
|
1174
|
+
message?: string;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Request and response metadata
|
|
1179
|
+
*/
|
|
1180
|
+
export interface Meta {
|
|
1181
|
+
/**
|
|
1182
|
+
* Unique identifier for this request (for tracing and support)
|
|
1183
|
+
*/
|
|
1184
|
+
request_id?: string;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Server timestamp when the response was generated
|
|
1188
|
+
*/
|
|
1189
|
+
timestamp?: string;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* API version used for this request
|
|
1193
|
+
*/
|
|
1194
|
+
version?: string;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Standard API response envelope for all v3 endpoints
|
|
1200
|
+
*/
|
|
1201
|
+
export interface WebhookListEventsResponse {
|
|
1202
|
+
/**
|
|
1203
|
+
* A paginated list of webhook delivery records.
|
|
1204
|
+
*/
|
|
1205
|
+
data?: WebhookListEventsResponse.Data | null;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Error information
|
|
1209
|
+
*/
|
|
1210
|
+
error?: WebhookListEventsResponse.Error | null;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Request and response metadata
|
|
1214
|
+
*/
|
|
1215
|
+
meta?: WebhookListEventsResponse.Meta;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Indicates whether the request was successful
|
|
1219
|
+
*/
|
|
1220
|
+
success?: boolean;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
export namespace WebhookListEventsResponse {
|
|
1224
|
+
/**
|
|
1225
|
+
* A paginated list of webhook delivery records.
|
|
1226
|
+
*/
|
|
1227
|
+
export interface Data {
|
|
1228
|
+
/**
|
|
1229
|
+
* The events on this page.
|
|
1230
|
+
*/
|
|
1231
|
+
events?: Array<Data.Event>;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Pagination metadata for list responses
|
|
1235
|
+
*/
|
|
1236
|
+
pagination?: Data.Pagination;
|
|
1237
|
+
}
|
|
810
1238
|
|
|
811
1239
|
export namespace Data {
|
|
812
1240
|
export interface Event {
|
|
@@ -838,6 +1266,103 @@ export namespace WebhookListEventsResponse {
|
|
|
838
1266
|
|
|
839
1267
|
response_body?: string | null;
|
|
840
1268
|
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Pagination metadata for list responses
|
|
1272
|
+
*/
|
|
1273
|
+
export interface Pagination {
|
|
1274
|
+
/**
|
|
1275
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
1276
|
+
*/
|
|
1277
|
+
cursors?: Pagination.Cursors | null;
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Whether there are more pages after this one
|
|
1281
|
+
*/
|
|
1282
|
+
has_more?: boolean;
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Current page number (1-indexed)
|
|
1286
|
+
*/
|
|
1287
|
+
page?: number;
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Number of items per page
|
|
1291
|
+
*/
|
|
1292
|
+
page_size?: number;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Total number of items across all pages
|
|
1296
|
+
*/
|
|
1297
|
+
total_count?: number;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Total number of pages
|
|
1301
|
+
*/
|
|
1302
|
+
total_pages?: number;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
export namespace Pagination {
|
|
1306
|
+
/**
|
|
1307
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
1308
|
+
*/
|
|
1309
|
+
export interface Cursors {
|
|
1310
|
+
/**
|
|
1311
|
+
* Cursor to fetch the next page.
|
|
1312
|
+
*/
|
|
1313
|
+
after?: string | null;
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Cursor to fetch the previous page.
|
|
1317
|
+
*/
|
|
1318
|
+
before?: string | null;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Error information
|
|
1325
|
+
*/
|
|
1326
|
+
export interface Error {
|
|
1327
|
+
/**
|
|
1328
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1329
|
+
*/
|
|
1330
|
+
code?: string;
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Additional validation error details (field-level errors)
|
|
1334
|
+
*/
|
|
1335
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* URL to documentation about this error
|
|
1339
|
+
*/
|
|
1340
|
+
doc_url?: string | null;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Human-readable error message
|
|
1344
|
+
*/
|
|
1345
|
+
message?: string;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Request and response metadata
|
|
1350
|
+
*/
|
|
1351
|
+
export interface Meta {
|
|
1352
|
+
/**
|
|
1353
|
+
* Unique identifier for this request (for tracing and support)
|
|
1354
|
+
*/
|
|
1355
|
+
request_id?: string;
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Server timestamp when the response was generated
|
|
1359
|
+
*/
|
|
1360
|
+
timestamp?: string;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* API version used for this request
|
|
1364
|
+
*/
|
|
1365
|
+
version?: string;
|
|
841
1366
|
}
|
|
842
1367
|
}
|
|
843
1368
|
|
|
@@ -853,12 +1378,12 @@ export interface WebhookRotateSecretResponse {
|
|
|
853
1378
|
/**
|
|
854
1379
|
* Error information
|
|
855
1380
|
*/
|
|
856
|
-
error?:
|
|
1381
|
+
error?: WebhookRotateSecretResponse.Error | null;
|
|
857
1382
|
|
|
858
1383
|
/**
|
|
859
1384
|
* Request and response metadata
|
|
860
1385
|
*/
|
|
861
|
-
meta?:
|
|
1386
|
+
meta?: WebhookRotateSecretResponse.Meta;
|
|
862
1387
|
|
|
863
1388
|
/**
|
|
864
1389
|
* Indicates whether the request was successful
|
|
@@ -873,6 +1398,51 @@ export namespace WebhookRotateSecretResponse {
|
|
|
873
1398
|
export interface Data {
|
|
874
1399
|
signing_secret?: string;
|
|
875
1400
|
}
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* Error information
|
|
1404
|
+
*/
|
|
1405
|
+
export interface Error {
|
|
1406
|
+
/**
|
|
1407
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1408
|
+
*/
|
|
1409
|
+
code?: string;
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Additional validation error details (field-level errors)
|
|
1413
|
+
*/
|
|
1414
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* URL to documentation about this error
|
|
1418
|
+
*/
|
|
1419
|
+
doc_url?: string | null;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Human-readable error message
|
|
1423
|
+
*/
|
|
1424
|
+
message?: string;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Request and response metadata
|
|
1429
|
+
*/
|
|
1430
|
+
export interface Meta {
|
|
1431
|
+
/**
|
|
1432
|
+
* Unique identifier for this request (for tracing and support)
|
|
1433
|
+
*/
|
|
1434
|
+
request_id?: string;
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* Server timestamp when the response was generated
|
|
1438
|
+
*/
|
|
1439
|
+
timestamp?: string;
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* API version used for this request
|
|
1443
|
+
*/
|
|
1444
|
+
version?: string;
|
|
1445
|
+
}
|
|
876
1446
|
}
|
|
877
1447
|
|
|
878
1448
|
/**
|
|
@@ -887,12 +1457,12 @@ export interface WebhookTestResponse {
|
|
|
887
1457
|
/**
|
|
888
1458
|
* Error information
|
|
889
1459
|
*/
|
|
890
|
-
error?:
|
|
1460
|
+
error?: WebhookTestResponse.Error | null;
|
|
891
1461
|
|
|
892
1462
|
/**
|
|
893
1463
|
* Request and response metadata
|
|
894
1464
|
*/
|
|
895
|
-
meta?:
|
|
1465
|
+
meta?: WebhookTestResponse.Meta;
|
|
896
1466
|
|
|
897
1467
|
/**
|
|
898
1468
|
* Indicates whether the request was successful
|
|
@@ -909,6 +1479,162 @@ export namespace WebhookTestResponse {
|
|
|
909
1479
|
|
|
910
1480
|
success?: boolean;
|
|
911
1481
|
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Error information
|
|
1485
|
+
*/
|
|
1486
|
+
export interface Error {
|
|
1487
|
+
/**
|
|
1488
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1489
|
+
*/
|
|
1490
|
+
code?: string;
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Additional validation error details (field-level errors)
|
|
1494
|
+
*/
|
|
1495
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* URL to documentation about this error
|
|
1499
|
+
*/
|
|
1500
|
+
doc_url?: string | null;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Human-readable error message
|
|
1504
|
+
*/
|
|
1505
|
+
message?: string;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Request and response metadata
|
|
1510
|
+
*/
|
|
1511
|
+
export interface Meta {
|
|
1512
|
+
/**
|
|
1513
|
+
* Unique identifier for this request (for tracing and support)
|
|
1514
|
+
*/
|
|
1515
|
+
request_id?: string;
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Server timestamp when the response was generated
|
|
1519
|
+
*/
|
|
1520
|
+
timestamp?: string;
|
|
1521
|
+
|
|
1522
|
+
/**
|
|
1523
|
+
* API version used for this request
|
|
1524
|
+
*/
|
|
1525
|
+
version?: string;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* Standard API response envelope for all v3 endpoints
|
|
1531
|
+
*/
|
|
1532
|
+
export interface WebhookToggleStatusResponse {
|
|
1533
|
+
/**
|
|
1534
|
+
* The response data (null if error)
|
|
1535
|
+
*/
|
|
1536
|
+
data?: WebhookToggleStatusResponse.Data | null;
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Error information
|
|
1540
|
+
*/
|
|
1541
|
+
error?: WebhookToggleStatusResponse.Error | null;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* Request and response metadata
|
|
1545
|
+
*/
|
|
1546
|
+
meta?: WebhookToggleStatusResponse.Meta;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Indicates whether the request was successful
|
|
1550
|
+
*/
|
|
1551
|
+
success?: boolean;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
export namespace WebhookToggleStatusResponse {
|
|
1555
|
+
/**
|
|
1556
|
+
* The response data (null if error)
|
|
1557
|
+
*/
|
|
1558
|
+
export interface Data {
|
|
1559
|
+
id?: string;
|
|
1560
|
+
|
|
1561
|
+
consecutive_failures?: number;
|
|
1562
|
+
|
|
1563
|
+
created_at?: string;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
1567
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
1568
|
+
*/
|
|
1569
|
+
customer_id?: string;
|
|
1570
|
+
|
|
1571
|
+
display_name?: string;
|
|
1572
|
+
|
|
1573
|
+
endpoint_url?: string;
|
|
1574
|
+
|
|
1575
|
+
event_filters?: { [key: string]: Array<string> } | null;
|
|
1576
|
+
|
|
1577
|
+
event_types?: Array<string>;
|
|
1578
|
+
|
|
1579
|
+
is_active?: boolean;
|
|
1580
|
+
|
|
1581
|
+
last_delivery_attempt_at?: string | null;
|
|
1582
|
+
|
|
1583
|
+
last_successful_delivery_at?: string | null;
|
|
1584
|
+
|
|
1585
|
+
retry_count?: number;
|
|
1586
|
+
|
|
1587
|
+
signing_secret?: string | null;
|
|
1588
|
+
|
|
1589
|
+
timeout_seconds?: number;
|
|
1590
|
+
|
|
1591
|
+
updated_at?: string | null;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Error information
|
|
1596
|
+
*/
|
|
1597
|
+
export interface Error {
|
|
1598
|
+
/**
|
|
1599
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
1600
|
+
*/
|
|
1601
|
+
code?: string;
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* Additional validation error details (field-level errors)
|
|
1605
|
+
*/
|
|
1606
|
+
details?: { [key: string]: Array<string> } | null;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* URL to documentation about this error
|
|
1610
|
+
*/
|
|
1611
|
+
doc_url?: string | null;
|
|
1612
|
+
|
|
1613
|
+
/**
|
|
1614
|
+
* Human-readable error message
|
|
1615
|
+
*/
|
|
1616
|
+
message?: string;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Request and response metadata
|
|
1621
|
+
*/
|
|
1622
|
+
export interface Meta {
|
|
1623
|
+
/**
|
|
1624
|
+
* Unique identifier for this request (for tracing and support)
|
|
1625
|
+
*/
|
|
1626
|
+
request_id?: string;
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* Server timestamp when the response was generated
|
|
1630
|
+
*/
|
|
1631
|
+
timestamp?: string;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* API version used for this request
|
|
1635
|
+
*/
|
|
1636
|
+
version?: string;
|
|
1637
|
+
}
|
|
912
1638
|
}
|
|
913
1639
|
|
|
914
1640
|
export interface WebhookCreateParams {
|
|
@@ -1170,24 +1896,21 @@ export interface WebhookToggleStatusParams {
|
|
|
1170
1896
|
|
|
1171
1897
|
export declare namespace Webhooks {
|
|
1172
1898
|
export {
|
|
1173
|
-
type APIMeta as APIMeta,
|
|
1174
|
-
type APIResponseWebhook as APIResponseWebhook,
|
|
1175
|
-
type ErrorDetail as ErrorDetail,
|
|
1176
1899
|
type InboundMessageEvent as InboundMessageEvent,
|
|
1177
1900
|
type InboundMessageEventPayload as InboundMessageEventPayload,
|
|
1178
1901
|
type MessageEvent as MessageEvent,
|
|
1179
1902
|
type MessageEventPayload as MessageEventPayload,
|
|
1180
|
-
type MutationRequest as MutationRequest,
|
|
1181
|
-
type PaginationMeta as PaginationMeta,
|
|
1182
1903
|
type TemplateEvent as TemplateEvent,
|
|
1183
1904
|
type TemplateEventPayload as TemplateEventPayload,
|
|
1184
|
-
type
|
|
1185
|
-
type
|
|
1905
|
+
type WebhookCreateResponse as WebhookCreateResponse,
|
|
1906
|
+
type WebhookRetrieveResponse as WebhookRetrieveResponse,
|
|
1907
|
+
type WebhookUpdateResponse as WebhookUpdateResponse,
|
|
1186
1908
|
type WebhookListResponse as WebhookListResponse,
|
|
1187
1909
|
type WebhookListEventTypesResponse as WebhookListEventTypesResponse,
|
|
1188
1910
|
type WebhookListEventsResponse as WebhookListEventsResponse,
|
|
1189
1911
|
type WebhookRotateSecretResponse as WebhookRotateSecretResponse,
|
|
1190
1912
|
type WebhookTestResponse as WebhookTestResponse,
|
|
1913
|
+
type WebhookToggleStatusResponse as WebhookToggleStatusResponse,
|
|
1191
1914
|
type WebhookCreateParams as WebhookCreateParams,
|
|
1192
1915
|
type WebhookRetrieveParams as WebhookRetrieveParams,
|
|
1193
1916
|
type WebhookUpdateParams as WebhookUpdateParams,
|