UNPKG

@unkey/api

Version:

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

31 lines 1.44 kB
import * as z from "zod/v3"; export type V2KeysAddRolesRequestBody = { /** * Specifies which key receives the additional roles using the database identifier returned from `createKey`. * * @remarks * Do not confuse this with the actual API key string that users include in requests. * Added roles supplement existing roles and permissions without replacing them. * Role assignments take effect immediately but may take up to 30 seconds to propagate across all regions. */ keyId: string; /** * Assigns additional roles to the key through direct assignment to existing workspace roles. * * @remarks * Operations are idempotent - adding existing roles has no effect and causes no errors. * * All roles must already exist in the workspace - roles cannot be created automatically. * Invalid roles cause the entire operation to fail atomically, ensuring consistent state. */ roles: Array<string>; }; /** @internal */ export type V2KeysAddRolesRequestBody$Outbound = { keyId: string; roles: Array<string>; }; /** @internal */ export declare const V2KeysAddRolesRequestBody$outboundSchema: z.ZodType<V2KeysAddRolesRequestBody$Outbound, z.ZodTypeDef, V2KeysAddRolesRequestBody>; export declare function v2KeysAddRolesRequestBodyToJSON(v2KeysAddRolesRequestBody: V2KeysAddRolesRequestBody): string; //# sourceMappingURL=v2keysaddrolesrequestbody.d.ts.map