resend 6.30.0 → 6.31.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/dist/index.cjs CHANGED
@@ -25,7 +25,7 @@ let postal_mime = require("postal-mime");
25
25
  postal_mime = __toESM(postal_mime);
26
26
  let standardwebhooks = require("standardwebhooks");
27
27
  //#region package.json
28
- var version = "6.30.0";
28
+ var version = "6.31.0";
29
29
  //#endregion
30
30
  //#region src/common/utils/build-pagination-query.ts
31
31
  function buildPaginationUrl(base, options) {
package/dist/index.d.cts CHANGED
@@ -716,19 +716,19 @@ interface EmailRenderOptions {
716
716
  /**
717
717
  * The React component used to write the message.
718
718
  *
719
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
719
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
720
720
  */
721
721
  react: React$1.ReactNode;
722
722
  /**
723
723
  * The HTML version of the message.
724
724
  *
725
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
725
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
726
726
  */
727
727
  html: string;
728
728
  /**
729
729
  * The plain text version of the message.
730
730
  *
731
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
731
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
732
732
  */
733
733
  text: string;
734
734
  }
@@ -736,7 +736,7 @@ interface SegmentOptions {
736
736
  /**
737
737
  * The id of the segment you want to send to
738
738
  *
739
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
739
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
740
740
  */
741
741
  segmentId: string;
742
742
  /**
@@ -749,7 +749,7 @@ type SendBroadcastOnCreationOptions = {
749
749
  * Whether to send the broadcast immediately or keep it as a draft.
750
750
  * If not provided or set to false, the broadcast will be created as a draft.
751
751
  *
752
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
752
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
753
753
  */
754
754
  send: true;
755
755
  /**
@@ -757,7 +757,7 @@ type SendBroadcastOnCreationOptions = {
757
757
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
758
758
  * or relative time (eg: in 2 days).
759
759
  *
760
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
760
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
761
761
  */
762
762
  scheduledAt?: string;
763
763
  } | {
@@ -765,7 +765,7 @@ type SendBroadcastOnCreationOptions = {
765
765
  * Whether to send the broadcast immediately or keep it as a draft.
766
766
  * If not provided or set to false, the broadcast will be created as a draft.
767
767
  *
768
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
768
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
769
769
  */
770
770
  send?: false;
771
771
  /**
@@ -773,7 +773,7 @@ type SendBroadcastOnCreationOptions = {
773
773
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
774
774
  * or relative time (eg: in 2 days).
775
775
  *
776
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
776
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
777
777
  */
778
778
  scheduledAt?: never;
779
779
  };
@@ -781,37 +781,37 @@ interface CreateBroadcastBaseOptions {
781
781
  /**
782
782
  * The name of the broadcast
783
783
  *
784
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
784
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
785
785
  */
786
786
  name?: string;
787
787
  /**
788
788
  * A short snippet of text displayed as a preview in recipients' inboxes, often shown below or beside the subject line.
789
789
  *
790
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
790
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
791
791
  */
792
792
  previewText?: string;
793
793
  /**
794
794
  * Sender email address. To include a friendly name, use the format `"Your Name <sender@domain.com>"`
795
795
  *
796
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
796
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
797
797
  */
798
798
  from: string;
799
799
  /**
800
800
  * Reply-to email address. For multiple addresses, send as an array of strings.
801
801
  *
802
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
802
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
803
803
  */
804
804
  replyTo?: string | string[];
805
805
  /**
806
806
  * Email subject.
807
807
  *
808
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
808
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
809
809
  */
810
810
  subject: string;
811
811
  /**
812
812
  * The id of the topic you want to send to
813
813
  *
814
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
814
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
815
815
  */
816
816
  topicId?: string | null;
817
817
  }
@@ -917,7 +917,7 @@ interface SendBroadcastBaseOptions {
917
917
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
918
918
  * or relative time (eg: in 2 days).
919
919
  *
920
- * @link https://resend.com/docs/api-reference/broadcasts/send#body-parameters
920
+ * @link https://resend.com/docs/api-reference/broadcasts/send-broadcast#body-parameters
921
921
  */
922
922
  scheduledAt?: string;
923
923
  }
@@ -2408,7 +2408,7 @@ declare class Usage {
2408
2408
  }
2409
2409
  //#endregion
2410
2410
  //#region src/webhooks/interfaces/webhook-event.interface.d.ts
2411
- type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
2411
+ type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'contact.topics.updated' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'topic.created' | 'topic.updated' | 'topic.deleted';
2412
2412
  interface BaseEmailEventData {
2413
2413
  broadcast_id?: string;
2414
2414
  created_at: string;
@@ -2468,6 +2468,13 @@ interface ContactEventData {
2468
2468
  last_name?: string | null;
2469
2469
  unsubscribed: boolean;
2470
2470
  }
2471
+ interface ContactTopicsEventData {
2472
+ email: string;
2473
+ topics: {
2474
+ id: string;
2475
+ subscription: 'opt_in' | 'opt_out';
2476
+ }[];
2477
+ }
2471
2478
  interface DomainRecord {
2472
2479
  record: string;
2473
2480
  name: string;
@@ -2492,6 +2499,15 @@ interface SuppressionEventData {
2492
2499
  source_id: string | null;
2493
2500
  created_at: string;
2494
2501
  }
2502
+ interface TopicEventData {
2503
+ id: string;
2504
+ name: string;
2505
+ description: string | null;
2506
+ default_subscription: 'opt_in' | 'opt_out';
2507
+ deleted: boolean;
2508
+ created_at: string;
2509
+ updated_at: string;
2510
+ }
2495
2511
  interface EmailSentEvent {
2496
2512
  type: 'email.sent';
2497
2513
  created_at: string;
@@ -2570,6 +2586,11 @@ interface ContactDeletedEvent {
2570
2586
  created_at: string;
2571
2587
  data: ContactEventData;
2572
2588
  }
2589
+ interface ContactTopicsUpdatedEvent {
2590
+ type: 'contact.topics.updated';
2591
+ created_at: string;
2592
+ data: ContactTopicsEventData;
2593
+ }
2573
2594
  interface DomainCreatedEvent {
2574
2595
  type: 'domain.created';
2575
2596
  created_at: string;
@@ -2595,7 +2616,22 @@ interface SuppressionRemovedEvent {
2595
2616
  created_at: string;
2596
2617
  data: SuppressionEventData;
2597
2618
  }
2598
- type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent;
2619
+ interface TopicCreatedEvent {
2620
+ type: 'topic.created';
2621
+ created_at: string;
2622
+ data: TopicEventData;
2623
+ }
2624
+ interface TopicUpdatedEvent {
2625
+ type: 'topic.updated';
2626
+ created_at: string;
2627
+ data: TopicEventData;
2628
+ }
2629
+ interface TopicDeletedEvent {
2630
+ type: 'topic.deleted';
2631
+ created_at: string;
2632
+ data: TopicEventData;
2633
+ }
2634
+ type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactTopicsUpdatedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent | TopicCreatedEvent | TopicUpdatedEvent | TopicDeletedEvent;
2599
2635
  //#endregion
2600
2636
  //#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
2601
2637
  type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
@@ -2814,4 +2850,4 @@ export declare class Resend {
2814
2850
  delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
2815
2851
  }
2816
2852
  //#endregion
2817
- export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, OAuthGrant, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
2853
+ export type { ContactCreatedEvent, ContactDeletedEvent, ContactTopicsUpdatedEvent, ContactUpdatedEvent, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, OAuthGrant, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, TopicCreatedEvent, TopicDeletedEvent, TopicUpdatedEvent, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
package/dist/index.d.mts CHANGED
@@ -716,19 +716,19 @@ interface EmailRenderOptions {
716
716
  /**
717
717
  * The React component used to write the message.
718
718
  *
719
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
719
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
720
720
  */
721
721
  react: React$1.ReactNode;
722
722
  /**
723
723
  * The HTML version of the message.
724
724
  *
725
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
725
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
726
726
  */
727
727
  html: string;
728
728
  /**
729
729
  * The plain text version of the message.
730
730
  *
731
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
731
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
732
732
  */
733
733
  text: string;
734
734
  }
@@ -736,7 +736,7 @@ interface SegmentOptions {
736
736
  /**
737
737
  * The id of the segment you want to send to
738
738
  *
739
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
739
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
740
740
  */
741
741
  segmentId: string;
742
742
  /**
@@ -749,7 +749,7 @@ type SendBroadcastOnCreationOptions = {
749
749
  * Whether to send the broadcast immediately or keep it as a draft.
750
750
  * If not provided or set to false, the broadcast will be created as a draft.
751
751
  *
752
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
752
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
753
753
  */
754
754
  send: true;
755
755
  /**
@@ -757,7 +757,7 @@ type SendBroadcastOnCreationOptions = {
757
757
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
758
758
  * or relative time (eg: in 2 days).
759
759
  *
760
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
760
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
761
761
  */
762
762
  scheduledAt?: string;
763
763
  } | {
@@ -765,7 +765,7 @@ type SendBroadcastOnCreationOptions = {
765
765
  * Whether to send the broadcast immediately or keep it as a draft.
766
766
  * If not provided or set to false, the broadcast will be created as a draft.
767
767
  *
768
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
768
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
769
769
  */
770
770
  send?: false;
771
771
  /**
@@ -773,7 +773,7 @@ type SendBroadcastOnCreationOptions = {
773
773
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
774
774
  * or relative time (eg: in 2 days).
775
775
  *
776
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
776
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
777
777
  */
778
778
  scheduledAt?: never;
779
779
  };
@@ -781,37 +781,37 @@ interface CreateBroadcastBaseOptions {
781
781
  /**
782
782
  * The name of the broadcast
783
783
  *
784
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
784
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
785
785
  */
786
786
  name?: string;
787
787
  /**
788
788
  * A short snippet of text displayed as a preview in recipients' inboxes, often shown below or beside the subject line.
789
789
  *
790
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
790
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
791
791
  */
792
792
  previewText?: string;
793
793
  /**
794
794
  * Sender email address. To include a friendly name, use the format `"Your Name <sender@domain.com>"`
795
795
  *
796
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
796
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
797
797
  */
798
798
  from: string;
799
799
  /**
800
800
  * Reply-to email address. For multiple addresses, send as an array of strings.
801
801
  *
802
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
802
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
803
803
  */
804
804
  replyTo?: string | string[];
805
805
  /**
806
806
  * Email subject.
807
807
  *
808
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
808
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
809
809
  */
810
810
  subject: string;
811
811
  /**
812
812
  * The id of the topic you want to send to
813
813
  *
814
- * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
814
+ * @link https://resend.com/docs/api-reference/broadcasts/create-broadcast#body-parameters
815
815
  */
816
816
  topicId?: string | null;
817
817
  }
@@ -917,7 +917,7 @@ interface SendBroadcastBaseOptions {
917
917
  * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
918
918
  * or relative time (eg: in 2 days).
919
919
  *
920
- * @link https://resend.com/docs/api-reference/broadcasts/send#body-parameters
920
+ * @link https://resend.com/docs/api-reference/broadcasts/send-broadcast#body-parameters
921
921
  */
922
922
  scheduledAt?: string;
923
923
  }
@@ -2408,7 +2408,7 @@ declare class Usage {
2408
2408
  }
2409
2409
  //#endregion
2410
2410
  //#region src/webhooks/interfaces/webhook-event.interface.d.ts
2411
- type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
2411
+ type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'contact.topics.updated' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'topic.created' | 'topic.updated' | 'topic.deleted';
2412
2412
  interface BaseEmailEventData {
2413
2413
  broadcast_id?: string;
2414
2414
  created_at: string;
@@ -2468,6 +2468,13 @@ interface ContactEventData {
2468
2468
  last_name?: string | null;
2469
2469
  unsubscribed: boolean;
2470
2470
  }
2471
+ interface ContactTopicsEventData {
2472
+ email: string;
2473
+ topics: {
2474
+ id: string;
2475
+ subscription: 'opt_in' | 'opt_out';
2476
+ }[];
2477
+ }
2471
2478
  interface DomainRecord {
2472
2479
  record: string;
2473
2480
  name: string;
@@ -2492,6 +2499,15 @@ interface SuppressionEventData {
2492
2499
  source_id: string | null;
2493
2500
  created_at: string;
2494
2501
  }
2502
+ interface TopicEventData {
2503
+ id: string;
2504
+ name: string;
2505
+ description: string | null;
2506
+ default_subscription: 'opt_in' | 'opt_out';
2507
+ deleted: boolean;
2508
+ created_at: string;
2509
+ updated_at: string;
2510
+ }
2495
2511
  interface EmailSentEvent {
2496
2512
  type: 'email.sent';
2497
2513
  created_at: string;
@@ -2570,6 +2586,11 @@ interface ContactDeletedEvent {
2570
2586
  created_at: string;
2571
2587
  data: ContactEventData;
2572
2588
  }
2589
+ interface ContactTopicsUpdatedEvent {
2590
+ type: 'contact.topics.updated';
2591
+ created_at: string;
2592
+ data: ContactTopicsEventData;
2593
+ }
2573
2594
  interface DomainCreatedEvent {
2574
2595
  type: 'domain.created';
2575
2596
  created_at: string;
@@ -2595,7 +2616,22 @@ interface SuppressionRemovedEvent {
2595
2616
  created_at: string;
2596
2617
  data: SuppressionEventData;
2597
2618
  }
2598
- type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent;
2619
+ interface TopicCreatedEvent {
2620
+ type: 'topic.created';
2621
+ created_at: string;
2622
+ data: TopicEventData;
2623
+ }
2624
+ interface TopicUpdatedEvent {
2625
+ type: 'topic.updated';
2626
+ created_at: string;
2627
+ data: TopicEventData;
2628
+ }
2629
+ interface TopicDeletedEvent {
2630
+ type: 'topic.deleted';
2631
+ created_at: string;
2632
+ data: TopicEventData;
2633
+ }
2634
+ type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactTopicsUpdatedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent | TopicCreatedEvent | TopicUpdatedEvent | TopicDeletedEvent;
2599
2635
  //#endregion
2600
2636
  //#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
2601
2637
  type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
@@ -2814,4 +2850,4 @@ export declare class Resend {
2814
2850
  delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
2815
2851
  }
2816
2852
  //#endregion
2817
- export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, OAuthGrant, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
2853
+ export type { ContactCreatedEvent, ContactDeletedEvent, ContactTopicsUpdatedEvent, ContactUpdatedEvent, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, OAuthGrant, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, TopicCreatedEvent, TopicDeletedEvent, TopicUpdatedEvent, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import PostalMime from "postal-mime";
2
2
  import { Webhook } from "standardwebhooks";
3
3
  //#region package.json
4
- var version = "6.30.0";
4
+ var version = "6.31.0";
5
5
  //#endregion
6
6
  //#region src/common/utils/build-pagination-query.ts
7
7
  function buildPaginationUrl(base, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.30.0",
3
+ "version": "6.31.0",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",