resend 6.7.0 → 6.8.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 +4 -2
- package/dist/index.d.cts +34 -1
- package/dist/index.d.mts +34 -1
- package/dist/index.mjs +4 -2
- package/package.json +17 -19
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let svix = require("svix");
|
|
2
2
|
|
|
3
3
|
//#region package.json
|
|
4
|
-
var version = "6.
|
|
4
|
+
var version = "6.8.0";
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/common/utils/build-pagination-query.ts
|
|
@@ -128,7 +128,9 @@ var Broadcasts = class {
|
|
|
128
128
|
reply_to: payload.replyTo,
|
|
129
129
|
subject: payload.subject,
|
|
130
130
|
text: payload.text,
|
|
131
|
-
topic_id: payload.topicId
|
|
131
|
+
topic_id: payload.topicId,
|
|
132
|
+
send: payload.send,
|
|
133
|
+
scheduled_at: payload.scheduledAt
|
|
132
134
|
}, options);
|
|
133
135
|
}
|
|
134
136
|
async send(id, payload) {
|
package/dist/index.d.cts
CHANGED
|
@@ -433,6 +433,39 @@ interface SegmentOptions {
|
|
|
433
433
|
*/
|
|
434
434
|
audienceId: string;
|
|
435
435
|
}
|
|
436
|
+
type SendBroadcastOnCreationOptions = {
|
|
437
|
+
/**
|
|
438
|
+
* Whether to send the broadcast immediately or keep it as a draft.
|
|
439
|
+
* If not provided or set to false, the broadcast will be created as a draft.
|
|
440
|
+
*
|
|
441
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
442
|
+
*/
|
|
443
|
+
send: true;
|
|
444
|
+
/**
|
|
445
|
+
* Schedule time to send the broadcast. Can only be used if `send` is true.
|
|
446
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
|
|
447
|
+
* or relative time (eg: in 2 days).
|
|
448
|
+
*
|
|
449
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
450
|
+
*/
|
|
451
|
+
scheduledAt?: string;
|
|
452
|
+
} | {
|
|
453
|
+
/**
|
|
454
|
+
* Whether to send the broadcast immediately or keep it as a draft.
|
|
455
|
+
* If not provided or set to false, the broadcast will be created as a draft.
|
|
456
|
+
*
|
|
457
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
458
|
+
*/
|
|
459
|
+
send?: false;
|
|
460
|
+
/**
|
|
461
|
+
* Schedule time to send the broadcast. Can only be used if `send` is true.
|
|
462
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
|
|
463
|
+
* or relative time (eg: in 2 days).
|
|
464
|
+
*
|
|
465
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
466
|
+
*/
|
|
467
|
+
scheduledAt?: never;
|
|
468
|
+
};
|
|
436
469
|
interface CreateBroadcastBaseOptions {
|
|
437
470
|
/**
|
|
438
471
|
* The name of the broadcast
|
|
@@ -471,7 +504,7 @@ interface CreateBroadcastBaseOptions {
|
|
|
471
504
|
*/
|
|
472
505
|
topicId?: string | null;
|
|
473
506
|
}
|
|
474
|
-
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions;
|
|
507
|
+
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions & SendBroadcastOnCreationOptions;
|
|
475
508
|
interface CreateBroadcastRequestOptions extends PostOptions {}
|
|
476
509
|
interface CreateBroadcastResponseSuccess {
|
|
477
510
|
/** The ID of the newly sent broadcasts. */
|
package/dist/index.d.mts
CHANGED
|
@@ -433,6 +433,39 @@ interface SegmentOptions {
|
|
|
433
433
|
*/
|
|
434
434
|
audienceId: string;
|
|
435
435
|
}
|
|
436
|
+
type SendBroadcastOnCreationOptions = {
|
|
437
|
+
/**
|
|
438
|
+
* Whether to send the broadcast immediately or keep it as a draft.
|
|
439
|
+
* If not provided or set to false, the broadcast will be created as a draft.
|
|
440
|
+
*
|
|
441
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
442
|
+
*/
|
|
443
|
+
send: true;
|
|
444
|
+
/**
|
|
445
|
+
* Schedule time to send the broadcast. Can only be used if `send` is true.
|
|
446
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
|
|
447
|
+
* or relative time (eg: in 2 days).
|
|
448
|
+
*
|
|
449
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
450
|
+
*/
|
|
451
|
+
scheduledAt?: string;
|
|
452
|
+
} | {
|
|
453
|
+
/**
|
|
454
|
+
* Whether to send the broadcast immediately or keep it as a draft.
|
|
455
|
+
* If not provided or set to false, the broadcast will be created as a draft.
|
|
456
|
+
*
|
|
457
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
458
|
+
*/
|
|
459
|
+
send?: false;
|
|
460
|
+
/**
|
|
461
|
+
* Schedule time to send the broadcast. Can only be used if `send` is true.
|
|
462
|
+
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z)
|
|
463
|
+
* or relative time (eg: in 2 days).
|
|
464
|
+
*
|
|
465
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
466
|
+
*/
|
|
467
|
+
scheduledAt?: never;
|
|
468
|
+
};
|
|
436
469
|
interface CreateBroadcastBaseOptions {
|
|
437
470
|
/**
|
|
438
471
|
* The name of the broadcast
|
|
@@ -471,7 +504,7 @@ interface CreateBroadcastBaseOptions {
|
|
|
471
504
|
*/
|
|
472
505
|
topicId?: string | null;
|
|
473
506
|
}
|
|
474
|
-
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions;
|
|
507
|
+
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & RequireAtLeastOne<SegmentOptions> & CreateBroadcastBaseOptions & SendBroadcastOnCreationOptions;
|
|
475
508
|
interface CreateBroadcastRequestOptions extends PostOptions {}
|
|
476
509
|
interface CreateBroadcastResponseSuccess {
|
|
477
510
|
/** The ID of the newly sent broadcasts. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Webhook } from "svix";
|
|
2
2
|
|
|
3
3
|
//#region package.json
|
|
4
|
-
var version = "6.
|
|
4
|
+
var version = "6.8.0";
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/common/utils/build-pagination-query.ts
|
|
@@ -128,7 +128,9 @@ var Broadcasts = class {
|
|
|
128
128
|
reply_to: payload.replyTo,
|
|
129
129
|
subject: payload.subject,
|
|
130
130
|
text: payload.text,
|
|
131
|
-
topic_id: payload.topicId
|
|
131
|
+
topic_id: payload.topicId,
|
|
132
|
+
send: payload.send,
|
|
133
|
+
scheduled_at: payload.scheduledAt
|
|
132
134
|
}, options);
|
|
133
135
|
}
|
|
134
136
|
async send(id, payload) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -29,19 +29,6 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
34
|
-
"integration:nextjs": "cd ./integrations/nextjs && next build --turbopack",
|
|
35
|
-
"lint": "biome check .",
|
|
36
|
-
"lint:fix": "biome check . --write",
|
|
37
|
-
"prepublishOnly": "pnpm run build",
|
|
38
|
-
"test": "vitest run",
|
|
39
|
-
"test:dev": "cross-env TEST_MODE=dev vitest run",
|
|
40
|
-
"test:integrations": "vitest run integrations",
|
|
41
|
-
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
42
|
-
"test:watch": "vitest",
|
|
43
|
-
"typecheck": "tsc --noEmit"
|
|
44
|
-
},
|
|
45
32
|
"repository": {
|
|
46
33
|
"type": "git",
|
|
47
34
|
"url": "git+https://github.com/resend/resend-node.git"
|
|
@@ -69,15 +56,26 @@
|
|
|
69
56
|
"@pollyjs/core": "6.0.6",
|
|
70
57
|
"@pollyjs/persister-fs": "6.0.6",
|
|
71
58
|
"@types/node": "24.10.4",
|
|
72
|
-
"@types/react": "19.2.
|
|
59
|
+
"@types/react": "19.2.8",
|
|
73
60
|
"cross-env": "10.1.0",
|
|
74
61
|
"dotenv": "17.2.3",
|
|
75
62
|
"pkg-pr-new": "0.0.62",
|
|
76
63
|
"rimraf": "6.1.2",
|
|
77
|
-
"tsdown": "0.
|
|
64
|
+
"tsdown": "0.19.0",
|
|
78
65
|
"typescript": "5.9.3",
|
|
79
|
-
"vitest": "4.0.
|
|
66
|
+
"vitest": "4.0.17",
|
|
80
67
|
"vitest-fetch-mock": "0.4.5"
|
|
81
68
|
},
|
|
82
|
-
"
|
|
83
|
-
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsdown src/index.ts --format esm,cjs --dts",
|
|
71
|
+
"integration:nextjs": "cd ./integrations/nextjs && next build --turbopack",
|
|
72
|
+
"lint": "biome check .",
|
|
73
|
+
"lint:fix": "biome check . --write",
|
|
74
|
+
"test": "vitest run",
|
|
75
|
+
"test:dev": "cross-env TEST_MODE=dev vitest run",
|
|
76
|
+
"test:integrations": "vitest run integrations",
|
|
77
|
+
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
78
|
+
"test:watch": "vitest",
|
|
79
|
+
"typecheck": "tsc --noEmit"
|
|
80
|
+
}
|
|
81
|
+
}
|