@lovrabet/sdk 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/index.js +1 -1
- package/dist/src/http/post.d.ts +1 -1
- package/dist/src/models/openapi-model.d.ts +2 -0
- package/dist/src/types/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/src/http/post.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const post: <ResponseData>(url: string, body?: Record<string, any>, init?: RequestInit) => Promise<ResponseData>;
|
|
1
|
+
export declare const post: <ResponseData>(url: string, body?: Record<string, any>, init?: RequestInit, debug?: boolean) => Promise<ResponseData>;
|
|
@@ -10,6 +10,8 @@ export declare class OpenApiModel extends AbstractBaseModel {
|
|
|
10
10
|
protected getApiPath(sdkMethod: string): string;
|
|
11
11
|
/**
|
|
12
12
|
* OpenAPI 模式的请求体构建策略
|
|
13
|
+
* 认证信息(token、timeStamp)由 HttpClient 自动添加到请求头(Header)中
|
|
14
|
+
* 请求体只包含业务数据
|
|
13
15
|
*/
|
|
14
16
|
protected buildRequestBody(method: string, data: any): any;
|
|
15
17
|
}
|
|
@@ -49,6 +49,8 @@ export interface ModelConfig {
|
|
|
49
49
|
tableName: string;
|
|
50
50
|
/** 数据集代码 */
|
|
51
51
|
datasetCode: string;
|
|
52
|
+
/** 数据集名称 */
|
|
53
|
+
name?: string;
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
56
|
* 模型配置集合接口
|
|
@@ -124,6 +126,8 @@ export interface ClientConfig {
|
|
|
124
126
|
onError?: (error: any) => void;
|
|
125
127
|
/** 需要重新登录时的回调函数 */
|
|
126
128
|
onRedirectToLogin?: () => void;
|
|
129
|
+
/** 是否启用调试日志(打印请求 URL、Headers 和 Body) */
|
|
130
|
+
debug?: boolean;
|
|
127
131
|
};
|
|
128
132
|
}
|
|
129
133
|
/**
|