resend 4.1.2 → 4.2.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
@@ -406,6 +406,24 @@ interface SendBroadcastResponse {
406
406
  error: ErrorResponse | null;
407
407
  }
408
408
 
409
+ interface UpdateBroadcastResponseSuccess {
410
+ id: string;
411
+ }
412
+ interface UpdateBroadcastOptions {
413
+ name?: string;
414
+ audienceId?: string;
415
+ from?: string;
416
+ html?: string;
417
+ text?: string;
418
+ subject?: string;
419
+ replyTo?: string[];
420
+ previewText?: string;
421
+ }
422
+ interface UpdateBroadcastResponse {
423
+ data: UpdateBroadcastResponseSuccess | null;
424
+ error: ErrorResponse | null;
425
+ }
426
+
409
427
  declare class Broadcasts {
410
428
  private readonly resend;
411
429
  private renderAsync?;
@@ -415,6 +433,7 @@ declare class Broadcasts {
415
433
  list(): Promise<ListBroadcastsResponse>;
416
434
  get(id: string): Promise<GetBroadcastResponse>;
417
435
  remove(id: string): Promise<RemoveBroadcastResponse>;
436
+ update(id: string, payload: UpdateBroadcastOptions): Promise<UpdateBroadcastResponse>;
418
437
  }
419
438
 
420
439
  interface PatchOptions {
package/dist/index.d.ts CHANGED
@@ -406,6 +406,24 @@ interface SendBroadcastResponse {
406
406
  error: ErrorResponse | null;
407
407
  }
408
408
 
409
+ interface UpdateBroadcastResponseSuccess {
410
+ id: string;
411
+ }
412
+ interface UpdateBroadcastOptions {
413
+ name?: string;
414
+ audienceId?: string;
415
+ from?: string;
416
+ html?: string;
417
+ text?: string;
418
+ subject?: string;
419
+ replyTo?: string[];
420
+ previewText?: string;
421
+ }
422
+ interface UpdateBroadcastResponse {
423
+ data: UpdateBroadcastResponseSuccess | null;
424
+ error: ErrorResponse | null;
425
+ }
426
+
409
427
  declare class Broadcasts {
410
428
  private readonly resend;
411
429
  private renderAsync?;
@@ -415,6 +433,7 @@ declare class Broadcasts {
415
433
  list(): Promise<ListBroadcastsResponse>;
416
434
  get(id: string): Promise<GetBroadcastResponse>;
417
435
  remove(id: string): Promise<RemoveBroadcastResponse>;
436
+ update(id: string, payload: UpdateBroadcastOptions): Promise<UpdateBroadcastResponse>;
418
437
  }
419
438
 
420
439
  interface PatchOptions {
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.1.2";
75
+ var version = "4.2.0";
76
76
 
77
77
  // src/api-keys/api-keys.ts
78
78
  var ApiKeys = class {
@@ -272,6 +272,24 @@ var Broadcasts = class {
272
272
  return data;
273
273
  });
274
274
  }
275
+ update(id, payload) {
276
+ return __async(this, null, function* () {
277
+ const data = yield this.resend.patch(
278
+ `/broadcasts/${id}`,
279
+ {
280
+ name: payload.name,
281
+ audience_id: payload.audienceId,
282
+ from: payload.from,
283
+ html: payload.html,
284
+ text: payload.text,
285
+ subject: payload.subject,
286
+ reply_to: payload.replyTo,
287
+ preview_text: payload.previewText
288
+ }
289
+ );
290
+ return data;
291
+ });
292
+ }
275
293
  };
276
294
 
277
295
  // src/contacts/contacts.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 = "4.1.2";
42
+ var version = "4.2.0";
43
43
 
44
44
  // src/api-keys/api-keys.ts
45
45
  var ApiKeys = class {
@@ -239,6 +239,24 @@ var Broadcasts = class {
239
239
  return data;
240
240
  });
241
241
  }
242
+ update(id, payload) {
243
+ return __async(this, null, function* () {
244
+ const data = yield this.resend.patch(
245
+ `/broadcasts/${id}`,
246
+ {
247
+ name: payload.name,
248
+ audience_id: payload.audienceId,
249
+ from: payload.from,
250
+ html: payload.html,
251
+ text: payload.text,
252
+ subject: payload.subject,
253
+ reply_to: payload.replyTo,
254
+ preview_text: payload.previewText
255
+ }
256
+ );
257
+ return data;
258
+ });
259
+ }
242
260
  };
243
261
 
244
262
  // src/contacts/contacts.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "4.1.2",
3
+ "version": "4.2.0",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -42,19 +42,19 @@
42
42
  },
43
43
  "homepage": "https://github.com/resendlabs/resend-node#readme",
44
44
  "dependencies": {
45
- "@react-email/render": "1.0.1"
45
+ "@react-email/render": "1.0.5"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@biomejs/biome": "1.9.4",
49
49
  "@types/jest": "29.5.12",
50
- "@types/node": "18.19.44",
50
+ "@types/node": "18.19.80",
51
51
  "@types/react": "18.3.3",
52
52
  "jest": "29.7.0",
53
53
  "jest-fetch-mock": "3.0.3",
54
- "ts-jest": "29.2.4",
54
+ "ts-jest": "29.2.6",
55
55
  "ts-node": "10.9.2",
56
56
  "tsup": "7.2.0",
57
- "typescript": "5.5.4"
57
+ "typescript": "5.8.2"
58
58
  },
59
- "packageManager": "pnpm@9.7.1"
59
+ "packageManager": "pnpm@10.6.5"
60
60
  }