Skip to content

Commit 5f4bd9f

Browse files
committed
feat: remove domain capability from the SDK API
1 parent 33ae1ce commit 5f4bd9f

File tree

6 files changed

+2
-16
lines changed

6 files changed

+2
-16
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: [
@@ -97,7 +96,6 @@ describe('Domains', () => {
9796
).resolves.toMatchInlineSnapshot(`
9897
{
9998
"data": {
100-
"capability": "send-and-receive",
10199
"created_at": "2023-04-07T22:48:33.420498+00:00",
102100
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
103101
"name": "resend.com",
@@ -207,7 +205,6 @@ describe('Domains', () => {
207205
const response: CreateDomainResponseSuccess = {
208206
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
209207
name: 'resend.com',
210-
capability: 'send',
211208
created_at: '2023-04-07T22:48:33.420498+00:00',
212209
status: 'not_started',
213210
records: [
@@ -267,7 +264,6 @@ describe('Domains', () => {
267264
).resolves.toMatchInlineSnapshot(`
268265
{
269266
"data": {
270-
"capability": "send",
271267
"created_at": "2023-04-07T22:48:33.420498+00:00",
272268
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
273269
"name": "resend.com",
@@ -367,7 +363,6 @@ describe('Domains', () => {
367363
const response: CreateDomainResponseSuccess = {
368364
id: '3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222',
369365
name: 'resend.com',
370-
capability: 'send',
371366
created_at: '2023-04-07T22:48:33.420498+00:00',
372367
status: 'not_started',
373368
records: [
@@ -419,7 +414,6 @@ describe('Domains', () => {
419414
).resolves.toMatchInlineSnapshot(`
420415
{
421416
"data": {
422-
"capability": "send",
423417
"created_at": "2023-04-07T22:48:33.420498+00:00",
424418
"id": "3d4a472d-bc6d-4dd2-aa9d-d3d50ce87222",
425419
"name": "resend.com",
@@ -475,15 +469,13 @@ describe('Domains', () => {
475469
status: 'not_started',
476470
created_at: '2023-04-07T23:13:52.669661+00:00',
477471
region: 'eu-west-1',
478-
capability: 'send',
479472
},
480473
{
481474
id: 'ac7503ac-e027-4aea-94b3-b0acd46f65f9',
482475
name: 'react.email',
483476
status: 'not_started',
484477
created_at: '2023-04-07T23:13:20.417116+00:00',
485478
region: 'us-east-1',
486-
capability: 'receive',
487479
},
488480
],
489481
};
@@ -649,7 +641,6 @@ describe('Domains', () => {
649641
object: 'domain',
650642
id: 'fd61172c-cafc-40f5-b049-b45947779a29',
651643
name: 'resend.com',
652-
capability: 'send-and-receive',
653644
status: 'not_started',
654645
created_at: '2023-06-21T06:10:36.144Z',
655646
region: 'us-east-1',
@@ -705,7 +696,6 @@ describe('Domains', () => {
705696
await expect(resend.domains.get('1234')).resolves.toMatchInlineSnapshot(`
706697
{
707698
"data": {
708-
"capability": "send-and-receive",
709699
"created_at": "2023-06-21T06:10:36.144Z",
710700
"id": "fd61172c-cafc-40f5-b049-b45947779a29",
711701
"name": "resend.com",

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ 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
1514
extends Pick<
1615
Domain,
17-
'name' | 'id' | 'status' | 'created_at' | 'region' | 'capability'
16+
'name' | 'id' | 'status' | 'created_at' | 'region'
1817
> {
1918
records: DomainRecords[];
2019
}

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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Domain, DomainRecords } from './domain';
44
export interface GetDomainResponseSuccess
55
extends Pick<
66
Domain,
7-
'id' | 'name' | 'created_at' | 'region' | 'status' | 'capability'
7+
'id' | 'name' | 'created_at' | 'region' | 'status'
88
> {
99
object: 'domain';
1010
records: DomainRecords[];

0 commit comments

Comments
 (0)