UNPKG

@unkey/api

Version:

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

33 lines 1.68 kB
import * as z from "zod/v3"; export type V2KeysGetKeyRequestBody = { /** * Specifies which key to retrieve using the database identifier returned from `keys.createKey`. * * @remarks * Do not confuse this with the actual API key string that users include in requests. * Key data includes metadata, permissions, usage statistics, and configuration but never the plaintext key value unless `decrypt=true`. * Find this ID in creation responses, key listings, dashboard, or verification responses. */ keyId: string; /** * Controls whether to include the plaintext key value in the response for recovery purposes. * * @remarks * Only works for keys created with `recoverable=true` and requires the `decrypt_key` permission. * Returned keys must be handled securely, never logged, cached, or stored insecurely. * * Use only for legitimate recovery scenarios like user password resets or emergency access. * Most applications should keep this false to maintain security best practices and avoid accidental key exposure. * Decryption requests are audited and may trigger security alerts in enterprise environments. */ decrypt?: boolean | undefined; }; /** @internal */ export type V2KeysGetKeyRequestBody$Outbound = { keyId: string; decrypt: boolean; }; /** @internal */ export declare const V2KeysGetKeyRequestBody$outboundSchema: z.ZodType<V2KeysGetKeyRequestBody$Outbound, z.ZodTypeDef, V2KeysGetKeyRequestBody>; export declare function v2KeysGetKeyRequestBodyToJSON(v2KeysGetKeyRequestBody: V2KeysGetKeyRequestBody): string; //# sourceMappingURL=v2keysgetkeyrequestbody.d.ts.map