@lovrabet/sdk 1.1.12 → 1.1.14

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.
@@ -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
  }
@@ -124,6 +124,8 @@ export interface ClientConfig {
124
124
  onError?: (error: any) => void;
125
125
  /** 需要重新登录时的回调函数 */
126
126
  onRedirectToLogin?: () => void;
127
+ /** 是否启用调试日志(打印请求 URL、Headers 和 Body) */
128
+ debug?: boolean;
127
129
  };
128
130
  }
129
131
  /**
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@lovrabet/sdk",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
+ "license": "SEE LICENSE IN LICENSE",
4
5
  "main": "dist/index.js",
5
6
  "module": "dist/index.js",
6
7
  "types": "dist/index.d.ts",