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 +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -53,18 +53,19 @@ interface CreateApiKeyResponse {
|
|
|
53
53
|
error: ErrorResponse | null;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
interface
|
|
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
|
|
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'
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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, '
|
|
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' | '
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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
|
|
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'
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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, '
|
|
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' | '
|
|
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
|
-
|
|
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 =
|
|
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
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "3.0.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.
|
|
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.
|
|
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",
|