Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/common/interfaces/domain-api-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export interface DomainApiOptions {
name: string;
region?: string;
custom_return_path?: string;
capability?: 'send' | 'receive' | 'send-and-receive';
}
1 change: 0 additions & 1 deletion src/common/utils/parse-domain-to-api-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function parseDomainToApiOptions(
return {
name: domain.name,
region: domain.region,
capability: domain.capability,
custom_return_path: domain.customReturnPath,
};
}
10 changes: 0 additions & 10 deletions src/domains/domains.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe('Domains', () => {
const response: CreateDomainResponseSuccess = {
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
name: 'resend.com',
capability: 'send-and-receive',
created_at: '2023-04-07T22:48:33.420498+00:00',
status: 'not_started',
records: [
Expand Down Expand Up @@ -97,7 +96,6 @@ describe('Domains', () => {
).resolves.toMatchInlineSnapshot(`
{
"data": {
"capability": "send-and-receive",
"created_at": "2023-04-07T22:48:33.420498+00:00",
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
"name": "resend.com",
Expand Down Expand Up @@ -207,7 +205,6 @@ describe('Domains', () => {
const response: CreateDomainResponseSuccess = {
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
name: 'resend.com',
capability: 'send',
created_at: '2023-04-07T22:48:33.420498+00:00',
status: 'not_started',
records: [
Expand Down Expand Up @@ -267,7 +264,6 @@ describe('Domains', () => {
).resolves.toMatchInlineSnapshot(`
{
"data": {
"capability": "send",
"created_at": "2023-04-07T22:48:33.420498+00:00",
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
"name": "resend.com",
Expand Down Expand Up @@ -367,7 +363,6 @@ describe('Domains', () => {
const response: CreateDomainResponseSuccess = {
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
name: 'resend.com',
capability: 'send',
created_at: '2023-04-07T22:48:33.420498+00:00',
status: 'not_started',
records: [
Expand Down Expand Up @@ -419,7 +414,6 @@ describe('Domains', () => {
).resolves.toMatchInlineSnapshot(`
{
"data": {
"capability": "send",
"created_at": "2023-04-07T22:48:33.420498+00:00",
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
"name": "resend.com",
Expand Down Expand Up @@ -475,15 +469,13 @@ describe('Domains', () => {
status: 'not_started',
created_at: '2023-04-07T23:13:52.669661+00:00',
region: 'eu-west-1',
capability: 'send',
},
{
id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9',
name: 'react.email',
status: 'not_started',
created_at: '2023-04-07T23:13:20.417116+00:00',
region: 'us-east-1',
capability: 'receive',
},
],
};
Expand Down Expand Up @@ -649,7 +641,6 @@ describe('Domains', () => {
object: 'domain',
id: 'fd61172c-cafc-40f5-b049-b45947779a29',
name: 'resend.com',
capability: 'send-and-receive',
status: 'not_started',
created_at: '2023-06-21T06:10:36.144Z',
region: 'us-east-1',
Expand Down Expand Up @@ -705,7 +696,6 @@ describe('Domains', () => {
await expect(resend.domains.get('1234')).resolves.toMatchInlineSnapshot(`
{
"data": {
"capability": "send-and-receive",
"created_at": "2023-06-21T06:10:36.144Z",
"id": "fd61172c-cafc-40f5-b049-b45947779a29",
"name": "resend.com",
Expand Down
6 changes: 1 addition & 5 deletions src/domains/interfaces/create-domain-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ export interface CreateDomainOptions {
name: string;
region?: DomainRegion;
customReturnPath?: string;
capability?: 'send' | 'receive' | 'send-and-receive';
}

export interface CreateDomainRequestOptions extends PostOptions {}

export interface CreateDomainResponseSuccess
extends Pick<
Domain,
'name' | 'id' | 'status' | 'created_at' | 'region' | 'capability'
> {
extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'> {
records: DomainRecords[];
}

Expand Down
1 change: 0 additions & 1 deletion src/domains/interfaces/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ export interface Domain {
status: DomainStatus;
created_at: string;
region: DomainRegion;
capability: 'send' | 'receive' | 'send-and-receive';
}
5 changes: 1 addition & 4 deletions src/domains/interfaces/get-domain.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import type { Response } from '../../interfaces';
import type { Domain, DomainRecords } from './domain';

export interface GetDomainResponseSuccess
extends Pick<
Domain,
'id' | 'name' | 'created_at' | 'region' | 'status' | 'capability'
> {
extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'> {
object: 'domain';
records: DomainRecords[];
}
Expand Down
Loading