resend 6.9.3 → 6.9.4

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 CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -7,16 +7,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
- key = keys[i];
13
- if (!__hasOwnProp.call(to, key) && key !== except) {
14
- __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- }
19
- }
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
20
16
  }
21
17
  return to;
22
18
  };
@@ -24,15 +20,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
20
  value: mod,
25
21
  enumerable: true
26
22
  }) : target, mod));
27
-
28
23
  //#endregion
29
24
  let postal_mime = require("postal-mime");
30
25
  postal_mime = __toESM(postal_mime);
31
26
  let svix = require("svix");
32
-
33
27
  //#region package.json
34
- var version = "6.9.3";
35
-
28
+ var version = "6.9.4";
36
29
  //#endregion
37
30
  //#region src/common/utils/build-pagination-query.ts
38
31
  /**
@@ -47,7 +40,6 @@ function buildPaginationQuery(options) {
47
40
  if ("before" in options && options.before !== void 0) searchParams.set("before", options.before);
48
41
  return searchParams.toString();
49
42
  }
50
-
51
43
  //#endregion
52
44
  //#region src/api-keys/api-keys.ts
53
45
  var ApiKeys = class {
@@ -66,7 +58,6 @@ var ApiKeys = class {
66
58
  return await this.resend.delete(`/api-keys/${id}`);
67
59
  }
68
60
  };
69
-
70
61
  //#endregion
71
62
  //#region src/common/utils/parse-email-to-api-options.ts
72
63
  function parseAttachments(attachments) {
@@ -99,7 +90,6 @@ function parseEmailToApiOptions(email) {
99
90
  topic_id: email.topicId
100
91
  };
101
92
  }
102
-
103
93
  //#endregion
104
94
  //#region src/render.ts
105
95
  async function render(node) {
@@ -111,7 +101,6 @@ async function render(node) {
111
101
  }
112
102
  return render(node);
113
103
  }
114
-
115
104
  //#endregion
116
105
  //#region src/batch/batch.ts
117
106
  var Batch = class {
@@ -139,7 +128,6 @@ var Batch = class {
139
128
  });
140
129
  }
141
130
  };
142
-
143
131
  //#endregion
144
132
  //#region src/broadcasts/broadcasts.ts
145
133
  var Broadcasts = class {
@@ -193,7 +181,6 @@ var Broadcasts = class {
193
181
  });
194
182
  }
195
183
  };
196
-
197
184
  //#endregion
198
185
  //#region src/common/utils/parse-contact-properties-to-api-options.ts
199
186
  function parseContactPropertyFromApi(contactProperty) {
@@ -213,7 +200,6 @@ function parseContactPropertyToApiOptions(contactProperty) {
213
200
  };
214
201
  return { fallback_value: contactProperty.fallbackValue };
215
202
  }
216
-
217
203
  //#endregion
218
204
  //#region src/contact-properties/contact-properties.ts
219
205
  var ContactProperties = class {
@@ -285,7 +271,6 @@ var ContactProperties = class {
285
271
  return await this.resend.delete(`/contact-properties/${id}`);
286
272
  }
287
273
  };
288
-
289
274
  //#endregion
290
275
  //#region src/contacts/segments/contact-segments.ts
291
276
  var ContactSegments = class {
@@ -334,7 +319,6 @@ var ContactSegments = class {
334
319
  return this.resend.delete(`/contacts/${identifier}/segments/${options.segmentId}`);
335
320
  }
336
321
  };
337
-
338
322
  //#endregion
339
323
  //#region src/contacts/topics/contact-topics.ts
340
324
  var ContactTopics = class {
@@ -370,7 +354,6 @@ var ContactTopics = class {
370
354
  return this.resend.get(url);
371
355
  }
372
356
  };
373
-
374
357
  //#endregion
375
358
  //#region src/contacts/contacts.ts
376
359
  var Contacts = class {
@@ -471,7 +454,6 @@ var Contacts = class {
471
454
  return this.resend.delete(`/audiences/${payload.audienceId}/contacts/${payload?.email ? payload?.email : payload?.id}`);
472
455
  }
473
456
  };
474
-
475
457
  //#endregion
476
458
  //#region src/common/utils/parse-domain-to-api-options.ts
477
459
  function parseDomainToApiOptions(domain) {
@@ -485,7 +467,6 @@ function parseDomainToApiOptions(domain) {
485
467
  tls: domain.tls
486
468
  };
487
469
  }
488
-
489
470
  //#endregion
490
471
  //#region src/domains/domains.ts
491
472
  var Domains = class {
@@ -518,7 +499,6 @@ var Domains = class {
518
499
  return await this.resend.post(`/domains/${id}/verify`);
519
500
  }
520
501
  };
521
-
522
502
  //#endregion
523
503
  //#region src/emails/attachments/attachments.ts
524
504
  var Attachments$1 = class {
@@ -536,7 +516,6 @@ var Attachments$1 = class {
536
516
  return await this.resend.get(url);
537
517
  }
538
518
  };
539
-
540
519
  //#endregion
541
520
  //#region src/emails/receiving/attachments/attachments.ts
542
521
  var Attachments = class {
@@ -554,7 +533,6 @@ var Attachments = class {
554
533
  return await this.resend.get(url);
555
534
  }
556
535
  };
557
-
558
536
  //#endregion
559
537
  //#region src/emails/receiving/receiving.ts
560
538
  var Receiving = class {
@@ -672,7 +650,6 @@ var Receiving = class {
672
650
  });
673
651
  }
674
652
  };
675
-
676
653
  //#endregion
677
654
  //#region src/emails/emails.ts
678
655
  var Emails = class {
@@ -703,7 +680,6 @@ var Emails = class {
703
680
  return await this.resend.post(`/emails/${id}/cancel`);
704
681
  }
705
682
  };
706
-
707
683
  //#endregion
708
684
  //#region src/segments/segments.ts
709
685
  var Segments = class {
@@ -725,7 +701,6 @@ var Segments = class {
725
701
  return await this.resend.delete(`/segments/${id}`);
726
702
  }
727
703
  };
728
-
729
704
  //#endregion
730
705
  //#region src/common/utils/get-pagination-query-properties.ts
731
706
  function getPaginationQueryProperties(options = {}) {
@@ -735,7 +710,6 @@ function getPaginationQueryProperties(options = {}) {
735
710
  if (options.limit) query.set("limit", options.limit.toString());
736
711
  return query.size > 0 ? `?${query.toString()}` : "";
737
712
  }
738
-
739
713
  //#endregion
740
714
  //#region src/common/utils/parse-template-to-api-options.ts
741
715
  function parseVariables(variables) {
@@ -757,7 +731,6 @@ function parseTemplateToApiOptions(template) {
757
731
  variables: parseVariables(template.variables)
758
732
  };
759
733
  }
760
-
761
734
  //#endregion
762
735
  //#region src/templates/chainable-template-result.ts
763
736
  var ChainableTemplateResult = class {
@@ -778,7 +751,6 @@ var ChainableTemplateResult = class {
778
751
  return this.publishFn(data.id);
779
752
  }
780
753
  };
781
-
782
754
  //#endregion
783
755
  //#region src/templates/templates.ts
784
756
  var Templates = class {
@@ -819,7 +791,6 @@ var Templates = class {
819
791
  return await this.resend.patch(`/templates/${identifier}`, parseTemplateToApiOptions(payload));
820
792
  }
821
793
  };
822
-
823
794
  //#endregion
824
795
  //#region src/topics/topics.ts
825
796
  var Topics = class {
@@ -873,7 +844,6 @@ var Topics = class {
873
844
  return await this.resend.delete(`/topics/${id}`);
874
845
  }
875
846
  };
876
-
877
847
  //#endregion
878
848
  //#region src/webhooks/webhooks.ts
879
849
  var Webhooks = class {
@@ -905,7 +875,6 @@ var Webhooks = class {
905
875
  });
906
876
  }
907
877
  };
908
-
909
878
  //#endregion
910
879
  //#region src/resend.ts
911
880
  const defaultBaseUrl = "https://api.resend.com";
@@ -1046,6 +1015,5 @@ var Resend = class {
1046
1015
  return this.fetchRequest(path, requestOptions);
1047
1016
  }
1048
1017
  };
1049
-
1050
1018
  //#endregion
1051
- exports.Resend = Resend;
1019
+ exports.Resend = Resend;
package/dist/index.d.cts CHANGED
@@ -4,6 +4,7 @@ import * as React$1 from "react";
4
4
  interface ApiKey {
5
5
  created_at: string;
6
6
  id: string;
7
+ last_used_at: string | null;
7
8
  name: string;
8
9
  }
9
10
  //#endregion
@@ -226,7 +227,7 @@ type ListApiKeysOptions = PaginationOptions;
226
227
  type ListApiKeysResponseSuccess = {
227
228
  object: 'list';
228
229
  has_more: boolean;
229
- data: Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
230
+ data: Pick<ApiKey, 'name' | 'id' | 'created_at' | 'last_used_at'>[];
230
231
  };
231
232
  type ListApiKeysResponse = Response<ListApiKeysResponseSuccess>;
232
233
  //#endregion
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ import * as React$1 from "react";
4
4
  interface ApiKey {
5
5
  created_at: string;
6
6
  id: string;
7
+ last_used_at: string | null;
7
8
  name: string;
8
9
  }
9
10
  //#endregion
@@ -226,7 +227,7 @@ type ListApiKeysOptions = PaginationOptions;
226
227
  type ListApiKeysResponseSuccess = {
227
228
  object: 'list';
228
229
  has_more: boolean;
229
- data: Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
230
+ data: Pick<ApiKey, 'name' | 'id' | 'created_at' | 'last_used_at'>[];
230
231
  };
231
232
  type ListApiKeysResponse = Response<ListApiKeysResponseSuccess>;
232
233
  //#endregion
package/dist/index.mjs CHANGED
@@ -1,9 +1,7 @@
1
1
  import PostalMime from "postal-mime";
2
2
  import { Webhook } from "svix";
3
-
4
3
  //#region package.json
5
- var version = "6.9.3";
6
-
4
+ var version = "6.9.4";
7
5
  //#endregion
8
6
  //#region src/common/utils/build-pagination-query.ts
9
7
  /**
@@ -18,7 +16,6 @@ function buildPaginationQuery(options) {
18
16
  if ("before" in options && options.before !== void 0) searchParams.set("before", options.before);
19
17
  return searchParams.toString();
20
18
  }
21
-
22
19
  //#endregion
23
20
  //#region src/api-keys/api-keys.ts
24
21
  var ApiKeys = class {
@@ -37,7 +34,6 @@ var ApiKeys = class {
37
34
  return await this.resend.delete(`/api-keys/${id}`);
38
35
  }
39
36
  };
40
-
41
37
  //#endregion
42
38
  //#region src/common/utils/parse-email-to-api-options.ts
43
39
  function parseAttachments(attachments) {
@@ -70,7 +66,6 @@ function parseEmailToApiOptions(email) {
70
66
  topic_id: email.topicId
71
67
  };
72
68
  }
73
-
74
69
  //#endregion
75
70
  //#region src/render.ts
76
71
  async function render(node) {
@@ -82,7 +77,6 @@ async function render(node) {
82
77
  }
83
78
  return render(node);
84
79
  }
85
-
86
80
  //#endregion
87
81
  //#region src/batch/batch.ts
88
82
  var Batch = class {
@@ -110,7 +104,6 @@ var Batch = class {
110
104
  });
111
105
  }
112
106
  };
113
-
114
107
  //#endregion
115
108
  //#region src/broadcasts/broadcasts.ts
116
109
  var Broadcasts = class {
@@ -164,7 +157,6 @@ var Broadcasts = class {
164
157
  });
165
158
  }
166
159
  };
167
-
168
160
  //#endregion
169
161
  //#region src/common/utils/parse-contact-properties-to-api-options.ts
170
162
  function parseContactPropertyFromApi(contactProperty) {
@@ -184,7 +176,6 @@ function parseContactPropertyToApiOptions(contactProperty) {
184
176
  };
185
177
  return { fallback_value: contactProperty.fallbackValue };
186
178
  }
187
-
188
179
  //#endregion
189
180
  //#region src/contact-properties/contact-properties.ts
190
181
  var ContactProperties = class {
@@ -256,7 +247,6 @@ var ContactProperties = class {
256
247
  return await this.resend.delete(`/contact-properties/${id}`);
257
248
  }
258
249
  };
259
-
260
250
  //#endregion
261
251
  //#region src/contacts/segments/contact-segments.ts
262
252
  var ContactSegments = class {
@@ -305,7 +295,6 @@ var ContactSegments = class {
305
295
  return this.resend.delete(`/contacts/${identifier}/segments/${options.segmentId}`);
306
296
  }
307
297
  };
308
-
309
298
  //#endregion
310
299
  //#region src/contacts/topics/contact-topics.ts
311
300
  var ContactTopics = class {
@@ -341,7 +330,6 @@ var ContactTopics = class {
341
330
  return this.resend.get(url);
342
331
  }
343
332
  };
344
-
345
333
  //#endregion
346
334
  //#region src/contacts/contacts.ts
347
335
  var Contacts = class {
@@ -442,7 +430,6 @@ var Contacts = class {
442
430
  return this.resend.delete(`/audiences/${payload.audienceId}/contacts/${payload?.email ? payload?.email : payload?.id}`);
443
431
  }
444
432
  };
445
-
446
433
  //#endregion
447
434
  //#region src/common/utils/parse-domain-to-api-options.ts
448
435
  function parseDomainToApiOptions(domain) {
@@ -456,7 +443,6 @@ function parseDomainToApiOptions(domain) {
456
443
  tls: domain.tls
457
444
  };
458
445
  }
459
-
460
446
  //#endregion
461
447
  //#region src/domains/domains.ts
462
448
  var Domains = class {
@@ -489,7 +475,6 @@ var Domains = class {
489
475
  return await this.resend.post(`/domains/${id}/verify`);
490
476
  }
491
477
  };
492
-
493
478
  //#endregion
494
479
  //#region src/emails/attachments/attachments.ts
495
480
  var Attachments$1 = class {
@@ -507,7 +492,6 @@ var Attachments$1 = class {
507
492
  return await this.resend.get(url);
508
493
  }
509
494
  };
510
-
511
495
  //#endregion
512
496
  //#region src/emails/receiving/attachments/attachments.ts
513
497
  var Attachments = class {
@@ -525,7 +509,6 @@ var Attachments = class {
525
509
  return await this.resend.get(url);
526
510
  }
527
511
  };
528
-
529
512
  //#endregion
530
513
  //#region src/emails/receiving/receiving.ts
531
514
  var Receiving = class {
@@ -643,7 +626,6 @@ var Receiving = class {
643
626
  });
644
627
  }
645
628
  };
646
-
647
629
  //#endregion
648
630
  //#region src/emails/emails.ts
649
631
  var Emails = class {
@@ -674,7 +656,6 @@ var Emails = class {
674
656
  return await this.resend.post(`/emails/${id}/cancel`);
675
657
  }
676
658
  };
677
-
678
659
  //#endregion
679
660
  //#region src/segments/segments.ts
680
661
  var Segments = class {
@@ -696,7 +677,6 @@ var Segments = class {
696
677
  return await this.resend.delete(`/segments/${id}`);
697
678
  }
698
679
  };
699
-
700
680
  //#endregion
701
681
  //#region src/common/utils/get-pagination-query-properties.ts
702
682
  function getPaginationQueryProperties(options = {}) {
@@ -706,7 +686,6 @@ function getPaginationQueryProperties(options = {}) {
706
686
  if (options.limit) query.set("limit", options.limit.toString());
707
687
  return query.size > 0 ? `?${query.toString()}` : "";
708
688
  }
709
-
710
689
  //#endregion
711
690
  //#region src/common/utils/parse-template-to-api-options.ts
712
691
  function parseVariables(variables) {
@@ -728,7 +707,6 @@ function parseTemplateToApiOptions(template) {
728
707
  variables: parseVariables(template.variables)
729
708
  };
730
709
  }
731
-
732
710
  //#endregion
733
711
  //#region src/templates/chainable-template-result.ts
734
712
  var ChainableTemplateResult = class {
@@ -749,7 +727,6 @@ var ChainableTemplateResult = class {
749
727
  return this.publishFn(data.id);
750
728
  }
751
729
  };
752
-
753
730
  //#endregion
754
731
  //#region src/templates/templates.ts
755
732
  var Templates = class {
@@ -790,7 +767,6 @@ var Templates = class {
790
767
  return await this.resend.patch(`/templates/${identifier}`, parseTemplateToApiOptions(payload));
791
768
  }
792
769
  };
793
-
794
770
  //#endregion
795
771
  //#region src/topics/topics.ts
796
772
  var Topics = class {
@@ -844,7 +820,6 @@ var Topics = class {
844
820
  return await this.resend.delete(`/topics/${id}`);
845
821
  }
846
822
  };
847
-
848
823
  //#endregion
849
824
  //#region src/webhooks/webhooks.ts
850
825
  var Webhooks = class {
@@ -876,7 +851,6 @@ var Webhooks = class {
876
851
  });
877
852
  }
878
853
  };
879
-
880
854
  //#endregion
881
855
  //#region src/resend.ts
882
856
  const defaultBaseUrl = "https://api.resend.com";
@@ -1017,6 +991,5 @@ var Resend = class {
1017
991
  return this.fetchRequest(path, requestOptions);
1018
992
  }
1019
993
  };
1020
-
1021
994
  //#endregion
1022
- export { Resend };
995
+ export { Resend };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.9.3",
3
+ "version": "6.9.4",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -29,6 +29,19 @@
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
+ },
32
45
  "repository": {
33
46
  "type": "git",
34
47
  "url": "git+https://github.com/resend/resend-node.git"
@@ -41,7 +54,7 @@
41
54
  "homepage": "https://github.com/resend/resend-node#readme",
42
55
  "dependencies": {
43
56
  "postal-mime": "2.7.3",
44
- "svix": "1.84.1"
57
+ "svix": "1.86.0"
45
58
  },
46
59
  "peerDependencies": {
47
60
  "@react-email/render": "*"
@@ -52,34 +65,23 @@
52
65
  }
53
66
  },
54
67
  "devDependencies": {
55
- "@biomejs/biome": "2.3.14",
68
+ "@biomejs/biome": "2.4.7",
56
69
  "@pollyjs/adapter-fetch": "6.0.7",
57
70
  "@pollyjs/core": "6.0.6",
58
71
  "@pollyjs/persister-fs": "6.0.6",
59
72
  "@types/mailparser": "3.4.6",
60
- "@types/node": "24.10.13",
61
- "@types/react": "19.2.13",
73
+ "@types/node": "24.11.0",
74
+ "@types/react": "19.2.14",
62
75
  "cross-env": "10.1.0",
63
- "dotenv": "17.2.4",
76
+ "dotenv": "17.3.1",
64
77
  "pkg-pr-new": "0.0.65",
65
78
  "react": "19.2.4",
66
79
  "react-dom": "19.2.4",
67
- "rimraf": "6.1.2",
68
- "tsdown": "0.20.3",
80
+ "rimraf": "6.1.3",
81
+ "tsdown": "0.21.0",
69
82
  "typescript": "5.9.3",
70
83
  "vitest": "4.0.18",
71
84
  "vitest-fetch-mock": "0.4.5"
72
85
  },
73
- "scripts": {
74
- "build": "tsdown src/index.ts --format esm,cjs --dts",
75
- "integration:nextjs": "cd ./integrations/nextjs && next build --turbopack",
76
- "lint": "biome check .",
77
- "lint:fix": "biome check . --write",
78
- "test": "vitest run",
79
- "test:dev": "cross-env TEST_MODE=dev vitest run",
80
- "test:integrations": "vitest run integrations",
81
- "test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
82
- "test:watch": "vitest",
83
- "typecheck": "tsc --noEmit"
84
- }
85
- }
86
+ "packageManager": "pnpm@10.30.3"
87
+ }