chore: 构建产物更新 v0.11.2

This commit is contained in:
2026-05-04 20:18:11 +08:00
parent 9d283dad99
commit 296c981377
4 changed files with 254 additions and 255 deletions

67
types/index.d.ts vendored
View File

@@ -1,23 +1,20 @@
declare type HttpMethod = "GET" | "POST" | "PUT" | "DELETE";
declare interface Base62Param {
/** 当前选中的 tab 标识 */
tab?: string
/** 当前页码 */
page?: number
/** 每页条数 */
pageSize?: number
/** 筛选条件 */
condition?: Record<string, unknown>
/** 侧边栏选中项标识 */
sider?: string
/** 搜索关键词 */
keyword?: string
}
declare type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'
/**
* @typedef {'GET' | 'POST' | 'PUT' | 'DELETE'} HttpMethod
*/
/**
* @typedef {Object} RequestOptions@typedef {Object} RequestOptions
* @property {string} [url]
* @property {HttpMethod} [method]
* @property {Record<string, unknown>} [params]
* @property {unknown} [data]
*/
/**
* 底层请求函数类型(兼容 axios 等)
* @typedef {(config: RequestOptions & Record<string, unknown>) => Promise<{ code: number, msg: string, data: unknown, res?: string }>} RequestFn
*/
/**
* 缓存条目:[code, msg, data, url, res]
* @typedef {[number, string, unknown, string, string]} CacheEntry
*/
declare class HttpRequest {
/**
* @param {string} [appKey]
@@ -81,9 +78,9 @@ declare class HttpRequest {
/**
* 通过 Base62 编码参数请求列表接口
* @param {string} code
* @param {Record<string, unknown>} [base62param]
* @param {Base62Param} [base62param]
*/
list: (code: string, base62param?: Record<string, unknown>) => any;
list: (code: string, base62param?: Base62Param) => any;
getAppInfo: () => void;
/**
* 清除缓存
@@ -99,10 +96,10 @@ declare class HttpRequest {
decode: (str?: string, defaultValue?: object) => unknown;
/**
* 将 JSON 对象编码为 Base62 字符串
* @param {Record<string, unknown>} [json]
* @param {Record<string, unknown> | unknown[]} [json]
* @returns {string}
*/
encode: (json?: Record<string, unknown>) => string;
encode: (json?: Record<string, unknown> | unknown[]) => string;
#private;
}
@@ -153,22 +150,16 @@ export declare class HttpResponse {
export declare function NewHttpResponse(code: number, message: string, data: unknown, url?: string, res?: string): HttpResponse;
/**
* 底层请求函数类型(兼容 axios 等)
*/
declare type RequestFn = (config: RequestOptions & Record<string, unknown>) => Promise<{
code: number;
msg: string;
data: unknown;
res?: string;
}>;
declare type RequestFn = (
config: RequestOptions & Record<string, unknown>
) => Promise<{ code: number; msg: string; data: unknown; res?: string }>
declare type RequestOptions = {
url?: string | undefined;
method?: HttpMethod | undefined;
params?: Record<string, unknown> | undefined;
data?: unknown;
};
declare interface RequestOptions {
url?: string
method?: HttpMethod
params?: Record<string, unknown>
data?: unknown
}
/**
* DJB2 算法 —— 将字符串散列为十六进制字符串