Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update via SDK Studio #132

Merged
merged 1 commit into from
Mar 11, 2024
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
26 changes: 5 additions & 21 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1517,22 +1517,16 @@ Methods:
Types:

- <code><a href="./src/resources/email-routing/routing/routing.ts">EmailSettings</a></code>
- <code><a href="./src/resources/email-routing/routing/routing.ts">RoutingDisableResponse</a></code>
- <code><a href="./src/resources/email-routing/routing/routing.ts">RoutingEnableResponse</a></code>
- <code><a href="./src/resources/email-routing/routing/routing.ts">RoutingGetResponse</a></code>

Methods:

- <code title="post /zones/{zone_identifier}/email/routing/disable">client.emailRouting.routing.<a href="./src/resources/email-routing/routing/routing.ts">disable</a>(zoneIdentifier) -> RoutingDisableResponse</code>
- <code title="post /zones/{zone_identifier}/email/routing/enable">client.emailRouting.routing.<a href="./src/resources/email-routing/routing/routing.ts">enable</a>(zoneIdentifier) -> RoutingEnableResponse</code>
- <code title="get /zones/{zone_identifier}/email/routing">client.emailRouting.routing.<a href="./src/resources/email-routing/routing/routing.ts">get</a>(zoneIdentifier) -> RoutingGetResponse</code>

### Disables

Types:

- <code><a href="./src/resources/email-routing/routing/disables.ts">DisableCreateResponse</a></code>

Methods:

- <code title="post /zones/{zone_identifier}/email/routing/disable">client.emailRouting.routing.disables.<a href="./src/resources/email-routing/routing/disables.ts">create</a>(zoneIdentifier) -> DisableCreateResponse</code>

### DNS

Types:
Expand All @@ -1544,16 +1538,6 @@ Methods:

- <code title="get /zones/{zone_identifier}/email/routing/dns">client.emailRouting.routing.dns.<a href="./src/resources/email-routing/routing/dns.ts">get</a>(zoneIdentifier) -> DNSGetResponse | null</code>

### Enables

Types:

- <code><a href="./src/resources/email-routing/routing/enables.ts">EnableCreateResponse</a></code>

Methods:

- <code title="post /zones/{zone_identifier}/email/routing/enable">client.emailRouting.routing.enables.<a href="./src/resources/email-routing/routing/enables.ts">create</a>(zoneIdentifier) -> EnableCreateResponse</code>

### Rules

Types:
Expand Down Expand Up @@ -2641,7 +2625,7 @@ Types:
Methods:

- <code title="put /zones/{zone_id}/page_shield">client.pageShield.<a href="./src/resources/page-shield/page-shield.ts">update</a>({ ...params }) -> PageShieldUpdateZoneSettings</code>
- <code title="get /zones/{zone_id}/page_shield">client.pageShield.<a href="./src/resources/page-shield/page-shield.ts">list</a>({ ...params }) -> PageShieldGetZoneSettings</code>
- <code title="get /zones/{zone_id}/page_shield">client.pageShield.<a href="./src/resources/page-shield/page-shield.ts">get</a>({ ...params }) -> PageShieldGetZoneSettings</code>

