import type tcb from '@cloudbase/js-sdk'; import { ICloudFnParams } from './basic-api'; import { ISwrOptions } from './swr'; /** * 调用数据源公共云函数(lcap-common-service)中提供的方法 */ export declare function callCommonService(params: ICloudFnParams, app?: tcb.app.App): Promise; /** * 调用流程 */ export declare function callWorkflow(params: ICallWedaApiParams): Promise; /** * 权限信息 * https://tcloud-dev.oa.com/document/product/1505/57799?!preview&!document=1 */ export interface ICheckAuthParams { /** * 资源类型 (1:应用,2:数据源,3:流程) */ type: '1' | '2' | '3'; /** * 子资源类型 (1:应用,2:页面,3:按钮) */ subType: '1' | '2' | '3'; /** * 父资源ID (对于应用:只有Type =1/subType =3 此值才有意义) */ parentResourceId?: string; } /** * 检查权限 */ export declare function checkAuth(params: ICheckAuthParams): Promise; export interface ICallWedaApiParams { /** 方法名称 */ action: string; /** * 方法的自定义参数 * 其中 envType, envId, uid, source 均无需填写 */ data?: Record; /** * 是否自动将 data 的key 改为大写驼峰 * 默认为 true, 即使用时 data 可以采用小驼峰的 key */ capitalizeDataKey?: boolean; swr?: ISwrOptions; } /** * 调用微搭API */ export declare function callWedaApi(params: ICallWedaApiParams): Promise; /** * 数据源查询条件 * string: 数据源标识 * function: 自定义数据源查找条件 * {key, val}: 查找数据源信息中字段为 key, 值为 val 的项 */ type IDsProfileFilterOptions = string | ((ds: any) => boolean) | { val: string; key: string; }; /** * 根据数据源名称查询数据源信息(同步, 已废弃) * @deprecated use `getDataSourceProfileAsync` instead */ export declare function getDataSourceProfile(options: IDsProfileFilterOptions): any; /** * 根据数据源名称查询数据源信息(异步) */ export declare function getDataSourceProfileAsync(dsName: string | Record): Promise; export declare function standardizeDs(ds: any): Record; export {};