import type { PostgresDatabaseDeleteCredentialResult } from '@heroku/types/data'; import type { ResourceCtx } from '../../../core/extend-resource.js'; import type { ResolvedAddOn } from '../../platform/add-on/types.js'; import type { DatabaseCredentialOptions } from './index.js'; export type DestroyDatabaseCredentialOptions = DatabaseCredentialOptions & { /** * Fires before the destroy request, allowing the caller to perform any * necessary pre-destroy checks or UI rendering. */ beforeDestroy?: (preview: { addon: ResolvedAddOn; }) => Promise | void; }; export type DestroyDatabaseCredentialResult = { addon: ResolvedAddOn; result: PostgresDatabaseDeleteCredentialResult | void; }; /** * Destroys a credential on a Postgres database, dispatching to the * Advanced-tier or classic-tier endpoint based on the resolved add-on's plan. * * The owner credential (Advanced tier) and the default credential (classic/Essential * tier) can't be destroyed, custom credentials can't be destroyed on Essential-tier * databases, and a credential still attached to any app must be detached first. */ export declare function destroy(ctx: Pick, addonIdentity: string, credName: string, options?: DestroyDatabaseCredentialOptions): Promise;