import { Plugin } from "@webiny/plugins"; import type { CmsEntryValues, CmsModel, StorageOperationsCmsModel } from "../types/index.js"; export interface StorageOperationsCmsModelPluginCallable { (model: CmsModel): StorageOperationsCmsModel; } /** * This plugin should be initialized only once and hence the name. */ export declare class StorageOperationsCmsModelPlugin extends Plugin { static readonly type: string; name: string; private readonly models; private readonly cb; constructor(cb: StorageOperationsCmsModelPluginCallable); getModel(input: CmsModel): StorageOperationsCmsModel; /** * We can cache the converters by having a cache key that is a combination of model ID and savedOn. * The models created via the code will not have savedOn, so they will be unknown - and that is ok as they cannot change in the middle of the call. * * The models created via the CRUD operations might get changed in the middle of the call, so we need to re-create the SO model. */ private createCacheKey; }