+24
-8
@@ -28,3 +28,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); | ||
| //#region package.json | ||
| var version = "6.16.0"; | ||
| var version = "6.17.0"; | ||
| //#endregion | ||
@@ -766,3 +766,3 @@ //#region src/common/utils/build-pagination-query.ts | ||
| } | ||
| async forward(options) { | ||
| async forward(options, requestOptions = {}) { | ||
| const { emailId, to, from } = options; | ||
@@ -782,3 +782,3 @@ const passthrough = options.passthrough !== false; | ||
| subject: originalSubject | ||
| }); | ||
| }, requestOptions); | ||
| const forwardSubject = originalSubject.startsWith("Fwd:") ? originalSubject : `Fwd: ${originalSubject}`; | ||
@@ -791,5 +791,5 @@ return this.forwardWrapped(email, { | ||
| html: "html" in options ? options.html : void 0 | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
| async forwardPassthrough(email, options) { | ||
| async forwardPassthrough(email, options, requestOptions) { | ||
| const { to, from, subject } = options; | ||
@@ -833,5 +833,5 @@ if (!email.raw?.download_url) return { | ||
| attachments: attachments.length > 0 ? attachments : void 0 | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
| async forwardWrapped(email, options) { | ||
| async forwardWrapped(email, options, requestOptions) { | ||
| const { to, from, subject, text, html } = options; | ||
@@ -869,3 +869,3 @@ if (!email.raw?.download_url) return { | ||
| }] | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
@@ -947,2 +947,17 @@ }; | ||
| //#endregion | ||
| //#region src/oauth-grants/oauth-grants.ts | ||
| var OAuthGrants = class { | ||
| constructor(resend) { | ||
| this.resend = resend; | ||
| } | ||
| async list(options = {}) { | ||
| const queryString = buildPaginationQuery(options); | ||
| const url = queryString ? `/oauth/grants?${queryString}` : "/oauth/grants"; | ||
| return await this.resend.get(url); | ||
| } | ||
| async revoke(id) { | ||
| return await this.resend.delete(`/oauth/grants/${id}`); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region src/segments/segments.ts | ||
@@ -1160,2 +1175,3 @@ var Segments = class { | ||
| this.logs = new Logs(this); | ||
| this.oauthGrants = new OAuthGrants(this); | ||
| this.templates = new Templates(this); | ||
@@ -1162,0 +1178,0 @@ this.topics = new Topics(this); |
+24
-8
| import PostalMime from "postal-mime"; | ||
| import { Webhook } from "standardwebhooks"; | ||
| //#region package.json | ||
| var version = "6.16.0"; | ||
| var version = "6.17.0"; | ||
| //#endregion | ||
@@ -741,3 +741,3 @@ //#region src/common/utils/build-pagination-query.ts | ||
| } | ||
| async forward(options) { | ||
| async forward(options, requestOptions = {}) { | ||
| const { emailId, to, from } = options; | ||
@@ -757,3 +757,3 @@ const passthrough = options.passthrough !== false; | ||
| subject: originalSubject | ||
| }); | ||
| }, requestOptions); | ||
| const forwardSubject = originalSubject.startsWith("Fwd:") ? originalSubject : `Fwd: ${originalSubject}`; | ||
@@ -766,5 +766,5 @@ return this.forwardWrapped(email, { | ||
| html: "html" in options ? options.html : void 0 | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
| async forwardPassthrough(email, options) { | ||
| async forwardPassthrough(email, options, requestOptions) { | ||
| const { to, from, subject } = options; | ||
@@ -808,5 +808,5 @@ if (!email.raw?.download_url) return { | ||
| attachments: attachments.length > 0 ? attachments : void 0 | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
| async forwardWrapped(email, options) { | ||
| async forwardWrapped(email, options, requestOptions) { | ||
| const { to, from, subject, text, html } = options; | ||
@@ -844,3 +844,3 @@ if (!email.raw?.download_url) return { | ||
| }] | ||
| }); | ||
| }, requestOptions); | ||
| } | ||
@@ -922,2 +922,17 @@ }; | ||
| //#endregion | ||
| //#region src/oauth-grants/oauth-grants.ts | ||
| var OAuthGrants = class { | ||
| constructor(resend) { | ||
| this.resend = resend; | ||
| } | ||
| async list(options = {}) { | ||
| const queryString = buildPaginationQuery(options); | ||
| const url = queryString ? `/oauth/grants?${queryString}` : "/oauth/grants"; | ||
| return await this.resend.get(url); | ||
| } | ||
| async revoke(id) { | ||
| return await this.resend.delete(`/oauth/grants/${id}`); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region src/segments/segments.ts | ||
@@ -1135,2 +1150,3 @@ var Segments = class { | ||
| this.logs = new Logs(this); | ||
| this.oauthGrants = new OAuthGrants(this); | ||
| this.templates = new Templates(this); | ||
@@ -1137,0 +1153,0 @@ this.topics = new Topics(this); |
+14
-16
| { | ||
| "name": "resend", | ||
| "version": "6.16.0", | ||
| "version": "6.17.0", | ||
| "description": "Node.js library for the Resend API", | ||
@@ -32,15 +32,2 @@ "main": "./dist/index.cjs", | ||
| }, | ||
| "scripts": { | ||
| "build": "tsdown src/index.ts --format esm,cjs --dts", | ||
| "integration:nextjs": "cd ./e2e/nextjs && next build --turbopack", | ||
| "lint": "biome check .", | ||
| "lint:fix": "biome check . --write", | ||
| "prepublishOnly": "pnpm run build", | ||
| "test": "vitest run --exclude e2e", | ||
| "test:dev": "cross-env TEST_MODE=dev vitest run --exclude e2e", | ||
| "test:e2e": "vitest run e2e", | ||
| "test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run --exclude e2e", | ||
| "test:watch": "vitest --exclude e2e", | ||
| "typecheck": "tsc --noEmit" | ||
| }, | ||
| "repository": { | ||
@@ -87,3 +74,14 @@ "type": "git", | ||
| }, | ||
| "packageManager": "pnpm@11.3.0" | ||
| } | ||
| "scripts": { | ||
| "build": "tsdown src/index.ts --format esm,cjs --dts", | ||
| "integration:nextjs": "cd ./e2e/nextjs && next build --turbopack", | ||
| "lint": "biome check .", | ||
| "lint:fix": "biome check . --write", | ||
| "test": "vitest run --exclude e2e", | ||
| "test:dev": "cross-env TEST_MODE=dev vitest run --exclude e2e", | ||
| "test:e2e": "vitest run e2e", | ||
| "test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run --exclude e2e", | ||
| "test:watch": "vitest --exclude e2e", | ||
| "typecheck": "tsc --noEmit" | ||
| } | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
252573
1.7%2574
1.26%