UNPKG

@unkey/api

Version:

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

32 lines 1.69 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 V2KeysSetRolesResponseBody = { /** * 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 now directly assigned to the key after the set operation has completed. * * @remarks * * The response includes: * - The comprehensive, updated set of roles (reflecting the complete replacement) * - Both ID and name for each role for easy reference * * Important notes: * - This response shows the final state after the complete replacement * - If you provided an empty array in the request, this will also be empty * - This only shows direct role assignments on the key * - Role permissions are not expanded in this response - use keys.getKey for complete details * - An empty array indicates the key now has no roles assigned at all */ data: Array<Role>; }; /** @internal */ export declare const V2KeysSetRolesResponseBody$inboundSchema: z.ZodType<V2KeysSetRolesResponseBody, z.ZodTypeDef, unknown>; export declare function v2KeysSetRolesResponseBodyFromJSON(jsonString: string): SafeParseResult<V2KeysSetRolesResponseBody, SDKValidationError>; //# sourceMappingURL=v2keyssetrolesresponsebody.d.ts.map