interface OpenGroupCreateParams { /** 设备 ID */ deviceId: string; /** 名称 */ name?: string; /** 子功能显示类型 */ type?: string; /** 子功能分组类型 */ optionType?: string; /** 子功能来源 */ from?: 'RN' | '小程序' | 'APP'; /** 排序 */ order?: number; /** 是否显示 */ isShow?: boolean; /** 接口调用成功的回调函数 */ success?: () => void; /** 接口调用失败的回调函数 */ fail?: (err?: { errorMsg: string; errorCode: string | number; innerError: { errorCode: string | number; errorMsg: string; }; }) => void; /** 接口调用结束的回调函数(调用成功、失败都会执行) */ complete?: () => void; } interface OnOpenSubFunctionCallbackParams { /** 回调数据 */ data: { /** 群组创建结果,true 表示创建成功 */ groupCreateResult: boolean; }; /** 子功能标识 */ id: 'group_create'; /** 是否隐藏 */ isHide: boolean; } /** * 监听创建群组结果 * @param callback - 创建群组结果的回调函数 * @example * ```ts * onOpenGroupCreate((res) => { * console.log('群组创建结果:', res.data.groupCreateResult); * }); * ``` * @public * @since @ray-js/ray 1.4.21 */ export declare function onOpenGroupCreate(callback: (res: OnOpenSubFunctionCallbackParams) => void): void; /** * 打开创建群组页面 * @param params - 创建群组的参数 * @returns 打开创建群组页面的 Promise,成功时 resolve,失败时 reject * @example * ```ts * openGroupCreate({ * deviceId: 'xxxx', * success() { * console.log('打开创建群组页面成功'); * }, * fail(err) { * console.log('打开创建群组页面失败', err); * }, * }); * ``` * @public * @since @ray-js/ray 1.4.20 */ export declare function openGroupCreate(params: OpenGroupCreateParams): Promise; export {};