@gjzq/sdk 1.7.1 → 1.7.2-beta.1

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/dist/index.d.ts CHANGED
@@ -877,12 +877,6 @@ declare interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig
877
877
  headers: AxiosRequestHeaders;
878
878
  }
879
879
 
880
- /**
881
- * 设置公共参数
882
- * @param params 配置参数
883
- */
884
- declare type keyPublicValueType = 'userId' | 'pid' | 'YJB_userId';
885
-
886
880
  /**回流参数解析入参*/
887
881
  export declare type LinkActionConfigParam = {
888
882
  type: 'web' | 'native';
@@ -1691,7 +1685,11 @@ export declare const trackEvent: (params: TTrackEvent) => "event_name is empty!"
1691
1685
  */
1692
1686
  export declare const trackInitAuto: () => void;
1693
1687
 
1694
- export declare const trackPublicValue: <T extends Partial<Record<keyPublicValueType, string>>>(params: T) => void;
1688
+ /**
1689
+ * 设置公共参数
1690
+ * @param params 配置参数(支持任意键,要求值为基本数据类型)
1691
+ */
1692
+ export declare const trackPublicValue: (params: Record<string, string | number | boolean>) => void;
1695
1693
 
1696
1694
  /**
1697
1695
  *
package/dist/index2.cjs CHANGED
@@ -8272,18 +8272,14 @@ function insertScriptBeforInitFinder(env) {
8272
8272
  head.appendChild(script1);
8273
8273
  }
8274
8274
 
8275
+ /**
8276
+ * 设置公共参数
8277
+ * @param params 配置参数(支持任意键,要求值为基本数据类型)
8278
+ */
8275
8279
  var trackPublicValue = function trackPublicValue(params) {
8276
8280
  if (Object.keys(params).length === 0) {
8277
8281
  return;
8278
8282
  }
8279
- var validKeys = ['userId', 'pid', 'YJB_userId'],
8280
- keys = Object.keys(params),
8281
- invalidKeys = keys.filter(function (key) {
8282
- return !validKeys.includes(key);
8283
- });
8284
- if (invalidKeys.length > 0) {
8285
- throw new Error("Invalid keys found: ".concat(invalidKeys.join(', ')));
8286
- }
8287
8283
  if (window.collectEvent) {
8288
8284
  window.collectEvent('config', params);
8289
8285
  }
@@ -1,15 +1,11 @@
1
+ /**
2
+ * 设置公共参数
3
+ * @param params 配置参数(支持任意键,要求值为基本数据类型)
4
+ */
1
5
  var trackPublicValue = function trackPublicValue(params) {
2
6
  if (Object.keys(params).length === 0) {
3
7
  return;
4
8
  }
5
- var validKeys = ['userId', 'pid', 'YJB_userId'],
6
- keys = Object.keys(params),
7
- invalidKeys = keys.filter(function (key) {
8
- return !validKeys.includes(key);
9
- });
10
- if (invalidKeys.length > 0) {
11
- throw new Error("Invalid keys found: ".concat(invalidKeys.join(', ')));
12
- }
13
9
  if (window.collectEvent) {
14
10
  window.collectEvent('config', params);
15
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjzq/sdk",
3
- "version": "1.7.1",
3
+ "version": "1.7.2-beta.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "es/index.mjs",
6
6
  "types": "./dist/index.d.ts",