resend 6.40.1 → 6.42.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
@@ -57,7 +57,7 @@ const MOVE_THREAD_FOLDERS = [
57
57
  ];
58
58
  //#endregion
59
59
  //#region package.json
60
- var version = "6.40.1";
60
+ var version = "6.42.0";
61
61
  //#endregion
62
62
  //#region src/common/utils/build-pagination-query.ts
63
63
  function buildPaginationUrl(base, options) {
package/dist/index.d.cts CHANGED
@@ -395,7 +395,7 @@ export interface AutomationResponseConnection {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/automation-runs/interfaces/automation-run.d.ts
398
- export type AutomationRunStatus = 'running' | 'completed' | 'failed' | 'cancelled';
398
+ export type AutomationRunStatus = 'running' | 'completed' | 'failed' | 'cancelled' | 'quota_exceeded' | 'skipped';
399
399
  export type AutomationRunStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped' | 'waiting';
400
400
  export interface AutomationRunStep {
401
401
  key: string;
@@ -411,12 +411,13 @@ export interface AutomationRun {
411
411
  object: 'automation_run';
412
412
  id: string;
413
413
  status: AutomationRunStatus;
414
+ status_reason?: string;
414
415
  started_at: string | null;
415
416
  completed_at: string | null;
416
417
  created_at: string;
417
418
  steps: AutomationRunStep[];
418
419
  }
419
- export type AutomationRunItem = Pick<AutomationRun, 'id' | 'status' | 'started_at' | 'completed_at' | 'created_at'>;
420
+ export type AutomationRunItem = Pick<AutomationRun, 'id' | 'status' | 'status_reason' | 'started_at' | 'completed_at' | 'created_at'>;
420
421
  //#endregion
421
422
  //#region src/automation-runs/interfaces/cancel-automation-run.interface.d.ts
422
423
  export interface CancelAutomationRunOptions {
@@ -1776,6 +1777,7 @@ export type SendEventOptions = {
1776
1777
  contactId?: never;
1777
1778
  payload?: Record<string, unknown>;
1778
1779
  };
1780
+ export interface SendEventRequestOptions extends PostOptions, IdempotentRequest {}
1779
1781
  export interface SendEventResponseSuccess {
1780
1782
  object: 'event';
1781
1783
  event: string;
@@ -2598,7 +2600,7 @@ declare class Emails {
2598
2600
  declare class Events$1 {
2599
2601
  private readonly resend;
2600
2602
  constructor(resend: Resend);
2601
- send(payload: SendEventOptions, requestOptions?: RequestOptions): Promise<SendEventResponse>;
2603
+ send(payload: SendEventOptions, requestOptions?: SendEventRequestOptions): Promise<SendEventResponse>;
2602
2604
  create(payload: CreateEventOptions, requestOptions?: RequestOptions): Promise<CreateEventResponse>;
2603
2605
  get(identifier: string, requestOptions?: RequestOptions): Promise<GetEventResponse>;
2604
2606
  list(options?: ListEventsOptions, requestOptions?: RequestOptions): Promise<ListEventsResponse>;
package/dist/index.d.mts CHANGED
@@ -395,7 +395,7 @@ export interface AutomationResponseConnection {
395
395
  }
396
396
  //#endregion
397
397
  //#region src/automation-runs/interfaces/automation-run.d.ts
398
- export type AutomationRunStatus = 'running' | 'completed' | 'failed' | 'cancelled';
398
+ export type AutomationRunStatus = 'running' | 'completed' | 'failed' | 'cancelled' | 'quota_exceeded' | 'skipped';
399
399
  export type AutomationRunStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipped' | 'waiting';
400
400
  export interface AutomationRunStep {
401
401
  key: string;
@@ -411,12 +411,13 @@ export interface AutomationRun {
411
411
  object: 'automation_run';
412
412
  id: string;
413
413
  status: AutomationRunStatus;
414
+ status_reason?: string;
414
415
  started_at: string | null;
415
416
  completed_at: string | null;
416
417
  created_at: string;
417
418
  steps: AutomationRunStep[];
418
419
  }
419
- export type AutomationRunItem = Pick<AutomationRun, 'id' | 'status' | 'started_at' | 'completed_at' | 'created_at'>;
420
+ export type AutomationRunItem = Pick<AutomationRun, 'id' | 'status' | 'status_reason' | 'started_at' | 'completed_at' | 'created_at'>;
420
421
  //#endregion
421
422
  //#region src/automation-runs/interfaces/cancel-automation-run.interface.d.ts
422
423
  export interface CancelAutomationRunOptions {
@@ -1776,6 +1777,7 @@ export type SendEventOptions = {
1776
1777
  contactId?: never;
1777
1778
  payload?: Record<string, unknown>;
1778
1779
  };
1780
+ export interface SendEventRequestOptions extends PostOptions, IdempotentRequest {}
1779
1781
  export interface SendEventResponseSuccess {
1780
1782
  object: 'event';
1781
1783
  event: string;
@@ -2598,7 +2600,7 @@ declare class Emails {
2598
2600
  declare class Events$1 {
2599
2601
  private readonly resend;
2600
2602
  constructor(resend: Resend);
2601
- send(payload: SendEventOptions, requestOptions?: RequestOptions): Promise<SendEventResponse>;
2603
+ send(payload: SendEventOptions, requestOptions?: SendEventRequestOptions): Promise<SendEventResponse>;
2602
2604
  create(payload: CreateEventOptions, requestOptions?: RequestOptions): Promise<CreateEventResponse>;
2603
2605
  get(identifier: string, requestOptions?: RequestOptions): Promise<GetEventResponse>;
2604
2606
  list(options?: ListEventsOptions, requestOptions?: RequestOptions): Promise<ListEventsResponse>;
package/dist/index.mjs CHANGED
@@ -33,7 +33,7 @@ const MOVE_THREAD_FOLDERS = [
33
33
  ];
34
34
  //#endregion
35
35
  //#region package.json
36
- var version = "6.40.1";
36
+ var version = "6.42.0";
37
37
  //#endregion
38
38
  //#region src/common/utils/build-pagination-query.ts
39
39
  function buildPaginationUrl(base, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.40.1",
3
+ "version": "6.42.0",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",