// Type definitions for @trtc/calls-uikit-wx-uniapp-engine import { Ref, ComputedRef } from 'vue'; import { CallMediaType, AudioPlayBackDevice } from '@trtc/call-engine-lite-wx'; // ────── Constants ────── export declare enum CallStatus { IDLE = 'idle', CALLING = 'calling', CONNECTED = 'connected', } export declare enum CallRole { UNKNOWN = 'unknown', CALLEE = 'callee', CALLER = 'caller', } export declare enum DeviceStatus { UNKNOWN = 'unknown', ON = 'on', OFF = 'off', } export declare enum FeatureButton { Camera = 'camera', Microphone = 'microphone', SwitchCamera = 'switchCamera', InviteUser = 'inviteUser', } export declare enum LayoutMode { LocalInLargeView = 'local', RemoteInLargeView = 'remote', } export declare const EVENT: { LOGIN_SUCCESS: string; LOGOUT_SUCCESS: string; ACTIVE_CONV_UPDATED: string; SEND_MESSAGE: string; ON_CALLS: string; }; export declare const UI_PLATFORM: { UNI_MINI_APP: string; }; export declare enum MessageType { MSG_TEXT = 'TIMTextElem', MSG_CUSTOM = 'TIMCustomElem', } // ────── Types ────── export interface LoginParams { userId: string; userSig: string; sdkAppId: number; [key: string]: any; } export interface LoginUserInfo { userId: string; userName: string; avatarUrl: string; customInfo?: Record; } export interface SetSelfInfoParams { userName?: string; avatarUrl?: string; customInfo?: Record; } export interface ICallParticipant { id: string; name?: string; avatarUrl?: string; remark?: string; isMicrophoneOpened?: boolean; isCameraOpened?: boolean; volume?: number; } export interface ICallParticipantInfo { selfInfo: Partial & { status?: CallStatus; role?: CallRole }; callerInfo: Partial; allParticipants: ICallParticipant[]; speakerVolumes: any[]; networkQualities: any[]; isGroup: boolean; } // ────── Composable Hooks ────── export declare function useCallListState(): { inviterId: Ref; mediaType: Ref; duration: Ref; pusherId: Ref; calls: (params: any) => Promise; accept: () => Promise; reject: () => Promise; hangup: () => Promise; inviteUser: (params: any) => Promise; setSoundMode: (type?: any) => Promise; setSelfInfo: (params: any) => Promise; }; export declare function useCallParticipantState(): { callParticipantInfo: Ref; }; export declare function useDeviceState(): { microphoneStatus: Ref; cameraStatus: Ref; isFrontCamera: Ref; currentAudioRoute: Ref; openLocalMicrophone: () => Promise; closeLocalMicrophone: () => Promise; openLocalCamera: () => Promise; closeLocalCamera: () => Promise; switchCamera: () => Promise; setAudioRoute: () => Promise; }; export declare function useUIConfigState(): { hiddenButtons: ComputedRef>; layoutMode: ComputedRef; viewBackground: ComputedRef>; }; export declare function useLoginState(): { loginUserInfo: Ref; login: (options: LoginParams) => Promise; logout: () => Promise; setSelfInfo: (options: SetSelfInfoParams) => Promise; }; // ────── Service Exports ────── export declare const TUIStore: any; export declare const StoreName: any; export declare const TUICallKitAPI: any; export declare const NAME: Record; export declare function t(args: any): string; export declare const uiDesign: any; // ────── Utilities ────── export declare function formatDuration(seconds: number): string; export declare function removeC2C(str: string): string; export declare function isJSON(str: string): boolean; export declare function JSONToObject(str: string): any; export interface PermissionCheckResult { granted: boolean; tip: string; level: 'granted' | 'mini-program' | 'system'; } export declare function checkMicrophonePermission(): Promise; export declare function checkCameraPermission(): Promise; export declare function handlePermissionDenied(result: PermissionCheckResult): Promise<{ confirm: boolean }>; // ────── TUIBridge ────── export declare const TUIBridge: { registerEvent(eventName: string, notification: any): void; unregisterEvent(eventName: string, notification: any): void; notifyEvent(options: { eventName: string; params?: Record }): void; };