@ledvance/base 1.1.49 → 1.1.51

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.
@@ -0,0 +1,51 @@
1
+ @ColumnInfo(name = "device_id")
2
+ val deviceId: String,
3
+ @ColumnInfo(name = "device_name")
4
+ val deviceName: String,
5
+ @ColumnInfo(name = "cat_id")
6
+ val catId: String,
7
+ @ColumnInfo(name = "channel_no")
8
+ val channelNo: Int,
9
+ @ColumnInfo(name = "device_category")
10
+ val deviceCategory: String,
11
+ @ColumnInfo(name = "device_image")
12
+ val deviceImage: String,
13
+ @ColumnInfo(name = "tuya_device_id")
14
+ val tuyaDeviceId: String,
15
+ // deviceType 对应 ProductInfo 的 productId
16
+ @ColumnInfo(name = "device_type")
17
+ val deviceType: String,
18
+ @ColumnInfo(name = "offline_time")
19
+ val offlineTime: String,
20
+ @ColumnInfo(name = "rn_package")
21
+ val rnPackage: String?,
22
+ @ColumnInfo(name = "status")
23
+ val status: Int,
24
+ @ColumnInfo(name = "create_time")
25
+ val createTime: String,
26
+ @ColumnInfo(name = "version")
27
+ val version: String,
28
+ @ColumnInfo(name = "user_id")
29
+ val userId: String,
30
+ @ColumnInfo(name = "family_id")
31
+ val familyId: Long,
32
+ @ColumnInfo(name = "room_id")
33
+ val roomId: Long,
34
+ @ColumnInfo(name = "room_name")
35
+ val roomName: String,
36
+ @ColumnInfo(name = "is_shared")
37
+ val isShared: Int,
38
+ @ColumnInfo(name = "local_index")
39
+ val localIndex: String,
40
+ @ColumnInfo(name = "resource_category")
41
+ val resourceCategory: String,
42
+ @ColumnInfo(name = "resource_id")
43
+ val resourceId: String,
44
+ @ColumnInfo(name = "resource_identifier")
45
+ val resourceIdentifier: String,
46
+ @ColumnInfo(name = "resource_type")
47
+ val resourceType: Int,
48
+ @ColumnInfo(name = "index")
49
+ val index: Int = 0,
50
+ @ColumnInfo(name = "switch_state")
51
+ val switchState: Boolean = true
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.49",
7
+ "version": "1.1.51",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@reduxjs/toolkit": "^1.8.6",
@@ -51,7 +51,7 @@ export declare class NativeApi {
51
51
  static setDps<T>(deviceId: string, dps: any): Promise<NativeResult<T>>;
52
52
  static deleteDevice(deviceId: string, isReset: boolean): Promise<NativeResult<any>>;
53
53
  static renameDevice(deviceId: string, name: string): Promise<NativeResult<any>>;
54
- static toDeviceSettingsPage(deviceId: string): void;
54
+ static toDeviceSettingsPage(deviceId: string, isGroup?: boolean): void;
55
55
  static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>>;
56
56
  static getJson(deviceId: string, featureType: string): Promise<Result<any>>;
57
57
  static groupControl(tyGroupId: number, dps: string, config: string): Promise<Result<any>>;
@@ -59,7 +59,7 @@ export declare class NativeApi {
59
59
  }
60
60
  export declare const openDownloadFile: (filePath: string) => Promise<unknown>;
61
61
  export declare const queryDpIds: (dpIds: string, deviceId: string) => Promise<unknown>;
62
- export declare const formatNumber: (num: number, fixed: number, isCN: boolean) => string;
62
+ export declare const formatNumber: (num: number, fixed: number, shoGroup?: boolean) => string;
63
63
  export declare const getTimeZone: () => string;
64
64
  export declare const getSystemTimeFormat: () => Promise<number>;
65
65
  export {};
package/src/api/native.ts CHANGED
@@ -8,7 +8,7 @@ interface LDVDevicePanelManager {
8
8
  getAllTaskTimer: (deviceId: string, type: number, callback: (res: NativeResult<string>) => void) => void
9
9
  deleteDevice: (deviceId: string, isReset: boolean, callback: (result: any) => void) => void
10
10
  rename: (deviceId: string, name: string, callback: (result: any) => void) => void
11
- toDeviceSettingsPage: (deviceId: string) => void
11
+ toDeviceSettingsPage: (deviceId: string, isGroup: boolean) => void
12
12
  putJson: (deviceId: string, featureType: string, json: string, callback: (res: NativeResult<any>) => void) => void
13
13
  getJson: (deviceId: string, featureType: string, callback: (res: NativeResult<string>) => void) => void
14
14
  getInitiativeQueryDpsInfoWithDpsArray: (dpIds: string, deviceId: string, callback: (res: NativeResult<string>) => void) => void
@@ -192,8 +192,8 @@ const rename: RenameResultType = (deviceId: string, name: string) => {
192
192
  })
193
193
  }
194
194
 
195
- function toDeviceSettingsPage(tuyaDeviceId: string) {
196
- devicePanel.toDeviceSettingsPage(tuyaDeviceId)
195
+ function toDeviceSettingsPage(tuyaDeviceId: string, isGroup: boolean = false) {
196
+ devicePanel.toDeviceSettingsPage(tuyaDeviceId, isGroup)
197
197
  }
198
198
 
199
199
  export class NativeApi {
@@ -257,8 +257,8 @@ export class NativeApi {
257
257
  return rename(deviceId, name)
258
258
  }
259
259
 
260
- static toDeviceSettingsPage(deviceId: string): void {
261
- toDeviceSettingsPage(deviceId)
260
+ static toDeviceSettingsPage(deviceId: string, isGroup: boolean = false): void {
261
+ toDeviceSettingsPage(deviceId, isGroup)
262
262
  }
263
263
 
264
264
  static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>> {
@@ -11,7 +11,8 @@ export declare function getWeek(weekString: any): number[];
11
11
  */
12
12
  export declare function spliceByStep(str: string, step: number): string[];
13
13
  export declare function hex2Int(hex: string): number;
14
- export declare const localeNumber: (v: number | string, fixed?: number | undefined) => string | number;
14
+ export declare const localeNumber: (v: number | string, fixed?: number | undefined, showGroup?: boolean | undefined) => string | number;
15
+ export declare const exchangeNumber: (v: number | string) => string;
15
16
  export declare const exportFile: (list: any) => void;
16
17
  export declare const exportHistoryFile: (list: any) => void;
17
18
  export declare const monthFormat: (v: number | string) => string;