/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { permissionsLlmCheck } from "../funcs/permissionsLlmCheck.js"; import { permissionsLlmGrant } from "../funcs/permissionsLlmGrant.js"; import { permissionsLlmRevoke } from "../funcs/permissionsLlmRevoke.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class SDKLlm extends ClientSDK { /** * Grant permission to a user or make public * * @remarks * Grant a role to a user for a resource, or grant public access by using "*" as userId. Only owners can grant permissions. Public access is allowed only for writer and reader roles. */ async grant( request: operations.LlmGrantRequest, options?: RequestOptions, ): Promise { return unwrapAsync(permissionsLlmGrant( this, request, options, )); } /** * Revoke permission from a user or remove public access * * @remarks * Revoke a role from a user for a resource, or remove public access by using "*" as userId. Only owners can revoke permissions. */ async revoke( request: operations.LlmRevokeRequest, options?: RequestOptions, ): Promise { return unwrapAsync(permissionsLlmRevoke( this, request, options, )); } /** * Check user permission * * @remarks * Check whether the authenticated caller has a specific role on a resource. */ async check( request: operations.LlmCheckRequest, options?: RequestOptions, ): Promise { return unwrapAsync(permissionsLlmCheck( this, request, options, )); } }