import type { ContentfulUserIdentity } from '../runtime/context.js'; import type { CmsEditConfig, SpaceConfig } from './types.js'; export interface HostedDeploymentConfig { spaceId: string; environment: string; defaultLocale?: string; devBaseUrl?: string; productionSiteUrl?: string; vercelBypassToken?: string; /** * Preview API token for default index sync (draft content). * Server-side only — avoids per-editor CMA api_keys access for AI Editor roles. */ previewAccessToken?: string; /** Content Delivery API token for `index sync --published` and published catalog lookups. */ deliveryAccessToken?: string; /** Short key used as defaultSpace in CmsEditConfig */ projectKey: string; } export interface ValidatePatResult extends ContentfulUserIdentity { token: string; } /** * Validates a Contentful personal access token and returns the owning user. */ export declare function validateContentfulPat(token: string): Promise; /** * Verifies the PAT can access the expected space (deployment lock). */ export declare function assertPatSpaceAccess(token: string, expectedSpaceId: string): Promise; export declare function validatePatForDeployment(token: string, deployment: HostedDeploymentConfig): Promise; export declare function buildHostedSpaceConfig(deployment: HostedDeploymentConfig, managementToken: string): SpaceConfig; export declare function buildHostedConfig(deployment: HostedDeploymentConfig, managementToken: string): CmsEditConfig; export declare function loadHostedDeploymentFromEnv(): HostedDeploymentConfig; export declare function extractBearerToken(authorizationHeader: string | null): string | null; //# sourceMappingURL=hosted.d.ts.map