import { H as HttpClientConfig } from './types-C8x5GGVP.js'; import { ContentstackRegion } from './regions/index.js'; import { C as ContentstackHttpClient } from './client-C0hESzBg.js'; import { C as ContentstackCredentials, e as OAuthConfig, f as OAuthTokens } from './types-BmuNBa52.js'; interface PublishDetails { environment: string; locale: string; time: string; user: string; } interface WorkflowStage { uid: string; name: string; color: string; order: number; next_available_stages?: string[]; } interface FieldSchema { uid: string; data_type: string; display_name: string; mandatory?: boolean; unique?: boolean; multiple?: boolean; field_metadata?: Record; schema?: FieldSchema[]; [key: string]: unknown; } interface Entry { uid: string; title: string; url?: string; locale: string; created_at: string; updated_at: string; created_by: string; updated_by: string; _version: number; tags?: string[]; publish_details?: PublishDetails[]; _workflow?: WorkflowStage; [field: string]: unknown; } interface ContentType { uid: string; title: string; description?: string; schema: FieldSchema[]; options: Record; created_at: string; updated_at: string; } interface Asset { uid: string; title: string; filename: string; url: string; content_type: string; file_size: string; dimension?: { width: number; height: number; }; created_at: string; updated_at: string; } interface AssetFolder { uid: string; name: string; parent_uid?: string; is_dir: boolean; created_at: string; updated_at: string; } interface Environment { uid: string; name: string; urls: Array<{ url: string; locale: string; }>; created_at: string; updated_at: string; } interface Locale { uid: string; code: string; name: string; fallback_locale?: string; created_at: string; updated_at: string; } interface Branch { uid: string; source: string; alias?: Array<{ uid: string; }>; created_at: string; updated_at: string; } interface Release { uid: string; name: string; description?: string; locked: boolean; archived: boolean; created_at: string; updated_at: string; } interface ReleaseItem { uid: string; version: number; content_type_uid: string; action: "publish" | "unpublish"; locale: string; } interface Taxonomy { uid: string; name: string; description?: string; created_at: string; updated_at: string; } interface TaxonomyTerm { uid: string; name: string; parent_uid?: string; depth: number; created_at: string; updated_at: string; } interface Webhook { uid: string; name: string; destinations: Array<{ target_url: string; http_basic_auth?: string; http_basic_password?: string; custom_header?: Array<{ header_name: string; value: string; }>; }>; channels: string[]; retry_policy: string; disabled: boolean; created_at: string; updated_at: string; } interface Workflow { uid: string; name: string; description?: string; content_types: string[]; workflow_stages: WorkflowStage[]; enabled: boolean; created_at: string; updated_at: string; } interface BasePublishAction { environments: string[]; locales: string[]; scheduled_at?: string; } interface BaseToken { uid: string; name: string; description?: string; token: string; created_at: string; updated_at: string; } interface ManagementToken extends BaseToken { scope: Array<{ module: string; acl: Record; }>; expires_on?: string; } interface DeliveryToken extends BaseToken { scope: Array<{ environments: Array<{ uid: string; name: string; }>; module: string; }>; } interface GlobalField { uid: string; title: string; description?: string; schema: FieldSchema[]; created_at: string; updated_at: string; } interface Label { uid: string; name: string; content_types: string[]; parent?: string[]; created_at: string; updated_at: string; } interface Role { uid: string; name: string; description?: string; rules: Array<{ module: string; users: string[]; acl: Record; }>; stack: { api_key: string; }; created_at: string; updated_at: string; } interface AuditLogEntry { uid: string; module: string; event_type: string; request_id: string; metadata: Record; remote_addr: string; created_at: string; created_by: string; } interface Extension { uid: string; title: string; type: string; tag?: string; scope?: { content_types: string[]; }; src?: string; config?: Record; created_at: string; updated_at: string; } interface BranchAlias { uid: string; source: string; created_at: string; updated_at: string; } interface PublishRule { uid: string; workflow: string; actions: string[]; branches: string[]; content_types: string[]; locales: string[]; environment: string; approvers: Array<{ uid: string; name?: string; email?: string; }>; created_at: string; updated_at: string; } interface PreviewToken extends BaseToken { scope: Array<{ environments: Array<{ uid: string; name: string; }>; module: string; }>; } interface MergeJob { uid: string; base_branch: string; compare_branch: string; status: string; merge_comment?: string; errors?: unknown[]; created_at: string; updated_at: string; } type AssetPublishAction = BasePublishAction; declare class AssetsClient { private readonly http; constructor(http: ContentstackHttpClient); list(opts?: { limit?: number; folder?: string; }): AsyncIterable; listAll(opts?: { limit?: number; folder?: string; }): Promise; get(uid: string): Promise; upload(form: FormData): Promise; update(uid: string, data: Partial): Promise; delete(uid: string): Promise; publish(uid: string, data: AssetPublishAction): Promise; unpublish(uid: string, data: AssetPublishAction): Promise; listFolders(opts?: { limit?: number; }): Promise; getFolder(uid: string): Promise; createFolder(data: { name: string; parent_uid?: string; }): Promise; updateFolder(uid: string, data: { name: string; }): Promise; deleteFolder(uid: string): Promise; replace(uid: string, form: FormData): Promise; getReferences(uid: string): Promise; } interface CrudConfig { basePath: string; singularKey: string; pluralKey: string; } declare class CrudClient { protected readonly http: ContentstackHttpClient; protected readonly config: CrudConfig; constructor(http: ContentstackHttpClient, config: CrudConfig); list(opts?: { limit?: number; }): AsyncIterable; listAll(opts?: { limit?: number; }): Promise; get(uid: string): Promise; create(data: Partial): Promise; update(uid: string, data: Partial): Promise; delete(uid: string): Promise; } declare class AuditLogClient extends CrudClient { constructor(http: ContentstackHttpClient); } interface CMAClientManagementTokenAuth { type: "management-token"; token: string; } interface CMAClientOAuthAuth { type: "oauth"; accessToken?: string; getAccessToken?: () => string | Promise; } interface CMAClientAuthtokenAuth { type: "authtoken"; token: string; } interface CMAClientCredentialsAuth extends ContentstackCredentials { type: "credentials"; } interface CMAClientOAuthFlowAuth { type: "oauth-flow"; config: OAuthConfig; tokens?: OAuthTokens; code?: string; codeVerifier?: string; obtainedAt?: number; refreshThresholdMs?: number; onTokens?: (tokens: OAuthTokens & { obtainedAt: number; }) => void | Promise; } type CMAClientAuth = CMAClientManagementTokenAuth | CMAClientOAuthAuth | CMAClientAuthtokenAuth | CMAClientCredentialsAuth | CMAClientOAuthFlowAuth; declare class BranchAliasesClient { private readonly http; constructor(http: ContentstackHttpClient); list(): Promise; get(uid: string): Promise; createOrUpdate(uid: string, targetBranch: string): Promise; delete(uid: string): Promise; } interface MergeRequest { base_branch: string; compare_branch: string; default_merge_strategy: "merge_prefer_base" | "merge_prefer_compare" | "overwrite_with_compare" | "merge_new_only" | "ignore"; merge_comment?: string; item_merge_strategies?: Record; } declare class BranchesClient { private readonly http; constructor(http: ContentstackHttpClient); list(opts?: { limit?: number; }): AsyncIterable; listAll(opts?: { limit?: number; }): Promise; get(uid: string): Promise; create(data: { uid: string; source: string; }): Promise; delete(uid: string): Promise; compare(baseBranch: string, compareBranch: string): Promise; merge(data: MergeRequest): Promise; listMergeJobs(): Promise; getMergeJob(uid: string): Promise; } interface BulkEntry { uid: string; content_type: string; locale: string; version?: number; } interface BulkPublishAction extends BasePublishAction { entries?: BulkEntry[]; assets?: Array<{ uid: string; }>; } interface BulkWorkflowAction { entries: Array<{ uid: string; content_type: string; locale: string; }>; workflow_stage: { uid: string; comment?: string; }; } declare class BulkOperationsClient { private readonly http; constructor(http: ContentstackHttpClient); publish(data: BulkPublishAction): Promise; unpublish(data: BulkPublishAction): Promise; delete(data: { entries?: Array<{ uid: string; content_type: string; locale: string; }>; assets?: Array<{ uid: string; }>; }): Promise; updateWorkflow(data: BulkWorkflowAction): Promise; addItems(data: Record): Promise; updateItems(data: Record): Promise; jobStatus(jobId: string): Promise; getJobItems(jobId: string, opts?: { limit?: number; skip?: number; }): Promise; } declare class ContentTypesClient extends CrudClient { constructor(http: ContentstackHttpClient); list(opts?: { limit?: number; include_count?: boolean; }): AsyncIterable; listAll(opts?: { limit?: number; include_count?: boolean; }): Promise; export(uid: string): Promise; import(data: Record): Promise; } interface EntryListOptions { locale?: string; include_publish_details?: boolean; include_workflow?: boolean; include_count?: boolean; query?: Record; asc?: string; desc?: string; limit?: number; } interface EntryGetOptions { locale?: string; include_publish_details?: boolean; include_workflow?: boolean; version?: number; } type PublishAction = BasePublishAction; interface WorkflowStageAction { workflow_stage: { uid: string; comment?: string; due_date?: string; assigned_to?: Array<{ uid: string; name: string; email: string; }>; notify?: boolean; }; } declare class EntriesClient { private readonly http; constructor(http: ContentstackHttpClient); private basePath; list(ctUid: string, opts?: EntryListOptions): AsyncIterable; listAll(ctUid: string, opts?: EntryListOptions): Promise; get(ctUid: string, entryUid: string, opts?: EntryGetOptions): Promise; create(ctUid: string, data: Partial): Promise; update(ctUid: string, entryUid: string, data: Partial): Promise; delete(ctUid: string, entryUid: string, opts?: { locale?: string; }): Promise; publish(ctUid: string, entryUid: string, data: PublishAction): Promise; unpublish(ctUid: string, entryUid: string, data: PublishAction): Promise; localize(ctUid: string, entryUid: string, data: Record): Promise; setWorkflowStage(ctUid: string, entryUid: string, data: WorkflowStageAction): Promise; references(ctUid: string, entryUid: string): Promise; languages(ctUid: string, entryUid: string): Promise; versions(ctUid: string, entryUid: string): Promise; import(ctUid: string, data: Record, opts?: { locale?: string; overwrite?: boolean; }): Promise; } declare class EnvironmentsClient extends CrudClient { constructor(http: ContentstackHttpClient); } declare class ExtensionsClient extends CrudClient { constructor(http: ContentstackHttpClient); upload(form: FormData): Promise; } declare class GlobalFieldsClient extends CrudClient { constructor(http: ContentstackHttpClient); export(uid: string): Promise; import(data: Record): Promise; } declare class LabelsClient extends CrudClient