resend 6.7.0 → 6.9.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.d.mts CHANGED
@@ -1,5 +1,3 @@
1
- import * as React$1 from "react";
2
-
3
1
  //#region src/api-keys/interfaces/api-key.d.ts
4
2
  interface ApiKey {
5
3
  created_at: string;
@@ -219,7 +217,7 @@ interface EmailRenderOptions$1 {
219
217
  *
220
218
  * @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
221
219
  */
222
- react: React$1.ReactNode;
220
+ react: void 0;
223
221
  /**
224
222
  * The HTML version of the message.
225
223
  *
@@ -361,8 +359,7 @@ interface CreateBatchRequestOptions extends PostOptions, IdempotentRequest {
361
359
  }
362
360
  type CreateBatchSuccessResponse<Options extends CreateBatchRequestOptions = CreateBatchRequestOptions> = {
363
361
  data: {
364
- /** The ID of the newly created email. */
365
- id: string;
362
+ /** The ID of the newly created email. */id: string;
366
363
  }[];
367
364
  } & (Options['batchValidation'] extends 'permissive' ? {
368
365
  /**
@@ -407,7 +404,7 @@ interface EmailRenderOptions {
407
404
  *
408
405
  * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
409
406
  */
410
- react: React$1.ReactNode;
407
+ react: void 0;
411
408
  /**
412
409
  * The HTML version of the message.
413
410
  *
@@ -433,6 +430,39 @@ interface SegmentOptions {
433
430
  */
434
431
  audienceId: string;
435
432
  }
433
+ type SendBroadcastOnCreationOptions = {
434
+ /**
435
+ * Whether to send the broadcast immediately or keep it as a draft.
436
+ * If not provided or set to false, the broadcast will be created as a draft.
437
+ *
438
+ * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
439
+ */
440
+ send: true;
441
+ /**
442
+ * Schedule time to send the broadcast. Can only be used if `send` is true.
443
+ * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
444
+ * or relative time (eg: in 2 days).
445
+ *
446
+ * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
447
+ */
448
+ scheduledAt?: string;
449
+ } | {
450
+ /**
451
+ * Whether to send the broadcast immediately or keep it as a draft.
452
+ * If not provided or set to false, the broadcast will be created as a draft.
453
+ *
454
+ * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
455
+ */
456
+ send?: false;
457
+ /**
458
+ * Schedule time to send the broadcast. Can only be used if `send` is true.
459
+ * The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
460
+ * or relative time (eg: in 2 days).
461
+ *
462
+ * @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
463
+ */
464
+ scheduledAt?: never;
465
+ };
436
466
  interface CreateBroadcastBaseOptions {
437
467
  /**
438
468
  * The name of the broadcast
@@ -471,7 +501,7 @@ interface CreateBroadcastBaseOptions {
471
501
  */
472
502
  topicId?: string | null;
473
503
  }
474
- type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions;
504
+ type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions & SendBroadcastOnCreationOptions;
475
505
  interface CreateBroadcastRequestOptions extends PostOptions {}
476
506
  interface CreateBroadcastResponseSuccess {
477
507
  /** The ID of the newly sent broadcasts. */
@@ -542,6 +572,97 @@ type UpdateBroadcastOptions = {
542
572
  };
543
573
  type UpdateBroadcastResponse = Response<UpdateBroadcastResponseSuccess>;
544
574
  //#endregion
575
+ //#region src/contact-properties/interfaces/contact-property.d.ts
576
+ type StringBaseApiContactProperty = {
577
+ type: 'string';
578
+ fallback_value: string | null;
579
+ };
580
+ type NumberBaseApiContactProperty = {
581
+ type: 'number';
582
+ fallback_value: number | null;
583
+ };
584
+ type ApiContactProperty = {
585
+ id: string;
586
+ created_at: string;
587
+ key: string;
588
+ } & (StringBaseApiContactProperty | NumberBaseApiContactProperty);
589
+ type StringBaseContactProperty = {
590
+ type: 'string';
591
+ fallbackValue: string | null;
592
+ };
593
+ type NumberBaseContactProperty = {
594
+ type: 'number';
595
+ fallbackValue: number | null;
596
+ };
597
+ type ContactProperty = {
598
+ id: string;
599
+ createdAt: string;
600
+ key: string;
601
+ } & (StringBaseContactProperty | NumberBaseContactProperty);
602
+ //#endregion
603
+ //#region src/contact-properties/interfaces/create-contact-property-options.interface.d.ts
604
+ type StringBaseContactPropertyOptions = {
605
+ type: 'string';
606
+ fallbackValue?: string | null;
607
+ };
608
+ type NumberBaseContactPropertyOptions = {
609
+ type: 'number';
610
+ fallbackValue?: number | null;
611
+ };
612
+ type CreateContactPropertyOptions = {
613
+ key: string;
614
+ } & (StringBaseContactPropertyOptions | NumberBaseContactPropertyOptions);
615
+ interface CreateContactPropertyApiOptions {
616
+ key: string;
617
+ type: 'string' | 'number';
618
+ fallback_value?: string | number | null;
619
+ }
620
+ type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
621
+ object: 'contact_property';
622
+ };
623
+ type CreateContactPropertyResponse = Response<CreateContactPropertyResponseSuccess>;
624
+ //#endregion
625
+ //#region src/contact-properties/interfaces/delete-contact-property-options.interface.d.ts
626
+ type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
627
+ object: 'contact_property';
628
+ deleted: boolean;
629
+ };
630
+ type RemoveContactPropertyResponse = Response<RemoveContactPropertyResponseSuccess>;
631
+ //#endregion
632
+ //#region src/contact-properties/interfaces/get-contact-property.interface.d.ts
633
+ type GetContactPropertyResponseSuccess = ApiContactProperty & {
634
+ object: 'contact_property';
635
+ };
636
+ type GetContactPropertyResponse = Response<ContactProperty & {
637
+ object: 'contact_property';
638
+ }>;
639
+ //#endregion
640
+ //#region src/contact-properties/interfaces/list-contact-properties-options.interface.d.ts
641
+ type ListContactPropertiesOptions = PaginationOptions;
642
+ type ListContactPropertiesResponseSuccess = {
643
+ object: 'list';
644
+ has_more: boolean;
645
+ data: ApiContactProperty[];
646
+ };
647
+ type ListContactPropertiesResponse = Response<{
648
+ object: 'list';
649
+ has_more: boolean;
650
+ data: ContactProperty[];
651
+ }>;
652
+ //#endregion
653
+ //#region src/contact-properties/interfaces/update-contact-property-options.interface.d.ts
654
+ type UpdateContactPropertyOptions = {
655
+ id: string;
656
+ fallbackValue?: string | number | null;
657
+ };
658
+ interface UpdateContactPropertyApiOptions {
659
+ fallback_value?: string | number | null;
660
+ }
661
+ type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
662
+ object: 'contact_property';
663
+ };
664
+ type UpdateContactPropertyResponse = Response<UpdateContactPropertyResponseSuccess>;
665
+ //#endregion
545
666
  //#region src/contacts/interfaces/contact.d.ts
