resend 6.8.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.cjs +130 -16
- package/dist/index.d.cts +226 -143
- package/dist/index.d.mts +226 -143
- package/dist/index.mjs +130 -16
- package/package.json +8 -6
package/dist/index.d.cts
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:
|
|
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:
|
|
407
|
+
react: void 0;
|
|
411
408
|
/**
|
|
412
409
|
* The HTML version of the message.
|
|
413
410
|
*
|
|
@@ -575,6 +572,97 @@ type UpdateBroadcastOptions = {
|
|
|
575
572
|
};
|
|
576
573
|
type UpdateBroadcastResponse = Response<UpdateBroadcastResponseSuccess>;
|
|
577
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
|
|
578
666
|
//#region src/contacts/interfaces/contact.d.ts
|
|
579
667
|
interface Contact {
|
|
580
668
|
created_at: string;
|
|
@@ -616,13 +704,36 @@ type SelectingField = {
|
|
|
616
704
|
interface CreateContactPropertiesOptions {
|
|
617
705
|
[key: string]: string | number | null;
|
|
618
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
|
+
}
|
|
619
720
|
interface CreateContactOptions {
|
|
620
|
-
audienceId?: string;
|
|
621
721
|
email: string;
|
|
622
722
|
unsubscribed?: boolean;
|
|
623
723
|
firstName?: string;
|
|
624
724
|
lastName?: string;
|
|
625
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;
|
|
626
737
|
}
|
|
627
738
|
interface CreateContactRequestOptions extends PostOptions {}
|
|
628
739
|
interface CreateContactResponseSuccess extends Pick<Contact, 'id'> {
|
|
@@ -698,6 +809,79 @@ type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
|
|
|
698
809
|
};
|
|
699
810
|
type UpdateContactResponse = Response<UpdateContactResponseSuccess>;
|
|
700
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
|
|
701
885
|
//#region src/domains/interfaces/create-domain-options.interface.d.ts
|
|
702
886
|
interface CreateDomainOptions {
|
|
703
887
|
name: string;
|
|
@@ -836,6 +1020,26 @@ interface UpdateEmailResponseSuccess {
|
|
|
836
1020
|
}
|
|
837
1021
|
type UpdateEmailResponse = Response<UpdateEmailResponseSuccess>;
|
|
838
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
|
|
839
1043
|
//#region src/emails/receiving/interfaces/get-receiving-email.interface.d.ts
|
|
840
1044
|
interface GetReceivingEmailResponseSuccess {
|
|
841
1045
|
object: 'email';
|
|
@@ -851,6 +1055,10 @@ interface GetReceivingEmailResponseSuccess {
|
|
|
851
1055
|
text: string | null;
|
|
852
1056
|
headers: Record<string, string>;
|
|
853
1057
|
message_id: string;
|
|
1058
|
+
raw: {
|
|
1059
|
+
download_url: string;
|
|
1060
|
+
expires_at: string;
|
|
1061
|
+
} | null;
|
|
854
1062
|
attachments: Array<{
|
|
855
1063
|
id: string;
|
|
856
1064
|
filename: string;
|
|
@@ -864,7 +1072,7 @@ type GetReceivingEmailResponse = Response<GetReceivingEmailResponseSuccess>;
|
|
|
864
1072
|
//#endregion
|
|
865
1073
|
//#region src/emails/receiving/interfaces/list-receiving-emails.interface.d.ts
|
|
866
1074
|
type ListReceivingEmailsOptions = PaginationOptions;
|
|
867
|
-
type ListReceivingEmail = Omit<GetReceivingEmailResponseSuccess, 'html' | 'text' | 'headers' | 'object'>;
|
|
1075
|
+
type ListReceivingEmail = Omit<GetReceivingEmailResponseSuccess, 'html' | 'text' | 'headers' | 'raw' | 'object'>;
|
|
868
1076
|
interface ListReceivingEmailsResponseSuccess {
|
|
869
1077
|
object: 'list';
|
|
870
1078
|
has_more: boolean;
|
|
@@ -907,68 +1115,6 @@ declare class Broadcasts {
|
|
|
907
1115
|
update(id: string, payload: UpdateBroadcastOptions): Promise<UpdateBroadcastResponse>;
|
|
908
1116
|
}
|
|
909
1117
|
//#endregion
|
|
910
|
-
//#region src/contact-properties/interfaces/contact-property.d.ts
|
|
911
|
-
type StringBaseContactProperty = {
|
|
912
|
-
type: 'string';
|
|
913
|
-
fallbackValue: string | null;
|
|
914
|
-
};
|
|
915
|
-
type NumberBaseContactProperty = {
|
|
916
|
-
type: 'number';
|
|
917
|
-
fallbackValue: number | null;
|
|
918
|
-
};
|
|
919
|
-
type ContactProperty = {
|
|
920
|
-
id: string;
|
|
921
|
-
createdAt: string;
|
|
922
|
-
key: string;
|
|
923
|
-
} & (StringBaseContactProperty | NumberBaseContactProperty);
|
|
924
|
-
//#endregion
|
|
925
|
-
//#region src/contact-properties/interfaces/create-contact-property-options.interface.d.ts
|
|
926
|
-
type StringBaseContactPropertyOptions = {
|
|
927
|
-
type: 'string';
|
|
928
|
-
fallbackValue?: string | null;
|
|
929
|
-
};
|
|
930
|
-
type NumberBaseContactPropertyOptions = {
|
|
931
|
-
type: 'number';
|
|
932
|
-
fallbackValue?: number | null;
|
|
933
|
-
};
|
|
934
|
-
type CreateContactPropertyOptions = {
|
|
935
|
-
key: string;
|
|
936
|
-
} & (StringBaseContactPropertyOptions | NumberBaseContactPropertyOptions);
|
|
937
|
-
type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
|
|
938
|
-
object: 'contact_property';
|
|
939
|
-
};
|
|
940
|
-
type CreateContactPropertyResponse = Response<CreateContactPropertyResponseSuccess>;
|
|
941
|
-
//#endregion
|
|
942
|
-
//#region src/contact-properties/interfaces/delete-contact-property-options.interface.d.ts
|
|
943
|
-
type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
|
|
944
|
-
object: 'contact_property';
|
|
945
|
-
deleted: boolean;
|
|
946
|
-
};
|
|
947
|
-
type RemoveContactPropertyResponse = Response<RemoveContactPropertyResponseSuccess>;
|
|
948
|
-
//#endregion
|
|
949
|
-
//#region src/contact-properties/interfaces/get-contact-property.interface.d.ts
|
|
950
|
-
type GetContactPropertyResponse = Response<ContactProperty & {
|
|
951
|
-
object: 'contact_property';
|
|
952
|
-
}>;
|
|
953
|
-
//#endregion
|
|
954
|
-
//#region src/contact-properties/interfaces/list-contact-properties-options.interface.d.ts
|
|
955
|
-
type ListContactPropertiesOptions = PaginationOptions;
|
|
956
|
-
type ListContactPropertiesResponse = Response<{
|
|
957
|
-
object: 'list';
|
|
958
|
-
has_more: boolean;
|
|
959
|
-
data: ContactProperty[];
|
|
960
|
-
}>;
|
|
961
|
-
//#endregion
|
|
962
|
-
//#region src/contact-properties/interfaces/update-contact-property-options.interface.d.ts
|
|
963
|
-
type UpdateContactPropertyOptions = {
|
|
964
|
-
id: string;
|
|
965
|
-
fallbackValue?: string | number | null;
|
|
966
|
-
};
|
|
967
|
-
type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
|
|
968
|
-
object: 'contact_property';
|
|
969
|
-
};
|
|
970
|
-
type UpdateContactPropertyResponse = Response<UpdateContactPropertyResponseSuccess>;
|
|
971
|
-
//#endregion
|
|
972
1118
|
//#region src/contact-properties/contact-properties.d.ts
|
|
973
1119
|
declare class ContactProperties {
|
|
974
1120
|
private readonly resend;
|
|
@@ -980,46 +1126,6 @@ declare class ContactProperties {
|
|
|
980
1126
|
remove(id: string): Promise<RemoveContactPropertyResponse>;
|
|
981
1127
|
}
|
|
982
1128
|
//#endregion
|
|
983
|
-
//#region src/contacts/segments/interfaces/contact-segments.interface.d.ts
|
|
984
|
-
type ContactSegmentsBaseOptions = {
|
|
985
|
-
contactId: string;
|
|
986
|
-
email?: never;
|
|
987
|
-
} | {
|
|
988
|
-
contactId?: never;
|
|
989
|
-
email: string;
|
|
990
|
-
};
|
|
991
|
-
//#endregion
|
|
992
|
-
//#region src/contacts/segments/interfaces/add-contact-segment.interface.d.ts
|
|
993
|
-
type AddContactSegmentOptions = ContactSegmentsBaseOptions & {
|
|
994
|
-
segmentId: string;
|
|
995
|
-
};
|
|
996
|
-
interface AddContactSegmentResponseSuccess {
|
|
997
|
-
id: string;
|
|
998
|
-
}
|
|
999
|
-
type AddContactSegmentResponse = Response<AddContactSegmentResponseSuccess>;
|
|
1000
|
-
//#endregion
|
|
1001
|
-
//#region src/segments/interfaces/segment.d.ts
|
|
1002
|
-
interface Segment {
|
|
1003
|
-
created_at: string;
|
|
1004
|
-
id: string;
|
|
1005
|
-
name: string;
|
|
1006
|
-
}
|
|
1007
|
-
//#endregion
|
|
1008
|
-
//#region src/contacts/segments/interfaces/list-contact-segments.interface.d.ts
|
|
1009
|
-
type ListContactSegmentsOptions = PaginationOptions & ContactSegmentsBaseOptions;
|
|
1010
|
-
type ListContactSegmentsResponseSuccess = PaginatedData<Segment[]>;
|
|
1011
|
-
type ListContactSegmentsResponse = Response<ListContactSegmentsResponseSuccess>;
|
|
1012
|
-
//#endregion
|
|
1013
|
-
//#region src/contacts/segments/interfaces/remove-contact-segment.interface.d.ts
|
|
1014
|
-
type RemoveContactSegmentOptions = ContactSegmentsBaseOptions & {
|
|
1015
|
-
segmentId: string;
|
|
1016
|
-
};
|
|
1017
|
-
interface RemoveContactSegmentResponseSuccess {
|
|
1018
|
-
id: string;
|
|
1019
|
-
deleted: boolean;
|
|
1020
|
-
}
|
|
1021
|
-
type RemoveContactSegmentResponse = Response<RemoveContactSegmentResponseSuccess>;
|
|
1022
|
-
//#endregion
|
|
1023
1129
|
//#region src/contacts/segments/contact-segments.d.ts
|
|
1024
1130
|
declare class ContactSegments {
|
|
1025
1131
|
private readonly resend;
|
|
@@ -1029,37 +1135,6 @@ declare class ContactSegments {
|
|
|
1029
1135
|
remove(options: RemoveContactSegmentOptions): Promise<RemoveContactSegmentResponse>;
|
|
1030
1136
|
}
|
|
1031
1137
|
//#endregion
|
|
1032
|
-
//#region src/contacts/topics/interfaces/list-contact-topics.interface.d.ts
|
|
1033
|
-
interface ListContactTopicsBaseOptions {
|
|
1034
|
-
id?: string;
|
|
1035
|
-
email?: string;
|
|
1036
|
-
}
|
|
1037
|
-
type ListContactTopicsOptions = ListContactTopicsBaseOptions & PaginationOptions;
|
|
1038
|
-
interface ContactTopic {
|
|
1039
|
-
id: string;
|
|
1040
|
-
name: string;
|
|
1041
|
-
description: string | null;
|
|
1042
|
-
subscription: 'opt_in' | 'opt_out';
|
|
1043
|
-
}
|
|
1044
|
-
type ListContactTopicsResponseSuccess = PaginatedData<ContactTopic[]>;
|
|
1045
|
-
type ListContactTopicsResponse = Response<ListContactTopicsResponseSuccess>;
|
|
1046
|
-
//#endregion
|
|
1047
|
-
//#region src/contacts/topics/interfaces/update-contact-topics.interface.d.ts
|
|
1048
|
-
interface UpdateContactTopicsBaseOptions {
|
|
1049
|
-
id?: string;
|
|
1050
|
-
email?: string;
|
|
1051
|
-
}
|
|
1052
|
-
interface UpdateContactTopicsOptions extends UpdateContactTopicsBaseOptions {
|
|
1053
|
-
topics: {
|
|
1054
|
-
id: string;
|
|
1055
|
-
subscription: 'opt_in' | 'opt_out';
|
|
1056
|
-
}[];
|
|
1057
|
-
}
|
|
1058
|
-
interface UpdateContactTopicsResponseSuccess {
|
|
1059
|
-
id: string;
|
|
1060
|
-
}
|
|
1061
|
-
type UpdateContactTopicsResponse = Response<UpdateContactTopicsResponseSuccess>;
|
|
1062
|
-
//#endregion
|
|
1063
1138
|
//#region src/contacts/topics/contact-topics.d.ts
|
|
1064
1139
|
declare class ContactTopics {
|
|
1065
1140
|
private readonly resend;
|
|
@@ -1074,7 +1149,7 @@ declare class Contacts {
|
|
|
1074
1149
|
readonly topics: ContactTopics;
|
|
1075
1150
|
readonly segments: ContactSegments;
|
|
1076
1151
|
constructor(resend: Resend);
|
|
1077
|
-
create(payload: CreateContactOptions, options?: CreateContactRequestOptions): Promise<CreateContactResponse>;
|
|
1152
|
+
create(payload: CreateContactOptions | LegacyCreateContactOptions, options?: CreateContactRequestOptions): Promise<CreateContactResponse>;
|
|
1078
1153
|
list(options?: ListContactsOptions): Promise<ListContactsResponse>;
|
|
1079
1154
|
get(options: GetContactOptions): Promise<GetContactResponse>;
|
|
1080
1155
|
update(options: UpdateContactOptions): Promise<UpdateContactResponse>;
|
|
@@ -1126,6 +1201,9 @@ declare class Receiving {
|
|
|
1126
1201
|
constructor(resend: Resend);
|
|
1127
1202
|
get(id: string): Promise<GetReceivingEmailResponse>;
|
|
1128
1203
|
list(options?: ListReceivingEmailsOptions): Promise<ListReceivingEmailsResponse>;
|
|
1204
|
+
forward(options: ForwardReceivingEmailOptions): Promise<ForwardReceivingEmailResponse>;
|
|
1205
|
+
private forwardPassthrough;
|
|
1206
|
+
private forwardWrapped;
|
|
1129
1207
|
}
|
|
1130
1208
|
//#endregion
|
|
1131
1209
|
//#region src/emails/emails.d.ts
|
|
@@ -1227,6 +1305,7 @@ type TemplateOptionalFieldsForCreation = Partial<Pick<Template, 'subject' | 'tex
|
|
|
1227
1305
|
variables?: TemplateVariableCreationOptions[];
|
|
1228
1306
|
};
|
|
1229
1307
|
type CreateTemplateOptions = Pick<Template, 'name'> & TemplateOptionalFieldsForCreation & TemplateContentCreationOptions;
|
|
1308
|
+
interface CreateTemplateRequestOptions extends PostOptions {}
|
|
1230
1309
|
interface CreateTemplateResponseSuccess extends Pick<Template, 'id'> {
|
|
1231
1310
|
object: 'template';
|
|
1232
1311
|
}
|
|
@@ -1260,6 +1339,7 @@ interface GetTemplateResponseSuccess extends Template {
|
|
|
1260
1339
|
type GetTemplateResponse = Response<GetTemplateResponseSuccess>;
|
|
1261
1340
|
//#endregion
|
|
1262
1341
|
//#region src/templates/interfaces/list-templates.interface.d.ts
|
|
1342
|
+
type ListTemplatesOptions = PaginationOptions;
|
|
1263
1343
|
interface TemplateListItem extends Pick<Template, 'id' | 'name' | 'created_at' | 'updated_at' | 'status' | 'published_at' | 'alias'> {}
|
|
1264
1344
|
interface ListTemplatesResponseSuccess {
|
|
1265
1345
|
object: 'list';
|
|
@@ -1327,6 +1407,9 @@ type CreateTopicResponseSuccess = Pick<Topic, 'id'>;
|
|
|
1327
1407
|
type CreateTopicResponse = Response<CreateTopicResponseSuccess>;
|
|
1328
1408
|
//#endregion
|
|
1329
1409
|
//#region src/topics/interfaces/get-contact.interface.d.ts
|
|
1410
|
+
interface GetTopicOptions {
|
|
1411
|
+
id: string;
|
|
1412
|
+
}
|
|
1330
1413
|
type GetTopicResponseSuccess = Topic;
|
|
1331
1414
|
type GetTopicResponse = Response<GetTopicResponseSuccess>;
|
|
1332
1415
|
//#endregion
|
|
@@ -1644,4 +1727,4 @@ declare class Resend {
|
|
|
1644
1727
|
delete<T>(path: string, query?: unknown): Promise<Response<T>>;
|
|
1645
1728
|
}
|
|
1646
1729
|
//#endregion
|
|
1647
|
-
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 };
|