Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 28, 2024
1 parent 846a96c commit d0bb567
Show file tree
Hide file tree
Showing 259 changed files with 2,589 additions and 2,541 deletions.
852 changes: 426 additions & 426 deletions api.md

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class Cloudflare extends Core.APIClient {
customHostnames: API.CustomHostnames = new API.CustomHostnames(this);
customNameservers: API.CustomNameservers = new API.CustomNameservers(this);
dns: API.DNS = new API.DNS(this);
dnssec: API.DNSSEC = new API.DNSSEC(this);
dnssec: API.DNSSECResource = new API.DNSSECResource(this);
emailRouting: API.EmailRouting = new API.EmailRouting(this);
filters: API.Filters = new API.Filters(this);
firewall: API.Firewall = new API.Firewall(this);
Expand Down Expand Up @@ -468,39 +468,39 @@ export namespace Cloudflare {
export import Argo = API.Argo;

export import Plans = API.Plans;
export import BillSubsAPIAvailableRatePlan = API.BillSubsAPIAvailableRatePlan;
export import AvailableRatePlan = API.AvailableRatePlan;
export import PlanListResponse = API.PlanListResponse;

export import RatePlans = API.RatePlans;
export import BillSubsRatePlan = API.BillSubsRatePlan;
export import RatePlan = API.RatePlan;
export import RatePlanGetResponse = API.RatePlanGetResponse;

export import CertificateAuthorities = API.CertificateAuthorities;

export import ClientCertificates = API.ClientCertificates;
export import TLSCertificatesAndHostnamesClientCertificate = API.TLSCertificatesAndHostnamesClientCertificate;
export import TLSCertificatesAndHostnamesClientCertificatesV4PagePaginationArray = API.TLSCertificatesAndHostnamesClientCertificatesV4PagePaginationArray;
export import ClientCertificate = API.ClientCertificate;
export import ClientCertificatesV4PagePaginationArray = API.ClientCertificatesV4PagePaginationArray;
export import ClientCertificateCreateParams = API.ClientCertificateCreateParams;
export import ClientCertificateListParams = API.ClientCertificateListParams;
export import ClientCertificateDeleteParams = API.ClientCertificateDeleteParams;
export import ClientCertificateEditParams = API.ClientCertificateEditParams;
export import ClientCertificateGetParams = API.ClientCertificateGetParams;

export import CustomCertificates = API.CustomCertificates;
export import TLSCertificatesAndHostnamesCustomCertificate = API.TLSCertificatesAndHostnamesCustomCertificate;
export import CustomCertificate = API.CustomCertificate;
export import CustomCertificateCreateResponse = API.CustomCertificateCreateResponse;
export import CustomCertificateDeleteResponse = API.CustomCertificateDeleteResponse;
export import CustomCertificateEditResponse = API.CustomCertificateEditResponse;
export import CustomCertificateGetResponse = API.CustomCertificateGetResponse;
export import TLSCertificatesAndHostnamesCustomCertificatesV4PagePaginationArray = API.TLSCertificatesAndHostnamesCustomCertificatesV4PagePaginationArray;
export import CustomCertificatesV4PagePaginationArray = API.CustomCertificatesV4PagePaginationArray;
export import CustomCertificateCreateParams = API.CustomCertificateCreateParams;
export import CustomCertificateListParams = API.CustomCertificateListParams;
export import CustomCertificateDeleteParams = API.CustomCertificateDeleteParams;
export import CustomCertificateEditParams = API.CustomCertificateEditParams;
export import CustomCertificateGetParams = API.CustomCertificateGetParams;

export import CustomHostnames = API.CustomHostnames;
export import TLSCertificatesAndHostnamesCustomHostname = API.TLSCertificatesAndHostnamesCustomHostname;
export import CustomHostname = API.CustomHostname;
export import CustomHostnameCreateResponse = API.CustomHostnameCreateResponse;
export import CustomHostnameListResponse = API.CustomHostnameListResponse;
export import CustomHostnameDeleteResponse = API.CustomHostnameDeleteResponse;
Expand All @@ -514,7 +514,7 @@ export namespace Cloudflare {
export import CustomHostnameGetParams = API.CustomHostnameGetParams;

export import CustomNameservers = API.CustomNameservers;
export import DNSCustomNameserversCustomNS = API.DNSCustomNameserversCustomNS;
export import CustomNameserver = API.CustomNameserver;
export import CustomNameserverDeleteResponse = API.CustomNameserverDeleteResponse;
export import CustomNameserverAvailabiltyResponse = API.CustomNameserverAvailabiltyResponse;
export import CustomNameserverGetResponse = API.CustomNameserverGetResponse;
Expand All @@ -527,8 +527,8 @@ export namespace Cloudflare {

export import DNS = API.DNS;

export import DNSSECResource = API.DNSSECResource;
export import DNSSEC = API.DNSSEC;
export import DNSSECDNSSEC = API.DNSSECDNSSEC;
export import DNSSECDeleteResponse = API.DNSSECDeleteResponse;
export import DNSSECDeleteParams = API.DNSSECDeleteParams;
export import DNSSECEditParams = API.DNSSECEditParams;
Expand All @@ -541,17 +541,17 @@ export namespace Cloudflare {
export import EmailRoutingGetResponse = API.EmailRoutingGetResponse;

export import Filters = API.Filters;
export import LegacyJhsFilter = API.LegacyJhsFilter;
export import FirewallFilter = API.FirewallFilter;
export import FilterCreateResponse = API.FilterCreateResponse;
export import LegacyJhsFiltersV4PagePaginationArray = API.LegacyJhsFiltersV4PagePaginationArray;
export import FirewallFiltersV4PagePaginationArray = API.FirewallFiltersV4PagePaginationArray;
export import FilterCreateParams = API.FilterCreateParams;
export import FilterUpdateParams = API.FilterUpdateParams;
export import FilterListParams = API.FilterListParams;

export import Firewall = API.Firewall;

export import Healthchecks = API.Healthchecks;
export import HealthchecksHealthchecks = API.HealthchecksHealthchecks;
export import Healthcheck = API.Healthcheck;
export import HealthcheckListResponse = API.HealthcheckListResponse;
export import HealthcheckDeleteResponse = API.HealthcheckDeleteResponse;
export import HealthcheckCreateParams = API.HealthcheckCreateParams;
Expand All @@ -562,8 +562,8 @@ export namespace Cloudflare {
export import HealthcheckGetParams = API.HealthcheckGetParams;

export import KeylessCertificates = API.KeylessCertificates;
export import TLSCertificatesAndHostnamesBase = API.TLSCertificatesAndHostnamesBase;
export import TLSCertificatesAndHostnamesKeylessCertificate = API.TLSCertificatesAndHostnamesKeylessCertificate;
export import KeylessCertificate = API.KeylessCertificate;
export import KeylessCertificateHostname = API.KeylessCertificateHostname;
export import KeylessCertificateListResponse = API.KeylessCertificateListResponse;
export import KeylessCertificateDeleteResponse = API.KeylessCertificateDeleteResponse;
export import KeylessCertificateCreateParams = API.KeylessCertificateCreateParams;
Expand All @@ -577,7 +577,7 @@ export namespace Cloudflare {
export import Logs = API.Logs;

export import OriginTLSClientAuth = API.OriginTLSClientAuth;
export import TLSCertificatesAndHostnamesZoneAuthenticatedOriginPull = API.TLSCertificatesAndHostnamesZoneAuthenticatedOriginPull;
export import OriginTLSClientCertificateZoneAuthenticatedOriginPull = API.OriginTLSClientCertificateZoneAuthenticatedOriginPull;
export import OriginTLSClientAuthCreateResponse = API.OriginTLSClientAuthCreateResponse;
export import OriginTLSClientAuthListResponse = API.OriginTLSClientAuthListResponse;
export import OriginTLSClientAuthDeleteResponse = API.OriginTLSClientAuthDeleteResponse;
Expand All @@ -588,7 +588,7 @@ export namespace Cloudflare {
export import OriginTLSClientAuthGetParams = API.OriginTLSClientAuthGetParams;

export import Pagerules = API.Pagerules;
export import ZonesPageRule = API.ZonesPageRule;
export import ZonesPagerule = API.ZonesPagerule;
export import PageruleCreateResponse = API.PageruleCreateResponse;
export import PageruleUpdateResponse = API.PageruleUpdateResponse;
export import PageruleListResponse = API.PageruleListResponse;
Expand All @@ -603,7 +603,7 @@ export namespace Cloudflare {
export import PageruleGetParams = API.PageruleGetParams;

export import RateLimits = API.RateLimits;
export import LegacyJhsRateLimits = API.LegacyJhsRateLimits;
export import RateLimit = API.RateLimit;
export import RateLimitCreateResponse = API.RateLimitCreateResponse;
export import RateLimitListResponse = API.RateLimitListResponse;
export import RateLimitDeleteResponse = API.RateLimitDeleteResponse;
Expand All @@ -617,7 +617,7 @@ export namespace Cloudflare {
export import SecondaryDNS = API.SecondaryDNS;

export import WaitingRooms = API.WaitingRooms;
export import WaitingroomWaitingroom = API.WaitingroomWaitingroom;
export import WaitingRoom = API.WaitingRoom;
export import WaitingRoomListResponse = API.WaitingRoomListResponse;
export import WaitingRoomDeleteResponse = API.WaitingRoomDeleteResponse;
export import WaitingRoomCreateParams = API.WaitingRoomCreateParams;
Expand All @@ -633,9 +633,9 @@ export namespace Cloudflare {
export import DurableObjects = API.DurableObjects;

export import Queues = API.Queues;
export import WorkersQueue = API.WorkersQueue;
export import WorkersQueueCreated = API.WorkersQueueCreated;
export import WorkersQueueUpdated = API.WorkersQueueUpdated;
export import Queue = API.Queue;
export import QueueCreated = API.QueueCreated;
export import QueueUpdated = API.QueueUpdated;
export import QueueCreateResponse = API.QueueCreateResponse;
export import QueueUpdateResponse = API.QueueUpdateResponse;
export import QueueListResponse = API.QueueListResponse;
Expand All @@ -654,8 +654,8 @@ export namespace Cloudflare {
export import ManagedHeaderEditParams = API.ManagedHeaderEditParams;

export import PageShield = API.PageShield;
export import PageShieldGetZoneSettings = API.PageShieldGetZoneSettings;
export import PageShieldUpdateZoneSettings = API.PageShieldUpdateZoneSettings;
export import PageShieldSetting = API.PageShieldSetting;
export import PageShieldUpdateResponse = API.PageShieldUpdateResponse;
export import PageShieldUpdateParams = API.PageShieldUpdateParams;
export import PageShieldGetParams = API.PageShieldGetParams;

Expand Down Expand Up @@ -702,8 +702,8 @@ export namespace Cloudflare {
export import MagicNetworkMonitoring = API.MagicNetworkMonitoring;

export import MTLSCertificates = API.MTLSCertificates;
export import TLSCertificatesAndHostnamesCertificateObjectPost = API.TLSCertificatesAndHostnamesCertificateObjectPost;
export import TLSCertificatesAndHostnamesComponentsSchemasCertificateObject = API.TLSCertificatesAndHostnamesComponentsSchemasCertificateObject;
export import MTLSCertificate = API.MTLSCertificate;
export import MTLSCertificateUpdate = API.MTLSCertificateUpdate;
export import MTLSCertificateListResponse = API.MTLSCertificateListResponse;
export import MTLSCertificateCreateParams = API.MTLSCertificateCreateParams;
export import MTLSCertificateListParams = API.MTLSCertificateListParams;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/accounts/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export namespace Accounts {
export import MemberDeleteParams = MembersAPI.MemberDeleteParams;
export import MemberGetParams = MembersAPI.MemberGetParams;
export import Roles = RolesAPI.Roles;
export import IamSchemasRole = RolesAPI.IamSchemasRole;
export import Role = RolesAPI.Role;
export import RoleListResponse = RolesAPI.RoleListResponse;
export import RoleGetResponse = RolesAPI.RoleGetResponse;
export import RoleListParams = RolesAPI.RoleListParams;
Expand Down
9 changes: 1 addition & 8 deletions src/resources/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,4 @@ export {
MemberListResponsesV4PagePaginationArray,
Members,
} from './members';
export {
IamSchemasRole,
RoleListResponse,
RoleGetResponse,
RoleListParams,
RoleGetParams,
Roles,
} from './roles';
export { Role, RoleListResponse, RoleGetResponse, RoleListParams, RoleGetParams, Roles } from './roles';
2 changes: 1 addition & 1 deletion src/resources/accounts/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export interface MemberListResponse {
/**
* Roles assigned to this Member.
*/
roles: Array<RolesAPI.IamSchemasRole>;
roles: Array<RolesAPI.Role>;

/**
* A member's status in the organization.
Expand Down
6 changes: 3 additions & 3 deletions src/resources/accounts/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Roles extends APIResource {
}
}

export interface IamSchemasRole {
export interface Role {
/**
* Role identifier tag.
*/
Expand All @@ -56,7 +56,7 @@ export interface IamSchemasRole {
permissions: Array<string>;
}

export type RoleListResponse = Array<IamSchemasRole>;
export type RoleListResponse = Array<Role>;

export type RoleGetResponse = unknown | string | null;

Expand All @@ -69,7 +69,7 @@ export interface RoleGetParams {
}

export namespace Roles {
export import IamSchemasRole = RolesAPI.IamSchemasRole;
export import Role = RolesAPI.Role;
export import RoleListResponse = RolesAPI.RoleListResponse;
export import RoleGetResponse = RolesAPI.RoleGetResponse;
export import RoleListParams = RolesAPI.RoleListParams;
Expand Down
6 changes: 3 additions & 3 deletions src/resources/alerting/alerting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export namespace Alerting {
export import AvailableAlertListParams = AvailableAlertsAPI.AvailableAlertListParams;
export import Destinations = DestinationsAPI.Destinations;
export import History = HistoryAPI.History;
export import AaaHistory = HistoryAPI.AaaHistory;
export import AaaHistoriesV4PagePaginationArray = HistoryAPI.AaaHistoriesV4PagePaginationArray;
export import AlertingHistory = HistoryAPI.AlertingHistory;
export import AlertingHistoriesV4PagePaginationArray = HistoryAPI.AlertingHistoriesV4PagePaginationArray;
export import HistoryListParams = HistoryAPI.HistoryListParams;
export import Policies = PoliciesAPI.Policies;
export import AaaPolicies = PoliciesAPI.AaaPolicies;
export import AlertingPolicies = PoliciesAPI.AlertingPolicies;
export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse;
export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse;
export import PolicyListResponse = PoliciesAPI.PolicyListResponse;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/alerting/destinations/destinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export namespace Destinations {
export import EligibleGetResponse = EligibleAPI.EligibleGetResponse;
export import EligibleGetParams = EligibleAPI.EligibleGetParams;
export import Pagerduty = PagerdutyAPI.Pagerduty;
export import AaaPagerduty = PagerdutyAPI.AaaPagerduty;
export import AlertingPagerduty = PagerdutyAPI.AlertingPagerduty;
export import PagerdutyCreateResponse = PagerdutyAPI.PagerdutyCreateResponse;
export import PagerdutyDeleteResponse = PagerdutyAPI.PagerdutyDeleteResponse;
export import PagerdutyGetResponse = PagerdutyAPI.PagerdutyGetResponse;
Expand All @@ -26,7 +26,7 @@ export namespace Destinations {
export import PagerdutyGetParams = PagerdutyAPI.PagerdutyGetParams;
export import PagerdutyLinkParams = PagerdutyAPI.PagerdutyLinkParams;
export import Webhooks = WebhooksAPI.Webhooks;
export import AaaWebhooks = WebhooksAPI.AaaWebhooks;
export import AlertingWebhooks = WebhooksAPI.AlertingWebhooks;
export import WebhookCreateResponse = WebhooksAPI.WebhookCreateResponse;
export import WebhookUpdateResponse = WebhooksAPI.WebhookUpdateResponse;
export import WebhookListResponse = WebhooksAPI.WebhookListResponse;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/alerting/destinations/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
AaaPagerduty,
AlertingPagerduty,
PagerdutyCreateResponse,
PagerdutyDeleteResponse,
PagerdutyGetResponse,
Expand All @@ -13,7 +13,7 @@ export {
Pagerduty,
} from './pagerduty';
export {
AaaWebhooks,
AlertingWebhooks,
WebhookCreateResponse,
WebhookUpdateResponse,
WebhookListResponse,
Expand Down
6 changes: 3 additions & 3 deletions src/resources/alerting/destinations/pagerduty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class Pagerduty extends APIResource {
}
}

export interface AaaPagerduty {
export interface AlertingPagerduty {
/**
* UUID
*/
Expand All @@ -92,7 +92,7 @@ export interface PagerdutyCreateResponse {

export type PagerdutyDeleteResponse = unknown | Array<unknown> | string;

export type PagerdutyGetResponse = Array<AaaPagerduty>;
export type PagerdutyGetResponse = Array<AlertingPagerduty>;

export interface PagerdutyLinkResponse {
/**
Expand Down Expand Up @@ -130,7 +130,7 @@ export interface PagerdutyLinkParams {
}

export namespace Pagerduty {
export import AaaPagerduty = PagerdutyAPI.AaaPagerduty;
export import AlertingPagerduty = PagerdutyAPI.AlertingPagerduty;
export import PagerdutyCreateResponse = PagerdutyAPI.PagerdutyCreateResponse;
export import PagerdutyDeleteResponse = PagerdutyAPI.PagerdutyDeleteResponse;
export import PagerdutyGetResponse = PagerdutyAPI.PagerdutyGetResponse;
Expand Down
10 changes: 5 additions & 5 deletions src/resources/alerting/destinations/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ export class Webhooks extends APIResource {
webhookId: string,
params: WebhookGetParams,
options?: Core.RequestOptions,
): Core.APIPromise<AaaWebhooks> {
): Core.APIPromise<AlertingWebhooks> {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/alerting/v3/destinations/webhooks/${webhookId}`,
options,
) as Core.APIPromise<{ result: AaaWebhooks }>
) as Core.APIPromise<{ result: AlertingWebhooks }>
)._thenUnwrap((obj) => obj.result);
}
}

export interface AaaWebhooks {
export interface AlertingWebhooks {
/**
* The unique identifier of a webhook
*/
Expand Down Expand Up @@ -147,7 +147,7 @@ export interface WebhookUpdateResponse {
id?: string;
}

export type WebhookListResponse = Array<AaaWebhooks>;
export type WebhookListResponse = Array<AlertingWebhooks>;

export type WebhookDeleteResponse = unknown | Array<unknown> | string;

Expand Down Expand Up @@ -223,7 +223,7 @@ export interface WebhookGetParams {
}

export namespace Webhooks {
export import AaaWebhooks = WebhooksAPI.AaaWebhooks;
export import AlertingWebhooks = WebhooksAPI.AlertingWebhooks;
export import WebhookCreateResponse = WebhooksAPI.WebhookCreateResponse;
export import WebhookUpdateResponse = WebhooksAPI.WebhookUpdateResponse;
export import WebhookListResponse = WebhooksAPI.WebhookListResponse;
Expand Down
12 changes: 6 additions & 6 deletions src/resources/alerting/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ export class History extends APIResource {
list(
params: HistoryListParams,
options?: Core.RequestOptions,
): Core.PagePromise<AaaHistoriesV4PagePaginationArray, AaaHistory> {
): Core.PagePromise<AlertingHistoriesV4PagePaginationArray, AlertingHistory> {
const { account_id, ...query } = params;
return this._client.getAPIList(
`/accounts/${account_id}/alerting/v3/history`,
AaaHistoriesV4PagePaginationArray,
AlertingHistoriesV4PagePaginationArray,
{ query, ...options },
);
}
}

export class AaaHistoriesV4PagePaginationArray extends V4PagePaginationArray<AaaHistory> {}
export class AlertingHistoriesV4PagePaginationArray extends V4PagePaginationArray<AlertingHistory> {}

export interface AaaHistory {
export interface AlertingHistory {
/**
* UUID
*/
Expand Down Expand Up @@ -94,7 +94,7 @@ export interface HistoryListParams extends V4PagePaginationArrayParams {
}

export namespace History {
export import AaaHistory = HistoryAPI.AaaHistory;
export import AaaHistoriesV4PagePaginationArray = HistoryAPI.AaaHistoriesV4PagePaginationArray;
export import AlertingHistory = HistoryAPI.AlertingHistory;
export import AlertingHistoriesV4PagePaginationArray = HistoryAPI.AlertingHistoriesV4PagePaginationArray;
export import HistoryListParams = HistoryAPI.HistoryListParams;
}
Loading

0 comments on commit d0bb567

Please sign in to comment.