546
667
  interface Contact {
547
668
  created_at: string;
@@ -583,13 +704,36 @@ type SelectingField = {
583
704
  interface CreateContactPropertiesOptions {
584
705
  [key: string]: string | number | null;
585
706
  }
707
+ interface LegacyCreateContactOptions {
708
+ /**
709
+ * @deprecated Use `segments` instead to add one or more segments to the new contact
710
+ */
711
+ audienceId: string;
712
+ email: string;
713
+ unsubscribed?: boolean;
714
+ firstName?: string;
715
+ lastName?: string;
716
+ properties?: CreateContactPropertiesOptions;
717
+ segments?: never;
718
+ topics?: never;
719
+ }
586
720
  interface CreateContactOptions {
587
- audienceId?: string;
588
721
  email: string;
589
722
  unsubscribed?: boolean;
590
723
  firstName?: string;
591
724
  lastName?: string;
592
725
  properties?: CreateContactPropertiesOptions;
726
+ segments?: {
727
+ id: string;
728
+ }[];
729
+ topics?: {
730
+ id: string;
731
+ subscription: 'opt_in' | 'opt_out';
732
+ }[];
733
+ /**
734
+ * @deprecated Use `segments` instead to add one or more segments to the new contact
735
+ */
736
+ audienceId?: never;
593
737
  }
594
738
  interface CreateContactRequestOptions extends PostOptions {}
595
739
  interface CreateContactResponseSuccess extends Pick<Contact, 'id'> {
@@ -665,6 +809,79 @@ type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
665
809
  };
666
810
  type UpdateContactResponse = Response<UpdateContactResponseSuccess>;
667
811
  //#endregion
812
+ //#region src/contacts/segments/interfaces/contact-segments.interface.d.ts
813
+ type ContactSegmentsBaseOptions = {
814
+ contactId: string;
815
+ email?: never;
816
+ } | {
817
+ contactId?: never;
818
+ email: string;
819
+ };
820
+ //#endregion
821
+ //#region src/contacts/segments/interfaces/add-contact-segment.interface.d.ts
822
+ type AddContactSegmentOptions = ContactSegmentsBaseOptions & {
823
+ segmentId: string;
824
+ };
825
+ interface AddContactSegmentResponseSuccess {
826
+ id: string;
827
+ }
828
+ type AddContactSegmentResponse = Response<AddContactSegmentResponseSuccess>;
829
+ //#endregion
830
+ //#region src/segments/interfaces/segment.d.ts
831
+ interface Segment {
832
+ created_at: string;
833
+ id: string;
834
+ name: string;
835
+ }
836
+ //#endregion
837
+ //#region src/contacts/segments/interfaces/list-contact-segments.interface.d.ts
838
+ type ListContactSegmentsOptions = PaginationOptions & ContactSegmentsBaseOptions;
839
+ type ListContactSegmentsResponseSuccess = PaginatedData<Segment[]>;
840
+ type ListContactSegmentsResponse = Response<ListContactSegmentsResponseSuccess>;
841
+ //#endregion
842
+ //#region src/contacts/segments/interfaces/remove-contact-segment.interface.d.ts
843
+ type RemoveContactSegmentOptions = ContactSegmentsBaseOptions & {
844
+ segmentId: string;
845
+ };
846
+ interface RemoveContactSegmentResponseSuccess {
847
+ id: string;
848
+ deleted: boolean;
849
+ }
850
+ type RemoveContactSegmentResponse = Response<RemoveContactSegmentResponseSuccess>;
851
+ //#endregion
852
+ //#region src/contacts/topics/interfaces/list-contact-topics.interface.d.ts
853
+ interface ListContactTopicsBaseOptions {
854
+ id?: string;
855
+ email?: string;
856
+ }
857
+ type ListContactTopicsOptions = ListContactTopicsBaseOptions & PaginationOptions;
858
+ interface ListContactTopicsRequestOptions extends GetOptions {}
859
+ interface ContactTopic {
860
+ id: string;
861
+ name: string;
862
+ description: string | null;
863
+ subscription: 'opt_in' | 'opt_out';
864
+ }
865
+ type ListContactTopicsResponseSuccess = PaginatedData<ContactTopic[]>;
866
+ type ListContactTopicsResponse = Response<ListContactTopicsResponseSuccess>;
867
+ //#endregion
868
+ //#region src/contacts/topics/interfaces/update-contact-topics.interface.d.ts
869
+ interface UpdateContactTopicsBaseOptions {
870
+ id?: string;
871
+ email?: string;
872
+ }
873
+ interface UpdateContactTopicsOptions extends UpdateContactTopicsBaseOptions {
874
+ topics: {
875
+ id: string;
876
+ subscription: 'opt_in' | 'opt_out';
877
+ }[];
878
+ }
879
+ interface UpdateContactTopicsRequestOptions extends PatchOptions {}
880
+ interface UpdateContactTopicsResponseSuccess {
881
+ id: string;
882
+ }
883
+ type UpdateContactTopicsResponse = Response<UpdateContactTopicsResponseSuccess>;
884
+ //#endregion
668
885
  //#region src/domains/interfaces/create-domain-options.interface.d.ts
669
886
  interface CreateDomainOptions {
670
887
  name: string;
@@ -803,6 +1020,26 @@ interface UpdateEmailResponseSuccess {
803
1020
  }
804
1021
  type UpdateEmailResponse = Response<UpdateEmailResponseSuccess>;
805
1022
  //#endregion
1023
+ //#region src/emails/receiving/interfaces/forward-receiving-email.interface.d.ts
1024
+ interface ForwardReceivingEmailBodyOptions {
1025
+ text: string;
1026
+ html: string;
1027
+ }
1028
+ interface ForwardReceivingEmailBaseOptions {
1029
+ emailId: string;
1030
+ to: string | string[];
1031
+ from: string;
1032
+ }
1033
+ type ForwardReceivingEmailOptions = (ForwardReceivingEmailBaseOptions & {
1034
+ passthrough?: true;
1035
+ }) | (ForwardReceivingEmailBaseOptions & {
1036
+ passthrough: false;
1037
+ } & RequireAtLeastOne<ForwardReceivingEmailBodyOptions>);
1038
+ interface ForwardReceivingEmailResponseSuccess {
1039
+ id: string;
1040
+ }
1041
+ type ForwardReceivingEmailResponse = Response<ForwardReceivingEmailResponseSuccess>;
1042
+ //#endregion
806
1043
  //#region src/emails/receiving/interfaces/get-receiving-email.interface.d.ts
807
1044
  interface GetReceivingEmailResponseSuccess {
808
1045
  object: 'email';
@@ -818,6 +1055,10 @@ interface GetReceivingEmailResponseSuccess {
818
1055
  text: string | null;
819
1056
  headers: Record<string, string>;
820
1057
  message_id: string;
1058
+ raw: {
1059
+ download_url: string;
1060
+ expires_at: string;
1061
+ } | null;
821
1062
  attachments: Array<{
822
1063
  id: string;
823
1064
  filename: string;
@@ -831,7 +1072,7 @@ type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
831
1072
  //#endregion
832
1073
  //#region src/emails/receiving/interfaces/list-receiving-emails.interface.d.ts
833
1074
  type ListReceivingEmailsOptions = PaginationOptions;
834
- type ListReceivingEmail = Omit<GetReceivingEmailResponseSuccess, 'html' | 'text' | 'headers' | 'object'>;
1075
+ type ListReceivingEmail = Omit<GetReceivingEmailResponseSuccess, 'html' | 'text' | 'headers' | 'raw' | 'object'>;
835
1076
  interface ListReceivingEmailsResponseSuccess {
836
1077
  object: 'list';
837
1078
  has_more: boolean;
@@ -874,68 +1115,6 @@ declare class Broadcasts {
874
1115
  update(id: string, payload: UpdateBroadcastOptions): Promise<UpdateBroadcastResponse>;
875
1116
  }
876
1117
  //#endregion
877
- //#region src/contact-properties/interfaces/contact-property.d.ts
878
- type StringBaseContactProperty = {
879
- type: 'string';
880
- fallbackValue: string | null;
881
- };
882
- type NumberBaseContactProperty = {
883
- type: 'number';
884
- fallbackValue: number | null;
885
- };
886
- type ContactProperty = {
887
- id: string;
888
- createdAt: string;
889
- key: string;
890
- } & (StringBaseContactProperty | NumberBaseContactProperty);
891
- //#endregion
892
- //#region src/contact-properties/interfaces/create-contact-property-options.interface.d.ts
893
- type StringBaseContactPropertyOptions = {
894
- type: 'string';
895
- fallbackValue?: string | null;
896
- };
897
- type NumberBaseContactPropertyOptions = {
898
- type: 'number';
899
- fallbackValue?: number | null;
900
- };
901
- type CreateContactPropertyOptions = {
902
- key: string;
903
- } & (StringBaseContactPropertyOptions | NumberBaseContactPropertyOptions);
904
- type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
905
- object: 'contact_property';
906
- };
907
- type CreateContactPropertyResponse = Response<CreateContactPropertyResponseSuccess>;
908
- //#endregion
909
- //#region src/contact-properties/interfaces/delete-contact-property-options.interface.d.ts
910
- type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
911
- object: 'contact_property';
912
- deleted: boolean;
913
- };
914
- type RemoveContactPropertyResponse = Response<RemoveContactPropertyResponseSuccess>;
915
- //#endregion
916
- //#region src/contact-properties/interfaces/get-contact-property.interface.d.ts
917
- type GetContactPropertyResponse = Response<ContactProperty & {
918
- object: 'contact_property';
919
- }>;
920
- //#endregion
921
- //#region src/contact-properties/interfaces/list-contact-properties-options.interface.d.ts
922
- type ListContactPropertiesOptions = PaginationOptions;
923
- type ListContactPropertiesResponse = Response<{
924
- object: 'list';
925
- has_more: boolean;
926
- data: ContactProperty[];
927
- }>;
928
- //#endregion
929
- //#region src/contact-properties/interfaces/update-contact-property-options.interface.d.ts
930
- type UpdateContactPropertyOptions = {
931
- id: string;
932
- fallbackValue?: string | number | null;
933
- };
934
- type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
935
- object: 'contact_property';
936
- };
937
- type UpdateContactPropertyResponse = Response<UpdateContactPropertyResponseSuccess>;
938
- //#endregion
939
1118
  //#region src/contact-properties/contact-properties.d.ts
940
1119
  declare class ContactProperties {
941
1120
  private readonly resend;
@@ -947,46 +1126,6 @@ declare class ContactProperties {
947
1126
  remove(id: string): Promise<RemoveContactPropertyResponse>;
948
1127
  }
949
1128
  //#endregion
950
- //#region src/contacts/segments/interfaces/contact-segments.interface.d.ts
951
- type ContactSegmentsBaseOptions = {
952
- contactId: string;
953
- email?: never;
954
- } | {
955
- contactId?: never;
956
- email: string;
957
- };
958
- //#endregion
959
- //#region src/contacts/segments/interfaces/add-contact-segment.interface.d.ts
960
- type AddContactSegmentOptions = ContactSegmentsBaseOptions & {
961
- segmentId: string;
962
- };
963
- interface AddContactSegmentResponseSuccess {
964
- id: string;
965
- }
966
- type AddContactSegmentResponse = Response<AddContactSegmentResponseSuccess>;
967
- //#endregion
968
- //#region src/segments/interfaces/segment.d.ts
969
- interface Segment {
970
- created_at: string;
971
- id: string;
972
- name: string;
973
- }
974
- //#endregion
975
- //#region src/contacts/segments/interfaces/list-contact-segments.interface.d.ts
976
- type ListContactSegmentsOptions = PaginationOptions & ContactSegmentsBaseOptions;
977
- type ListContactSegmentsResponseSuccess = PaginatedData<Segment[]>;
978
- type ListContactSegmentsResponse = Response<ListContactSegmentsResponseSuccess>;
979
- //#endregion
980
- //#region src/contacts/segments/interfaces/remove-contact-segment.interface.d.ts
981
- type RemoveContactSegmentOptions = ContactSegmentsBaseOptions & {
982
- segmentId: string;
983
- };
984
- interface RemoveContactSegmentResponseSuccess {
985
- id: string;
986
- deleted: boolean;
987
- }
988
- type RemoveContactSegmentResponse = Response<RemoveContactSegmentResponseSuccess>;
989
- //#endregion
990
1129
  //#region src/contacts/segments/contact-segments.d.ts
991
1130
  declare class ContactSegments {
992
1131
  private readonly resend;
@@ -996,37 +1135,6 @@ declare class ContactSegments {
996
1135
  remove(options: RemoveContactSegmentOptions): Promise<RemoveContactSegmentResponse>;
997
1136
  }
998
1137
  //#endregion
999
- //#region src/contacts/topics/interfaces/list-contact-topics.interface.d.ts
1000
- interface ListContactTopicsBaseOptions {
1001
- id?: string;
1002
- email?: string;
1003
- }
1004
- type ListContactTopicsOptions = ListContactTopicsBaseOptions & PaginationOptions;
1005
- interface ContactTopic {
1006
- id: string;
1007
- name: string;
1008
- description: string | null;
1009
- subscription: 'opt_in' | 'opt_out';
1010
- }
1011
- type ListContactTopicsResponseSuccess = PaginatedData<ContactTopic[]>;
1012
- type ListContactTopicsResponse = Response<ListContactTopicsResponseSuccess>;
1013
- //#endregion
1014
- //#region src/contacts/topics/interfaces/update-contact-topics.interface.d.ts
1015
- interface UpdateContactTopicsBaseOptions {
1016
- id?: string;
1017
- email?: string;
1018
- }
1019
- interface UpdateContactTopicsOptions extends UpdateContactTopicsBaseOptions {
1020
- topics: {
1021
- id: string;
1022
- subscription: 'opt_in' | 'opt_out';
1023
- }[];
1024
- }
1025
- interface UpdateContactTopicsResponseSuccess {
1026
- id: string;
1027
- }
1028
- type UpdateContactTopicsResponse = Response<UpdateContactTopicsResponseSuccess>;
1029
- //#endregion
1030
1138
  //#region src/contacts/topics/contact-topics.d.ts
1031
1139
  declare class ContactTopics {
1032
1140
  private readonly resend;
@@ -1041,7 +1149,7 @@ declare class Contacts {
1041
1149
  readonly topics: ContactTopics;
1042
1150
  readonly segments: ContactSegments;
1043
1151
  constructor(resend: Resend);
1044
- create(payload: CreateContactOptions, options?: CreateContactRequestOptions): Promise<CreateContactResponse>;
1152
+ create(payload: CreateContactOptions | LegacyCreateContactOptions, options?: CreateContactRequestOptions): Promise<CreateContactResponse>;
1045
1153
  list(options?: ListContactsOptions): Promise<ListContactsResponse>;
1046
1154
  get(options: GetContactOptions): Promise<GetContactResponse>;
1047
1155
  update(options: UpdateContactOptions): Promise<UpdateContactResponse>;
@@ -1093,6 +1201,9 @@ declare class Receiving {
1093
1201
  constructor(resend: Resend);
1094
1202
  get(id: string): Promise<GetReceivingEmailResponse>;
1095
1203
  list(options?: ListReceivingEmailsOptions): Promise<ListReceivingEmailsResponse>;
1204
+ forward(options: ForwardReceivingEmailOptions): Promise<ForwardReceivingEmailResponse>;
1205
+ private forwardPassthrough;
1206
+ private forwardWrapped;
1096
1207
  }
1097
1208
  //#endregion
1098
1209
  //#region src/emails/emails.d.ts
@@ -1194,6 +1305,7 @@ type TemplateOptionalFieldsForCreation = Partial<Pick<Template, 'subject' | 'tex
1194
1305
  variables?: TemplateVariableCreationOptions[];
1195
1306
  };
1196
1307
  type CreateTemplateOptions = Pick<Template, 'name'> & TemplateOptionalFieldsForCreation & TemplateContentCreationOptions;
1308
+ interface CreateTemplateRequestOptions extends PostOptions {}
1197
1309
  interface CreateTemplateResponseSuccess extends Pick<Template, 'id'> {
1198
1310
  object: 'template';
1199
1311
  }
@@ -1227,6 +1339,7 @@ interface GetTemplateResponseSuccess extends Template {
1227
1339
  type GetTemplateResponse = Response<GetTemplateResponseSuccess>;
1228
1340
  //#endregion
1229
1341
  //#region src/templates/interfaces/list-templates.interface.d.ts
1342
+ type ListTemplatesOptions = PaginationOptions;
1230
1343
  interface TemplateListItem extends Pick<Template, 'id' | 'name' | 'created_at' | 'updated_at' | 'status' | 'published_at' | 'alias'> {}
1231
1344
  interface ListTemplatesResponseSuccess {
1232
1345
  object: 'list';
@@ -1294,6 +1407,9 @@ type CreateTopicResponseSuccess = Pick<Topic, 'id'>;
1294
1407
  type CreateTopicResponse = Response<CreateTopicResponseSuccess>;
1295
1408
  //#endregion
1296
1409
  //#region src/topics/interfaces/get-contact.interface.d.ts
1410
+ interface GetTopicOptions {
1411
+ id: string;
1412
+ }
1297
1413
  type GetTopicResponseSuccess = Topic;
1298
1414
  type GetTopicResponse = Response<GetTopicResponseSuccess>;
1299
1415
  //#endregion
@@ -1611,4 +1727,4 @@ declare class Resend {
1611
1727
  delete<T>(path: string, query?: unknown): Promise<Response<T>>;
1612
1728
  }
1613
1729
  //#endregion
1614
- export { ApiKey, Attachment, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsApiResponse, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, Tag, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactResponse, UpdateContactResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, Webhook, WebhookEvent, WebhookEventPayload };
1730
+ export { AddContactSegmentOptions, AddContactSegmentResponse, AddContactSegmentResponseSuccess, ApiContactProperty, ApiKey, Attachment, Broadcast, CancelEmailResponse, CancelEmailResponseSuccess, Contact, ContactCreatedEvent, ContactDeletedEvent, ContactProperty, ContactSegmentsBaseOptions, ContactTopic, ContactUpdatedEvent, CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateBroadcastOptions, CreateBroadcastRequestOptions, CreateBroadcastResponse, CreateBroadcastResponseSuccess, CreateContactOptions, CreateContactPropertyApiOptions, CreateContactPropertyOptions, CreateContactPropertyResponse, CreateContactPropertyResponseSuccess, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, CreateSegmentOptions, CreateSegmentRequestOptions, CreateSegmentResponse, CreateSegmentResponseSuccess, CreateTemplateOptions, CreateTemplateRequestOptions, CreateTemplateResponse, CreateTemplateResponseSuccess, CreateTopicOptions, CreateTopicResponse, CreateTopicResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, Domain, DomainApiOptions, DomainCapabilities, DomainCapabilityStatus, DomainCreatedEvent, DomainDeletedEvent, DomainDkimRecord, DomainNameservers, DomainRecords, DomainRegion, DomainSpfRecord, DomainStatus, DomainUpdatedEvent, DuplicateTemplateResponse, DuplicateTemplateResponseSuccess, EmailApiAttachment, EmailApiOptions, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, type ErrorResponse, ForwardReceivingEmailOptions, ForwardReceivingEmailResponse, ForwardReceivingEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetBroadcastResponse, GetBroadcastResponseSuccess, GetContactOptions, GetContactPropertyResponse, GetContactPropertyResponseSuccess, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, GetOptions, GetReceivingEmailResponse, GetReceivingEmailResponseSuccess, GetSegmentResponse, GetSegmentResponseSuccess, GetTemplateResponse, GetTemplateResponseSuccess, GetTopicOptions, GetTopicResponse, GetTopicResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, IdempotentRequest, LegacyCreateContactOptions, ListApiKeysOptions, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAttachmentsApiResponse, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListBroadcastsOptions, ListBroadcastsResponse, ListBroadcastsResponseSuccess, ListContactPropertiesOptions, ListContactPropertiesResponse, ListContactPropertiesResponseSuccess, ListContactSegmentsOptions, ListContactSegmentsResponse, ListContactSegmentsResponseSuccess, ListContactTopicsOptions, ListContactTopicsRequestOptions, ListContactTopicsResponse, ListContactTopicsResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsOptions, ListDomainsResponse, ListDomainsResponseSuccess, ListReceivingEmail, ListReceivingEmailsOptions, ListReceivingEmailsResponse, ListReceivingEmailsResponseSuccess, ListSegmentsOptions, ListSegmentsResponse, ListSegmentsResponseSuccess, ListTemplatesOptions, ListTemplatesResponse, ListTemplatesResponseSuccess, ListTopicsResponse, ListTopicsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, PaginatedData, PaginationOptions, PatchOptions, PostOptions, PublishTemplateResponse, PublishTemplateResponseSuccess, PutOptions, ReceivingRecord, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveBroadcastResponse, RemoveBroadcastResponseSuccess, RemoveContactOptions, RemoveContactPropertyResponse, RemoveContactPropertyResponseSuccess, RemoveContactSegmentOptions, RemoveContactSegmentResponse, RemoveContactSegmentResponseSuccess, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, RemoveSegmentResponse, RemoveSegmentResponseSuccess, RemoveTemplateResponse, RemoveTemplateResponseSuccess, RemoveTopicResponse, RemoveTopicResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, RequireAtLeastOne, Resend, type Response, Segment, SelectingField, SendBroadcastOptions, SendBroadcastRequestOptions, SendBroadcastResponse, SendBroadcastResponseSuccess, Tag, Template, TemplateVariable, Topic, UpdateBroadcastOptions, UpdateBroadcastResponse, UpdateBroadcastResponseSuccess, UpdateContactOptions, UpdateContactPropertyApiOptions, UpdateContactPropertyOptions, UpdateContactPropertyResponse, UpdateContactPropertyResponseSuccess, UpdateContactResponse, UpdateContactResponseSuccess, UpdateContactTopicsOptions, UpdateContactTopicsRequestOptions, UpdateContactTopicsResponse, UpdateContactTopicsResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, UpdateEmailOptions, UpdateEmailResponse, UpdateEmailResponseSuccess, UpdateTemplateOptions, UpdateTemplateResponse, UpdateTemplateResponseSuccess, UpdateTopicOptions, UpdateTopicResponse, UpdateTopicResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess, Webhook, WebhookEvent, WebhookEventPayload };