import type { ResourceCtx } from '../../../core/extend-resource.js'; import type { PlatformClient } from '../../../services/platform.js'; import type { ResolveAddonOptions, ResolvedAddOn } from './types.js'; /** * Resolve a Platform add-on by identity. * * The add-on identity may be: * - an add-on UUID (`d5e3f2a4-...`) * - a globally-unique add-on name (`postgres-curved-12345`) * - an add-on service slug (`heroku-postgresql`) * - an add-on plan slug (`heroku-postgresql:essential-0`) * * It may also be an add-on attachment identity: * - an attachment UUID (`2a4d5e3f-...`), name (`DATABASE`), or config * var (`DATABASE_URL`). These identities require `appIdentity`. * - an attachment name or config var prefixed with the app name * (`my-app::DATABASE`, `my-app::DATABASE_URL`). * * `addonService` (e.g. `heroku-postgresql`) is filtered client-side after * the resolve. The platform's server-side `addon_service` filter excludes * alpha add-ons, so we don't pass it through. * * Errors: * - throws `AddonNotFoundError` if no match is found * - throws `AddonAmbiguousError` if multiple matches remain after filtering */ export declare function resolveAddon(ctx: Pick, addonIdentity: string, options?: ResolveAddonOptions): Promise; export declare function resolveAddonInternal(platform: PlatformClient, addonIdentity: string, options?: { addonService?: string; appIdentity?: string; }): Promise;