UNPKG

@unkey/api

Version:

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

31 lines 1.62 kB
import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Meta } from "./meta.js"; import { Role } from "./role.js"; export type V2KeysAddRolesResponseBody = { /** * Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team. */ meta: Meta; /** * Complete list of all roles directly assigned to the key after the operation completes. * * @remarks * * The response includes: * - All roles now assigned to the key (both pre-existing and newly added) * - Both ID and name of each role for easy reference * * Important notes: * - The response shows the complete current state after the addition * - An empty array means the key has no roles assigned (unlikely after an add operation) * - This only shows direct role assignments, not inherited or nested roles * - Role permissions are not expanded in this response - use keys.getKey for full details */ data: Array<Role>; }; /** @internal */ export declare const V2KeysAddRolesResponseBody$inboundSchema: z.ZodType<V2KeysAddRolesResponseBody, z.ZodTypeDef, unknown>; export declare function v2KeysAddRolesResponseBodyFromJSON(jsonString: string): SafeParseResult<V2KeysAddRolesResponseBody, SDKValidationError>; //# sourceMappingURL=v2keysaddrolesresponsebody.d.ts.map