cloudflare/cloudflare-typescript

Public

mirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ff1339ab00fd4a5bd6993cd10aa0eabc11ae7da7

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/index.ts

843lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import { type Agent } from './_shims/index';
4import * as qs from './internal/qs';
5import * as Core from './core';
6import * as Errors from './error';
7import * as Pagination from './pagination';
8import {
9 type CursorLimitPaginationParams,
10 CursorLimitPaginationResponse,
11 type CursorPaginationParams,
12 CursorPaginationResponse,
13 SinglePageResponse,
14 type V4PagePaginationArrayParams,
15 V4PagePaginationArrayResponse,
16 type V4PagePaginationParams,
17 V4PagePaginationResponse,
18} from './pagination';
19import * as Uploads from './uploads';
20import * as API from './resources/index';
21import { AuditLogs } from './resources/audit-logs';
22import { BotManagement } from './resources/bot-management';
23import { BrandProtection } from './resources/brand-protection';
24import { ClientCertificates } from './resources/client-certificates';
25import { CustomNameservers } from './resources/custom-nameservers';
26import { DCVDelegation } from './resources/dcv-delegation';
27import { DNSSECResource } from './resources/dnssec';
28import { Filters } from './resources/filters';
29import { IPs } from './resources/ips';
30import { KeylessCertificates } from './resources/keyless-certificates';
31import { ManagedTransforms } from './resources/managed-transforms';
32import { Memberships } from './resources/memberships';
33import { OriginCACertificates } from './resources/origin-ca-certificates';
34import { OriginPostQuantumEncryption } from './resources/origin-post-quantum-encryption';
35import { RateLimits } from './resources/rate-limits';
36import {
37 SecurityTXT,
38 SecurityTXTDeleteParams,
39 SecurityTXTDeleteResponse,
40 SecurityTXTGetParams,
41 SecurityTXTGetResponse,
42 SecurityTXTUpdateParams,
43 SecurityTXTUpdateResponse,
44} from './resources/security-txt';
45import { URLNormalization } from './resources/url-normalization';
46import { WARPConnector } from './resources/warp-connector';
47import { Accounts } from './resources/accounts/accounts';
48import { ACM } from './resources/acm/acm';
49import { Addressing } from './resources/addressing/addressing';
50import { AIGateway } from './resources/ai-gateway/ai-gateway';
51import { Alerting } from './resources/alerting/alerting';
52import { APIGateway } from './resources/api-gateway/api-gateway';
53import { Argo } from './resources/argo/argo';
54import { Billing } from './resources/billing/billing';
55import { BotnetFeed } from './resources/botnet-feed/botnet-feed';
56import { Cache } from './resources/cache/cache';
57import { Calls } from './resources/calls/calls';
58import { CertificateAuthorities } from './resources/certificate-authorities/certificate-authorities';
59import { CloudConnector } from './resources/cloud-connector/cloud-connector';
60import { CloudforceOne } from './resources/cloudforce-one/cloudforce-one';
61import { CustomCertificates } from './resources/custom-certificates/custom-certificates';
62import { CustomHostnames } from './resources/custom-hostnames/custom-hostnames';
63import { D1Resource } from './resources/d1/d1';
64import { Diagnostics } from './resources/diagnostics/diagnostics';
65import { DNS } from './resources/dns/dns';
66import { DurableObjects } from './resources/durable-objects/durable-objects';
67import { EmailRouting } from './resources/email-routing/email-routing';
68import { EmailSecurity } from './resources/email-security/email-security';
69import { Firewall } from './resources/firewall/firewall';
70import { Healthchecks } from './resources/healthchecks/healthchecks';
71import { Hostnames } from './resources/hostnames/hostnames';
72import { HyperdriveResource } from './resources/hyperdrive/hyperdrive';
73import { IAM } from './resources/iam/iam';
74import { Images } from './resources/images/images';
75import { Intel } from './resources/intel/intel';
76import { KV } from './resources/kv/kv';
77import { LoadBalancers } from './resources/load-balancers/load-balancers';
78import { Logpush } from './resources/logpush/logpush';
79import { Logs } from './resources/logs/logs';
80import { MagicNetworkMonitoring } from './resources/magic-network-monitoring/magic-network-monitoring';
81import { MagicTransit } from './resources/magic-transit/magic-transit';
82import { MTLSCertificates } from './resources/mtls-certificates/mtls-certificates';
83import { OriginTLSClientAuth } from './resources/origin-tls-client-auth/origin-tls-client-auth';
84import { PageShield } from './resources/page-shield/page-shield';
85import { Pagerules } from './resources/pagerules/pagerules';
86import { Pages } from './resources/pages/pages';
87import { Queues } from './resources/queues/queues';
88import { R2 } from './resources/r2/r2';
89import { Radar } from './resources/radar/radar';
90import { Registrar } from './resources/registrar/registrar';
91import { RequestTracers } from './resources/request-tracers/request-tracers';
92import {
93 ResourceSharing,
94 ResourceSharingCreateParams,
95 ResourceSharingCreateResponse,
96 ResourceSharingDeleteParams,
97 ResourceSharingDeleteResponse,
98 ResourceSharingGetParams,
99 ResourceSharingGetResponse,
100 ResourceSharingListParams,
101 ResourceSharingListResponse,
102 ResourceSharingListResponsesV4PagePaginationArray,
103 ResourceSharingUpdateParams,
104 ResourceSharingUpdateResponse,
105} from './resources/resource-sharing/resource-sharing';
106import { Rules } from './resources/rules/rules';
107import { Rulesets } from './resources/rulesets/rulesets';
108import { RUM } from './resources/rum/rum';
109import { SecondaryDNS } from './resources/secondary-dns/secondary-dns';
110import { Snippets } from './resources/snippets/snippets';
111import { Spectrum } from './resources/spectrum/spectrum';
112import { Speed } from './resources/speed/speed';
113import { SSL } from './resources/ssl/ssl';
114import { Storage } from './resources/storage/storage';
115import { Stream } from './resources/stream/stream';
116import { Turnstile } from './resources/turnstile/turnstile';
117import { URLScanner } from './resources/url-scanner/url-scanner';
118import { User } from './resources/user/user';
119import { Vectorize } from './resources/vectorize/vectorize';
120import { WaitingRooms } from './resources/waiting-rooms/waiting-rooms';
121import { Web3 } from './resources/web3/web3';
122import { WorkersForPlatforms } from './resources/workers-for-platforms/workers-for-platforms';
123import { Workers } from './resources/workers/workers';
124import {
125 WorkflowGetParams,
126 WorkflowGetResponse,
127 WorkflowListParams,
128 WorkflowListResponse,
129 WorkflowListResponsesV4PagePaginationArray,
130 WorkflowUpdateParams,
131 WorkflowUpdateResponse,
132 Workflows,
133} from './resources/workflows/workflows';
134import { ZeroTrust } from './resources/zero-trust/zero-trust';
135import { Zones } from './resources/zones/zones';
136
137export interface ClientOptions {
138 /**
139 * The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
140 */
141 apiToken?: string | null | undefined;
142
143 /**
144 * The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
145 */
146 apiKey?: string | null | undefined;
147
148 /**
149 * The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
150 */
151 apiEmail?: string | null | undefined;
152
153 /**
154 * 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).
155 */
156 userServiceKey?: string | null | undefined;
157
158 /**
159 * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
160 *
161 * Defaults to process.env['CLOUDFLARE_BASE_URL'].
162 */
163 baseURL?: string | null | undefined;
164
165 /**
166 * The maximum amount of time (in milliseconds) that the client should wait for a response
167 * from the server before timing out a single request.
168 *
169 * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
170 * much longer than this timeout before the promise succeeds or fails.
171 */
172 timeout?: number;
173
174 /**
175 * An HTTP agent used to manage HTTP(S) connections.
176 *
177 * If not provided, an agent will be constructed by default in the Node.js environment,
178 * otherwise no agent is used.
179 */
180 httpAgent?: Agent;
181
182 /**
183 * Specify a custom `fetch` function implementation.
184 *
185 * If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
186 * defined globally.
187 */
188 fetch?: Core.Fetch | undefined;
189
190 /**
191 * The maximum number of times that the client will retry a request in case of a
192 * temporary failure, like a network error or a 5XX error from the server.
193 *
194 * @default 2
195 */
196 maxRetries?: number;
197
198 /**
199 * Default headers to include with every request to the API.
200 *
201 * These can be removed in individual requests by explicitly setting the
202 * header to `undefined` or `null` in request options.
203 */
204 defaultHeaders?: Core.Headers;
205
206 /**
207 * Default query parameters to include with every request to the API.
208 *
209 * These can be removed in individual requests by explicitly setting the
210 * param to `undefined` in request options.
211 */
212 defaultQuery?: Core.DefaultQuery;
213}
214
215/**
216 * API Client for interfacing with the Cloudflare API.
217 */
218export class Cloudflare extends Core.APIClient {
219 apiToken: string | null;
220 apiKey: string | null;
221 apiEmail: string | null;
222 userServiceKey: string | null;
223
224 private _options: ClientOptions;
225
226 /**
227 * API Client for interfacing with the Cloudflare API.
228 *
229 * @param {string | null | undefined} [opts.apiToken=process.env['CLOUDFLARE_API_TOKEN'] ?? null]
230 * @param {string | null | undefined} [opts.apiKey=process.env['CLOUDFLARE_API_KEY'] ?? null]
231 * @param {string | null | undefined} [opts.apiEmail=process.env['CLOUDFLARE_EMAIL'] ?? null]
232 * @param {string | null | undefined} [opts.userServiceKey=process.env['CLOUDFLARE_API_USER_SERVICE_KEY'] ?? null]
233 * @param {string} [opts.baseURL=process.env['CLOUDFLARE_BASE_URL'] ?? https://api.cloudflare.com/client/v4] - Override the default base URL for the API.
234 * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
235 * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
236 * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
237 * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
238 * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
239 * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
240 */
241 constructor({
242 baseURL = Core.readEnv('CLOUDFLARE_BASE_URL'),
243 apiToken = Core.readEnv('CLOUDFLARE_API_TOKEN') ?? null,
244 apiKey = Core.readEnv('CLOUDFLARE_API_KEY') ?? null,
245 apiEmail = Core.readEnv('CLOUDFLARE_EMAIL') ?? null,
246 userServiceKey = Core.readEnv('CLOUDFLARE_API_USER_SERVICE_KEY') ?? null,
247 ...opts
248 }: ClientOptions = {}) {
249 const options: ClientOptions = {
250 apiToken,
251 apiKey,
252 apiEmail,
253 userServiceKey,
254 ...opts,
255 baseURL: baseURL || `https://api.cloudflare.com/client/v4`,
256 };
257
258 super({
259 baseURL: options.baseURL!,
260 timeout: options.timeout ?? 60000 /* 1 minute */,
261 httpAgent: options.httpAgent,
262 maxRetries: options.maxRetries,
263 fetch: options.fetch,
264 });
265
266 this._options = options;
267
268 this.apiToken = apiToken;
269 this.apiKey = apiKey;
270 this.apiEmail = apiEmail;
271 this.userServiceKey = userServiceKey;
272 }
273
274 accounts: API.Accounts = new API.Accounts(this);
275 originCACertificates: API.OriginCACertificates = new API.OriginCACertificates(this);
276 ips: API.IPs = new API.IPs(this);
277 memberships: API.Memberships = new API.Memberships(this);
278 user: API.User = new API.User(this);
279 zones: API.Zones = new API.Zones(this);
280 loadBalancers: API.LoadBalancers = new API.LoadBalancers(this);
281 cache: API.Cache = new API.Cache(this);
282 ssl: API.SSL = new API.SSL(this);
283 acm: API.ACM = new API.ACM(this);
284 argo: API.Argo = new API.Argo(this);
285 certificateAuthorities: API.CertificateAuthorities = new API.CertificateAuthorities(this);
286 clientCertificates: API.ClientCertificates = new API.ClientCertificates(this);
287 customCertificates: API.CustomCertificates = new API.CustomCertificates(this);
288 customHostnames: API.CustomHostnames = new API.CustomHostnames(this);
289 customNameservers: API.CustomNameservers = new API.CustomNameservers(this);
290 dns: API.DNS = new API.DNS(this);
291 dnssec: API.DNSSECResource = new API.DNSSECResource(this);
292 emailSecurity: API.EmailSecurity = new API.EmailSecurity(this);
293 emailRouting: API.EmailRouting = new API.EmailRouting(this);
294 filters: API.Filters = new API.Filters(this);
295 firewall: API.Firewall = new API.Firewall(this);
296 healthchecks: API.Healthchecks = new API.Healthchecks(this);
297 keylessCertificates: API.KeylessCertificates = new API.KeylessCertificates(this);
298 logpush: API.Logpush = new API.Logpush(this);
299 logs: API.Logs = new API.Logs(this);
300 originTLSClientAuth: API.OriginTLSClientAuth = new API.OriginTLSClientAuth(this);
301 pagerules: API.Pagerules = new API.Pagerules(this);
302 rateLimits: API.RateLimits = new API.RateLimits(this);
303 secondaryDNS: API.SecondaryDNS = new API.SecondaryDNS(this);
304 waitingRooms: API.WaitingRooms = new API.WaitingRooms(this);
305 web3: API.Web3 = new API.Web3(this);
306 workers: API.Workers = new API.Workers(this);
307 kv: API.KV = new API.KV(this);
308 durableObjects: API.DurableObjects = new API.DurableObjects(this);
309 queues: API.Queues = new API.Queues(this);
310 apiGateway: API.APIGateway = new API.APIGateway(this);
311 managedTransforms: API.ManagedTransforms = new API.ManagedTransforms(this);
312 pageShield: API.PageShield = new API.PageShield(this);
313 rulesets: API.Rulesets = new API.Rulesets(this);
314 urlNormalization: API.URLNormalization = new API.URLNormalization(this);
315 spectrum: API.Spectrum = new API.Spectrum(this);
316 addressing: API.Addressing = new API.Addressing(this);
317 auditLogs: API.AuditLogs = new API.AuditLogs(this);
318 billing: API.Billing = new API.Billing(this);
319 brandProtection: API.BrandProtection = new API.BrandProtection(this);
320 diagnostics: API.Diagnostics = new API.Diagnostics(this);
321 images: API.Images = new API.Images(this);
322 intel: API.Intel = new API.Intel(this);
323 magicTransit: API.MagicTransit = new API.MagicTransit(this);
324 magicNetworkMonitoring: API.MagicNetworkMonitoring = new API.MagicNetworkMonitoring(this);
325 mtlsCertificates: API.MTLSCertificates = new API.MTLSCertificates(this);
326 pages: API.Pages = new API.Pages(this);
327 registrar: API.Registrar = new API.Registrar(this);
328 requestTracers: API.RequestTracers = new API.RequestTracers(this);
329 rules: API.Rules = new API.Rules(this);
330 storage: API.Storage = new API.Storage(this);
331 stream: API.Stream = new API.Stream(this);
332 alerting: API.Alerting = new API.Alerting(this);
333 d1: API.D1Resource = new API.D1Resource(this);
334 r2: API.R2 = new API.R2(this);
335 warpConnector: API.WARPConnector = new API.WARPConnector(this);
336 workersForPlatforms: API.WorkersForPlatforms = new API.WorkersForPlatforms(this);
337 zeroTrust: API.ZeroTrust = new API.ZeroTrust(this);
338 turnstile: API.Turnstile = new API.Turnstile(this);
339 hyperdrive: API.HyperdriveResource = new API.HyperdriveResource(this);
340 rum: API.RUM = new API.RUM(this);
341 vectorize: API.Vectorize = new API.Vectorize(this);
342 urlScanner: API.URLScanner = new API.URLScanner(this);
343 radar: API.Radar = new API.Radar(this);
344 botManagement: API.BotManagement = new API.BotManagement(this);
345 originPostQuantumEncryption: API.OriginPostQuantumEncryption = new API.OriginPostQuantumEncryption(this);
346 speed: API.Speed = new API.Speed(this);
347 dcvDelegation: API.DCVDelegation = new API.DCVDelegation(this);
348 hostnames: API.Hostnames = new API.Hostnames(this);
349 snippets: API.Snippets = new API.Snippets(this);
350 calls: API.Calls = new API.Calls(this);
351 cloudforceOne: API.CloudforceOne = new API.CloudforceOne(this);
352 aiGateway: API.AIGateway = new API.AIGateway(this);
353 iam: API.IAM = new API.IAM(this);
354 cloudConnector: API.CloudConnector = new API.CloudConnector(this);
355 botnetFeed: API.BotnetFeed = new API.BotnetFeed(this);
356 securityTXT: API.SecurityTXT = new API.SecurityTXT(this);
357 workflows: API.Workflows = new API.Workflows(this);
358 resourceSharing: API.ResourceSharing = new API.ResourceSharing(this);
359
360 protected override defaultQuery(): Core.DefaultQuery | undefined {
361 return this._options.defaultQuery;
362 }
363
364 protected override defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers {
365 return {
366 ...super.defaultHeaders(opts),
367 'X-Auth-Key': this.apiKey,
368 'X-Auth-Email': this.apiEmail,
369 ...this._options.defaultHeaders,
370 };
371 }
372
373 protected override validateHeaders(headers: Core.Headers, customHeaders: Core.Headers) {
374 if (this.apiEmail && headers['x-auth-email']) {
375 return;
376 }
377 if (customHeaders['x-auth-email'] === null) {
378 return;
379 }
380
381 if (this.apiKey && headers['x-auth-key']) {
382 return;
383 }
384 if (customHeaders['x-auth-key'] === null) {
385 return;
386 }
387
388 if (this.apiToken && headers['authorization']) {
389 return;
390 }
391 if (customHeaders['authorization'] === null) {
392 return;
393 }
394
395 if (this.userServiceKey && headers['x-auth-user-service-key']) {
396 return;
397 }
398 if (customHeaders['x-auth-user-service-key'] === null) {
399 return;
400 }
401
402 throw new Error(
403 'Could not resolve authentication method. Expected one of apiEmail, apiKey, apiToken or userServiceKey to be set. Or for one of the "X-Auth-Email", "X-Auth-Key", "Authorization" or "X-Auth-User-Service-Key" headers to be explicitly omitted',
404 );
405 }
406
407 protected override authHeaders(opts: Core.FinalRequestOptions): Core.Headers {
408 const apiEmailAuth = this.apiEmailAuth(opts);
409 const apiKeyAuth = this.apiKeyAuth(opts);
410 const apiTokenAuth = this.apiTokenAuth(opts);
411 const userServiceKeyAuth = this.userServiceKeyAuth(opts);
412
413 if (
414 apiEmailAuth != null &&
415 !Core.isEmptyObj(apiEmailAuth) &&
416 apiKeyAuth != null &&
417 !Core.isEmptyObj(apiKeyAuth)
418 ) {
419 return { ...apiEmailAuth, ...apiKeyAuth };
420 }
421
422 if (apiTokenAuth != null && !Core.isEmptyObj(apiTokenAuth)) {
423 return apiTokenAuth;
424 }
425
426 if (userServiceKeyAuth != null && !Core.isEmptyObj(userServiceKeyAuth)) {
427 return userServiceKeyAuth;
428 }
429 return {};
430 }
431
432 protected apiEmailAuth(opts: Core.FinalRequestOptions): Core.Headers {
433 if (this.apiEmail == null) {
434 return {};
435 }
436 return { 'X-Auth-Email': this.apiEmail };
437 }
438
439 protected apiKeyAuth(opts: Core.FinalRequestOptions): Core.Headers {
440 if (this.apiKey == null) {
441 return {};
442 }
443 return { 'X-Auth-Key': this.apiKey };
444 }
445
446 protected apiTokenAuth(opts: Core.FinalRequestOptions): Core.Headers {
447 if (this.apiToken == null) {
448 return {};
449 }
450 return { Authorization: `Bearer ${this.apiToken}` };
451 }
452
453 protected userServiceKeyAuth(opts: Core.FinalRequestOptions): Core.Headers {
454 if (this.userServiceKey == null) {
455 return {};
456 }
457 return { 'X-Auth-User-Service-Key': this.userServiceKey };
458 }
459
460 protected override stringifyQuery(query: Record<string, unknown>): string {
461 return qs.stringify(query, { allowDots: true, arrayFormat: 'repeat' });
462 }
463
464 static Cloudflare = this;
465 static DEFAULT_TIMEOUT = 60000; // 1 minute
466
467 static CloudflareError = Errors.CloudflareError;
468 static APIError = Errors.APIError;
469 static APIConnectionError = Errors.APIConnectionError;
470 static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
471 static APIUserAbortError = Errors.APIUserAbortError;
472 static NotFoundError = Errors.NotFoundError;
473 static ConflictError = Errors.ConflictError;
474 static RateLimitError = Errors.RateLimitError;
475 static BadRequestError = Errors.BadRequestError;
476 static AuthenticationError = Errors.AuthenticationError;
477 static InternalServerError = Errors.InternalServerError;
478 static PermissionDeniedError = Errors.PermissionDeniedError;
479 static UnprocessableEntityError = Errors.UnprocessableEntityError;
480
481 static toFile = Uploads.toFile;
482 static fileFromPath = Uploads.fileFromPath;
483}
484
485export const CloudflareError = Errors.CloudflareError;
486export const APIError = Errors.APIError;
487export const APIConnectionError = Errors.APIConnectionError;
488export const APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
489export const APIUserAbortError = Errors.APIUserAbortError;
490export const NotFoundError = Errors.NotFoundError;
491export const ConflictError = Errors.ConflictError;
492export const RateLimitError = Errors.RateLimitError;
493export const BadRequestError = Errors.BadRequestError;
494export const AuthenticationError = Errors.AuthenticationError;
495export const InternalServerError = Errors.InternalServerError;
496export const PermissionDeniedError = Errors.PermissionDeniedError;
497export const UnprocessableEntityError = Errors.UnprocessableEntityError;
498
499export import toFile = Uploads.toFile;
500export import fileFromPath = Uploads.fileFromPath;
501
502Cloudflare.Accounts = Accounts;
503Cloudflare.OriginCACertificates = OriginCACertificates;
504Cloudflare.IPs = IPs;
505Cloudflare.Memberships = Memberships;
506Cloudflare.User = User;
507Cloudflare.Zones = Zones;
508Cloudflare.LoadBalancers = LoadBalancers;
509Cloudflare.Cache = Cache;
510Cloudflare.SSL = SSL;
511Cloudflare.ACM = ACM;
512Cloudflare.Argo = Argo;
513Cloudflare.CertificateAuthorities = CertificateAuthorities;
514Cloudflare.ClientCertificates = ClientCertificates;
515Cloudflare.CustomCertificates = CustomCertificates;
516Cloudflare.CustomHostnames = CustomHostnames;
517Cloudflare.CustomNameservers = CustomNameservers;
518Cloudflare.DNS = DNS;
519Cloudflare.DNSSECResource = DNSSECResource;
520Cloudflare.EmailSecurity = EmailSecurity;
521Cloudflare.EmailRouting = EmailRouting;
522Cloudflare.Filters = Filters;
523Cloudflare.Firewall = Firewall;
524Cloudflare.Healthchecks = Healthchecks;
525Cloudflare.KeylessCertificates = KeylessCertificates;
526Cloudflare.Logpush = Logpush;
527Cloudflare.Logs = Logs;
528Cloudflare.OriginTLSClientAuth = OriginTLSClientAuth;
529Cloudflare.Pagerules = Pagerules;
530Cloudflare.RateLimits = RateLimits;
531Cloudflare.SecondaryDNS = SecondaryDNS;
532Cloudflare.WaitingRooms = WaitingRooms;
533Cloudflare.Web3 = Web3;
534Cloudflare.Workers = Workers;
535Cloudflare.KV = KV;
536Cloudflare.DurableObjects = DurableObjects;
537Cloudflare.Queues = Queues;
538Cloudflare.APIGateway = APIGateway;
539Cloudflare.ManagedTransforms = ManagedTransforms;
540Cloudflare.PageShield = PageShield;
541Cloudflare.Rulesets = Rulesets;
542Cloudflare.URLNormalization = URLNormalization;
543Cloudflare.Spectrum = Spectrum;
544Cloudflare.Addressing = Addressing;
545Cloudflare.AuditLogs = AuditLogs;
546Cloudflare.Billing = Billing;
547Cloudflare.BrandProtection = BrandProtection;
548Cloudflare.Diagnostics = Diagnostics;
549Cloudflare.Images = Images;
550Cloudflare.Intel = Intel;
551Cloudflare.MagicTransit = MagicTransit;
552Cloudflare.MagicNetworkMonitoring = MagicNetworkMonitoring;
553Cloudflare.MTLSCertificates = MTLSCertificates;
554Cloudflare.Pages = Pages;
555Cloudflare.Registrar = Registrar;
556Cloudflare.RequestTracers = RequestTracers;
557Cloudflare.Rules = Rules;
558Cloudflare.Storage = Storage;
559Cloudflare.Stream = Stream;
560Cloudflare.Alerting = Alerting;
561Cloudflare.D1Resource = D1Resource;
562Cloudflare.R2 = R2;
563Cloudflare.WARPConnector = WARPConnector;
564Cloudflare.WorkersForPlatforms = WorkersForPlatforms;
565Cloudflare.ZeroTrust = ZeroTrust;
566Cloudflare.Turnstile = Turnstile;
567Cloudflare.HyperdriveResource = HyperdriveResource;
568Cloudflare.RUM = RUM;
569Cloudflare.Vectorize = Vectorize;
570Cloudflare.URLScanner = URLScanner;
571Cloudflare.Radar = Radar;
572Cloudflare.BotManagement = BotManagement;
573Cloudflare.OriginPostQuantumEncryption = OriginPostQuantumEncryption;
574Cloudflare.Speed = Speed;
575Cloudflare.DCVDelegation = DCVDelegation;
576Cloudflare.Hostnames = Hostnames;
577Cloudflare.Snippets = Snippets;
578Cloudflare.Calls = Calls;
579Cloudflare.CloudforceOne = CloudforceOne;
580Cloudflare.AIGateway = AIGateway;
581Cloudflare.IAM = IAM;
582Cloudflare.CloudConnector = CloudConnector;
583Cloudflare.BotnetFeed = BotnetFeed;
584Cloudflare.SecurityTXT = SecurityTXT;
585Cloudflare.Workflows = Workflows;
586Cloudflare.WorkflowListResponsesV4PagePaginationArray = WorkflowListResponsesV4PagePaginationArray;
587Cloudflare.ResourceSharing = ResourceSharing;
588Cloudflare.ResourceSharingListResponsesV4PagePaginationArray =
589 ResourceSharingListResponsesV4PagePaginationArray;
590
591export declare namespace Cloudflare {
592 export type RequestOptions = Core.RequestOptions;
593
594 export import V4PagePagination = Pagination.V4PagePagination;
595 export {
596 type V4PagePaginationParams as V4PagePaginationParams,
597 type V4PagePaginationResponse as V4PagePaginationResponse,
598 };
599
600 export import V4PagePaginationArray = Pagination.V4PagePaginationArray;
601 export {
602 type V4PagePaginationArrayParams as V4PagePaginationArrayParams,
603 type V4PagePaginationArrayResponse as V4PagePaginationArrayResponse,
604 };
605
606 export import CursorPagination = Pagination.CursorPagination;
607 export {
608 type CursorPaginationParams as CursorPaginationParams,
609 type CursorPaginationResponse as CursorPaginationResponse,
610 };
611
612 export import CursorLimitPagination = Pagination.CursorLimitPagination;
613 export {
614 type CursorLimitPaginationParams as CursorLimitPaginationParams,
615 type CursorLimitPaginationResponse as CursorLimitPaginationResponse,
616 };
617
618 export import SinglePage = Pagination.SinglePage;
619 export { type SinglePageResponse as SinglePageResponse };
620
621 export { Accounts as Accounts };
622
623 export { OriginCACertificates as OriginCACertificates };
624
625 export { IPs as IPs };
626
627 export { Memberships as Memberships };
628
629 export { User as User };
630
631 export { Zones as Zones };
632
633 export { LoadBalancers as LoadBalancers };
634
635 export { Cache as Cache };
636
637 export { SSL as SSL };
638
639 export { ACM as ACM };
640
641 export { Argo as Argo };
642
643 export { CertificateAuthorities as CertificateAuthorities };
644
645 export { ClientCertificates as ClientCertificates };
646
647 export { CustomCertificates as CustomCertificates };
648
649 export { CustomHostnames as CustomHostnames };
650
651 export { CustomNameservers as CustomNameservers };
652
653 export { DNS as DNS };
654
655 export { DNSSECResource as DNSSECResource };
656
657 export { EmailSecurity as EmailSecurity };
658
659 export { EmailRouting as EmailRouting };
660
661 export { Filters as Filters };
662
663 export { Firewall as Firewall };
664
665 export { Healthchecks as Healthchecks };
666
667 export { KeylessCertificates as KeylessCertificates };
668
669 export { Logpush as Logpush };
670
671 export { Logs as Logs };
672
673 export { OriginTLSClientAuth as OriginTLSClientAuth };
674
675 export { Pagerules as Pagerules };
676
677 export { RateLimits as RateLimits };
678
679 export { SecondaryDNS as SecondaryDNS };
680
681 export { WaitingRooms as WaitingRooms };
682
683 export { Web3 as Web3 };
684
685 export { Workers as Workers };
686
687 export { KV as KV };
688
689 export { DurableObjects as DurableObjects };
690
691 export { Queues as Queues };
692
693 export { APIGateway as APIGateway };
694
695 export { ManagedTransforms as ManagedTransforms };
696
697 export { PageShield as PageShield };
698
699 export { Rulesets as Rulesets };
700
701 export { URLNormalization as URLNormalization };
702
703 export { Spectrum as Spectrum };
704
705 export { Addressing as Addressing };
706
707 export { AuditLogs as AuditLogs };
708
709 export { Billing as Billing };
710
711 export { BrandProtection as BrandProtection };
712
713 export { Diagnostics as Diagnostics };
714
715 export { Images as Images };
716
717 export { Intel as Intel };
718
719 export { MagicTransit as MagicTransit };
720
721 export { MagicNetworkMonitoring as MagicNetworkMonitoring };
722
723 export { MTLSCertificates as MTLSCertificates };
724
725 export { Pages as Pages };
726
727 export { Registrar as Registrar };
728
729 export { RequestTracers as RequestTracers };
730
731 export { Rules as Rules };
732
733 export { Storage as Storage };
734
735 export { Stream as Stream };
736
737 export { Alerting as Alerting };
738
739 export { D1Resource as D1Resource };
740
741 export { R2 as R2 };
742
743 export { WARPConnector as WARPConnector };
744
745 export { WorkersForPlatforms as WorkersForPlatforms };
746
747 export { ZeroTrust as ZeroTrust };
748
749 export { Turnstile as Turnstile };
750
751 export { HyperdriveResource as HyperdriveResource };
752
753 export { RUM as RUM };
754
755 export { Vectorize as Vectorize };
756
757 export { URLScanner as URLScanner };
758
759 export { Radar as Radar };
760
761 export { BotManagement as BotManagement };
762
763 export { OriginPostQuantumEncryption as OriginPostQuantumEncryption };
764
765 export { Speed as Speed };
766
767 export { DCVDelegation as DCVDelegation };
768
769 export { Hostnames as Hostnames };
770
771 export { Snippets as Snippets };
772
773 export { Calls as Calls };
774
775 export { CloudforceOne as CloudforceOne };
776
777 export { AIGateway as AIGateway };
778
779 export { IAM as IAM };
780
781 export { CloudConnector as CloudConnector };
782
783 export { BotnetFeed as BotnetFeed };
784
785 export {
786 SecurityTXT as SecurityTXT,
787 type SecurityTXTUpdateResponse as SecurityTXTUpdateResponse,
788 type SecurityTXTDeleteResponse as SecurityTXTDeleteResponse,
789 type SecurityTXTGetResponse as SecurityTXTGetResponse,
790 type SecurityTXTUpdateParams as SecurityTXTUpdateParams,
791 type SecurityTXTDeleteParams as SecurityTXTDeleteParams,
792 type SecurityTXTGetParams as SecurityTXTGetParams,
793 };
794
795 export {
796 Workflows as Workflows,
797 type WorkflowUpdateResponse as WorkflowUpdateResponse,
798 type WorkflowListResponse as WorkflowListResponse,
799 type WorkflowGetResponse as WorkflowGetResponse,
800 WorkflowListResponsesV4PagePaginationArray as WorkflowListResponsesV4PagePaginationArray,
801 type WorkflowUpdateParams as WorkflowUpdateParams,
802 type WorkflowListParams as WorkflowListParams,
803 type WorkflowGetParams as WorkflowGetParams,
804 };
805
806 export {
807 ResourceSharing as ResourceSharing,
808 type ResourceSharingCreateResponse as ResourceSharingCreateResponse,
809 type ResourceSharingUpdateResponse as ResourceSharingUpdateResponse,
810 type ResourceSharingListResponse as ResourceSharingListResponse,
811 type ResourceSharingDeleteResponse as ResourceSharingDeleteResponse,
812 type ResourceSharingGetResponse as ResourceSharingGetResponse,
813 ResourceSharingListResponsesV4PagePaginationArray as ResourceSharingListResponsesV4PagePaginationArray,
814 type ResourceSharingCreateParams as ResourceSharingCreateParams,
815 type ResourceSharingUpdateParams as ResourceSharingUpdateParams,
816 type ResourceSharingListParams as ResourceSharingListParams,
817 type ResourceSharingDeleteParams as ResourceSharingDeleteParams,
818 type ResourceSharingGetParams as ResourceSharingGetParams,
819 };
820
821 export type ASN = API.ASN;
822 export type AuditLog = API.AuditLog;
823 export type CertificateCA = API.CertificateCA;
824 export type CertificateRequestType = API.CertificateRequestType;
825 export type CloudflareTunnel = API.CloudflareTunnel;
826 export type ErrorData = API.ErrorData;
827 export type Identifier = API.Identifier;
828 export type LoadBalancerPreview = API.LoadBalancerPreview;
829 export type Member = API.Member;
830 export type PaginationInfo = API.PaginationInfo;
831 export type Permission = API.Permission;
832 export type PermissionGrant = API.PermissionGrant;
833 export type RatePlan = API.RatePlan;
834 export type ResponseInfo = API.ResponseInfo;
835 export type Result = API.Result;
836 export type Role = API.Role;
837 export type SortDirection = API.SortDirection;
838 export type Subscription = API.Subscription;
839 export type SubscriptionComponent = API.SubscriptionComponent;
840 export type SubscriptionZone = API.SubscriptionZone;
841}
842
843export default Cloudflare;
844