Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 9, 2024
1 parent 182aa26 commit 46f3d96
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 43 deletions.
13 changes: 6 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,6 @@ Methods:
Types:

- <code><a href="./src/resources/custom-hostnames/custom-hostnames.ts">CustomHostname</a></code>
- <code><a href="./src/resources/custom-hostnames/custom-hostnames.ts">CustomMetadata</a></code>
- <code><a href="./src/resources/custom-hostnames/custom-hostnames.ts">UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1</a></code>
- <code><a href="./src/resources/custom-hostnames/custom-hostnames.ts">UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510</a></code>
- <code><a href="./src/resources/custom-hostnames/custom-hostnames.ts">UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1</a></code>
Expand Down Expand Up @@ -1449,16 +1448,16 @@ Methods:
Types:

- <code><a href="./src/resources/email-routing/rules/rules.ts">Action</a></code>
- <code><a href="./src/resources/email-routing/rules/rules.ts">EmailRule</a></code>
- <code><a href="./src/resources/email-routing/rules/rules.ts">EmailRoutingRule</a></code>
- <code><a href="./src/resources/email-routing/rules/rules.ts">Matcher</a></code>

Methods:

- <code title="post /zones/{zone_identifier}/email/routing/rules">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">create</a>(zoneIdentifier, { ...params }) -> EmailRule</code>
- <code title="put /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">update</a>(zoneIdentifier, ruleIdentifier, { ...params }) -> EmailRule</code>
- <code title="get /zones/{zone_identifier}/email/routing/rules">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">list</a>(zoneIdentifier, { ...params }) -> EmailRulesV4PagePaginationArray</code>
- <code title="delete /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">delete</a>(zoneIdentifier, ruleIdentifier) -> EmailRule</code>
- <code title="get /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">get</a>(zoneIdentifier, ruleIdentifier) -> EmailRule</code>
- <code title="post /zones/{zone_identifier}/email/routing/rules">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">create</a>(zoneIdentifier, { ...params }) -> EmailRoutingRule</code>
- <code title="put /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">update</a>(zoneIdentifier, ruleIdentifier, { ...params }) -> EmailRoutingRule</code>
- <code title="get /zones/{zone_identifier}/email/routing/rules">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">list</a>(zoneIdentifier, { ...params }) -> EmailRoutingRulesV4PagePaginationArray</code>
- <code title="delete /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">delete</a>(zoneIdentifier, ruleIdentifier) -> EmailRoutingRule</code>
- <code title="get /zones/{zone_identifier}/email/routing/rules/{rule_identifier}">client.emailRouting.rules.<a href="./src/resources/email-routing/rules/rules.ts">get</a>(zoneIdentifier, ruleIdentifier) -> EmailRoutingRule</code>

### CatchAlls

Expand Down
58 changes: 44 additions & 14 deletions src/resources/custom-hostnames/custom-hostnames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export interface CustomHostname {
/**
* These are per-hostname (customer) settings.
*/
custom_metadata?: CustomMetadata;
custom_metadata?: CustomHostname.CustomMetadata;

/**
* a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
Expand Down Expand Up @@ -176,6 +176,16 @@ export interface CustomHostname {
}

export namespace CustomHostname {
/**
* These are per-hostname (customer) settings.
*/
export interface CustomMetadata {
/**
* Unique metadata for this hostname.
*/
key?: string;
}

/**
* This is a record which can be placed to activate a hostname.
*/
Expand Down Expand Up @@ -411,16 +421,6 @@ export namespace CustomHostname {
}
}

/**
* These are per-hostname (customer) settings.
*/
export interface CustomMetadata {
/**
* Unique metadata for this hostname.
*/
key?: string;
}

/**
* A ubiquitous bundle has the highest probability of being verified everywhere,
* even by clients using outdated or unusual trust stores. An optimal bundle uses
Expand Down Expand Up @@ -464,7 +464,7 @@ export interface UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd {
/**
* These are per-hostname (customer) settings.
*/
custom_metadata?: CustomMetadata;
custom_metadata?: UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd.CustomMetadata;

