import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Redacted from "effect/Redacted"; import { AuthError } from "../../Auth/AuthProvider.ts"; import { CredentialsStore } from "../../Auth/Credentials.ts"; export type CloudflareAuthConfig = { method: "env"; } | { method: "stored"; credentialType: "apiToken"; } | { method: "stored"; credentialType: "apiKey"; } | { method: "oauth"; scopes: string[]; accountId: string; }; export type CloudflareStoredCredentials = { type: "apiToken"; apiToken: string; accountId: string; } | { type: "apiKey"; apiKey: string; email: string; accountId: string; }; export type CloudflareResolvedCredentials = { type: "apiToken"; apiToken: Redacted.Redacted; accountId: string; source: { type: CloudflareAuthConfig["method"]; details?: string; }; } | { type: "apiKey"; apiKey: Redacted.Redacted; email: Redacted.Redacted; accountId: string; source: { type: CloudflareAuthConfig["method"]; details?: string; }; } | { type: "oauth"; accessToken: Redacted.Redacted; expires: number; accountId: string; source: { type: CloudflareAuthConfig["method"]; details?: string; }; }; export declare const CLOUDFLARE_AUTH_PROVIDER_NAME = "Cloudflare"; export declare const validateAccountId: (accountId: string | undefined, source: string) => Effect.Effect; /** * Layer that registers the Cloudflare {@link AuthProvider} into the * {@link AuthProviders} registry when built. Include this in the Cloudflare * `providers()` layer so `alchemy login` can discover it. */ export declare const CloudflareAuth: Layer.Layer; export declare const ALL_SCOPES: { "access:read": string; "access:write": string; "account:read": string; "agw:read": string; "agw:run": string; "agw:write": string; "ai:read": string; "ai:write": string; "aiaudit:read": string; "aiaudit:write": string; "aig:read": string; "aig:write": string; "auditlogs:read": string; "browser:read": string; "browser:write": string; "cfone:read": string; "cfone:write": string; "cloudchamber:write": string; "connectivity:admin": string; "connectivity:bind": string; "connectivity:read": string; "constellation:write": string; "containers:write": string; "d1:write": string; "dex:read": string; "dex:write": string; "dns_analytics:read": string; "dns_records:edit": string; "dns_records:read": string; "dns_settings:read": string; "firstpartytags:write": string; "lb:edit": string; "lb:read": string; "logpush:read": string; "logpush:write": string; "notification:read": string; "notification:write": string; "pages:read": string; "pages:write": string; "pipelines:read": string; "pipelines:setup": string; "pipelines:write": string; "query_cache:write": string; "queues:write": string; "r2_catalog:write": string; "radar:read": string; "ai-search:read": string; "ai-search:write": string; "ai-search:run": string; "secrets_store:read": string; "secrets_store:write": string; "ssl_certs:write": string; "sso-connector:read": string; "sso-connector:write": string; "teams:pii": string; "teams:read": string; "teams:secure_location": string; "teams:write": string; "url_scanner:read": string; "url_scanner:write": string; "user:read": string; "vectorize:write": string; "workers:read": string; "workers:write": string; "workers_builds:read": string; "workers_builds:write": string; "workers_kv:write": string; "workers_observability:read": string; "workers_observability:write": string; "workers_observability_telemetry:write": string; "workers_routes:write": string; "workers_scripts:write": string; "workers_tail:read": string; "zone:read": string; }; export declare const DEFAULT_SCOPES: string[]; export declare const OAUTH_CLIENT_ID = "6d8c2255-0773-45f6-b376-2914632e6f91"; export declare const OAUTH_REDIRECT_URI = "https://alchemy.run/auth/callback"; export declare const OAUTH_LOCAL_CALLBACK_URI = "http://localhost:9976/auth/callback"; export declare const OAUTH_ENDPOINTS: { authorize: string; token: string; revoke: string; }; //# sourceMappingURL=AuthProvider.d.ts.map