import type { EntryFileType, EntryInfo, EntryParam, ICodeAPIService, ICodePlatform, IRepositoryModel, RefsParam, TreeEntry } from '@codeblitzjs/ide-code-api'; export type { EntryFileType, EntryInfo, EntryParam, ICodePlatform, IRepositoryModel, RefsParam, TreeEntry }; export { CodePlatform } from '@codeblitzjs/ide-code-api'; export declare const ICodeServiceConfig: unique symbol; interface ICodePlatformConfig { hostname?: string[]; /** location.origin */ origin?: string; /** 用于接口请求,不设置为 origin */ endpoint?: string; /** api 请求 token,上层可预设 token */ token?: string; /** 文件存储系统 默认 IndexedDB 全局缓存 */ isInMemory?: boolean; /** 是否递归获取文件 只请求一次文件列表 */ recursive?: boolean; [key: string]: any; } export type ICodeServiceConfig = { /** 平台 */ platform: ICodePlatform | string; /** 群组或用户 */ owner: string; /** 仓库名 */ name: string; /** 从代码托管平台跳转过来的路径,解析出 ref 和默认打开的文件,如 blob/master/README.md */ refPath?: string; /** ref */ ref?: string; /** tag */ tag?: string; /** branch */ branch?: string; /** commit sha */ commit?: string; /** url hash */ hash?: string; /** 仓库id */ projectId?: string; [key: string]: any; } & { [key in ICodePlatform]?: ICodePlatformConfig; }; export type InitializeState = 'Uninitialized' | 'Failed' | 'Initialized'; /** * 无需 Remote */ export declare enum RefType { Head = 0, Tag = 1 } export interface Ref { readonly type: RefType; readonly name: string; readonly commit: string; } export interface HeadRef { readonly type: RefType; readonly name?: string; readonly commit?: string; } export interface Refs { readonly branches: Ref[]; readonly tags: Ref[]; } export interface Submodule { name: string; path: string; url: string; } export interface ProjectDesc { platform: ICodePlatform | string; owner: string; name: string; } type Tail = T extends [IRepositoryModel, ...infer P] ? P : T; type Carry = F extends (...args: any[]) => any ? (...args: Tail>) => ReturnType : F; export type ICodeAPIProxy = { [P in keyof ICodeAPIService]: Carry; }; //# sourceMappingURL=types.d.ts.map