@sentdm/sentdm 0.26.0 → 0.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +12 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/contacts.d.mts +48 -486
  10. package/resources/contacts.d.mts.map +1 -1
  11. package/resources/contacts.d.ts +48 -486
  12. package/resources/contacts.d.ts.map +1 -1
  13. package/resources/contacts.js +3 -3
  14. package/resources/contacts.js.map +1 -1
  15. package/resources/contacts.mjs +3 -3
  16. package/resources/contacts.mjs.map +1 -1
  17. package/resources/index.d.mts +6 -6
  18. package/resources/index.d.mts.map +1 -1
  19. package/resources/index.d.ts +6 -6
  20. package/resources/index.d.ts.map +1 -1
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/me.d.mts +40 -113
  24. package/resources/me.d.mts.map +1 -1
  25. package/resources/me.d.ts +40 -113
  26. package/resources/me.d.ts.map +1 -1
  27. package/resources/me.js.map +1 -1
  28. package/resources/me.mjs.map +1 -1
  29. package/resources/messages.d.mts +7 -126
  30. package/resources/messages.d.mts.map +1 -1
  31. package/resources/messages.d.ts +7 -126
  32. package/resources/messages.d.ts.map +1 -1
  33. package/resources/messages.js.map +1 -1
  34. package/resources/messages.mjs.map +1 -1
  35. package/resources/numbers.d.mts +3 -42
  36. package/resources/numbers.d.mts.map +1 -1
  37. package/resources/numbers.d.ts +3 -42
  38. package/resources/numbers.d.ts.map +1 -1
  39. package/resources/numbers.js.map +1 -1
  40. package/resources/numbers.mjs.map +1 -1
  41. package/resources/profiles/campaigns.d.mts +149 -480
  42. package/resources/profiles/campaigns.d.mts.map +1 -1
  43. package/resources/profiles/campaigns.d.ts +149 -480
  44. package/resources/profiles/campaigns.d.ts.map +1 -1
  45. package/resources/profiles/campaigns.js +41 -39
  46. package/resources/profiles/campaigns.js.map +1 -1
  47. package/resources/profiles/campaigns.mjs +41 -39
  48. package/resources/profiles/campaigns.mjs.map +1 -1
  49. package/resources/profiles/index.d.mts +2 -2
  50. package/resources/profiles/index.d.mts.map +1 -1
  51. package/resources/profiles/index.d.ts +2 -2
  52. package/resources/profiles/index.d.ts.map +1 -1
  53. package/resources/profiles/index.js.map +1 -1
  54. package/resources/profiles/index.mjs.map +1 -1
  55. package/resources/profiles/profiles.d.mts +391 -1699
  56. package/resources/profiles/profiles.d.mts.map +1 -1
  57. package/resources/profiles/profiles.d.ts +391 -1699
  58. package/resources/profiles/profiles.d.ts.map +1 -1
  59. package/resources/profiles/profiles.js +6 -3
  60. package/resources/profiles/profiles.js.map +1 -1
  61. package/resources/profiles/profiles.mjs +6 -3
  62. package/resources/profiles/profiles.mjs.map +1 -1
  63. package/resources/templates.d.mts +176 -993
  64. package/resources/templates.d.mts.map +1 -1
  65. package/resources/templates.d.ts +176 -993
  66. package/resources/templates.d.ts.map +1 -1
  67. package/resources/templates.js +3 -3
  68. package/resources/templates.js.map +1 -1
  69. package/resources/templates.mjs +3 -3
  70. package/resources/templates.mjs.map +1 -1
  71. package/resources/users.d.mts +46 -373
  72. package/resources/users.d.mts.map +1 -1
  73. package/resources/users.d.ts +46 -373
  74. package/resources/users.d.ts.map +1 -1
  75. package/resources/users.js +7 -3
  76. package/resources/users.js.map +1 -1
  77. package/resources/users.mjs +7 -3
  78. package/resources/users.mjs.map +1 -1
  79. package/resources/webhooks.d.mts +110 -624
  80. package/resources/webhooks.d.mts.map +1 -1
  81. package/resources/webhooks.d.ts +110 -624
  82. package/resources/webhooks.d.ts.map +1 -1
  83. package/resources/webhooks.js +7 -6
  84. package/resources/webhooks.js.map +1 -1
  85. package/resources/webhooks.mjs +7 -6
  86. package/resources/webhooks.mjs.map +1 -1
  87. package/src/client.ts +68 -33
  88. package/src/resources/contacts.ts +49 -566
  89. package/src/resources/index.ts +34 -17
  90. package/src/resources/me.ts +51 -132
  91. package/src/resources/messages.ts +7 -141
  92. package/src/resources/numbers.ts +3 -47
  93. package/src/resources/profiles/campaigns.ts +172 -667
  94. package/src/resources/profiles/index.ts +17 -5
  95. package/src/resources/profiles/profiles.ts +549 -2282
  96. package/src/resources/templates.ts +206 -1256
  97. package/src/resources/users.ts +47 -430
  98. package/src/resources/webhooks.ts +120 -742
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as WebhooksAPI from './webhooks';
4
5
  import { APIPromise } from '../core/api-promise';
