resend 0.15.2 → 0.15.3

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
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",
@@ -1,9 +1,9 @@
1
1
  import { Resend } from '../resend';
2
- import { CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse } from './interfaces';
2
+ import { CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, ListApiKeysResponse } from './interfaces';
3
3
  export declare class ApiKeys {
4
4
  private readonly resend;
5
5
  constructor(resend: Resend);
6
6
  create(payload: CreateApiKeyOptions, options?: CreateApiKeyRequestOptions): Promise<CreateApiKeyResponse>;
7
- list(): Promise<void>;
7
+ list(): Promise<ListApiKeysResponse>;
8
8
  remove(id: string): Promise<void>;
9
9
  }
@@ -1 +1,2 @@
1
1
  export * from './create-api-key-options.interface';
2
+ export * from './list-api-keys.interface';
@@ -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-api-key-options.interface"), exports);
18
+ __exportStar(require("./list-api-keys.interface"), exports);
@@ -0,0 +1,5 @@
1
+ export type ListApiKeysResponse = {
2
+ name: string;
3
+ id: string;
4
+ created_at: string;
5
+ }[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,8 @@
1
1
  import { DomainRegion, DomainStatus } from './domain';
2
2
  export type ListDomainsResponse = {
3
- data: {
4
- name: string;
5
- id: string;
6
- created_at: string;
7
- region: DomainRegion;
8
- status: DomainStatus;
9
- }[];
10
- };
3
+ name: string;
4
+ id: string;
5
+ created_at: string;
6
+ region: DomainRegion;
7
+ status: DomainStatus;
8
+ }[];
@@ -7,7 +7,7 @@ export interface CreateEmailOptions {
7
7
  cc?: string | string[];
8
8
  from: string;
9
9
  html?: string;
10
- react?: ReactElement;
10
+ react?: ReactElement | null;
11
11
  reply_to?: string | string[];
12
12
  subject: string;
13
13
  tags?: Tag[];
@@ -1,5 +1,6 @@
1
1
  export declare const RESEND_ERROR_CODES_BY_KEY: {
2
2
  readonly missing_required_fields: 422;
3
+ readonly rate_limit_exceeded: 429;
3
4
  readonly missing_api_key: 401;
4
5
  readonly invalid_api_Key: 403;
5
6
  readonly invalid_from_address: 403;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RESEND_ERROR_CODES_BY_KEY = void 0;
4
4
  exports.RESEND_ERROR_CODES_BY_KEY = {
5
5
  missing_required_fields: 422,
6
+ rate_limit_exceeded: 429,
6
7
  missing_api_key: 401,
7
8
  invalid_api_Key: 403,
8
9
  invalid_from_address: 403,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
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",