resend 3.4.0 → 3.6.0-canary.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 +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -143,21 +143,21 @@ interface EmailRenderOptions {
|
|
|
143
143
|
*
|
|
144
144
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
145
145
|
*/
|
|
146
|
-
react
|
|
146
|
+
react: React.ReactNode;
|
|
147
147
|
/**
|
|
148
148
|
* The HTML version of the message.
|
|
149
149
|
*
|
|
150
150
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
151
151
|
*/
|
|
152
|
-
html
|
|
152
|
+
html: string;
|
|
153
153
|
/**
|
|
154
154
|
* The plain text version of the message.
|
|
155
155
|
*
|
|
156
156
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
157
157
|
*/
|
|
158
|
-
text
|
|
158
|
+
text: string;
|
|
159
159
|
}
|
|
160
|
-
interface CreateEmailBaseOptions
|
|
160
|
+
interface CreateEmailBaseOptions {
|
|
161
161
|
/**
|
|
162
162
|
* Filename and content of attachments (max 40mb per email)
|
|
163
163
|
*
|
|
@@ -212,6 +212,13 @@ interface CreateEmailBaseOptions extends EmailRenderOptions {
|
|
|
212
212
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
213
213
|
*/
|
|
214
214
|
to: string | string[];
|
|
215
|
+
/**
|
|
216
|
+
* Schedule email to be sent later.
|
|
217
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).
|
|
218
|
+
*
|
|
219
|
+
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
220
|
+
*/
|
|
221
|
+
scheduled_at: string;
|
|
215
222
|
}
|
|
216
223
|
type CreateEmailOptions = RequireAtLeastOne<EmailRenderOptions> & CreateEmailBaseOptions;
|
|
217
224
|
interface CreateEmailRequestOptions extends PostOptions {
|
|
@@ -480,6 +487,15 @@ declare class Domains {
|
|
|
480
487
|
verify(id: string): Promise<VerifyDomainsResponse>;
|
|
481
488
|
}
|
|
482
489
|
|
|
490
|
+
interface CancelEmailResponse {
|
|
491
|
+
data: CancelEmailResponseSuccess | null;
|
|
492
|
+
error: ErrorResponse | null;
|
|
493
|
+
}
|
|
494
|
+
interface CancelEmailResponseSuccess {
|
|
495
|
+
object: 'email';
|
|
496
|
+
id: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
483
499
|
interface GetEmailResponseSuccess {
|
|
484
500
|
bcc: string[] | null;
|
|
485
501
|
cc: string[] | null;
|
|
@@ -505,6 +521,7 @@ declare class Emails {
|
|
|
505
521
|
send(payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
506
522
|
create(payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
507
523
|
get(id: string): Promise<GetEmailResponse>;
|
|
524
|
+
cancel(id: string): Promise<CancelEmailResponse>;
|
|
508
525
|
}
|
|
509
526
|
|
|
510
527
|
declare class Resend {
|
|
@@ -543,4 +560,4 @@ declare class Resend {
|
|
|
543
560
|
}>;
|
|
544
561
|
}
|
|
545
562
|
|
|
546
|
-
export { ErrorResponse, Resend };
|
|
563
|
+
export { CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAudienceOptions, CreateAudienceRequestOptions, CreateAudienceResponse, CreateAudienceResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateContactOptions, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, ErrorResponse, GetAudienceResponse, GetAudienceResponseSuccess, GetContactOptions, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAudiencesResponse, ListAudiencesResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsResponse, ListDomainsResponseSuccess, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveAudiencesResponse, RemoveAudiencesResponseSuccess, RemoveContactOptions, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, Resend, Tag, UpdateContactOptions, UpdateContactResponse, UpdateContactResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess };
|
package/dist/index.d.ts
CHANGED
|
@@ -143,21 +143,21 @@ interface EmailRenderOptions {
|
|
|
143
143
|
*
|
|
144
144
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
145
145
|
*/
|
|
146
|
-
react
|
|
146
|
+
react: React.ReactNode;
|
|
147
147
|
/**
|
|
148
148
|
* The HTML version of the message.
|
|
149
149
|
*
|
|
150
150
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
151
151
|
*/
|
|
152
|
-
html
|
|
152
|
+
html: string;
|
|
153
153
|
/**
|
|
154
154
|
* The plain text version of the message.
|
|
155
155
|
*
|
|
156
156
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
157
157
|
*/
|
|
158
|
-
text
|
|
158
|
+
text: string;
|
|
159
159
|
}
|
|
160
|
-
interface CreateEmailBaseOptions
|
|
160
|
+
interface CreateEmailBaseOptions {
|
|
161
161
|
/**
|
|
162
162
|
* Filename and content of attachments (max 40mb per email)
|
|
163
163
|
*
|
|
@@ -212,6 +212,13 @@ interface CreateEmailBaseOptions extends EmailRenderOptions {
|
|
|
212
212
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
213
213
|
*/
|
|
214
214
|
to: string | string[];
|
|
215
|
+
/**
|
|
216
|
+
* Schedule email to be sent later.
|
|
217
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).
|
|
218
|
+
*
|
|
219
|
+
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
220
|
+
*/
|
|
221
|
+
scheduled_at: string;
|
|
215
222
|
}
|
|
216
223
|
type CreateEmailOptions = RequireAtLeastOne<EmailRenderOptions> & CreateEmailBaseOptions;
|
|
217
224
|
interface CreateEmailRequestOptions extends PostOptions {
|
|
@@ -480,6 +487,15 @@ declare class Domains {
|
|
|
480
487
|
verify(id: string): Promise<VerifyDomainsResponse>;
|
|
481
488
|
}
|
|
482
489
|
|
|
490
|
+
interface CancelEmailResponse {
|
|
491
|
+
data: CancelEmailResponseSuccess | null;
|
|
492
|
+
error: ErrorResponse | null;
|
|
493
|
+
}
|
|
494
|
+
interface CancelEmailResponseSuccess {
|
|
495
|
+
object: 'email';
|
|
496
|
+
id: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
483
499
|
interface GetEmailResponseSuccess {
|
|
484
500
|
bcc: string[] | null;
|
|
485
501
|
cc: string[] | null;
|
|
@@ -505,6 +521,7 @@ declare class Emails {
|
|
|
505
521
|
send(payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
506
522
|
create(payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<CreateEmailResponse>;
|
|
507
523
|
get(id: string): Promise<GetEmailResponse>;
|
|
524
|
+
cancel(id: string): Promise<CancelEmailResponse>;
|
|
508
525
|
}
|
|
509
526
|
|
|
510
527
|
declare class Resend {
|
|
@@ -543,4 +560,4 @@ declare class Resend {
|
|
|
543
560
|
}>;
|
|
544
561
|
}
|
|
545
562
|
|
|
546
|
-
export { ErrorResponse, Resend };
|
|
563
|
+
export { CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, CreateApiKeyResponseSuccess, CreateAudienceOptions, CreateAudienceRequestOptions, CreateAudienceResponse, CreateAudienceResponseSuccess, CreateBatchOptions, CreateBatchRequestOptions, CreateBatchResponse, CreateBatchSuccessResponse, CreateContactOptions, CreateContactRequestOptions, CreateContactResponse, CreateContactResponseSuccess, CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, CreateDomainResponseSuccess, CreateEmailOptions, CreateEmailRequestOptions, CreateEmailResponse, CreateEmailResponseSuccess, ErrorResponse, GetAudienceResponse, GetAudienceResponseSuccess, GetContactOptions, GetContactResponse, GetContactResponseSuccess, GetDomainResponse, GetDomainResponseSuccess, GetEmailResponse, GetEmailResponseSuccess, ListApiKeysResponse, ListApiKeysResponseSuccess, ListAudiencesResponse, ListAudiencesResponseSuccess, ListContactsOptions, ListContactsResponse, ListContactsResponseSuccess, ListDomainsResponse, ListDomainsResponseSuccess, RemoveApiKeyResponse, RemoveApiKeyResponseSuccess, RemoveAudiencesResponse, RemoveAudiencesResponseSuccess, RemoveContactOptions, RemoveContactsResponse, RemoveContactsResponseSuccess, RemoveDomainsResponse, RemoveDomainsResponseSuccess, Resend, Tag, UpdateContactOptions, UpdateContactResponse, UpdateContactResponseSuccess, UpdateDomainsOptions, UpdateDomainsResponse, UpdateDomainsResponseSuccess, VerifyDomainsResponse, VerifyDomainsResponseSuccess };
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ __export(src_exports, {
|
|
|
62
62
|
module.exports = __toCommonJS(src_exports);
|
|
63
63
|
|
|
64
64
|
// package.json
|
|
65
|
-
var version = "3.
|
|
65
|
+
var version = "3.6.0-canary.0";
|
|
66
66
|
|
|
67
67
|
// src/api-keys/api-keys.ts
|
|
68
68
|
var ApiKeys = class {
|
|
@@ -315,6 +315,14 @@ var Emails = class {
|
|
|
315
315
|
return data;
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
+
cancel(id) {
|
|
319
|
+
return __async(this, null, function* () {
|
|
320
|
+
const data = yield this.resend.post(
|
|
321
|
+
`/emails/${id}/cancel`
|
|
322
|
+
);
|
|
323
|
+
return data;
|
|
324
|
+
});
|
|
325
|
+
}
|
|
318
326
|
};
|
|
319
327
|
|
|
320
328
|
// src/resend.ts
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// package.json
|
|
42
|
-
var version = "3.
|
|
42
|
+
var version = "3.6.0-canary.0";
|
|
43
43
|
|
|
44
44
|
// src/api-keys/api-keys.ts
|
|
45
45
|
var ApiKeys = class {
|
|
@@ -292,6 +292,14 @@ var Emails = class {
|
|
|
292
292
|
return data;
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
+
cancel(id) {
|
|
296
|
+
return __async(this, null, function* () {
|
|
297
|
+
const data = yield this.resend.post(
|
|
298
|
+
`/emails/${id}/cancel`
|
|
299
|
+
);
|
|
300
|
+
return data;
|
|
301
|
+
});
|
|
302
|
+
}
|
|
295
303
|
};
|
|
296
304
|
|
|
297
305
|
// src/resend.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0-canary.0",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/resendlabs/resend-node#readme",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@react-email/render": "0.0.
|
|
45
|
+
"@react-email/render": "0.0.16"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@biomejs/biome": "1.8.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"tsup": "7.2.0",
|
|
57
57
|
"typescript": "5.4.5"
|
|
58
58
|
},
|
|
59
|
-
"packageManager": "pnpm@9.
|
|
59
|
+
"packageManager": "pnpm@9.5.0"
|
|
60
60
|
}
|