@cpzxrobot/sdk 1.0.25 → 1.0.27

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/device_filter.ts CHANGED
@@ -271,6 +271,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
271
271
  status?: string;
272
272
  unit?: Number;
273
273
  detail?: boolean;
274
+ type?: string;
274
275
  supplier?: string; //供应商,可用于过滤设备
275
276
  } = undefined
276
277
  ): Promise<T[]> {
@@ -293,7 +294,7 @@ export abstract class DeviceFilter<T extends { id: number }> {
293
294
  return this.context.axios.get("/api/v1/device/list?rand=" + rand, {
294
295
  params: {
295
296
  location: farm,
296
- type: this.deviceType,
297
+ type: options?.type || this.deviceType,
297
298
  unit: options?.unit,
298
299
  data: options?.data,
299
300
  status: options?.status,
package/device_gateway.ts CHANGED
@@ -78,6 +78,7 @@ export class DeviceGateway extends Object {
78
78
  | null; //如果data为null,则不获取数据,只获取设备列表,否则获取设备列表和数据
79
79
  status?: string;
80
80
  unit?: Number;
81
+ type?: string;
81
82
  detail?: boolean;
82
83
  supplier?: string; //供应商,可用于过滤设备
83
84
  } = undefined
@@ -234,7 +234,7 @@ class DeviceFilter {
234
234
  return this.context.axios.get("/api/v1/device/list?rand=" + rand, {
235
235
  params: {
236
236
  location: farm,
237
- type: this.deviceType,
237
+ type: (options === null || options === void 0 ? void 0 : options.type) || this.deviceType,
238
238
  unit: options === null || options === void 0 ? void 0 : options.unit,
239
239
  data: options === null || options === void 0 ? void 0 : options.data,
240
240
  status: options === null || options === void 0 ? void 0 : options.status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {