import { FactoryStorageDomain } from '@mastra/core/storage'; import type { CollectionSchema } from '@mastra/core/storage'; import type { FactorySecretEncryption } from '../../../secret-encryption.js'; /** * A user-defined OpenAI-compatible provider. The DB-backed counterpart of the * local `settings.json` `customProviders` entries: org-scoped rows keyed by the * derived provider id (name slug), API key stored alongside so a deployed * server never reads the shared settings file. */ export interface CustomProviderRecord { id: string; orgId: string; createdBy: string; /** Stable slug derived from the name (`getCustomProviderId`). */ providerId: string; name: string; url: string; apiKey: string | null; models: string[]; createdAt: Date; updatedAt: Date; } export interface UpsertCustomProviderInput { providerId: string; name: string; url: string; apiKey?: string; models: string[]; } export declare const CUSTOM_PROVIDERS_SCHEMA: CollectionSchema; export declare class CustomProvidersStorage extends FactoryStorageDomain { #private; private readonly encryption; constructor(encryption?: FactorySecretEncryption); init(): Promise; dangerouslyClearAll(): Promise; /** * Create or wholesale-replace a provider by `(orgId, providerId)` — mirrors * the settings.json upsert semantics (no key retention: an absent `apiKey` * clears the stored key). `previousProviderId` renames the provider: the * common path is a single atomic in-place update of the old row; renaming * onto an id that already exists overwrites the target first and removes the * old row last, so no interleaving or failure can lose the provider. */ upsert({ orgId, userId, input, previousProviderId, }: { orgId: string; userId: string; input: UpsertCustomProviderInput; previousProviderId?: string; }): Promise; list({ orgId }: { orgId: string; }): Promise; delete({ orgId, providerId }: { orgId: string; providerId: string; }): Promise; } //# sourceMappingURL=base.d.ts.map