import { AxiosRequestConfig } from "axios"; import { LarkApiResponse, TokenType } from "./types"; /** * 昆仑智联 API 客户端 * 简化的 HTTP 客户端,用于调用昆仑智联开放平台 API */ export declare class LarkClient { private http; private tenantToken; private tokenExpireAt; constructor(); /** * 获取 tenant_access_token */ getTenantToken(): Promise; /** * 发起 API 请求 */ request(config: AxiosRequestConfig & { tokenType?: TokenType; }): Promise>; /** * GET 请求 */ get(url: string, params?: Record): Promise>; /** * POST 请求 */ post(url: string, data?: any): Promise>; /** * PUT 请求 */ put(url: string, data?: any): Promise>; /** * DELETE 请求 */ delete(url: string, data?: any): Promise>; /** * PATCH 请求 */ patch(url: string, data?: any): Promise>; /** * 构建文档 URL * 昆仑智联的文档 URL 统一使用 nipj5983sr.fklzl.cnpc.com.cn 域名 */ buildDocUrl(docId: string, type?: "doc" | "docx" | "sheet" | "bitable" | "board"): string; /** * 设置文档公开权限(链接分享可编辑) */ setPublicPermission(token: string, type: "doc" | "docx" | "sheet" | "bitable" | "file", perm?: "view" | "edit"): Promise; /** * 转移文档所有者 * @param token 文档/表格 token * @param type 文档类型 * @param memberId 新所有者 ID * @param memberType 成员类型 * @param removeOldOwner 是否移除旧所有者权限,默认 false(保留为协作者) */ transferOwner(token: string, type: "doc" | "docx" | "sheet" | "bitable" | "file", memberId: string, memberType?: "openid" | "userid" | "email", removeOldOwner?: boolean): Promise; /** * 通过邮箱转移文档所有者 */ transferOwnerByEmail(token: string, type: "doc" | "docx" | "sheet" | "bitable" | "file", email: string): Promise; } export declare function getLarkClient(): LarkClient; //# sourceMappingURL=client.d.ts.map