## Policies

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ export namespace Cloudflare {
export import PageShieldGetZoneSettings = API.PageShieldGetZoneSettings;
export import PageShieldUpdateZoneSettings = API.PageShieldUpdateZoneSettings;
export import PageShieldUpdateParams = API.PageShieldUpdateParams;
export import PageShieldListParams = API.PageShieldListParams;
export import PageShieldGetParams = API.PageShieldGetParams;

export import Rulesets = API.Rulesets;
export import RulesetsRulesetResponse = API.RulesetsRulesetResponse;
Expand Down
2 changes: 2 additions & 0 deletions src/resources/email-routing/email-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ export class EmailRouting extends APIResource {
export namespace EmailRouting {
export import Routing = RoutingAPI.Routing;
export import EmailSettings = RoutingAPI.EmailSettings;
export import RoutingDisableResponse = RoutingAPI.RoutingDisableResponse;
export import RoutingEnableResponse = RoutingAPI.RoutingEnableResponse;
export import RoutingGetResponse = RoutingAPI.RoutingGetResponse;
}
8 changes: 7 additions & 1 deletion src/resources/email-routing/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// File generated from our OpenAPI spec by Stainless.

export { EmailRouting } from './email-routing';
export { EmailSettings, RoutingGetResponse, Routing } from './routing/index';
export {
EmailSettings,
RoutingDisableResponse,
RoutingEnableResponse,
RoutingGetResponse,
Routing,
} from './routing/index';
66 changes: 0 additions & 66 deletions src/resources/email-routing/routing/disables.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/resources/email-routing/routing/enables.ts

This file was deleted.

10 changes: 7 additions & 3 deletions src/resources/email-routing/routing/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// File generated from our OpenAPI spec by Stainless.

export { DisableCreateResponse, Disables } from './disables';
export {
EmailAddresses,
AddressCreateResponse,
Expand All @@ -26,5 +25,10 @@ export {
RuleListResponsesV4PagePaginationArray,
Rules,
} from './rules/index';
export { EmailSettings, RoutingGetResponse, Routing } from './routing';
export { EnableCreateResponse, Enables } from './enables';
export {
EmailSettings,
RoutingDisableResponse,
RoutingEnableResponse,
RoutingGetResponse,
Routing,
} from './routing';
119 changes: 111 additions & 8 deletions src/resources/email-routing/routing/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,37 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as RoutingAPI from 'cloudflare/resources/email-routing/routing/routing';
import * as AddressesAPI from 'cloudflare/resources/email-routing/routing/addresses';
import * as DisablesAPI from 'cloudflare/resources/email-routing/routing/disables';
import * as DNSAPI from 'cloudflare/resources/email-routing/routing/dns';
import * as EnablesAPI from 'cloudflare/resources/email-routing/routing/enables';
import * as RulesAPI from 'cloudflare/resources/email-routing/routing/rules/rules';

export class Routing extends APIResource {
disables: DisablesAPI.Disables = new DisablesAPI.Disables(this._client);
dns: DNSAPI.DNS = new DNSAPI.DNS(this._client);
enables: EnablesAPI.Enables = new EnablesAPI.Enables(this._client);
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
addresses: AddressesAPI.Addresses = new AddressesAPI.Addresses(this._client);

/**
* Disable your Email Routing zone. Also removes additional MX records previously
* required for Email Routing to work.
*/
disable(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<RoutingDisableResponse> {
return (
this._client.post(`/zones/${zoneIdentifier}/email/routing/disable`, options) as Core.APIPromise<{
result: RoutingDisableResponse;
}>
)._thenUnwrap((obj) => obj.result);
}

/**
* Enable you Email Routing zone. Add and lock the necessary MX and SPF records.
*/
enable(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<RoutingEnableResponse> {
return (
this._client.post(`/zones/${zoneIdentifier}/email/routing/enable`, options) as Core.APIPromise<{
result: RoutingEnableResponse;
}>
)._thenUnwrap((obj) => obj.result);
}

/**
* Get information about the settings for your Email Routing zone.
*/
Expand Down Expand Up @@ -71,6 +90,92 @@ export interface EmailSettings {
tag?: string;
}

export interface RoutingDisableResponse {
/**
* Email Routing settings identifier.
*/
id?: string;

/**
* The date and time the settings have been created.
*/
created?: string;

/**
* State of the zone settings for Email Routing.
*/
enabled?: true | false;

/**
* The date and time the settings have been modified.
*/
modified?: string;

/**
* Domain of your zone.
*/
name?: string;

/**
* Flag to check if the user skipped the configuration wizard.
*/
skip_wizard?: true | false;

/**
* Show the state of your account, and the type or configuration error.
*/
status?: 'ready' | 'unconfigured' | 'misconfigured' | 'misconfigured/locked' | 'unlocked';

/**
* @deprecated: Email Routing settings tag. (Deprecated, replaced by Email Routing
* settings identifier)
*/
tag?: string;
}

export interface RoutingEnableResponse {
/**
* Email Routing settings identifier.
*/
id?: string;

/**
* The date and time the settings have been created.
*/
created?: string;

/**
* State of the zone settings for Email Routing.
*/
enabled?: true | false;

/**
* The date and time the settings have been modified.
*/
modified?: string;

/**
* Domain of your zone.
*/
name?: string;

/**
* Flag to check if the user skipped the configuration wizard.
*/
skip_wizard?: true | false;

/**
* Show the state of your account, and the type or configuration error.
*/
status?: 'ready' | 'unconfigured' | 'misconfigured' | 'misconfigured/locked' | 'unlocked';

/**
* @deprecated: Email Routing settings tag. (Deprecated, replaced by Email Routing
* settings identifier)
*/
tag?: string;
}

export interface RoutingGetResponse {
/**
* Email Routing settings identifier.
Expand Down Expand Up @@ -116,14 +221,12 @@ export interface RoutingGetResponse {

export namespace Routing {
export import EmailSettings = RoutingAPI.EmailSettings;
export import RoutingDisableResponse = RoutingAPI.RoutingDisableResponse;
export import RoutingEnableResponse = RoutingAPI.RoutingEnableResponse;
export import RoutingGetResponse = RoutingAPI.RoutingGetResponse;
export import Disables = DisablesAPI.Disables;
export import DisableCreateResponse = DisablesAPI.DisableCreateResponse;
export import DNS = DNSAPI.DNS;
export import EmailDNSRecord = DNSAPI.EmailDNSRecord;
export import DNSGetResponse = DNSAPI.DNSGetResponse;
export import Enables = EnablesAPI.Enables;
export import EnableCreateResponse = EnablesAPI.EnableCreateResponse;
export import Rules = RulesAPI.Rules;
export import EmailRules = RulesAPI.EmailRules;
export import RuleCreateResponse = RulesAPI.RuleCreateResponse;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export {
PageShieldGetZoneSettings,
PageShieldUpdateZoneSettings,
PageShieldUpdateParams,
PageShieldListParams,
PageShieldGetParams,
PageShield,
} from './page-shield/page-shield';
export { Pages } from './pages/pages';
Expand Down
Loading