UNPKG

askexperts

Version:

AskExperts SDK: build and use AI experts - ask them questions and pay with bitcoin on an open protocol

57 lines (56 loc) 2.23 kB
import { DBExpert } from "./interfaces.js"; import { ExpertClient } from "./ExpertClient.js"; /** * Remote implementation of the ExpertClient interface * Communicates with a remote server for expert-related operations */ export declare class RemoteExpertClient implements ExpertClient { private url; /** * Creates a new RemoteExpertClient instance * @param url - URL of the remote server */ constructor(url: string); /** * List all experts * @returns Promise resolving to an array of expert objects * @throws Error indicating this method is not implemented yet */ listExperts(): Promise<DBExpert[]>; /** * Get an expert by pubkey * @param pubkey - Pubkey of the expert to get * @returns Promise resolving to the expert if found, null otherwise * @throws Error indicating this method is not implemented yet */ getExpert(pubkey: string): Promise<DBExpert | null>; /** * Insert a new expert * @param expert - Expert to insert * @returns Promise resolving to true if expert was inserted, false otherwise * @throws Error indicating this method is not implemented yet */ insertExpert(expert: DBExpert): Promise<boolean>; /** * Update an existing expert * @param expert - Expert to update * @returns Promise resolving to true if expert was updated, false otherwise * @throws Error indicating this method is not implemented yet */ updateExpert(expert: DBExpert): Promise<boolean>; /** * Set the disabled status of an expert * @param pubkey - Pubkey of the expert to update * @param disabled - Whether the expert should be disabled * @returns Promise resolving to true if expert was updated, false otherwise * @throws Error indicating this method is not implemented yet */ setExpertDisabled(pubkey: string, disabled: boolean): Promise<boolean>; /** * Delete an expert * @param pubkey - Pubkey of the expert to delete * @returns Promise resolving to true if expert was deleted, false otherwise * @throws Error indicating this method is not implemented yet */ deleteExpert(pubkey: string): Promise<boolean>; }