resend 3.0.0-canary.0 → 3.0.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
@@ -53,18 +53,19 @@ interface CreateApiKeyResponse {
53
53
  error: ErrorResponse | null;
54
54
  }
55
55
 
56
- interface ListApiKeysResponseSuccess {
57
- name: string;
58
- id: string;
56
+ interface ApiKey {
59
57
  created_at: string;
58
+ id: string;
59
+ name: string;
60
60
  }
61
+
62
+ type ListApiKeysResponseSuccess = Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
61
63
  interface ListApiKeysResponse {
62
- data: ListApiKeysResponseSuccess[] | null;
64
+ data: ListApiKeysResponseSuccess | null;
63
65
  error: ErrorResponse | null;
64
66
  }
65
67
 
66
68
  interface RemoveApiKeyResponseSuccess {
67
- id: string;
68
69
  }
69
70
  interface RemoveApiKeyResponse {
70
71
  data: RemoveApiKeyResponseSuccess | null;
@@ -90,7 +91,8 @@ interface CreateAudienceOptions {
90
91
  }
91
92
  interface CreateAudienceRequestOptions extends PostOptions {
92
93
  }
93
- interface CreateAudienceResponseSuccess extends Pick<Audience, 'name' | 'id' | 'created_at'> {
94
+ interface CreateAudienceResponseSuccess extends Pick<Audience, 'name' | 'id'> {
95
+ object: 'audience';
94
96
  }
95
97
  interface CreateAudienceResponse {
96
98
  data: CreateAudienceResponseSuccess | null;
@@ -105,13 +107,19 @@ interface GetAudienceResponse {
105
107
  error: ErrorResponse | null;
106
108
  }
107
109
 
108
- type ListAudiencesResponseSuccess = Audience[];
110
+ type ListAudiencesResponseSuccess = {
111
+ object: 'list';
112
+ data: Audience[];
113
+ };
109
114
  interface ListAudiencesResponse {
110
115
  data: ListAudiencesResponseSuccess | null;
111
116
  error: ErrorResponse | null;
112
117
  }
113
118
 
114
- type RemoveAudiencesResponseSuccess = Pick<Audience, 'id'>;
119
+ interface RemoveAudiencesResponseSuccess extends Pick<Audience, 'id'> {
120
+ object: 'audience';
121
+ deleted: boolean;
122
+ }
115
123
  interface RemoveAudiencesResponse {
116
124
  data: RemoveAudiencesResponseSuccess | null;
117
125
  error: ErrorResponse | null;
@@ -266,7 +274,10 @@ interface PatchOptions {
266
274
  interface Contact {
267
275
  created_at: string;
268
276
  id: string;
269
- name: string;
277
+ email: string;
278
+ first_name?: string;
279
+ last_name?: string;
280
+ unsubscribed: boolean;
270
281
  }
271
282
 
272
283
  interface CreateContactOptions {
@@ -278,7 +289,8 @@ interface CreateContactOptions {
278
289
  }
279
290
  interface CreateContactRequestOptions extends PostOptions {
280
291
  }
281
- interface CreateContactResponseSuccess extends Pick<Contact, 'name' | 'id' | 'created_at'> {
292
+ interface CreateContactResponseSuccess extends Pick<Contact, 'id'> {
293
+ object: 'contact';
282
294
  }
283
295
  interface CreateContactResponse {
284
296
  data: CreateContactResponseSuccess | null;
@@ -289,7 +301,7 @@ interface GetContactOptions {
289
301
  audienceId: string;
290
302
  id: string;
291
303
  }
292
- interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'name' | 'created_at'> {
304
+ interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'email' | 'created_at' | 'first_name' | 'last_name' | 'unsubscribed'> {
293
305
  object: 'contact';
294
306
  }
295
307
  interface GetContactResponse {
@@ -300,7 +312,10 @@ interface GetContactResponse {
300
312
  interface ListContactsOptions {
301
313
  audienceId: string;
302
314
  }
303
- type ListContactsResponseSuccess = Contact[];
315
+ interface ListContactsResponseSuccess {
316
+ object: 'list';
317
+ data: Contact[];
318
+ }
304
319
  interface ListContactsResponse {
305
320
  data: ListContactsResponseSuccess | null;
306
321
  error: ErrorResponse | null;
@@ -412,7 +427,9 @@ interface GetDomainResponse {
412
427
  error: ErrorResponse | null;
413
428
  }
414
429
 
415
- type ListDomainsResponseSuccess = Domain[];
430
+ type ListDomainsResponseSuccess = {
431
+ data: Domain[];
432
+ };
416
433
  interface ListDomainsResponse {
417
434
  data: ListDomainsResponseSuccess | null;
418
435
  error: ErrorResponse | null;
package/dist/index.d.ts CHANGED
@@ -53,18 +53,19 @@ interface CreateApiKeyResponse {
53
53
  error: ErrorResponse | null;
54
54
  }
55
55
 
56
- interface ListApiKeysResponseSuccess {
57
- name: string;
58
- id: string;
56
+ interface ApiKey {
59
57
  created_at: string;
58
+ id: string;
59
+ name: string;
60
60
  }
61
+
62
+ type ListApiKeysResponseSuccess = Pick<ApiKey, 'name' | 'id' | 'created_at'>[];
61
63
  interface ListApiKeysResponse {
62
- data: ListApiKeysResponseSuccess[] | null;
64
+ data: ListApiKeysResponseSuccess | null;
63
65
  error: ErrorResponse | null;
64
66
  }
65
67
 
66
68
  interface RemoveApiKeyResponseSuccess {
67
- id: string;
68
69
  }
69
70
  interface RemoveApiKeyResponse {
70
71
  data: RemoveApiKeyResponseSuccess | null;
@@ -90,7 +91,8 @@ interface CreateAudienceOptions {
90
91
  }
91
92
  interface CreateAudienceRequestOptions extends PostOptions {
92
93
  }
93
- interface CreateAudienceResponseSuccess extends Pick<Audience, 'name' | 'id' | 'created_at'> {
94
+ interface CreateAudienceResponseSuccess extends Pick<Audience, 'name' | 'id'> {
95
+ object: 'audience';
94
96
  }
95
97
  interface CreateAudienceResponse {
96
98
  data: CreateAudienceResponseSuccess | null;
@@ -105,13 +107,19 @@ interface GetAudienceResponse {
105
107
  error: ErrorResponse | null;
106
108
  }
107
109
 
108
- type ListAudiencesResponseSuccess = Audience[];
110
+ type ListAudiencesResponseSuccess = {
111
+ object: 'list';
112
+ data: Audience[];
113
+ };
109
114
  interface ListAudiencesResponse {
110
115
  data: ListAudiencesResponseSuccess | null;
111
116
  error: ErrorResponse | null;
112
117
  }
113
118
 
114
- type RemoveAudiencesResponseSuccess = Pick<Audience, 'id'>;
119
+ interface RemoveAudiencesResponseSuccess extends Pick<Audience, 'id'> {
120
+ object: 'audience';
121
+ deleted: boolean;
122
+ }
115
123
  interface RemoveAudiencesResponse {
116
124
  data: RemoveAudiencesResponseSuccess | null;
117
125
  error: ErrorResponse | null;
@@ -266,7 +274,10 @@ interface PatchOptions {
266
274
  interface Contact {
267
275
  created_at: string;
268
276
  id: string;
269
- name: string;
277
+ email: string;
278
+ first_name?: string;
279
+ last_name?: string;
280
+ unsubscribed: boolean;
270
281
  }
271
282
 
272
283
  interface CreateContactOptions {
@@ -278,7 +289,8 @@ interface CreateContactOptions {
278
289
  }
279
290
  interface CreateContactRequestOptions extends PostOptions {
280
291
  }
281
- interface CreateContactResponseSuccess extends Pick<Contact, 'name' | 'id' | 'created_at'> {
292
+ interface CreateContactResponseSuccess extends Pick<Contact, 'id'> {
293
+ object: 'contact';
282
294
  }
283
295
  interface CreateContactResponse {
284
296
  data: CreateContactResponseSuccess | null;
@@ -289,7 +301,7 @@ interface GetContactOptions {
289
301
  audienceId: string;
290
302
  id: string;
291
303
  }
292
- interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'name' | 'created_at'> {
304
+ interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'email' | 'created_at' | 'first_name' | 'last_name' | 'unsubscribed'> {
293
305
  object: 'contact';
294
306
  }
295
307
  interface GetContactResponse {
@@ -300,7 +312,10 @@ interface GetContactResponse {
300
312
  interface ListContactsOptions {
301
313
  audienceId: string;
302
314
  }
303
- type ListContactsResponseSuccess = Contact[];
315
+ interface ListContactsResponseSuccess {
316
+ object: 'list';
317
+ data: Contact[];
318
+ }
304
319
  interface ListContactsResponse {
305
320
  data: ListContactsResponseSuccess | null;
306
321
  error: ErrorResponse | null;
@@ -412,7 +427,9 @@ interface GetDomainResponse {
412
427
  error: ErrorResponse | null;
413
428
  }
414
429
 
415
- type ListDomainsResponseSuccess = Domain[];
430
+ type ListDomainsResponseSuccess = {
431
+ data: Domain[];
432
+ };
416
433
  interface ListDomainsResponse {
417
434
  data: ListDomainsResponseSuccess | null;
418
435
  error: ErrorResponse | null;
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ __export(src_exports, {
59
59
  module.exports = __toCommonJS(src_exports);
60
60
 
61
61
  // package.json
62
- var version = "3.0.0-canary.0";
62
+ var version = "3.0.0";
63
63
 
64
64
  // src/api-keys/api-keys.ts
65
65
  var ApiKeys = class {
package/dist/index.mjs CHANGED
@@ -36,7 +36,7 @@ var __async = (__this, __arguments, generator) => {
36
36
  };
37
37
 
38
38
  // package.json
39
- var version = "3.0.0-canary.0";
39
+ var version = "3.0.0";
40
40
 
41
41
  // src/api-keys/api-keys.ts
42
42
  var ApiKeys = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "3.0.0-canary.0",
3
+ "version": "3.0.0",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -49,13 +49,13 @@
49
49
  "devDependencies": {
50
50
  "@types/jest": "29.5.11",
51
51
  "@types/node": "18.19.7",
52
- "@types/react": "18.2.33",
52
+ "@types/react": "18.2.48",
53
53
  "@typescript-eslint/eslint-plugin": "6.19.0",
54
54
  "@typescript-eslint/parser": "6.19.0",
55
55
  "eslint": "8.56.0",
56
56
  "jest": "29.7.0",
57
57
  "jest-fetch-mock": "3.0.3",
58
- "prettier": "3.2.2",
58
+ "prettier": "3.2.4",
59
59
  "ts-jest": "29.1.1",
60
60
  "ts-node": "10.9.2",
61
61
  "tsup": "7.2.0",