@unkey/api
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.
34 lines • 2.15 kB
TypeScript
import { UnkeyCore } from "../core.js";
import { RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
import * as errors from "../models/errors/index.js";
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
import { UnkeyError } from "../models/errors/unkeyerror.js";
import { APIPromise } from "../types/async.js";
import { Result } from "../types/fp.js";
/**
* Remove key roles
*
* @remarks
* Remove roles from a key without affecting direct permissions or other roles.
*
* Use this for privilege downgrades, removing temporary access, or subscription changes that revoke specific role-based capabilities. Direct permissions remain unchanged.
*
* **Important**: Changes take effect immediately with up to 30-second edge propagation.
*
* **Required Permissions**
*
* Your root key must have one of the following permissions:
* - `api.*.update_key` (to update keys in any API)
* - `api.<api_id>.update_key` (to update keys in a specific API)
*
* **Side Effects**
*
* Invalidates the key cache for immediate effect, and makes role changes available for verification within 30 seconds across all regions.
*
* If set, this operation will use {@link Security.rootKey} from the global security.
*/
export declare function keysRemoveRoles(client: UnkeyCore, request: components.V2KeysRemoveRolesRequestBody, options?: RequestOptions): APIPromise<Result<components.V2KeysRemoveRolesResponseBody, errors.BadRequestErrorResponse | errors.UnauthorizedErrorResponse | errors.ForbiddenErrorResponse | errors.NotFoundErrorResponse | errors.TooManyRequestsErrorResponse | errors.InternalServerErrorResponse | UnkeyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
//# sourceMappingURL=keysRemoveRoles.d.ts.map