/**
* a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME
Expand Down Expand Up @@ -717,6 +717,16 @@ export namespace UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd {
}
}

/**
* These are per-hostname (customer) settings.
*/
export interface CustomMetadata {
/**
* Unique metadata for this hostname.
*/
key?: string;
}

/**
* This is a record which can be placed to activate a hostname.
*/
Expand Down Expand Up @@ -781,7 +791,7 @@ export interface CustomHostnameCreateParams {
/**
* Body param: These are per-hostname (customer) settings.
*/
custom_metadata?: CustomMetadata;
custom_metadata?: CustomHostnameCreateParams.CustomMetadata;
}

export namespace CustomHostnameCreateParams {
Expand Down Expand Up @@ -866,6 +876,16 @@ export namespace CustomHostnameCreateParams {
tls_1_3?: 'on' | 'off';
}
}

/**
* These are per-hostname (customer) settings.
*/
export interface CustomMetadata {
/**
* Unique metadata for this hostname.
*/
key?: string;
}
}

export interface CustomHostnameListParams extends V4PagePaginationArrayParams {
Expand Down Expand Up @@ -924,7 +944,7 @@ export interface CustomHostnameEditParams {
/**
* Body param: These are per-hostname (customer) settings.
*/
custom_metadata?: CustomMetadata;
custom_metadata?: CustomHostnameEditParams.CustomMetadata;

/**
* Body param: a valid hostname that’s been added to your DNS zone as an A, AAAA,
Expand All @@ -948,6 +968,16 @@ export interface CustomHostnameEditParams {
}

export namespace CustomHostnameEditParams {
/**
* These are per-hostname (customer) settings.
*/
export interface CustomMetadata {
/**
* Unique metadata for this hostname.
*/
key?: string;
}

/**
* SSL properties used when creating the custom hostname.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/resources/email-routing/email-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ export namespace EmailRouting {
export import DNSGetResponse = DNSAPI.DNSGetResponse;
export import Rules = RulesAPI.Rules;
export import Action = RulesAPI.Action;
export import EmailRule = RulesAPI.EmailRule;
export import EmailRoutingRule = RulesAPI.EmailRoutingRule;
export import Matcher = RulesAPI.Matcher;
export import EmailRulesV4PagePaginationArray = RulesAPI.EmailRulesV4PagePaginationArray;
export import EmailRoutingRulesV4PagePaginationArray = RulesAPI.EmailRoutingRulesV4PagePaginationArray;
export import RuleCreateParams = RulesAPI.RuleCreateParams;
export import RuleUpdateParams = RulesAPI.RuleUpdateParams;
export import RuleListParams = RulesAPI.RuleListParams;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/email-routing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

export {
Action,
EmailRule,
EmailRoutingRule,
Matcher,
RuleCreateParams,
RuleUpdateParams,
RuleListParams,
EmailRulesV4PagePaginationArray,
EmailRoutingRulesV4PagePaginationArray,
Rules,
} from './rules/index';
export {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/email-routing/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

export {
Action,
EmailRule,
EmailRoutingRule,
Matcher,
RuleCreateParams,
RuleUpdateParams,
RuleListParams,
EmailRulesV4PagePaginationArray,
EmailRoutingRulesV4PagePaginationArray,
Rules,
} from './rules';
export {
Expand Down
32 changes: 16 additions & 16 deletions src/resources/email-routing/rules/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export class Rules extends APIResource {
zoneIdentifier: string,
body: RuleCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<EmailRule> {
): Core.APIPromise<EmailRoutingRule> {
return (
this._client.post(`/zones/${zoneIdentifier}/email/routing/rules`, {
body,
...options,
}) as Core.APIPromise<{ result: EmailRule }>
}) as Core.APIPromise<{ result: EmailRoutingRule }>
)._thenUnwrap((obj) => obj.result);
}

Expand All @@ -36,12 +36,12 @@ export class Rules extends APIResource {
ruleIdentifier: string,
body: RuleUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise<EmailRule> {
): Core.APIPromise<EmailRoutingRule> {
return (
this._client.put(`/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`, {
body,
...options,
}) as Core.APIPromise<{ result: EmailRule }>
}) as Core.APIPromise<{ result: EmailRoutingRule }>
)._thenUnwrap((obj) => obj.result);
}

Expand All @@ -52,22 +52,22 @@ export class Rules extends APIResource {
zoneIdentifier: string,
query?: RuleListParams,
options?: Core.RequestOptions,
): Core.PagePromise<EmailRulesV4PagePaginationArray, EmailRule>;
): Core.PagePromise<EmailRoutingRulesV4PagePaginationArray, EmailRoutingRule>;
list(
zoneIdentifier: string,
options?: Core.RequestOptions,
): Core.PagePromise<EmailRulesV4PagePaginationArray, EmailRule>;
): Core.PagePromise<EmailRoutingRulesV4PagePaginationArray, EmailRoutingRule>;
list(
zoneIdentifier: string,
query: RuleListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<EmailRulesV4PagePaginationArray, EmailRule> {
): Core.PagePromise<EmailRoutingRulesV4PagePaginationArray, EmailRoutingRule> {
if (isRequestOptions(query)) {
return this.list(zoneIdentifier, {}, query);
}
return this._client.getAPIList(
`/zones/${zoneIdentifier}/email/routing/rules`,
EmailRulesV4PagePaginationArray,
EmailRoutingRulesV4PagePaginationArray,
{ query, ...options },
);
}
Expand All @@ -79,12 +79,12 @@ export class Rules extends APIResource {
zoneIdentifier: string,
ruleIdentifier: string,
options?: Core.RequestOptions,
): Core.APIPromise<EmailRule> {
): Core.APIPromise<EmailRoutingRule> {
return (
this._client.delete(
`/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`,
options,
) as Core.APIPromise<{ result: EmailRule }>
) as Core.APIPromise<{ result: EmailRoutingRule }>
)._thenUnwrap((obj) => obj.result);
}

Expand All @@ -95,17 +95,17 @@ export class Rules extends APIResource {
zoneIdentifier: string,
ruleIdentifier: string,
options?: Core.RequestOptions,
): Core.APIPromise<EmailRule> {
): Core.APIPromise<EmailRoutingRule> {
return (
this._client.get(
`/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`,
options,
) as Core.APIPromise<{ result: EmailRule }>
) as Core.APIPromise<{ result: EmailRoutingRule }>
)._thenUnwrap((obj) => obj.result);
}
}

export class EmailRulesV4PagePaginationArray extends V4PagePaginationArray<EmailRule> {}
export class EmailRoutingRulesV4PagePaginationArray extends V4PagePaginationArray<EmailRoutingRule> {}

/**
* Actions pattern.
Expand All @@ -119,7 +119,7 @@ export interface Action {
value: Array<string>;
}

export interface EmailRule {
export interface EmailRoutingRule {
/**
* Routing rule identifier.
*/
Expand Down Expand Up @@ -239,9 +239,9 @@ export interface RuleListParams extends V4PagePaginationArrayParams {

export namespace Rules {
export import Action = RulesAPI.Action;
export import EmailRule = RulesAPI.EmailRule;
export import EmailRoutingRule = RulesAPI.EmailRoutingRule;
export import Matcher = RulesAPI.Matcher;
export import EmailRulesV4PagePaginationArray = RulesAPI.EmailRulesV4PagePaginationArray;
export import EmailRoutingRulesV4PagePaginationArray = RulesAPI.EmailRoutingRulesV4PagePaginationArray;
export import RuleCreateParams = RulesAPI.RuleCreateParams;
export import RuleUpdateParams = RulesAPI.RuleUpdateParams;
export import RuleListParams = RulesAPI.RuleListParams;
Expand Down

0 comments on commit 46f3d96

Please sign in to comment.