tdem-web-sdk 1.0.16 → 1.0.17

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.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export declare type CoreApiConfig = {
5
5
  apiDetail?: boolean;
6
+ /** 普通成功请求是否全量上报。默认 true;显式 false 时仅上报慢请求(错误请求始终上报)。 */
6
7
  reportRequest?: boolean;
7
8
  resourceTypeHandler?: Function | undefined;
8
9
  retCodeHandler?: Function | undefined;
@@ -69,6 +70,11 @@ export interface InternalConfig extends Config {
69
70
  onReport?: Function;
70
71
  onWhitelist?: Function;
71
72
  api?: CoreApiConfig | boolean | Record<string, any>;
73
+ assets?: boolean | object;
74
+ click?: boolean | object;
75
+ console?: boolean | object;
76
+ bridge?: boolean | object;
77
+ struggleMonitor?: boolean | object;
72
78
  beforeReportSpeed?: Function;
73
79
  reportAssetSpeed?: boolean | object;
74
80
  reportApiSpeed?: boolean | object;
@@ -19,6 +19,11 @@ export declare const getRequestType: (config: InternalWebConfig & {
19
19
  api?: any;
20
20
  }, contentType: string | undefined, url: string) => any;
21
21
  export declare const getLogLevel: (isAjaxError: boolean, isErr: boolean) => ApiLogLevel;
22
+ /**
23
+ * 普通成功请求是否全量上报:api.reportRequest 默认 true。
24
+ * 仅当显式配置 false 时,才只上报慢请求 / 错误 / 白名单 / trace 注入流量。
25
+ */
26
+ export declare const isReportRequestEnabled: (apiConfig?: InternalWebConfig['api'] | any) => boolean;
22
27
  export declare const isSlowRequest: (duration: number | undefined, config?: (InternalWebConfig & {
23
28
  api?: any;
24
29
  }) | undefined, apiData?: any) => any;