import type { AiWorkspaceClient } from './aiworkspace_client'; import type { BucketClient } from './bucket_client'; import { kRPCClient } from './krpc_client'; import { AuthClient } from './auth_client'; import type { CurrentIdentity } from './hybrid_sso'; import { hashPassword, AccountInfo } from './account'; import { BuckyOSConfig, RuntimeType, parseSessionTokenClaims } from './runtime'; import { AuthTarget, VerifyHubClient } from './verify-hub-client'; import { TaskManagerClient } from './task_mgr_client'; import { WorkflowClient } from './workflow_client'; import { SystemConfigClient } from './system_config_client'; import { AiccClient } from './aicc_client'; import { MsgQueueClient } from './msg_queue_client'; import { MsgCenterClient } from './msg_center_client'; import { RepoClient } from './repo_client'; import { KEventClient, KEvent, KEventPatternInput, KEventReader, KEventReaderOptions, KEventSubscribeOptions, KEventSubscription } from './kevent_client'; import type { DidDocType } from './types'; import type { EncodedDocument } from './namelib'; export declare const WEB3_BRIDGE_HOST = "web3.buckyos.ai"; export declare const BS_SERVICE_VERIFY_HUB = "verify-hub"; export declare const BS_SERVICE_TASK_MANAGER = "task-manager"; export type SDKTarget = 'universal' | 'browser' | 'node'; export interface WalletSignWithActiveDidResult { signatures: (string | null)[]; pwd_hash: string | null; } export declare function getCurrentWalletUserFromHost(): Promise; export declare function resolveDidFromHost(did: string, docType?: DidDocType | null): Promise; export declare function getActiveRuntimeType(): RuntimeType; export declare function getActiveZoneGatewayOrigin(): string | null; export declare function getActiveSessionToken(): Promise; export declare class BuckyOSSDK { private currentRuntime; private currentAccountInfo; private currentKEventClient; private readonly target; constructor(target: SDKTarget); initBuckyOS(appid?: string, config?: BuckyOSConfig | null): Promise; getBuckyOSConfig(): BuckyOSConfig | null; getRuntimeType(): RuntimeType; getAppId(): string | null; getAppDid(): string | null; getAppInstanceId(): string | null; getAppDataDir(): string | null; attachEvent(eventName: string, callback: Function): void; removeEvent(cookieId: string): void; getKEventClient(): KEventClient; createEventReader(patterns: KEventPatternInput, options?: KEventReaderOptions): Promise; create_event_reader(patterns: KEventPatternInput, options?: KEventReaderOptions): Promise; subscribeKEvent(patterns: KEventPatternInput, callback: (event: KEvent) => void | Promise, options?: KEventSubscribeOptions): Promise; /** * Whom the current session speaks for: an account of this Zone, an External * DID (no account here) or an anonymous visitor. `getAccountInfo` stays * account-only and returns `null` for External sessions. */ getCurrentIdentity(): Promise; getAccountInfo(): Promise; loginByPassword(username: string, password: string, target?: AuthTarget): Promise; loginByRuntimeSession(): Promise; loginByBrowserSSO(): Promise; login(): Promise; logout(cleanAccountInfo?: boolean): void; getAppSetting(settingName?: string | null): Promise; setAppSetting(settingName: string | null | undefined, settingValue: string): Promise; getCurrentWalletUser(): Promise; resolve_did(did: string, docType?: DidDocType | null): Promise; walletSignWithActiveDid(payloads: Record[]): Promise; openExternalUrl(url: string): Promise; getZoneHostName(): string | null; getZoneServiceURL(serviceName: string): string; getServiceRpcClient(serviceName: string): kRPCClient; getVerifyHubClient(): VerifyHubClient; getSystemConfigClient(): SystemConfigClient; getTaskManagerClient(): TaskManagerClient; getWorkflowClient(): WorkflowClient; getAiccClient(): AiccClient; getAiWorkspaceClient(): AiWorkspaceClient; getBucketClient(): BucketClient; getMsgQueueClient(): MsgQueueClient; getMsgCenterClient(): MsgCenterClient; getRepoClient(): RepoClient; private buildRuntimeConfig; private tryGetZoneHostName; private fetchZoneHostFromIdentifierDoc; private syncCurrentAccountInfoFromRuntime; private usesRuntimeManagedSession; private detectEnvironmentRuntimeType; } export declare function createSDKModule(target: SDKTarget): { buckyos: { hashPassword: typeof hashPassword; initBuckyOS: (appid?: string, config?: BuckyOSConfig | null) => Promise; getBuckyOSConfig: () => BuckyOSConfig | null; getRuntimeType: () => RuntimeType; getAppId: () => string | null; getAppDid: () => string | null; getAppInstanceId: () => string | null; getAppDataDir: () => string | null; getKEventClient: () => KEventClient; createEventReader: (patterns: KEventPatternInput, options?: KEventReaderOptions) => Promise; create_event_reader: (patterns: KEventPatternInput, options?: KEventReaderOptions) => Promise; subscribeKEvent: (patterns: KEventPatternInput, callback: (event: KEvent) => void | Promise, options?: KEventSubscribeOptions) => Promise; attachEvent: (eventName: string, callback: Function) => void; removeEvent: (cookieId: string) => void; getAccountInfo: () => Promise; loginByPassword: (username: string, password: string, target?: AuthTarget | undefined) => Promise; loginByBrowserSSO: () => Promise; loginByRuntimeSession: () => Promise; login: () => Promise; logout: (cleanAccountInfo?: boolean) => void; getAppSetting: (settingName?: string | null) => Promise; setAppSetting: (settingName: string | null | undefined, settingValue: string) => Promise; getCurrentWalletUser: () => Promise; getCurrentIdentity: () => Promise; resolve_did: (did: string, docType?: DidDocType | null) => Promise; walletSignWithActiveDid: (payloads: Record[]) => Promise; openExternalUrl: (url: string) => Promise; getZoneHostName: () => string | null; getZoneServiceURL: (serviceName: string) => string; getServiceRpcClient: (serviceName: string) => kRPCClient; getVerifyHubClient: () => VerifyHubClient; getSystemConfigClient: () => SystemConfigClient; getTaskManagerClient: () => TaskManagerClient; getWorkflowClient: () => WorkflowClient; getAiccClient: () => AiccClient; getAiWorkspaceClient: () => AiWorkspaceClient; getBucketClient: () => BucketClient; getMsgQueueClient: () => MsgQueueClient; getMsgCenterClient: () => MsgCenterClient; getRepoClient: () => RepoClient; kRPCClient: typeof kRPCClient; AuthClient: typeof AuthClient; }; initBuckyOS: (appid?: string, config?: BuckyOSConfig | null) => Promise; getBuckyOSConfig: () => BuckyOSConfig | null; getRuntimeType: () => RuntimeType; getAppId: () => string | null; getAppDid: () => string | null; getAppInstanceId: () => string | null; getAppDataDir: () => string | null; getKEventClient: () => KEventClient; createEventReader: (patterns: KEventPatternInput, options?: KEventReaderOptions) => Promise; create_event_reader: (patterns: KEventPatternInput, options?: KEventReaderOptions) => Promise; subscribeKEvent: (patterns: KEventPatternInput, callback: (event: KEvent) => void | Promise, options?: KEventSubscribeOptions) => Promise; attachEvent: (eventName: string, callback: Function) => void; removeEvent: (cookieId: string) => void; getAccountInfo: () => Promise; loginByPassword: (username: string, password: string, target?: AuthTarget | undefined) => Promise; loginByBrowserSSO: () => Promise; loginByRuntimeSession: () => Promise; login: () => Promise; logout: (cleanAccountInfo?: boolean) => void; getAppSetting: (settingName?: string | null) => Promise; setAppSetting: (settingName: string | null | undefined, settingValue: string) => Promise; getCurrentWalletUser: () => Promise; getCurrentIdentity: () => Promise; resolve_did: (did: string, docType?: DidDocType | null) => Promise; walletSignWithActiveDid: (payloads: Record[]) => Promise; openExternalUrl: (url: string) => Promise; getZoneHostName: () => string | null; getZoneServiceURL: (serviceName: string) => string; getServiceRpcClient: (serviceName: string) => kRPCClient; getVerifyHubClient: () => VerifyHubClient; getSystemConfigClient: () => SystemConfigClient; getTaskManagerClient: () => TaskManagerClient; getWorkflowClient: () => WorkflowClient; getAiccClient: () => AiccClient; getAiWorkspaceClient: () => AiWorkspaceClient; getBucketClient: () => BucketClient; getMsgQueueClient: () => MsgQueueClient; getMsgCenterClient: () => MsgCenterClient; getRepoClient: () => RepoClient; }; export type { BuckyOSConfig }; export { RuntimeType }; export { parseSessionTokenClaims }; export { ZONE_USER_TYPES, EXTERNAL_PRINCIPAL_CLAIM, parseZoneUserType, isExternalPrincipal, } from './runtime'; export type { ZoneUserType, TokenPrincipalKind } from './runtime'; export { VerifyHubClient }; export { RPCError } from './krpc_client'; export * from './hybrid_sso'; export * from './app_login'; export type { AppAuthTarget, AuthTarget, LoginByJwtParams, LoginByPasswordParams, RefreshTokenParams, SudoByPasswordParams, SudoByPasswordResponse, SystemAuthTarget, TokenPair, VerifyTokenParams, } from './verify-hub-client'; export { SystemConfigClient }; export * from './task_mgr_client'; export * from './workflow_client'; export * from './aicc_client'; export { MsgQueueClient }; export { MsgCenterClient, mailboxAddress, mailboxResource, NOTIFY_INTENT, NOTIFY_DELIVERED_INTENT, NOTIFY_DATA_VERSION, NOTIFY_SESSION_PREFIX, NOTIFY_CHOICE_CONTROL_ID, NOTIFY_TEXT_CONTROL_ID, NOTIFY_ACTION_ANSWER, NOTIFY_ACTION_DISMISS, NOTIFY_LINK_PATH, isNotifyClosed, notifyCategorySessionId, notifyCategoryFromSessionId, inputPrompt, promptOptions, notifyAnswerToTaskResult, validateNotifyAnswer, notifyUrl, msgMachineData, notifyMessageData, commitNotifyAnswer, answerNotify, waitNotify, FRIEND_INTENT, CONTACT_TAG_ZONE_USER, CONTACT_TAG_ZONE_AGENT, CONTACT_TAG_HOMESTATION_FOLLOWING, CONTACT_CHANGED_EVENT_PATTERN, WELL_KNOWN_CONTACT_TAGS, USER_TYPE_GROUP_REF_PREFIX, USER_GROUP_REF_PREFIX, contactTagApp, contactTagKind, isUserGroupRefTag, } from './msg_center_client'; export type { AccessGroupLevel, Contact, ContactPatch, ContactQuery, ContactSource, FriendState, ContactTagKind, WellKnownContactTag, FriendRequestDirection, FriendRequestState, FriendRequestDecision, FriendDeliveryState, FriendDelivery, FriendRequest, FriendRequestResult, FriendMessageData, LookupKind, LookupSection, LookupInputKind, ReachabilityState, LookupErrorCode, Reachability, LookupRelation, LookupGroupInfo, LookupCandidate, LookupResult, ContactLookupReq, ListFriendRequestsReq, ContactChangedEvent, MailboxAddress, GetNextParams, PeekBoxParams, ListBoxByTimeParams, NotifyKind, NotifyCategory, NotifyLevel, NotifyStatus, NotifyConversation, NotifySource, NotifySendReq, NotifyRecordRef, NotifyDelivery, NotifyResult, NotifyView, NotifyListReq, NotifyListResult, NotifyMessageData, NotifyDeliveredData, NotifyAnswer, NotifyTaskAccess, NotifyCommit, WaitNotifyOptions, } from './msg_center_client'; export { RepoClient }; export * from './kevent_client'; //# sourceMappingURL=sdk_core.d.ts.map