resend 0.15.1 → 0.15.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/LICENSE +21 -0
- package/build/package.json +4 -4
- package/build/src/domains/domains.d.ts +2 -2
- package/build/src/domains/interfaces/create-domain-options.interface.d.ts +1 -3
- package/build/src/domains/interfaces/domain.d.ts +3 -0
- package/build/src/domains/interfaces/domain.js +2 -0
- package/build/src/domains/interfaces/index.d.ts +1 -0
- package/build/src/domains/interfaces/index.js +1 -0
- package/build/src/domains/interfaces/list-domains.interface.d.ts +10 -0
- package/build/src/domains/interfaces/list-domains.interface.js +2 -0
- package/package.json +4 -4
- package/readme.md +10 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Plus Five Five, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"axios": "1.4.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/jest": "29.5.
|
|
34
|
+
"@types/jest": "29.5.2",
|
|
35
35
|
"@types/node": "18.16.2",
|
|
36
36
|
"@types/react": "18.2.0",
|
|
37
|
-
"axios-mock-adapter": "1.21.
|
|
37
|
+
"axios-mock-adapter": "1.21.5",
|
|
38
38
|
"jest": "29.5.0",
|
|
39
39
|
"prettier": "2.8.8",
|
|
40
40
|
"supertest": "6.3.3",
|
|
41
41
|
"ts-jest": "29.1.0",
|
|
42
42
|
"tslint": "6.1.3",
|
|
43
|
-
"typescript": "5.
|
|
43
|
+
"typescript": "5.1.3"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Resend } from '../resend';
|
|
2
|
-
import { CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse } from './interfaces';
|
|
2
|
+
import { CreateDomainOptions, CreateDomainRequestOptions, CreateDomainResponse, ListDomainsResponse } from './interfaces';
|
|
3
3
|
export declare class Domains {
|
|
4
4
|
private readonly resend;
|
|
5
5
|
constructor(resend: Resend);
|
|
6
6
|
create(payload: CreateDomainOptions, options?: CreateDomainRequestOptions): Promise<CreateDomainResponse>;
|
|
7
|
-
list(): Promise<
|
|
7
|
+
list(): Promise<ListDomainsResponse>;
|
|
8
8
|
remove(id: string): Promise<void>;
|
|
9
9
|
verify(id: string): Promise<void>;
|
|
10
10
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { PostOptions } from '../../common/interfaces';
|
|
2
|
-
|
|
2
|
+
import { DomainRegion, DomainStatus } from './domain';
|
|
3
3
|
export interface CreateDomainOptions {
|
|
4
4
|
name: string;
|
|
5
5
|
region?: DomainRegion;
|
|
6
6
|
}
|
|
7
7
|
export interface CreateDomainRequestOptions extends PostOptions {
|
|
8
8
|
}
|
|
9
|
-
export type DomainNameservers = 'Amazon Route 53' | 'Cloudflare' | 'Digital Ocean' | 'GoDaddy' | 'Google Domains' | 'Namecheap' | 'Unidentified' | 'Vercel';
|
|
10
|
-
export type DomainStatus = 'pending' | 'verified' | 'failed' | 'temporary_failure' | 'not_started';
|
|
11
9
|
export interface DomainSpfRecord {
|
|
12
10
|
record: 'SPF';
|
|
13
11
|
name: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type DomainRegion = 'us-east-1' | 'eu-west-1' | 'sa-east-1';
|
|
2
|
+
export type DomainNameservers = 'Amazon Route 53' | 'Cloudflare' | 'Digital Ocean' | 'GoDaddy' | 'Google Domains' | 'Namecheap' | 'Unidentified' | 'Vercel';
|
|
3
|
+
export type DomainStatus = 'pending' | 'verified' | 'failed' | 'temporary_failure' | 'not_started';
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-domain-options.interface"), exports);
|
|
18
|
+
__exportStar(require("./list-domains.interface"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"axios": "1.4.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/jest": "29.5.
|
|
34
|
+
"@types/jest": "29.5.2",
|
|
35
35
|
"@types/node": "18.16.2",
|
|
36
36
|
"@types/react": "18.2.0",
|
|
37
|
-
"axios-mock-adapter": "1.21.
|
|
37
|
+
"axios-mock-adapter": "1.21.5",
|
|
38
38
|
"jest": "29.5.0",
|
|
39
39
|
"prettier": "2.8.8",
|
|
40
40
|
"supertest": "6.3.3",
|
|
41
41
|
"ts-jest": "29.1.0",
|
|
42
42
|
"tslint": "6.1.3",
|
|
43
|
-
"typescript": "5.
|
|
43
|
+
"typescript": "5.1.3"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/readme.md
CHANGED
|
@@ -10,13 +10,22 @@ npm install resend
|
|
|
10
10
|
yarn add resend
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
Send email with:
|
|
16
|
+
|
|
17
|
+
* [Node.js](https://github.com/resendlabs/resend-node-example)
|
|
18
|
+
* [Next.js (App Router)](https://github.com/resendlabs/resend-nextjs-app-router-example)
|
|
19
|
+
* [Next.js (Pages Router)](https://github.com/resendlabs/resend-nextjs-pages-router-example)
|
|
20
|
+
* [Express](https://github.com/resendlabs/resend-express-example)
|
|
21
|
+
|
|
13
22
|
## Setup
|
|
14
23
|
|
|
15
24
|
First, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com).
|
|
16
25
|
|
|
17
26
|
```js
|
|
18
27
|
import { Resend } from 'resend';
|
|
19
|
-
const resend = new Resend('
|
|
28
|
+
const resend = new Resend('re_123456789');
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
## Usage
|