UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

36 lines 2.28 kB
import { UnkeyCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { UnkeyError } from "../models/errors/unkeyerror.js"; import { APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * List API keys * * @remarks * Retrieve a paginated list of API keys for dashboard and administrative interfaces. * * Use this to build key management dashboards, filter keys by user with `externalId`, or retrieve key details for administrative purposes. Each key includes status, metadata, permissions, and usage limits. * * **Important**: Set `decrypt: true` only in secure contexts to retrieve plaintext key values from recoverable keys. * * **Required Permissions** * * Your root key must have one of the following permissions for basic key listing: * - `api.*.read_key` (to read keys from any API) * - `api.<api_id>.read_key` (to read keys from a specific API) * * Additionally, you need read access to the API itself: * - `api.*.read_api` or `api.<api_id>.read_api` * * Additional permission required for decrypt functionality: * - `api.*.decrypt_key` or `api.<api_id>.decrypt_key` * * If set, this operation will use {@link Security.rootKey} from the global security. */ export declare function apisListKeys(client: UnkeyCore, request: components.V2ApisListKeysRequestBody, options?: RequestOptions): APIPromise<Result<components.V2ApisListKeysResponseBody, errors.BadRequestErrorResponse | errors.UnauthorizedErrorResponse | errors.ForbiddenErrorResponse | errors.NotFoundErrorResponse | errors.TooManyRequestsErrorResponse | errors.InternalServerErrorResponse | UnkeyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>; //# sourceMappingURL=apisListKeys.d.ts.map