5
6
  import { buildHeaders } from '../internal/headers';
6
7
  import { RequestOptions } from '../internal/request-options';
@@ -15,10 +16,10 @@ export class Webhooks extends APIResource {
15
16
  *
16
17
  * @example
17
18
  * ```ts
18
- * const webhook = await client.webhooks.create();
19
+ * const apiResponseWebhook = await client.webhooks.create();
19
20
  * ```
20
21
  */
21
- create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse> {
22
+ create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<APIResponseWebhook> {
22
23
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
23
24
  return this._client.post('/v3/webhooks', {
24
25
  body,
@@ -38,7 +39,7 @@ export class Webhooks extends APIResource {
38
39
  *
39
40
  * @example
40
41
  * ```ts
41
- * const webhook = await client.webhooks.retrieve(
42
+ * const apiResponseWebhook = await client.webhooks.retrieve(
42
43
  * 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
43
44
  * );
44
45
  * ```
@@ -47,7 +48,7 @@ export class Webhooks extends APIResource {
47
48
  id: string,
48
49
  params: WebhookRetrieveParams | null | undefined = {},
49
50
  options?: RequestOptions,
50
- ): APIPromise<WebhookRetrieveResponse> {
51
+ ): APIPromise<APIResponseWebhook> {
51
52
  const { 'x-profile-id': xProfileID } = params ?? {};
52
53
  return this._client.get(path`/v3/webhooks/${id}`, {
53
54
  ...options,
@@ -63,16 +64,12 @@ export class Webhooks extends APIResource {
63
64
  *
64
65
  * @example
65
66
  * ```ts
66
- * const webhook = await client.webhooks.update(
67
+ * const apiResponseWebhook = await client.webhooks.update(
67
68
  * 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
68
69
  * );
69
70
  * ```
70
71
  */
71
- update(
72
- id: string,
73
- params: WebhookUpdateParams,
74
- options?: RequestOptions,
75
- ): APIPromise<WebhookUpdateResponse> {
72
+ update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<APIResponseWebhook> {
76
73
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
77
74
  return this._client.put(path`/v3/webhooks/${id}`, {
78
75
  body,
@@ -244,16 +241,17 @@ export class Webhooks extends APIResource {
244
241
  *
245
242
  * @example
246
243
  * ```ts
247
- * const response = await client.webhooks.toggleStatus(
248
- * 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
249
- * );
244
+ * const apiResponseWebhook =
245
+ * await client.webhooks.toggleStatus(
246
+ * 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
247
+ * );
250
248
  * ```
251
249
  */
252
250
  toggleStatus(
253
251
  id: string,
254
252
  params: WebhookToggleStatusParams,
255
253
  options?: RequestOptions,
256
- ): APIPromise<WebhookToggleStatusResponse> {
254
+ ): APIPromise<APIResponseWebhook> {
257
255
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
258
256
  return this._client.patch(path`/v3/webhooks/${id}/toggle-status`, {
259
257
  body,
@@ -270,318 +268,177 @@ export class Webhooks extends APIResource {
270
268
  }
271
269
 
272
270
  /**
273
- * Standard API response envelope for all v3 endpoints
271
+ * Request and response metadata
274
272
  */
275
- export interface WebhookCreateResponse {
276
- /**
277
- * The response data (null if error)
278
- */
279
- data?: WebhookCreateResponse.Data | null;
280
-
273
+ export interface APIMeta {
281
274
  /**
282
- * Error information
275
+ * Unique identifier for this request (for tracing and support)
283
276
  */
284
- error?: WebhookCreateResponse.Error | null;
277
+ request_id?: string;
285
278
 
286
279
  /**
287
- * Request and response metadata
280
+ * Server timestamp when the response was generated
288
281
  */
289
- meta?: WebhookCreateResponse.Meta;
282
+ timestamp?: string;
290
283
 
291
284
  /**
292
- * Indicates whether the request was successful
285
+ * API version used for this request
293
286
  */
294
- success?: boolean;
287
+ version?: string;
295
288
  }
296
289
 
297
- export namespace WebhookCreateResponse {
290
+ /**
291
+ * Standard API response envelope for all v3 endpoints
292
+ */
293
+ export interface APIResponseWebhook {
298
294
  /**
299
295
  * The response data (null if error)
300
296
  */
301
- export interface Data {
302
- id?: string;
303
-
304
- consecutive_failures?: number;
305
-
306
- created_at?: string;
307
-
308
- display_name?: string;
309
-
310
- endpoint_url?: string;
311
-
312
- event_filters?: { [key: string]: Array<string> } | null;
313
-
314
- event_types?: Array<string>;
315
-
316
- is_active?: boolean;
317
-
318
- last_delivery_attempt_at?: string | null;
319
-
320
- last_successful_delivery_at?: string | null;
321
-
322
- retry_count?: number;
323
-
324
- signing_secret?: string | null;
325
-
326
- timeout_seconds?: number;
327
-
328
- updated_at?: string | null;
329
- }
297
+ data?: WebhookResponse | null;
330
298
 
331
299
  /**
332
300
  * Error information
333
301
  */
334
- export interface Error {
335
- /**
336
- * Machine-readable error code (e.g., "RESOURCE_001")
337
- */
338
- code?: string;
339
-
340
- /**
341
- * Additional validation error details (field-level errors)
342
- */
343
- details?: { [key: string]: Array<string> } | null;
344
-
345
- /**
346
- * URL to documentation about this error
347
- */
348
- doc_url?: string | null;
349
-
350
- /**
351
- * Human-readable error message
352
- */
353
- message?: string;
354
- }
302
+ error?: ErrorDetail | null;
355
303
 
356
304
  /**
357
305
  * Request and response metadata
358
306
  */
359
- export interface Meta {
360
- /**
361
- * Unique identifier for this request (for tracing and support)
362
- */
363
- request_id?: string;
307
+ meta?: APIMeta;
364
308
 
365
- /**
366
- * Server timestamp when the response was generated
367
- */
368
- timestamp?: string;
369
-
370
- /**
371
- * API version used for this request
372
- */
373
- version?: string;
374
- }
309
+ /**
310
+ * Indicates whether the request was successful
311
+ */
312
+ success?: boolean;
375
313
  }
376
314
 
377
315
  /**
378
- * Standard API response envelope for all v3 endpoints
316
+ * Error information
379
317
  */
380
- export interface WebhookRetrieveResponse {
318
+ export interface ErrorDetail {
381
319
  /**
382
- * The response data (null if error)
320
+ * Machine-readable error code (e.g., "RESOURCE_001")
383
321
  */
384
- data?: WebhookRetrieveResponse.Data | null;
322
+ code?: string;
385
323
 
386
324
  /**
387
- * Error information
325
+ * Additional validation error details (field-level errors)
388
326
  */
389
- error?: WebhookRetrieveResponse.Error | null;
327
+ details?: { [key: string]: Array<string> } | null;
390
328
 
391
329
  /**
392
- * Request and response metadata
330
+ * URL to documentation about this error
393
331
  */
394
- meta?: WebhookRetrieveResponse.Meta;
332
+ doc_url?: string | null;
395
333
 
396
334
  /**
397
- * Indicates whether the request was successful
335
+ * Human-readable error message
398
336
  */
399
- success?: boolean;
337
+ message?: string;
400
338
  }
401
339
 
402
- export namespace WebhookRetrieveResponse {
340
+ export interface MutationRequest {
403
341
  /**
404
- * The response data (null if error)
342
+ * Sandbox flag - when true, the operation is simulated without side effects Useful
343
+ * for testing integrations without actual execution
405
344
  */
406
- export interface Data {
407
- id?: string;
408
-
409
- consecutive_failures?: number;
410
-
411
- created_at?: string;
412
-
413
- display_name?: string;
414
-
415
- endpoint_url?: string;
416
-
417
- event_filters?: { [key: string]: Array<string> } | null;
418
-
419
- event_types?: Array<string>;
420
-
421
- is_active?: boolean;
422
-
423
- last_delivery_attempt_at?: string | null;
424
-
425
- last_successful_delivery_at?: string | null;
426
-
427
- retry_count?: number;
428
-
429
- signing_secret?: string | null;
430
-
431
- timeout_seconds?: number;
432
-
433
- updated_at?: string | null;
434
- }
345
+ sandbox?: boolean;
346
+ }
435
347
 
348
+ /**
349
+ * Pagination metadata for list responses
350
+ */
351
+ export interface PaginationMeta {
436
352
  /**
437
- * Error information
353
+ * Cursor-based pagination pointers
438
354
  */
439
- export interface Error {
440
- /**
441
- * Machine-readable error code (e.g., "RESOURCE_001")
442
- */
443
- code?: string;
444
-
445
- /**
446
- * Additional validation error details (field-level errors)
447
- */
448
- details?: { [key: string]: Array<string> } | null;
449
-
450
- /**
451
- * URL to documentation about this error
452
- */
453
- doc_url?: string | null;
454
-
455
- /**
456
- * Human-readable error message
457
- */
458
- message?: string;
459
- }
355
+ cursors?: PaginationMeta.Cursors | null;
460
356
 
461
357
  /**
462
- * Request and response metadata
358
+ * Whether there are more pages after this one
463
359
  */
464
- export interface Meta {
465
- /**
466
- * Unique identifier for this request (for tracing and support)
467
- */
468
- request_id?: string;
360
+ has_more?: boolean;
469
361
 
470
- /**
471
- * Server timestamp when the response was generated
472
- */
473
- timestamp?: string;
474
-
475
- /**
476
- * API version used for this request
477
- */
478
- version?: string;
479
- }
480
- }
481
-
482
- /**
483
- * Standard API response envelope for all v3 endpoints
484
- */
485
- export interface WebhookUpdateResponse {
486
362
  /**
487
- * The response data (null if error)
363
+ * Current page number (1-indexed)
488
364
  */
489
- data?: WebhookUpdateResponse.Data | null;
365
+ page?: number;
490
366
 
491
367
  /**
492
- * Error information
368
+ * Number of items per page
493
369
  */
494
- error?: WebhookUpdateResponse.Error | null;
370
+ page_size?: number;
495
371
 
496
372
  /**
497
- * Request and response metadata
373
+ * Total number of items across all pages
498
374
  */
499
- meta?: WebhookUpdateResponse.Meta;
375
+ total_count?: number;
500
376
 
501
377
  /**
502
- * Indicates whether the request was successful
378
+ * Total number of pages
503
379
  */
504
- success?: boolean;
380
+ total_pages?: number;
505
381
  }
506
382
 
507
- export namespace WebhookUpdateResponse {
383
+ export namespace PaginationMeta {
508
384
  /**
509
- * The response data (null if error)
385
+ * Cursor-based pagination pointers
510
386
  */
511
- export interface Data {
512
- id?: string;
387
+ export interface Cursors {
388
+ /**
389
+ * Cursor to fetch the next page
390
+ */
391
+ after?: string | null;
513
392
 
514
- consecutive_failures?: number;
393
+ /**
394
+ * Cursor to fetch the previous page
395
+ */
396
+ before?: string | null;
397
+ }
398
+ }
515
399
 
516
- created_at?: string;
400
+ export interface WebhookEventType {
401
+ description?: string | null;
517
402
 
518
- display_name?: string;
403
+ display_name?: string;
519
404
 
520
- endpoint_url?: string;
405
+ event_type?: string | null;
521
406
 
522
- event_filters?: { [key: string]: Array<string> } | null;
407
+ is_active?: boolean;
523
408
 
524
- event_types?: Array<string>;
409
+ name?: string;
525
410
 
526
- is_active?: boolean;
411
+ sub_types?: Array<WebhookEventType> | null;
412
+ }
527
413
 
528
- last_delivery_attempt_at?: string | null;
414
+ export interface WebhookResponse {
415
+ id?: string;
529
416
 
530
- last_successful_delivery_at?: string | null;
417
+ consecutive_failures?: number;
531
418
 
532
- retry_count?: number;
419
+ created_at?: string;
533
420
 
534
- signing_secret?: string | null;
421
+ display_name?: string;
535
422
 
536
- timeout_seconds?: number;
423
+ endpoint_url?: string;
537
424
 
538
- updated_at?: string | null;
539
- }
425
+ event_filters?: { [key: string]: Array<string> } | null;
540
426
 
541
- /**
542
- * Error information
543
- */
544
- export interface Error {
545
- /**
546
- * Machine-readable error code (e.g., "RESOURCE_001")
547
- */
548
- code?: string;
427
+ event_types?: Array<string>;
549
428
 
550
- /**
551
- * Additional validation error details (field-level errors)
552
- */
553
- details?: { [key: string]: Array<string> } | null;
429
+ is_active?: boolean;
554
430
 
555
- /**
556
- * URL to documentation about this error
557
- */
558
- doc_url?: string | null;
431
+ last_delivery_attempt_at?: string | null;
559
432
 
560
- /**
561
- * Human-readable error message
562
- */
563
- message?: string;
564
- }
433
+ last_successful_delivery_at?: string | null;
565
434
 
566
- /**
567
- * Request and response metadata
568
- */
569
- export interface Meta {
570
- /**
571
- * Unique identifier for this request (for tracing and support)
572
- */
573
- request_id?: string;
435
+ retry_count?: number;
574
436
 
575
- /**
576
- * Server timestamp when the response was generated
577
- */
578
- timestamp?: string;
437
+ signing_secret?: string | null;
579
438
 
580
- /**
581
- * API version used for this request
582
- */
583
- version?: string;
584
- }
439
+ timeout_seconds?: number;
440
+
441
+ updated_at?: string | null;
585
442
  }
586
443
 
587
444
  /**
@@ -596,12 +453,12 @@ export interface WebhookListResponse {
596
453
  /**
597
454
  * Error information
598
455
  */
599
- error?: WebhookListResponse.Error | null;
456
+ error?: ErrorDetail | null;
600
457
 
601
458
  /**
602
459
  * Request and response metadata
603
460
  */
604
- meta?: WebhookListResponse.Meta;
461
+ meta?: APIMeta;
605
462
 
606
463
  /**
607
464
  * Indicates whether the request was successful
@@ -617,138 +474,9 @@ export namespace WebhookListResponse {
617
474
  /**
618
475
  * Pagination metadata for list responses
619
476
  */
620
- pagination?: Data.Pagination;
477
+ pagination?: WebhooksAPI.PaginationMeta;
621
478
 
622
- webhooks?: Array<Data.Webhook>;
623
- }
624
-
625
- export namespace Data {
626
- /**
627
- * Pagination metadata for list responses
628
- */
629
- export interface Pagination {
630
- /**
631
- * Cursor-based pagination pointers
632
- */
633
- cursors?: Pagination.Cursors | null;
634
-
635
- /**
636
- * Whether there are more pages after this one
637
- */
638
- has_more?: boolean;
639
-
640
- /**
641
- * Current page number (1-indexed)
642
- */
643
- page?: number;
644
-
645
- /**
646
- * Number of items per page
647
- */
648
- page_size?: number;
649
-
650
- /**
651
- * Total number of items across all pages
652
- */
653
- total_count?: number;
654
-
655
- /**
656
- * Total number of pages
657
- */
658
- total_pages?: number;
659
- }
660
-
661
- export namespace Pagination {
662
- /**
663
- * Cursor-based pagination pointers
664
- */
665
- export interface Cursors {
666
- /**
667
- * Cursor to fetch the next page
668
- */
669
- after?: string | null;
670
-
671
- /**
672
- * Cursor to fetch the previous page
673
- */
674
- before?: string | null;
675
- }
676
- }
677
-
678
- export interface Webhook {
679
- id?: string;
680
-
681
- consecutive_failures?: number;
682
-
683
- created_at?: string;
684
-
685
- display_name?: string;
686
-
687
- endpoint_url?: string;
688
-
689
- event_filters?: { [key: string]: Array<string> } | null;
690
-
691
- event_types?: Array<string>;
692
-
693
- is_active?: boolean;
694
-
695
- last_delivery_attempt_at?: string | null;
696
-
697
- last_successful_delivery_at?: string | null;
698
-
699
- retry_count?: number;
700
-
701
- signing_secret?: string | null;
702
-
703
- timeout_seconds?: number;
704
-
705
- updated_at?: string | null;
706
- }
707
- }
708
-
709
- /**
710
- * Error information
711
- */
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
- }
733
-
734
- /**
735
- * Request and response metadata
736
- */
737
- export interface Meta {
738
- /**
739
- * Unique identifier for this request (for tracing and support)
740
- */
741
- request_id?: string;
742
-
743
- /**
744
- * Server timestamp when the response was generated
745
- */
746
- timestamp?: string;
747
-
748
- /**
749
- * API version used for this request
750
- */
751
- version?: string;
479
+ webhooks?: Array<WebhooksAPI.WebhookResponse>;
752
480
  }
753
481
  }
754
482
 
@@ -764,12 +492,12 @@ export interface WebhookListEventTypesResponse {
764
492
  /**
765
493
  * Error information
766
494
  */
767
- error?: WebhookListEventTypesResponse.Error | null;
495
+ error?: ErrorDetail | null;
768
496
 
769
497
  /**
770
498
  * Request and response metadata
771
499
  */
772
- meta?: WebhookListEventTypesResponse.Meta;
500
+ meta?: APIMeta;
773
501
 
774
502
  /**
775
503
  * Indicates whether the request was successful
@@ -782,68 +510,7 @@ export namespace WebhookListEventTypesResponse {
782
510
  * The response data (null if error)
783
511
  */
784
512
  export interface Data {
785
- event_types?: Array<Data.EventType>;
786
- }
787
-
788
- export namespace Data {
789
- export interface EventType {
790
- description?: string | null;
791
-
792
- display_name?: string;
793
-
794
- event_type?: string | null;
795
-
796
- is_active?: boolean;
797
-
798
- name?: string;
799
-
800
- sub_types?: Array<unknown> | null;
801
- }
802
- }
803
-
804
- /**
805
- * Error information
806
- */
807
- export interface Error {
808
- /**
809
- * Machine-readable error code (e.g., "RESOURCE_001")
810
- */
811
- code?: string;
812
-
813
- /**
814
- * Additional validation error details (field-level errors)
815
- */
816
- details?: { [key: string]: Array<string> } | null;
817
-
818
- /**
819
- * URL to documentation about this error
820
- */
821
- doc_url?: string | null;
822
-
823
- /**
824
- * Human-readable error message
825
- */
826
- message?: string;
827
- }
828
-
829
- /**
830
- * Request and response metadata
831
- */
832
- export interface Meta {
833
- /**
834
- * Unique identifier for this request (for tracing and support)
835
- */
836
- request_id?: string;
837
-
838
- /**
839
- * Server timestamp when the response was generated
840
- */
841
- timestamp?: string;
842
-
843
- /**
844
- * API version used for this request
845
- */
846
- version?: string;
513
+ event_types?: Array<WebhooksAPI.WebhookEventType>;
847
514
  }
848
515
  }
849
516
 
@@ -859,12 +526,12 @@ export interface WebhookListEventsResponse {
859
526
  /**
860
527
  * Error information
861
528
  */
862
- error?: WebhookListEventsResponse.Error | null;
529
+ error?: ErrorDetail | null;
863
530
 
864
531
  /**
865
532
  * Request and response metadata
866
533
  */
867
- meta?: WebhookListEventsResponse.Meta;
534
+ meta?: APIMeta;
868
535
 
869
536
  /**
870
537
  * Indicates whether the request was successful
@@ -882,7 +549,7 @@ export namespace WebhookListEventsResponse {
882
549
  /**
883
550
  * Pagination metadata for list responses
884
551
  */
885
- pagination?: Data.Pagination;
552
+ pagination?: WebhooksAPI.PaginationMeta;
886
553
  }
887
554
 
888
555
  export namespace Data {
@@ -909,103 +576,6 @@ export namespace WebhookListEventsResponse {
909
576
 
910
577
  response_body?: string | null;
911
578
  }
912
-
913
- /**
914
- * Pagination metadata for list responses
915
- */
916
- export interface Pagination {
917
- /**
918
- * Cursor-based pagination pointers
919
- */
920
- cursors?: Pagination.Cursors | null;
921
-
922
- /**
923
- * Whether there are more pages after this one
924
- */
925
- has_more?: boolean;
926
-
927
- /**
928
- * Current page number (1-indexed)
929
- */
930
- page?: number;
931
-
932
- /**
933
- * Number of items per page
934
- */
935
- page_size?: number;
936
-
937
- /**
938
- * Total number of items across all pages
939
- */
940
- total_count?: number;
941
-
942
- /**
943
- * Total number of pages
944
- */
945
- total_pages?: number;
946
- }
947
-
948
- export namespace Pagination {
949
- /**
950
- * Cursor-based pagination pointers
951
- */
952
- export interface Cursors {
953
- /**
954
- * Cursor to fetch the next page
955
- */
956
- after?: string | null;
957
-
958
- /**
959
- * Cursor to fetch the previous page
960
- */
961
- before?: string | null;
962
- }
963
- }
964
- }
965
-
966
- /**
967
- * Error information
968
- */
969
- export interface Error {
970
- /**
971
- * Machine-readable error code (e.g., "RESOURCE_001")
972
- */
973
- code?: string;
974
-
975
- /**
976
- * Additional validation error details (field-level errors)
977
- */
978
- details?: { [key: string]: Array<string> } | null;
979
-
980
- /**
981
- * URL to documentation about this error
982
- */
983
- doc_url?: string | null;
984
-
985
- /**
986
- * Human-readable error message
987
- */
988
- message?: string;
989
- }
990
-
991
- /**
992
- * Request and response metadata
993
- */
994
- export interface Meta {
995
- /**
996
- * Unique identifier for this request (for tracing and support)
997
- */
998
- request_id?: string;
999
-
1000
- /**
1001
- * Server timestamp when the response was generated
1002
- */
1003
- timestamp?: string;
1004
-
1005
- /**
1006
- * API version used for this request
1007
- */
1008
- version?: string;
1009
579
  }
1010
580
  }
1011
581
 
@@ -1021,12 +591,12 @@ export interface WebhookRotateSecretResponse {
1021
591
  /**
1022
592
  * Error information
1023
593
  */
1024
- error?: WebhookRotateSecretResponse.Error | null;
594
+ error?: ErrorDetail | null;
1025
595
 
1026
596
  /**
1027
597
  * Request and response metadata
1028
598
  */
1029
- meta?: WebhookRotateSecretResponse.Meta;
599
+ meta?: APIMeta;
1030
600
 
1031
601
  /**
1032
602
  * Indicates whether the request was successful
@@ -1041,51 +611,6 @@ export namespace WebhookRotateSecretResponse {
1041
611
  export interface Data {
1042
612
  signing_secret?: string;
1043
613
  }
1044
-
1045
- /**
1046
- * Error information
1047
- */
1048
- export interface Error {
1049
- /**
1050
- * Machine-readable error code (e.g., "RESOURCE_001")
1051
- */
1052
- code?: string;
1053
-
1054
- /**
1055
- * Additional validation error details (field-level errors)
1056
- */
1057
- details?: { [key: string]: Array<string> } | null;
1058
-
1059
- /**
1060
- * URL to documentation about this error
1061
- */
1062
- doc_url?: string | null;
1063
-
1064
- /**
1065
- * Human-readable error message
1066
- */
1067
- message?: string;
1068
- }
1069
-
1070
- /**
1071
- * Request and response metadata
1072
- */
1073
- export interface Meta {
1074
- /**
1075
- * Unique identifier for this request (for tracing and support)
1076
- */
1077
- request_id?: string;
1078
-
1079
- /**
1080
- * Server timestamp when the response was generated
1081
- */
1082
- timestamp?: string;
1083
-
1084
- /**
1085
- * API version used for this request
1086
- */
1087
- version?: string;
1088
- }
1089
614
  }
1090
615
 
1091
616
  /**
@@ -1100,12 +625,12 @@ export interface WebhookTestResponse {
1100
625
  /**
1101
626
  * Error information
1102
627
  */
1103
- error?: WebhookTestResponse.Error | null;
628
+ error?: ErrorDetail | null;
1104
629
 
1105
630
  /**
1106
631
  * Request and response metadata
1107
632
  */
1108
- meta?: WebhookTestResponse.Meta;
633
+ meta?: APIMeta;
1109
634
 
1110
635
  /**
1111
636
  * Indicates whether the request was successful
@@ -1122,156 +647,6 @@ export namespace WebhookTestResponse {
1122
647
 
1123
648
  success?: boolean;
1124
649
  }
1125
-
1126
- /**
1127
- * Error information
1128
- */
1129
- export interface Error {
1130
- /**
1131
- * Machine-readable error code (e.g., "RESOURCE_001")
1132
- */
1133
- code?: string;
1134
-
1135
- /**
1136
- * Additional validation error details (field-level errors)
1137
- */
1138
- details?: { [key: string]: Array<string> } | null;
1139
-
1140
- /**
1141
- * URL to documentation about this error
1142
- */
1143
- doc_url?: string | null;
1144
-
1145
- /**
1146
- * Human-readable error message
1147
- */
1148
- message?: string;
1149
- }
1150
-
1151
- /**
1152
- * Request and response metadata
1153
- */
1154
- export interface Meta {
1155
- /**
1156
- * Unique identifier for this request (for tracing and support)
1157
- */
1158
- request_id?: string;
1159
-
1160
- /**
1161
- * Server timestamp when the response was generated
1162
- */
1163
- timestamp?: string;
1164
-
1165
- /**
1166
- * API version used for this request
1167
- */
1168
- version?: string;
1169
- }
1170
- }
1171
-
1172
- /**
1173
- * Standard API response envelope for all v3 endpoints
1174
- */
1175
- export interface WebhookToggleStatusResponse {
1176
- /**
1177
- * The response data (null if error)
1178
- */
1179
- data?: WebhookToggleStatusResponse.Data | null;
1180
-
1181
- /**
1182
- * Error information
1183
- */
1184
- error?: WebhookToggleStatusResponse.Error | null;
1185
-
1186
- /**
1187
- * Request and response metadata
1188
- */
1189
- meta?: WebhookToggleStatusResponse.Meta;
1190
-
1191
- /**
1192
- * Indicates whether the request was successful
1193
- */
1194
- success?: boolean;
1195
- }
1196
-
1197
- export namespace WebhookToggleStatusResponse {
1198
- /**
1199
- * The response data (null if error)
1200
- */
1201
- export interface Data {
1202
- id?: string;
1203
-
1204
- consecutive_failures?: number;
1205
-
1206
- created_at?: string;
1207
-
1208
- display_name?: string;
1209
-
1210
- endpoint_url?: string;
1211
-
1212
- event_filters?: { [key: string]: Array<string> } | null;
1213
-
1214
- event_types?: Array<string>;
1215
-
1216
- is_active?: boolean;
1217
-
1218
- last_delivery_attempt_at?: string | null;
1219
-
1220
- last_successful_delivery_at?: string | null;
1221
-
1222
- retry_count?: number;
1223
-
1224
- signing_secret?: string | null;
1225
-
1226
- timeout_seconds?: number;
1227
-
1228
- updated_at?: string | null;
1229
- }
1230
-
1231
- /**
1232
- * Error information
1233
- */
1234
- export interface Error {
1235
- /**
1236
- * Machine-readable error code (e.g., "RESOURCE_001")
1237
- */
1238
- code?: string;
1239
-
1240
- /**
1241
- * Additional validation error details (field-level errors)
1242
- */
1243
- details?: { [key: string]: Array<string> } | null;
1244
-
1245
- /**
1246
- * URL to documentation about this error
1247
- */
1248
- doc_url?: string | null;
1249
-
1250
- /**
1251
- * Human-readable error message
1252
- */
1253
- message?: string;
1254
- }
1255
-
1256
- /**
1257
- * Request and response metadata
1258
- */
1259
- export interface Meta {
1260
- /**
1261
- * Unique identifier for this request (for tracing and support)
1262
- */
1263
- request_id?: string;
1264
-
1265
- /**
1266
- * Server timestamp when the response was generated
1267
- */
1268
- timestamp?: string;
1269
-
1270
- /**
1271
- * API version used for this request
1272
- */
1273
- version?: string;
1274
- }
1275
650
  }
1276
651
 
1277
652
  export interface WebhookCreateParams {
@@ -1533,15 +908,18 @@ export interface WebhookToggleStatusParams {
1533
908
 
1534
909
  export declare namespace Webhooks {
1535
910
  export {
1536
- type WebhookCreateResponse as WebhookCreateResponse,
1537
- type WebhookRetrieveResponse as WebhookRetrieveResponse,
1538
- type WebhookUpdateResponse as WebhookUpdateResponse,
911
+ type APIMeta as APIMeta,
912
+ type APIResponseWebhook as APIResponseWebhook,
913
+ type ErrorDetail as ErrorDetail,
914
+ type MutationRequest as MutationRequest,
915
+ type PaginationMeta as PaginationMeta,
916
+ type WebhookEventType as WebhookEventType,
917
+ type WebhookResponse as WebhookResponse,
1539
918
  type WebhookListResponse as WebhookListResponse,
1540
919
  type WebhookListEventTypesResponse as WebhookListEventTypesResponse,
1541
920
  type WebhookListEventsResponse as WebhookListEventsResponse,
1542
921
  type WebhookRotateSecretResponse as WebhookRotateSecretResponse,
1543
922
  type WebhookTestResponse as WebhookTestResponse,
1544
- type WebhookToggleStatusResponse as WebhookToggleStatusResponse,
1545
923
  type WebhookCreateParams as WebhookCreateParams,
1546
924
  type WebhookRetrieveParams as WebhookRetrieveParams,
1547
925
  type WebhookUpdateParams as WebhookUpdateParams,