@hyext/types-ext-sdk-hy 3.18.7-beta.2 → 3.18.8-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.
Files changed (2) hide show
  1. package/index.d.ts +45 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -4199,6 +4199,20 @@ namespace env {
4199
4199
  * @returns 调用结果
4200
4200
  */
4201
4201
  function getPerformaceData(): Promise<PerformaceDataRsp>;
4202
+ /**
4203
+ * 获取来源数据
4204
+ * @returns 调用结果
4205
+ */
4206
+ function getSourceData(): Promise<GetSourceDataRsp>;
4207
+ /**
4208
+ * 监听来源数据变化
4209
+ * @param params - 监听参数
4210
+ */
4211
+ function onSourceDataChange(params: OnSourceDataChangeReq): Promise<void>;
4212
+ /**
4213
+ * 取消监听来源数据变化
4214
+ */
4215
+ function offSourceDataChange(): Promise<void>;
4202
4216
  }
4203
4217
 
4204
4218
  /**
@@ -4363,6 +4377,37 @@ type PerformaceDataRsp = {
4363
4377
  data?: PerformaceInfo;
4364
4378
  };
4365
4379
 
4380
+ /**
4381
+ * 来源数据详情
4382
+ * @property type - 来源数据的类型,例如hyaction、小程序本地接口、小程序后台服务拉起、其他业务来源等
4383
+ * @property data - 来源数据,字符串,业务自行定义
4384
+ */
4385
+ type SourceDataItem = {
4386
+ type: string;
4387
+ data: string;
4388
+ };
4389
+
4390
+ /**
4391
+ * 来源数据
4392
+ * @property list - 来源数据列表
4393
+ */
4394
+ type GetSourceDataRsp = {
4395
+ list: SourceDataItem[];
4396
+ };
4397
+
4398
+ /**
4399
+ * @param notice - 来源数据变化消息
4400
+ */
4401
+ type SourceDataChangeCallback = (notice: SourceDataItem) => void;
4402
+
4403
+ /**
4404
+ * 监听来源数据变化参数
4405
+ * @property callback - 回调函数
4406
+ */
4407
+ type OnSourceDataChangeReq = {
4408
+ callback: SourceDataChangeCallback;
4409
+ };
4410
+
4366
4411
  /**
4367
4412
  * EXE加工相关
4368
4413
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/types-ext-sdk-hy",
3
- "version": "3.18.7-beta.2",
3
+ "version": "3.18.8-beta.1",
4
4
  "description": "TypeScript definitions for sdk",
5
5
  "types": "./index.d.ts",
6
6
  "main": "",