import { Result } from "@webiny/feature/api"; import { ApiKeysRepository } from "../shared/abstractions.js"; import { ApiKeyNotAuthorizedError } from "../shared/errors.js"; import type { ApiKey } from "../shared/types.js"; export interface IDeleteApiKeyErrors { notAuthorized: ApiKeyNotAuthorizedError; } type DeleteApiKeyError = IDeleteApiKeyErrors[keyof IDeleteApiKeyErrors] | ApiKeysRepository.Error; export interface IDeleteApiKey { execute(id: string): Promise>; } /** Delete an API key. */ export declare const DeleteApiKeyUseCase: import("@webiny/di").Abstraction; export declare namespace DeleteApiKeyUseCase { type Interface = IDeleteApiKey; type Error = DeleteApiKeyError; } export interface ApiKeyBeforeDeletePayload { apiKey: ApiKey; } export interface ApiKeyAfterDeletePayload { apiKey: ApiKey; } export {};