resend 6.5.2-batch.0 → 6.6.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.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  let svix = require("svix");
2
2
 
3
3
  //#region package.json
4
- var version = "6.5.2-batch.0";
4
+ var version = "6.6.0";
5
5
 
6
6
  //#endregion
7
7
  //#region src/common/utils/build-pagination-query.ts
@@ -100,8 +100,7 @@ var Batch = class {
100
100
  }
101
101
  emails.push(parseEmailToApiOptions(email));
102
102
  }
103
- const endpoint = (typeof process !== "undefined" && process.env ? process.env.RESEND_EXPERIMENTAL_BATCH !== "false" && process.env.RESEND_EXPERIMENTAL_BATCH !== "0" : true) ? "/experimental/emails/batch" : "/emails/batch";
104
- return await this.resend.post(endpoint, emails, {
103
+ return await this.resend.post("/emails/batch", emails, {
105
104
  ...options,
106
105
  headers: {
107
106
  "x-batch-validation": options?.batchValidation ?? "strict",
package/dist/index.d.cts CHANGED
@@ -69,7 +69,7 @@ interface DomainApiOptions {
69
69
  }
70
70
  //#endregion
71
71
  //#region src/interfaces.d.ts
72
- type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
72
+ type RESEND_ERROR_CODE_KEY = 'invalid_idempotency_key' | 'validation_error' | 'missing_api_key' | 'restricted_api_key' | 'invalid_api_key' | 'not_found' | 'method_not_allowed' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_attachment' | 'invalid_from_address' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'missing_required_field' | 'monthly_quota_exceeded' | 'daily_quota_exceeded' | 'rate_limit_exceeded' | 'security_error' | 'application_error' | 'internal_server_error';
73
73
  type Response<T> = ({
74
74
  data: T;
75
75
  error: null;
package/dist/index.d.mts CHANGED
@@ -69,7 +69,7 @@ interface DomainApiOptions {
69
69
  }
70
70
  //#endregion
71
71
  //#region src/interfaces.d.ts
72
- type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
72
+ type RESEND_ERROR_CODE_KEY = 'invalid_idempotency_key' | 'validation_error' | 'missing_api_key' | 'restricted_api_key' | 'invalid_api_key' | 'not_found' | 'method_not_allowed' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_attachment' | 'invalid_from_address' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'missing_required_field' | 'monthly_quota_exceeded' | 'daily_quota_exceeded' | 'rate_limit_exceeded' | 'security_error' | 'application_error' | 'internal_server_error';
73
73
  type Response<T> = ({
74
74
  data: T;
75
75
  error: null;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Webhook } from "svix";
2
2
 
3
3
  //#region package.json
4
- var version = "6.5.2-batch.0";
4
+ var version = "6.6.0";
5
5
 
6
6
  //#endregion
7
7
  //#region src/common/utils/build-pagination-query.ts
@@ -100,8 +100,7 @@ var Batch = class {
100
100
  }
101
101
  emails.push(parseEmailToApiOptions(email));
102
102
  }
103
- const endpoint = (typeof process !== "undefined" && process.env ? process.env.RESEND_EXPERIMENTAL_BATCH !== "false" && process.env.RESEND_EXPERIMENTAL_BATCH !== "0" : true) ? "/experimental/emails/batch" : "/emails/batch";
104
- return await this.resend.post(endpoint, emails, {
103
+ return await this.resend.post("/emails/batch", emails, {
105
104
  ...options,
106
105
  headers: {
107
106
  "x-batch-validation": options?.batchValidation ?? "strict",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.5.2-batch.0",
3
+ "version": "6.6.0",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",