@ray-js/api 1.7.39 → 1.7.40

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.
@@ -82,9 +82,9 @@ type GetVehicleImgUrlResult = string;
82
82
  * @param {GetVehicleImgUrlParams} params
83
83
  * @returns {Promise<GetVehicleImgUrlResult>}
84
84
  */
85
- export declare const GetVehicleImgUrl: (params: GetVehicleImgUrlParams) => Promise<GetVehicleImgUrlResult>;
85
+ export declare const getVehicleImgUrl: (params: GetVehicleImgUrlParams) => Promise<GetVehicleImgUrlResult>;
86
86
  /**
87
- * 获取车辆详情图片地址参数
87
+ * 根据活动类型展示位置等获取活动信息参数
88
88
  */
89
89
  type GetActivityInfoParams = {
90
90
  activityTypes: string;
@@ -112,4 +112,48 @@ type GetActivityInfoResult = {
112
112
  * @returns {Promise<GetActivityInfoResult[]>}
113
113
  */
114
114
  export declare const getActivityInfo: (params: GetActivityInfoParams) => Promise<GetActivityInfoResult[]>;
115
+ /**
116
+ * 根据设备id和code查询设备属性信息参数
117
+ */
118
+ type GetDeviceBindInfoParams = {
119
+ deviceId: string;
120
+ codes: string;
121
+ coordinate?: string;
122
+ };
123
+ type GetDeviceBindInfoResult = Record<string, any>;
124
+ /**
125
+ * 根据设备id和code查询设备属性信息
126
+ * @param {GetDeviceBindInfoParams} params
127
+ * @returns {Promise<GetDeviceBindInfoResult>}
128
+ */
129
+ export declare const getDeviceBindInfo: (params: GetDeviceBindInfoParams) => Promise<GetDeviceBindInfoResult>;
130
+ /**
131
+ * 查询用户正在使用中的出行增值服务能力和导航增值服务能力参数
132
+ */
133
+ type GetRunningAbilityParams = {
134
+ devId: string;
135
+ uuid: string;
136
+ };
137
+ type GetRunningAbilityResult = Record<string, any>;
138
+ /**
139
+ * 查询用户正在使用中的出行增值服务能力和导航增值服务能力
140
+ * @param {GetRunningAbilityParams} params
141
+ * @returns {Promise<GetRunningAbilityResult>}
142
+ */
143
+ export declare const getRunningAbility: (params: GetRunningAbilityParams) => Promise<GetRunningAbilityResult>;
144
+ /**
145
+ * 根据设备id更新APP的弹窗状态(只弹窗一次)参数
146
+ */
147
+ type SetVasPopupParams = {
148
+ devId: string;
149
+ uuid: string;
150
+ hadPopup: boolean;
151
+ };
152
+ type SetVasPopupResult = boolean;
153
+ /**
154
+ * 根据设备id更新APP的弹窗状态(只弹窗一次)
155
+ * @param {SetVasPopupParams} params
156
+ * @returns {Promise<SetVasPopupResult>}
157
+ */
158
+ export declare const setVasPopup: (params: SetVasPopupParams) => Promise<SetVasPopupResult>;
115
159
  export {};
@@ -102,7 +102,7 @@ export const getVehicleDetail = params => {
102
102
  * @param {GetVehicleImgUrlParams} params
103
103
  * @returns {Promise<GetVehicleImgUrlResult>}
104
104
  */
105
- export const GetVehicleImgUrl = params => {
105
+ export const getVehicleImgUrl = params => {
106
106
  return requestCloud({
107
107
  api: `m.outdoors.device.vehicle.pic`,
108
108
  version: '1.0',
@@ -111,7 +111,7 @@ export const GetVehicleImgUrl = params => {
111
111
  };
112
112
 
113
113
  /**
114
- * 获取车辆详情图片地址参数
114
+ * 根据活动类型展示位置等获取活动信息参数
115
115
  */
116
116
 
117
117
  /**
@@ -129,4 +129,55 @@ export const getActivityInfo = params => {
129
129
  version: '1.0',
130
130
  data: params
131
131
  });
132
+ };
133
+
134
+ /**
135
+ * 根据设备id和code查询设备属性信息参数
136
+ */
137
+
138
+ /**
139
+ * 根据设备id和code查询设备属性信息
140
+ * @param {GetDeviceBindInfoParams} params
141
+ * @returns {Promise<GetDeviceBindInfoResult>}
142
+ */
143
+ export const getDeviceBindInfo = params => {
144
+ return requestCloud({
145
+ api: `${THING}.m.trip.outdoors.device.bind.info.get`,
146
+ version: '1.0',
147
+ data: params
148
+ });
149
+ };
150
+
151
+ /**
152
+ * 查询用户正在使用中的出行增值服务能力和导航增值服务能力参数
153
+ */
154
+
155
+ /**
156
+ * 查询用户正在使用中的出行增值服务能力和导航增值服务能力
157
+ * @param {GetRunningAbilityParams} params
158
+ * @returns {Promise<GetRunningAbilityResult>}
159
+ */
160
+ export const getRunningAbility = params => {
161
+ return requestCloud({
162
+ api: `m.outdoors.vas.running.ability.get`,
163
+ version: '3.0',
164
+ data: params
165
+ });
166
+ };
167
+
168
+ /**
169
+ * 根据设备id更新APP的弹窗状态(只弹窗一次)参数
170
+ */
171
+
172
+ /**
173
+ * 根据设备id更新APP的弹窗状态(只弹窗一次)
174
+ * @param {SetVasPopupParams} params
175
+ * @returns {Promise<SetVasPopupResult>}
176
+ */
177
+ export const setVasPopup = params => {
178
+ return requestCloud({
179
+ api: `m.outdoors.vas.popup.set`,
180
+ version: '1.0',
181
+ data: params
182
+ });
132
183
  };
@@ -61,7 +61,17 @@ export declare const initDevInfo: (option?: {
61
61
  deviceId?: string;
62
62
  groupId?: string;
63
63
  }) => Promise<DevInfo>;
64
- export declare const getDevInfo: () => DevInfo;
64
+ /**
65
+ * @deprecated
66
+ *
67
+ * 该方法已废弃,请使用@ray-js/ray 中的 device.getDeviceInfo 异步方法或@ray-js/panel-sdk 中的智能设备模型实例的 getDeviceInfo 同步方法获取。
68
+ *
69
+ * 若仍要使用,请确保在 await initDevInfo 方法后调用,此时设备信息已初始化完毕或在返回值为 null 时做好兼容处理。
70
+ */
71
+ export declare const getDevInfo: () => null | DevInfo;
72
+ /**
73
+ * @deprecated 该方法已废弃,请勿使用
74
+ */
65
75
  export declare const updateDevInfo: (devInfo: DevInfo) => void;
66
76
  /**
67
77
  * 绑定当前设备或群组基础事件
@@ -96,9 +96,21 @@ export const initDevInfo = option => {
96
96
  }
97
97
  });
98
98
  };
99
+
100
+ /**
101
+ * @deprecated
102
+ *
103
+ * 该方法已废弃,请使用@ray-js/ray 中的 device.getDeviceInfo 异步方法或@ray-js/panel-sdk 中的智能设备模型实例的 getDeviceInfo 同步方法获取。
104
+ *
105
+ * 若仍要使用,请确保在 await initDevInfo 方法后调用,此时设备信息已初始化完毕或在返回值为 null 时做好兼容处理。
106
+ */
99
107
  export const getDevInfo = () => {
100
108
  return __deviceInfo;
101
109
  };
110
+
111
+ /**
112
+ * @deprecated 该方法已废弃,请勿使用
113
+ */
102
114
  export const updateDevInfo = devInfo => {
103
115
  __deviceInfo = devInfo;
104
116
  };
@@ -2,6 +2,8 @@ import { publishDpsBase } from '../..';
2
2
  import { GetTTTAllParams, DpState } from './types';
3
3
  type PublishDpsOptions = Omit<GetTTTAllParams<typeof publishDpsBase>, 'deviceId' | 'dps'>;
4
4
  /**
5
+ * @deprecated 该方法已废弃,请使用@ray-js/ray中的 device.publishDps 替代
6
+ *
5
7
  * 下发 DP 点控制设备
6
8
  *
7
9
  * @param data - 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
@@ -14,7 +16,8 @@ type PublishDpsOptions = Omit<GetTTTAllParams<typeof publishDpsBase>, 'deviceId'
14
16
  */
15
17
  export declare function sendDps(data: DpState, options?: PublishDpsOptions): Promise<boolean>;
16
18
  /**
17
- * 兼容新旧 publishDps,可以使用原有小程序提供的调用方式,也可以使用 SDK 提供的调用方式。
19
+ * @deprecated 该方法已废弃,请使用@ray-js/ray中的 device.publishDps 替代
20
+ *
18
21
  * @param data ty.device.publishDps的参数 或 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
19
22
  * @param options publishDps 的高阶配置,默认值为 { mode: 2, options: {}, pipelines: [] } * @example
20
23
  *
@@ -10,6 +10,8 @@ const DEFAULT_OPTIONS = {
10
10
  };
11
11
 
12
12
  /**
13
+ * @deprecated 该方法已废弃,请使用@ray-js/ray中的 device.publishDps 替代
14
+ *
13
15
  * 下发 DP 点控制设备
14
16
  *
15
17
  * @param data - 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
@@ -47,7 +49,8 @@ export function sendDps(data) {
47
49
  }
48
50
 
49
51
  /**
50
- * 兼容新旧 publishDps,可以使用原有小程序提供的调用方式,也可以使用 SDK 提供的调用方式。
52
+ * @deprecated 该方法已废弃,请使用@ray-js/ray中的 device.publishDps 替代
53
+ *
51
54
  * @param data ty.device.publishDps的参数 或 当前要下发的 DP 数据,同时支持 key 为 dp code 或 dp id
52
55
  * @param options publishDps 的高阶配置,默认值为 { mode: 2, options: {}, pipelines: [] } * @example
53
56
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.39",
3
+ "version": "1.7.40",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,8 +29,8 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.39",
33
- "@ray-js/router": "1.7.39",
32
+ "@ray-js/framework": "1.7.40",
33
+ "@ray-js/router": "1.7.40",
34
34
  "base64-browser": "^1.0.1",
35
35
  "query-string": "^7.1.3"
36
36
  },
@@ -38,7 +38,7 @@
38
38
  "@ray-js/wechat": "^0.3.13"
39
39
  },
40
40
  "devDependencies": {
41
- "@ray-js/cli": "1.7.39",
41
+ "@ray-js/cli": "1.7.40",
42
42
  "art-template": "^4.13.4",
43
43
  "fs-extra": "^10.1.0",
44
44
  "miniprogram-api-typings": "^3.12.3",
@@ -48,5 +48,5 @@
48
48
  "access": "public",
49
49
  "registry": "https://registry.npmjs.org"
50
50
  },
51
- "gitHead": "29022302e7f940eed314d4deb15214fcfe389e2e"
51
+ "gitHead": "a56eaf983884b26733cf7432d20e16b4dd3bf851"
52
52
  }