resend 4.7.0-preview-topics.1 → 4.7.0-preview-topics.2
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 +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -224,6 +224,12 @@ interface CreateEmailBaseOptions {
|
|
|
224
224
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
225
225
|
*/
|
|
226
226
|
to: string | string[];
|
|
227
|
+
/**
|
|
228
|
+
* The id of the topic you want to send to
|
|
229
|
+
*
|
|
230
|
+
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
231
|
+
*/
|
|
232
|
+
topicId?: string | null;
|
|
227
233
|
/**
|
|
228
234
|
* Schedule email to be sent later.
|
|
229
235
|
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).
|
|
@@ -343,6 +349,12 @@ interface CreateBroadcastBaseOptions {
|
|
|
343
349
|
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
344
350
|
*/
|
|
345
351
|
subject: string;
|
|
352
|
+
/**
|
|
353
|
+
* The id of the topic you want to send to
|
|
354
|
+
*
|
|
355
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
356
|
+
*/
|
|
357
|
+
topicId?: string | null;
|
|
346
358
|
}
|
|
347
359
|
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & CreateBroadcastBaseOptions;
|
|
348
360
|
interface CreateBroadcastRequestOptions extends PostOptions {
|
|
@@ -368,6 +380,7 @@ interface Broadcast {
|
|
|
368
380
|
created_at: string;
|
|
369
381
|
scheduled_at: string | null;
|
|
370
382
|
sent_at: string | null;
|
|
383
|
+
topic_id?: string | null;
|
|
371
384
|
}
|
|
372
385
|
|
|
373
386
|
interface GetBroadcastResponseSuccess extends Broadcast {
|
|
@@ -430,6 +443,7 @@ interface UpdateBroadcastOptions {
|
|
|
430
443
|
subject?: string;
|
|
431
444
|
replyTo?: string[];
|
|
432
445
|
previewText?: string;
|
|
446
|
+
topicId?: string | null;
|
|
433
447
|
}
|
|
434
448
|
interface UpdateBroadcastResponse {
|
|
435
449
|
data: UpdateBroadcastResponseSuccess | null;
|
|
@@ -735,6 +749,7 @@ interface GetEmailResponseSuccess {
|
|
|
735
749
|
subject: string;
|
|
736
750
|
text: string | null;
|
|
737
751
|
to: string[];
|
|
752
|
+
topic_id?: string | null;
|
|
738
753
|
scheduled_at: string | null;
|
|
739
754
|
object: 'email';
|
|
740
755
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -224,6 +224,12 @@ interface CreateEmailBaseOptions {
|
|
|
224
224
|
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
225
225
|
*/
|
|
226
226
|
to: string | string[];
|
|
227
|
+
/**
|
|
228
|
+
* The id of the topic you want to send to
|
|
229
|
+
*
|
|
230
|
+
* @link https://resend.com/docs/api-reference/emails/send-email#body-parameters
|
|
231
|
+
*/
|
|
232
|
+
topicId?: string | null;
|
|
227
233
|
/**
|
|
228
234
|
* Schedule email to be sent later.
|
|
229
235
|
* The date should be in ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).
|
|
@@ -343,6 +349,12 @@ interface CreateBroadcastBaseOptions {
|
|
|
343
349
|
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
344
350
|
*/
|
|
345
351
|
subject: string;
|
|
352
|
+
/**
|
|
353
|
+
* The id of the topic you want to send to
|
|
354
|
+
*
|
|
355
|
+
* @link https://resend.com/docs/api-reference/broadcasts/create#body-parameters
|
|
356
|
+
*/
|
|
357
|
+
topicId?: string | null;
|
|
346
358
|
}
|
|
347
359
|
type CreateBroadcastOptions = RequireAtLeastOne<EmailRenderOptions> & CreateBroadcastBaseOptions;
|
|
348
360
|
interface CreateBroadcastRequestOptions extends PostOptions {
|
|
@@ -368,6 +380,7 @@ interface Broadcast {
|
|
|
368
380
|
created_at: string;
|
|
369
381
|
scheduled_at: string | null;
|
|
370
382
|
sent_at: string | null;
|
|
383
|
+
topic_id?: string | null;
|
|
371
384
|
}
|
|
372
385
|
|
|
373
386
|
interface GetBroadcastResponseSuccess extends Broadcast {
|
|
@@ -430,6 +443,7 @@ interface UpdateBroadcastOptions {
|
|
|
430
443
|
subject?: string;
|
|
431
444
|
replyTo?: string[];
|
|
432
445
|
previewText?: string;
|
|
446
|
+
topicId?: string | null;
|
|
433
447
|
}
|
|
434
448
|
interface UpdateBroadcastResponse {
|
|
435
449
|
data: UpdateBroadcastResponseSuccess | null;
|
|
@@ -735,6 +749,7 @@ interface GetEmailResponseSuccess {
|
|
|
735
749
|
subject: string;
|
|
736
750
|
text: string | null;
|
|
737
751
|
to: string[];
|
|
752
|
+
topic_id?: string | null;
|
|
738
753
|
scheduled_at: string | null;
|
|
739
754
|
object: 'email';
|
|
740
755
|
}
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ __export(src_exports, {
|
|
|
72
72
|
module.exports = __toCommonJS(src_exports);
|
|
73
73
|
|
|
74
74
|
// package.json
|
|
75
|
-
var version = "4.7.0-preview-topics.
|
|
75
|
+
var version = "4.7.0-preview-topics.2";
|
|
76
76
|
|
|
77
77
|
// src/api-keys/api-keys.ts
|
|
78
78
|
var ApiKeys = class {
|
|
@@ -158,7 +158,8 @@ function parseEmailToApiOptions(email) {
|
|
|
158
158
|
subject: email.subject,
|
|
159
159
|
tags: email.tags,
|
|
160
160
|
text: email.text,
|
|
161
|
-
to: email.to
|
|
161
|
+
to: email.to,
|
|
162
|
+
topic_id: email.topicId
|
|
162
163
|
};
|
|
163
164
|
}
|
|
164
165
|
|
|
@@ -234,7 +235,8 @@ var Broadcasts = class {
|
|
|
234
235
|
html: payload.html,
|
|
235
236
|
reply_to: payload.replyTo,
|
|
236
237
|
subject: payload.subject,
|
|
237
|
-
text: payload.text
|
|
238
|
+
text: payload.text,
|
|
239
|
+
topic_id: payload.topicId
|
|
238
240
|
},
|
|
239
241
|
options
|
|
240
242
|
);
|
|
@@ -284,7 +286,8 @@ var Broadcasts = class {
|
|
|
284
286
|
text: payload.text,
|
|
285
287
|
subject: payload.subject,
|
|
286
288
|
reply_to: payload.replyTo,
|
|
287
|
-
preview_text: payload.previewText
|
|
289
|
+
preview_text: payload.previewText,
|
|
290
|
+
topic_id: payload.topicId
|
|
288
291
|
}
|
|
289
292
|
);
|
|
290
293
|
return data;
|
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 = "4.7.0-preview-topics.
|
|
42
|
+
var version = "4.7.0-preview-topics.2";
|
|
43
43
|
|
|
44
44
|
// src/api-keys/api-keys.ts
|
|
45
45
|
var ApiKeys = class {
|
|
@@ -125,7 +125,8 @@ function parseEmailToApiOptions(email) {
|
|
|
125
125
|
subject: email.subject,
|
|
126
126
|
tags: email.tags,
|
|
127
127
|
text: email.text,
|
|
128
|
-
to: email.to
|
|
128
|
+
to: email.to,
|
|
129
|
+
topic_id: email.topicId
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
132
|
|
|
@@ -201,7 +202,8 @@ var Broadcasts = class {
|
|
|
201
202
|
html: payload.html,
|
|
202
203
|
reply_to: payload.replyTo,
|
|
203
204
|
subject: payload.subject,
|
|
204
|
-
text: payload.text
|
|
205
|
+
text: payload.text,
|
|
206
|
+
topic_id: payload.topicId
|
|
205
207
|
},
|
|
206
208
|
options
|
|
207
209
|
);
|
|
@@ -251,7 +253,8 @@ var Broadcasts = class {
|
|
|
251
253
|
text: payload.text,
|
|
252
254
|
subject: payload.subject,
|
|
253
255
|
reply_to: payload.replyTo,
|
|
254
|
-
preview_text: payload.previewText
|
|
256
|
+
preview_text: payload.previewText,
|
|
257
|
+
topic_id: payload.topicId
|
|
255
258
|
}
|
|
256
259
|
);
|
|
257
260
|
return data;
|