/*** * @file: * @author: caojianping * @Date: 2023-07-05 19:34:14 */ import { DingdingScanTypeEnum, OpenPlatformTypeEnum } from '../enums'; import { IDingdingScanResult, IDingdingShareParams } from './dingding.interface'; import { IFeishuScanResult } from './feishu.interface'; /** * 开放平台window类型 */ export type PlatformWindow = Record & { dd?: any; h5sdk?: any; tt?: any; }; /** * 开放平台选项接口 */ export interface IOpenPlatformOptions { signatureUrl: string; } /** * 开放平台链接地址接口 */ export interface IOpenPlatformUrl { agAppId: string; [key: string]: string; } /** * 开放平台接口 */ export interface IOpenPlatform { type: OpenPlatformTypeEnum; key: string; agAppId: string; isReady: boolean; options: IOpenPlatformOptions | null; /** * 初始化 * @param options 初始化参数选项 */ init(options?: IOpenPlatformOptions): Promise; /** * 授权码 */ authCode(): Promise; /** * 扫码 * @param type 扫码类型 * @param barCodeInput 是否支持手动输入条形码 */ scanCode(type?: DingdingScanTypeEnum | string[], barCodeInput?: boolean): Promise; /** * 分享 */ share(shareParams: IDingdingShareParams, debugFlag?: boolean): Promise; } /** * 开放平台授权码接口 */ export interface IBaseAuthCode { code: string; agAppId: string; }