UNPKG

@unkey/api

Version:

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

30 lines 1.37 kB
import * as z from "zod/v3"; export type V2KeysAddPermissionsRequestBody = { /** * Specifies which key receives the additional permissions using the database identifier returned from `keys.createKey`. * * @remarks * Do not confuse this with the actual API key string that users include in requests. */ keyId: string; /** * Grants additional permissions to the key through direct assignment or automatic creation. * * @remarks * Duplicate permissions are ignored automatically, making this operation idempotent. * * Adding permissions never removes existing permissions or role-based permissions. * * Any permissions that do not exist will be auto created if the root key has permissions, otherwise this operation will fail with a 403 error. */ permissions: Array<string>; }; /** @internal */ export type V2KeysAddPermissionsRequestBody$Outbound = { keyId: string; permissions: Array<string>; }; /** @internal */ export declare const V2KeysAddPermissionsRequestBody$outboundSchema: z.ZodType<V2KeysAddPermissionsRequestBody$Outbound, z.ZodTypeDef, V2KeysAddPermissionsRequestBody>; export declare function v2KeysAddPermissionsRequestBodyToJSON(v2KeysAddPermissionsRequestBody: V2KeysAddPermissionsRequestBody): string; //# sourceMappingURL=v2keysaddpermissionsrequestbody.d.ts.map