Skip to content
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
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1336
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ffc1bb60a27e3b339b4d7ab2698041e08185e4b4eb2a9c1238156594bf6c2bcb.yml
configured_endpoints: 1320
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9444873299c32d0d292a92b00c4f6f9571f2ccad0948f30e0dd3c7c82a275959.yml
273 changes: 108 additions & 165 deletions api.md

Large diffs are not rendered by default.

32 changes: 20 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import * as API from './resources/index';

export interface ClientOptions {
/**
* The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
* Defaults to process.env['CLOUDFLARE_API_TOKEN'].
*/
apiToken?: string | null | undefined;

/**
* The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
* Defaults to process.env['CLOUDFLARE_API_KEY'].
*/
apiKey?: string | null | undefined;

/**
* The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
* Defaults to process.env['CLOUDFLARE_EMAIL'].
*/
apiEmail?: string | null | undefined;

/**
* Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys).
* Defaults to process.env['CLOUDFLARE_API_USER_SERVICE_KEY'].
*/
userServiceKey?: string | null | undefined;

Expand Down Expand Up @@ -156,6 +156,8 @@ export class Cloudflare extends Core.APIClient {
ssl: API.SSL = new API.SSL(this);
acm: API.ACM = new API.ACM(this);
argo: API.Argo = new API.Argo(this);
plans: API.Plans = new API.Plans(this);
ratePlans: API.RatePlans = new API.RatePlans(this);
certificateAuthorities: API.CertificateAuthorities = new API.CertificateAuthorities(this);
clientCertificates: API.ClientCertificates = new API.ClientCertificates(this);
customCertificates: API.CustomCertificates = new API.CustomCertificates(this);
Expand All @@ -182,7 +184,7 @@ export class Cloudflare extends Core.APIClient {
durableObjects: API.DurableObjects = new API.DurableObjects(this);
queues: API.Queues = new API.Queues(this);
apiGateway: API.APIGateway = new API.APIGateway(this);
managedTransforms: API.ManagedTransforms = new API.ManagedTransforms(this);
managedHeaders: API.ManagedHeaders = new API.ManagedHeaders(this);
pageShield: API.PageShield = new API.PageShield(this);
rulesets: API.Rulesets = new API.Rulesets(this);
urlNormalization: API.URLNormalization = new API.URLNormalization(this);
Expand All @@ -198,6 +200,7 @@ export class Cloudflare extends Core.APIClient {
magicNetworkMonitoring: API.MagicNetworkMonitoring = new API.MagicNetworkMonitoring(this);
mtlsCertificates: API.MTLSCertificates = new API.MTLSCertificates(this);
pages: API.Pages = new API.Pages(this);
pcaps: API.PCAPs = new API.PCAPs(this);
registrar: API.Registrar = new API.Registrar(this);
requestTracers: API.RequestTracers = new API.RequestTracers(this);
rules: API.Rules = new API.Rules(this);
Expand All @@ -209,7 +212,7 @@ export class Cloudflare extends Core.APIClient {
warpConnector: API.WARPConnector = new API.WARPConnector(this);
workersForPlatforms: API.WorkersForPlatforms = new API.WorkersForPlatforms(this);
zeroTrust: API.ZeroTrust = new API.ZeroTrust(this);
turnstile: API.Turnstile = new API.Turnstile(this);
challenges: API.Challenges = new API.Challenges(this);
hyperdrive: API.HyperdriveResource = new API.HyperdriveResource(this);
rum: API.RUM = new API.RUM(this);
vectorize: API.Vectorize = new API.Vectorize(this);
Expand All @@ -223,6 +226,7 @@ export class Cloudflare extends Core.APIClient {
snippets: API.Snippets = new API.Snippets(this);
calls: API.Calls = new API.Calls(this);
cloudforceOne: API.CloudforceOne = new API.CloudforceOne(this);
eventNotifications: API.EventNotifications = new API.EventNotifications(this);
aiGateway: API.AIGateway = new API.AIGateway(this);
iam: API.IAM = new API.IAM(this);
cloudConnector: API.CloudConnector = new API.CloudConnector(this);
Expand Down Expand Up @@ -416,6 +420,10 @@ export namespace Cloudflare {

export import Argo = API.Argo;

export import Plans = API.Plans;

export import RatePlans = API.RatePlans;

export import CertificateAuthorities = API.CertificateAuthorities;

export import ClientCertificates = API.ClientCertificates;
Expand Down Expand Up @@ -468,7 +476,7 @@ export namespace Cloudflare {

export import APIGateway = API.APIGateway;

export import ManagedTransforms = API.ManagedTransforms;
export import ManagedHeaders = API.ManagedHeaders;

export import PageShield = API.PageShield;

Expand Down Expand Up @@ -500,6 +508,8 @@ export namespace Cloudflare {

export import Pages = API.Pages;

export import PCAPs = API.PCAPs;

export import Registrar = API.Registrar;

export import RequestTracers = API.RequestTracers;
Expand All @@ -522,7 +532,7 @@ export namespace Cloudflare {

export import ZeroTrust = API.ZeroTrust;

export import Turnstile = API.Turnstile;
export import Challenges = API.Challenges;

export import HyperdriveResource = API.HyperdriveResource;

Expand Down Expand Up @@ -550,6 +560,8 @@ export namespace Cloudflare {

export import CloudforceOne = API.CloudforceOne;

export import EventNotifications = API.EventNotifications;

export import AIGateway = API.AIGateway;

export import IAM = API.IAM;
Expand All @@ -570,14 +582,10 @@ export namespace Cloudflare {
export import PaginationInfo = API.PaginationInfo;
export import Permission = API.Permission;
export import PermissionGrant = API.PermissionGrant;
export import RatePlan = API.RatePlan;
export import ResponseInfo = API.ResponseInfo;
export import Result = API.Result;
export import Role = API.Role;
export import SortDirection = API.SortDirection;
export import Subscription = API.Subscription;
export import SubscriptionComponent = API.SubscriptionComponent;
export import SubscriptionZone = API.SubscriptionZone;
}

export default Cloudflare;
11 changes: 0 additions & 11 deletions src/resources/accounts/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as MembersAPI from './members';
import * as RolesAPI from './roles';
import * as SubscriptionsAPI from './subscriptions';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination';

export class Accounts extends APIResource {
members: MembersAPI.Members = new MembersAPI.Members(this._client);
roles: RolesAPI.Roles = new RolesAPI.Roles(this._client);
subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);

/**
* Create an account (only available for tenant admins at this time)
Expand Down Expand Up @@ -287,13 +285,4 @@ export namespace Accounts {
export import RoleGetResponse = RolesAPI.RoleGetResponse;
export import RoleListParams = RolesAPI.RoleListParams;
export import RoleGetParams = RolesAPI.RoleGetParams;
export import Subscriptions = SubscriptionsAPI.Subscriptions;
export import SubscriptionCreateResponse = SubscriptionsAPI.SubscriptionCreateResponse;
export import SubscriptionUpdateResponse = SubscriptionsAPI.SubscriptionUpdateResponse;
export import SubscriptionDeleteResponse = SubscriptionsAPI.SubscriptionDeleteResponse;
export import SubscriptionGetResponse = SubscriptionsAPI.SubscriptionGetResponse;
export import SubscriptionCreateParams = SubscriptionsAPI.SubscriptionCreateParams;
export import SubscriptionUpdateParams = SubscriptionsAPI.SubscriptionUpdateParams;
export import SubscriptionDeleteParams = SubscriptionsAPI.SubscriptionDeleteParams;
export import SubscriptionGetParams = SubscriptionsAPI.SubscriptionGetParams;
}
11 changes: 0 additions & 11 deletions src/resources/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,3 @@ export {
MemberListResponsesV4PagePaginationArray,
Members,
} from './members';
export {
SubscriptionCreateResponse,
SubscriptionUpdateResponse,
SubscriptionDeleteResponse,
SubscriptionGetResponse,
SubscriptionCreateParams,
SubscriptionUpdateParams,
SubscriptionDeleteParams,
SubscriptionGetParams,
Subscriptions,
} from './subscriptions';
144 changes: 0 additions & 144 deletions src/resources/accounts/subscriptions.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/resources/ai-gateway/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export interface LogListParams extends V4PagePaginationArrayParams {
/**
* Query param:
*/
feedback?: 0 | 1;
feedback?: -1 | 0 | 1;

/**
* Query param:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import { APIResource } from '../../resource';
import * as WidgetsAPI from './widgets';

export class Turnstile extends APIResource {
export class Challenges extends APIResource {
widgets: WidgetsAPI.Widgets = new WidgetsAPI.Widgets(this._client);
}

export namespace Turnstile {
export namespace Challenges {
export import Widgets = WidgetsAPI.Widgets;
export import Widget = WidgetsAPI.Widget;
export import WidgetDomain = WidgetsAPI.WidgetDomain;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Turnstile } from './turnstile';
export { Challenges } from './challenges';
export {
Widget,
WidgetDomain,
Expand Down
File renamed without changes.
Loading