Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf8c5c1

Browse files
committed
docs(domains): improve domain data docs
1 parent 1a37d5e commit bf8c5c1

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

docs/modules/domains.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const { data } = await mailchannels.domains.provision({
4141

4242
### Params
4343

44-
- `options` `DomainsProvisionOptions & DomainsData` <Badge type="danger" text="required" />: Provision options.
44+
- `options` `DomainsProvisionOptions & DomainsData` <Badge type="danger" text="required" />: The provision options and domain data.
4545
- `subscriptionHandle` `string` <Badge type="danger" text="required" />: The subscription `handle` that identifies the subscription that this domain should be provisioned against.
4646
> [!TIP]
4747
> Subscription handles can be retrieved from the [`subscriptions`](/modules/service#subscriptions) service method.
@@ -65,7 +65,7 @@ const { data } = await mailchannels.domains.provision({
6565

6666
### Response
6767

68-
- `data` `DomainsData | null` <Badge type="warning" text="nullable" />
68+
- `data` `DomainsData | null` <Badge type="warning" text="nullable" />: The provisioned domain data.
6969
- `domain` `string` <Badge text="guaranteed" />: The domain name.
7070
- `settings` `object` <Badge type="info" text="optional" />: The abuse policy settings for the domain. These settings determine how spam messages are handled.
7171
- `abusePolicy` `"block" | "flag" | "quarantine"` <Badge type="info" text="optional" />: The abuse policy.
@@ -119,13 +119,13 @@ const { results } = await mailchannels.domains.bulkProvision({
119119

120120
### Params
121121

122-
- `options` `DomainsBulkProvisionOptions` <Badge type="danger" text="required" />: Provision options.
122+
- `options` `DomainsBulkProvisionOptions` <Badge type="danger" text="required" />: The options to provision the domains.
123123
- `subscriptionHandle` `string` <Badge type="danger" text="required" />: The subscription `handle` that identifies the subscription that this domain should be provisioned against.
124124
> [!TIP]
125125
> Subscription handles can be retrieved from the [`subscriptions`](/modules/service#subscriptions) service method.
126126
- `associateKey` `boolean` <Badge type="info" text="optional" />: If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
127127
- `overwrite` `boolean` <Badge type="info" text="optional" />: If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.
128-
- `domains` `DomainsData[]` <Badge type="danger" text="required" />: A list of domains to provision.
128+
- `domains` `DomainsData[]` <Badge type="danger" text="required" />: A list of domain data to provision.
129129
- `domain` `string` <Badge type="danger" text="required" />: The domain name.
130130
- `settings` `object` <Badge type="info" text="optional" />: The abuse policy settings for the domain. These settings determine how spam messages are handled.
131131
- `abusePolicy` `"block" | "flag" | "quarantine"` <Badge type="info" text="optional" />: The abuse policy.
@@ -148,7 +148,7 @@ const { results } = await mailchannels.domains.bulkProvision({
148148
- `successes` `object[]` <Badge text="guaranteed" />: Domains that were successfully provisioned or updated.
149149
- `code` `number` <Badge text="guaranteed" />
150150
- `comment` `string` <Badge type="info" text="optional" />
151-
- `domain` `DomainsData` <Badge text="guaranteed" />: The domain name.
151+
- `domain` `DomainsData` <Badge text="guaranteed" />: The provisioned domain data.
152152
- `domain` `string` <Badge text="guaranteed" />: The domain name.
153153
- `settings` `object` <Badge type="info" text="optional" />: The abuse policy settings for the domain. These settings determine how spam messages are handled.
154154
- `abusePolicy` `"block" | "flag" | "quarantine"` <Badge type="info" text="optional" />: The abuse policy.
@@ -166,7 +166,7 @@ const { results } = await mailchannels.domains.bulkProvision({
166166
- `errors` `object[]` <Badge text="guaranteed" />: Domains that were not successfully provisioned.
167167
- `code` `number` <Badge text="guaranteed" />
168168
- `comment` `string` <Badge type="info" text="optional" />
169-
- `domain` `DomainsData` <Badge text="guaranteed" />: The domain name.
169+
- `domain` `DomainsData` <Badge text="guaranteed" />: The failed to provision domain data.
170170
- `domain` `string` <Badge text="guaranteed" />: The domain name.
171171
- `settings` `object` <Badge type="info" text="optional" />: The abuse policy settings for the domain. These settings determine how spam messages are handled.
172172
- `abusePolicy` `"block" | "flag" | "quarantine"` <Badge type="info" text="optional" />: The abuse policy.
@@ -219,7 +219,7 @@ const { domains } = await mailchannels.domains.list()
219219
220220
### Response
221221

222-
- `domains` `DomainsData[]` <Badge text="guaranteed" />: A list of domains.
222+
- `domains` `DomainsData[]` <Badge text="guaranteed" />: A list of domain data.
223223
- `domain` `string` <Badge text="guaranteed" />: The domain name.
224224
- `settings` `object` <Badge type="info" text="optional" />: The abuse policy settings for the domain. These settings determine how spam messages are handled.
225225
- `abusePolicy` `"block" | "flag" | "quarantine"` <Badge type="info" text="optional" />: The abuse policy.

src/modules/domains.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class Domains {
1515

1616
/**
1717
* Provision a single domain to use MailChannels Inbound.
18-
* @param options - The domain data to provision.
18+
* @param options - The provision options and domain data.
1919
* @example
2020
* ```ts
2121
* const mailchannels = new MailChannels('your-api-key')
@@ -52,7 +52,7 @@ export class Domains {
5252
/**
5353
* Provision up to 1000 domains to use MailChannels Inbound.
5454
* @param options - The options to provision the domains.
55-
* @param domains - The list of domains to provision.
55+
* @param domains - A list of domain data to provision.
5656
* @example
5757
* ```ts
5858
* const mailchannels = new MailChannels('your-api-key')

src/types/domains/provision.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export interface DomainsProvisionOptions {
7373
export type DomainsBulkProvisionOptions = DomainsProvisionOptions & Pick<DomainsData, "subscriptionHandle">;
7474

7575
export interface DomainsProvisionResponse {
76+
/**
77+
* The provisioned domain data.
78+
*/
7679
data: DomainsData | null;
7780
error: string | null;
7881
}
@@ -86,6 +89,9 @@ export interface DomainsBulkProvisionResponse {
8689
* Domains that were successfully provisioned or updated.
8790
*/
8891
successes: {
92+
/**
93+
* The provisioned domain data.
94+
*/
8995
domain: DomainsData;
9096
code: number;
9197
comment?: string;
@@ -94,6 +100,9 @@ export interface DomainsBulkProvisionResponse {
94100
* Domains that were not successfully provisioned.
95101
*/
96102
errors: {
103+
/**
104+
* The failed to provision domain data.
105+
*/
97106
domain: DomainsData;
98107
code: number;
99108
comment?: string;

0 commit comments

Comments
 (0)