Skip to content

Commit e3a9da7

Browse files
authored
feat: remove domain capability from the SDK API (#728)
1 parent a165270 commit e3a9da7

File tree

6 files changed

+2
-22
lines changed

6 files changed

+2
-22
lines changed

src/common/interfaces/domain-api-options.interface.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ export interface DomainApiOptions {
22
name: string;
33
region?: string;
44
custom_return_path?: string;
5-
capability?: 'send' | 'receive' | 'send-and-receive';
65
}

src/common/utils/parse-domain-to-api-options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export function parseDomainToApiOptions(
77
return {
88
name: domain.name,
99
region: domain.region,
10-
capability: domain.capability,
1110
custom_return_path: domain.customReturnPath,
1211
};
1312
}

src/domains/domains.spec.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('Domains', () => {
2525
const response: CreateDomainResponseSuccess = {
2626
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
2727
name: 'resend.com',
28-
capability: 'send-and-receive',
2928
created_at: '2023-04-07T22:48:33.420498+00:00',
3029
status: 'not_started',
3130
records: [
@@ -96,7 +95,6 @@ describe('Domains', () => {
9695
).resolves.toMatchInlineSnapshot(`
9796
{
9897
"data": {
99-
"capability": "send-and-receive",
10098
"created_at": "2023-04-07T22:48:33.420498+00:00",
10199
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
102100
"name": "resend.com",
@@ -203,7 +201,6 @@ describe('Domains', () => {
203201
const response: CreateDomainResponseSuccess = {
204202
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
205203
name: 'resend.com',
206-
capability: 'send',
207204
created_at: '2023-04-07T22:48:33.420498+00:00',
208205
status: 'not_started',
209206
records: [
@@ -263,7 +260,6 @@ describe('Domains', () => {
263260
).resolves.toMatchInlineSnapshot(`
264261
{
265262
"data": {
266-
"capability": "send",
267263
"created_at": "2023-04-07T22:48:33.420498+00:00",
268264
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
269265
"name": "resend.com",
@@ -361,7 +357,6 @@ describe('Domains', () => {
361357
const response: CreateDomainResponseSuccess = {
362358
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
363359
name: 'resend.com',
364-
capability: 'send',
365360
created_at: '2023-04-07T22:48:33.420498+00:00',
366361
status: 'not_started',
367362
records: [
@@ -412,7 +407,6 @@ describe('Domains', () => {
412407
).resolves.toMatchInlineSnapshot(`
413408
{
414409
"data": {
415-
"capability": "send",
416410
"created_at": "2023-04-07T22:48:33.420498+00:00",
417411
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
418412
"name": "resend.com",
@@ -467,15 +461,13 @@ describe('Domains', () => {
467461
status: 'not_started',
468462
created_at: '2023-04-07T23:13:52.669661+00:00',
469463
region: 'eu-west-1',
470-
capability: 'send',
471464
},
472465
{
473466
id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9',
474467
name: 'react.email',
475468
status: 'not_started',
476469
created_at: '2023-04-07T23:13:20.417116+00:00',
477470
region: 'us-east-1',
478-
capability: 'receive',
479471
},
480472
],
481473
};
@@ -627,7 +619,6 @@ describe('Domains', () => {
627619
object: 'domain',
628620
id: 'fd61172c-cafc-40f5-b049-b45947779a29',
629621
name: 'resend.com',
630-
capability: 'send-and-receive',
631622
status: 'not_started',
632623
created_at: '2023-06-21T06:10:36.144Z',
633624
region: 'us-east-1',
@@ -682,7 +673,6 @@ describe('Domains', () => {
682673
await expect(resend.domains.get('1234')).resolves.toMatchInlineSnapshot(`
683674
{
684675
"data": {
685-
"capability": "send-and-receive",
686676
"created_at": "2023-06-21T06:10:36.144Z",
687677
"id": "fd61172c-cafc-40f5-b049-b45947779a29",
688678
"name": "resend.com",

src/domains/interfaces/create-domain-options.interface.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ export interface CreateDomainOptions {
66
name: string;
77
region?: DomainRegion;
88
customReturnPath?: string;
9-
capability?: 'send' | 'receive' | 'send-and-receive';
109
}
1110

1211
export interface CreateDomainRequestOptions extends PostOptions {}
1312

1413
export interface CreateDomainResponseSuccess
15-
extends Pick<
16-
Domain,
17-
'name' | 'id' | 'status' | 'created_at' | 'region' | 'capability'
18-
> {
14+
extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'> {
1915
records: DomainRecords[];
2016
}
2117

src/domains/interfaces/domain.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,4 @@ export interface Domain {
6666
status: DomainStatus;
6767
created_at: string;
6868
region: DomainRegion;
69-
capability: 'send' | 'receive' | 'send-and-receive';
7069
}

src/domains/interfaces/get-domain.interface.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import type { Response } from '../../interfaces';
22
import type { Domain, DomainRecords } from './domain';
33

44
export interface GetDomainResponseSuccess
5-
extends Pick<
6-
Domain,
7-
'id' | 'name' | 'created_at' | 'region' | 'status' | 'capability'
8-
> {
5+
extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'> {
96
object: 'domain';
107
records: DomainRecords[];
118
}

0 commit comments

Comments
 (0)