import type { AssetType } from '@moteurio/types/Asset.js'; import type { ProjectSchema, VideoProvidersConfig } from '@moteurio/types/Project.js'; import type { VariantDefinition } from '@moteurio/types/VariantDefinition.js'; import type { MoteurClient } from '../client.js'; type AssetConfig = NonNullable; /** A project's media settings, secrets shown as `***`, with what the server offers. */ export type MediaSettings = { assetConfig: AssetConfig; videoProviders?: VideoProvidersConfig; /** Storages this server can use, e.g. `local`, `s3`. */ storages: string[]; /** Video hosts this server can send videos to. */ videoHosts: string[]; /** Files kept on the project's storage: to change storage, they are moved. */ storedFiles: number; /** * Where the videos are: per host (`mux`…) or `local` (this server), how many, and how many * have a copy here (those can move). Videos in the bin aren't counted. */ videos: Record; defaults: { maxUploadSizeMb: number; variants: VariantDefinition[]; types: AssetType[]; }; }; export type MediaSettingsUpdate = { assetConfig?: Partial; videoProviders?: VideoProvidersConfig | null; }; export type StorageSettings = { adapter: string; adapterConfig?: Record; }; export declare function projectMediaSettingsApi(client: MoteurClient): { get(projectId: string): Promise; update(projectId: string, body: MediaSettingsUpdate): Promise>; /** Writes, reads back and deletes a small file with these settings, before saving them. */ checkStorage(projectId: string, body: StorageSettings): Promise<{ ok: boolean; error?: string; }>; /** Copies every file to this storage, then switches to it. */ moveStorage(projectId: string, body: StorageSettings): Promise<{ moved: number; }>; /** * Moves the videos to where new ones go (the project's host, or this server), in the * background. `removeFromOld`: delete each at its old host once ready at the new one. */ moveVideos(projectId: string, body?: { removeFromOld?: boolean; }): Promise<{ to: string; moving: number; staying: number; }>; /** Forgets a video host's keys (refused while videos are there, or for the host in use). */ forgetVideoHost(projectId: string, host: string): Promise<{ videoProviders?: VideoProvidersConfig; }>; }; export {}; //# sourceMappingURL=mediaSettings.d.ts.map