@huanban/rulego-editor-core 1.1.6 → 1.3.0

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.
@@ -75,6 +75,7 @@ export declare class RuleChainAPI implements WorkflowFetcher {
75
75
  * @returns 解析后的 JSON
76
76
  */
77
77
  private request;
78
+ private getHeaders;
78
79
  /**
79
80
  * 将后端 RuleChain DSL 对象转为前端扁平化 WorkflowItem
80
81
  *
@@ -291,8 +291,8 @@ export interface RuleChainAPIOptions {
291
291
  apiBase: string;
292
292
  /** 请求超时毫秒数,默认 8000 */
293
293
  timeout?: number;
294
- /** 自定义请求头 */
295
- headers?: Record<string, string>;
294
+ /** 自定义请求头;支持函数形式以便每次请求读取最新 token */
295
+ headers?: Record<string, string> | (() => Record<string, string>);
296
296
  /** 认证 Token */
297
297
  authToken?: string;
298
298
  /**