import { FetchError, ARequestInit } from './utils/afetch.cjs'; import { ApiUserProfile, ApiWorkflowUserInsertPayload, APISuccessResult, ApiWorkflowUserUpdatePayload, ApiWorkflowDetail, ApiWorkflowListItem, ApiExtensionCreatePayload, ApiExtensionEntry, ApiExtensionUserListItem, ApiExtensionUserDetail, ApiStoreListExtensionsQuery, ApiExtensionStoreListItem, ApiWorkflowStoreListItem, ApiExtensionStoreDetail, ApiExtensionHighlightItem, ApiUserData } from './interfaces/api.interface.cjs'; declare class APIMeNamespace { private api; constructor(api: API); get(): Promise; update(profile: Partial>): Promise; createWorkflow(payload: ApiWorkflowUserInsertPayload): Promise>; updateWorkflow(workflowId: string, payload: ApiWorkflowUserUpdatePayload): Promise>; deleteWorkflow(workflowId: string): Promise>; getWorkflow(workflowId: string): Promise; listWorkflows(): Promise; createExtension(extensionPayload: ApiExtensionCreatePayload): Promise>; createEntry(extensionId: string, reason: string): Promise>; listExtensions(): Promise; getExtension(id: string): Promise; deleteExtensionEntry(extensionId: string): Promise>; deleteExtension(extensionId: string): Promise>; resubmitEntry(extensionId: string): Promise>; extensionExists(name: string): Promise; } declare class APIStoreNamespace { private api; constructor(api: API); listExtensions(options?: ApiStoreListExtensionsQuery): Promise<{ nextCursor: string; items: ApiExtensionStoreListItem[]; }>; listWorkflows(options?: ApiStoreListExtensionsQuery): Promise<{ nextCursor: string; items: ApiWorkflowStoreListItem[]; }>; getExtension(extensionId: string): Promise; getWorkflow(workflowId: string): Promise; } declare class APIExtensionsNamespace { private api; private apiKey; constructor(api: API); $setApiKey(apiKey: string): void; getDownloadFileUrl(extensionId: string): Promise<{ downloadUrl: string; }>; checkUpdate(extensions: { extensionId: string; version: string; }[]): Promise<{ id: string; fileUrl: string; version: string; apiVersion: string; }[]>; getHighlights(ids: string[]): Promise; } declare class APIWorkflowsNamespace { private api; private apiKey; constructor(api: API); $setApiKey(apiKey: string): void; get(workflowId: string): Promise; } declare class APIUserNamespace { private api; constructor(api: API); get(username: string): Promise; listWorkflows(username: string, nextCursor?: string): Promise<{ nextCursor: string; items: ApiWorkflowStoreListItem[]; }>; listExtensions(username: string, nextCursor?: string): Promise<{ nextCursor: string; items: ApiExtensionStoreListItem[]; }>; } declare class API { readonly apiBaseURL: string; readonly apiKey?: string | undefined; static getErrorMessage(error: unknown, byStatus?: Record): string; static handleError(func: () => Promise, handler: Record P>): Promise; private accessToken; handleError: typeof API.handleError; getErrorMessage: typeof API.getErrorMessage; readonly me: APIMeNamespace; readonly user: APIUserNamespace; readonly store: APIStoreNamespace; readonly workflows: APIWorkflowsNamespace; readonly extensions: APIExtensionsNamespace; constructor(apiBaseURL: string, apiKey?: string | undefined); authorizeFetch(path: string, init?: ARequestInit & { isPublic?: boolean; authToken?: string; }): Promise; $setAccessToken(session: string | null): void; $getAccessToken(): string | null; } export { API as A, APIMeNamespace as a, APIStoreNamespace as b, APIExtensionsNamespace as c, APIWorkflowsNamespace as d, APIUserNamespace as e };