import { AgoraRteError } from '../utilities/error'; import { AgoraFetchParams } from './type'; export interface AgoraRestfulClient { /** * Get the current host domain */ readonly host: string; cloneWithUserAndRoomCredential(userId: string, userToken: string, roomToken: string): AgoraRestfulClient; /** * Sets the prefix for API paths * @param pathPrefix The prefix to be added to all API paths */ setPathPrefix(pathPrefix: string): void; /** * Performs a fetch request to the Agora API * @param params The fetch parameters */ fetch(params: AgoraFetchParams): Promise; } export declare class AgoraRestfulClientError extends Error { private _httpCode; private _message; private _opts; constructor(_httpCode: number, _message: string, _opts?: { serviceCode?: number; origin?: Error; }); get httpCode(): number; get message(): string; get serviceCode(): number | undefined; get origin(): Error | undefined; } export declare const isRestfulError: (err: unknown) => err is AgoraRestfulClientError; export declare const wrapRestfulErrorAsRteError: (err: AgoraRestfulClientError, prefix: string) => AgoraRteError;