@ray-js/robot-data-stream 0.0.16-beta.2 → 0.0.16-beta.4
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/lib/mqtt/hooks/useStructuredMessage.d.ts +2 -7
- package/lib/mqtt/hooks/useStructuredMessage.js +1 -1
- package/lib/mqtt/type/index.d.ts +0 -12
- package/lib/mqtt/type/index.js +0 -14
- package/lib/mqtt/type/protocols/base.d.ts +23 -24
- package/lib/mqtt/type/protocols/base.js +1 -38
- package/lib/mqtt/type/protocols/carpetCleanProtocol.d.ts +6 -13
- package/lib/mqtt/type/protocols/carpetCleanProtocol.js +1 -14
- package/lib/mqtt/type/protocols/carpetProtocol.d.ts +52 -96
- package/lib/mqtt/type/protocols/carpetProtocol.js +1 -202
- package/lib/mqtt/type/protocols/devInfoProtocol.d.ts +5 -11
- package/lib/mqtt/type/protocols/devInfoProtocol.js +1 -10
- package/lib/mqtt/type/protocols/deviceModelProtocol.d.ts +14 -29
- package/lib/mqtt/type/protocols/deviceModelProtocol.js +1 -32
- package/lib/mqtt/type/protocols/furnitureModelProtocol.d.ts +15 -25
- package/lib/mqtt/type/protocols/furnitureModelProtocol.js +1 -27
- package/lib/mqtt/type/protocols/historyMapProtocol.d.ts +19 -36
- package/lib/mqtt/type/protocols/historyMapProtocol.js +1 -37
- package/lib/mqtt/type/protocols/partDivisionProtocol.d.ts +6 -20
- package/lib/mqtt/type/protocols/partDivisionProtocol.js +1 -12
- package/lib/mqtt/type/protocols/partMergeProtocol.d.ts +3 -12
- package/lib/mqtt/type/protocols/partMergeProtocol.js +1 -12
- package/lib/mqtt/type/protocols/passwordProtocol.d.ts +11 -21
- package/lib/mqtt/type/protocols/passwordProtocol.js +1 -25
- package/lib/mqtt/type/protocols/quietHoursProtocol.d.ts +17 -27
- package/lib/mqtt/type/protocols/quietHoursProtocol.js +1 -35
- package/lib/mqtt/type/protocols/resetMapProtocol.d.ts +2 -3
- package/lib/mqtt/type/protocols/roomPropertyProtocol.d.ts +32 -46
- package/lib/mqtt/type/protocols/roomPropertyProtocol.js +1 -134
- package/lib/mqtt/type/protocols/scheduleProtocol.d.ts +18 -69
- package/lib/mqtt/type/protocols/scheduleProtocol.js +1 -117
- package/lib/mqtt/type/protocols/selectRoomCleanProtocol.d.ts +22 -29
- package/lib/mqtt/type/protocols/selectRoomCleanProtocol.js +1 -48
- package/lib/mqtt/type/protocols/spotCleanProtocol.d.ts +18 -42
- package/lib/mqtt/type/protocols/spotCleanProtocol.js +1 -94
- package/lib/mqtt/type/protocols/virtualAreaProtocol.d.ts +17 -30
- package/lib/mqtt/type/protocols/virtualAreaProtocol.js +1 -36
- package/lib/mqtt/type/protocols/virtualWallProtocol.d.ts +11 -25
- package/lib/mqtt/type/protocols/virtualWallProtocol.js +1 -25
- package/lib/mqtt/type/protocols/voiceProtocol.d.ts +11 -19
- package/lib/mqtt/type/protocols/voiceProtocol.js +1 -23
- package/lib/mqtt/type/protocols/wifiMapProtocol.d.ts +6 -15
- package/lib/mqtt/type/protocols/wifiMapProtocol.js +1 -15
- package/lib/mqtt/type/protocols/zoneCleanProtocol.d.ts +37 -50
- package/lib/mqtt/type/protocols/zoneCleanProtocol.js +1 -76
- package/lib/mqtt/useCarpet.js +21 -35
- package/lib/mqtt/useCarpetClean.js +1 -4
- package/lib/mqtt/useDeviceModel.js +1 -4
- package/lib/mqtt/useFurnitureModel.js +1 -4
- package/lib/mqtt/useHistoryMap.js +8 -21
- package/lib/mqtt/usePartDivision.js +6 -20
- package/lib/mqtt/usePartMerge.js +1 -3
- package/lib/mqtt/usePassword.js +2 -9
- package/lib/mqtt/useQuiteHours.js +1 -4
- package/lib/mqtt/useRoomProperty.js +3 -7
- package/lib/mqtt/useSchedule.js +8 -12
- package/lib/mqtt/useSelectRoomClean.js +6 -14
- package/lib/mqtt/useSpotClean.js +4 -10
- package/lib/mqtt/useVirtualArea.js +1 -4
- package/lib/mqtt/useVirtualWall.js +1 -4
- package/lib/mqtt/useVoice.js +4 -7
- package/lib/mqtt/useWifiMap.js +1 -5
- package/lib/mqtt/useZoneClean.js +10 -15
- package/lib/utils/index.d.ts +15 -0
- package/lib/utils/index.js +35 -1
- package/package.json +1 -1
- package/lib/mqtt/type/fun.d.ts +0 -248
- package/lib/mqtt/type/fun.js +0 -146
- package/lib/mqtt/waterPreference.d.ts +0 -20
- package/lib/mqtt/waterPreference.js +0 -70
- package/lib/myLib/zod/mini/index.d.cts +0 -1
- package/lib/myLib/zod/mini/index.d.ts +0 -1
- package/lib/myLib/zod/mini/index.js +0 -1
- package/lib/myLib/zod/mini/package.json +0 -6
- package/lib/myLib/zod/src/mini/index.d.ts +0 -1
- package/lib/myLib/zod/src/mini/index.js +0 -1
- package/lib/myLib/zod/src/v4/core/api.d.ts +0 -306
- package/lib/myLib/zod/src/v4/core/api.js +0 -1256
- package/lib/myLib/zod/src/v4/core/checks.d.ts +0 -278
- package/lib/myLib/zod/src/v4/core/checks.js +0 -816
- package/lib/myLib/zod/src/v4/core/config.d.ts +0 -9
- package/lib/myLib/zod/src/v4/core/config.js +0 -5
- package/lib/myLib/zod/src/v4/core/core.d.ts +0 -70
- package/lib/myLib/zod/src/v4/core/core.js +0 -95
- package/lib/myLib/zod/src/v4/core/doc.d.ts +0 -14
- package/lib/myLib/zod/src/v4/core/doc.js +0 -42
- package/lib/myLib/zod/src/v4/core/errors.d.ts +0 -220
- package/lib/myLib/zod/src/v4/core/errors.js +0 -232
- package/lib/myLib/zod/src/v4/core/index.d.ts +0 -15
- package/lib/myLib/zod/src/v4/core/index.js +0 -15
- package/lib/myLib/zod/src/v4/core/json-schema-generator.d.ts +0 -65
- package/lib/myLib/zod/src/v4/core/json-schema-generator.js +0 -120
- package/lib/myLib/zod/src/v4/core/json-schema-processors.d.ts +0 -49
- package/lib/myLib/zod/src/v4/core/json-schema-processors.js +0 -593
- package/lib/myLib/zod/src/v4/core/json-schema.d.ts +0 -88
- package/lib/myLib/zod/src/v4/core/json-schema.js +0 -1
- package/lib/myLib/zod/src/v4/core/parse.d.ts +0 -49
- package/lib/myLib/zod/src/v4/core/parse.js +0 -147
- package/lib/myLib/zod/src/v4/core/regexes.d.ts +0 -78
- package/lib/myLib/zod/src/v4/core/regexes.js +0 -146
- package/lib/myLib/zod/src/v4/core/registries.d.ts +0 -35
- package/lib/myLib/zod/src/v4/core/registries.js +0 -51
- package/lib/myLib/zod/src/v4/core/schemas.d.ts +0 -1136
- package/lib/myLib/zod/src/v4/core/schemas.js +0 -2745
- package/lib/myLib/zod/src/v4/core/standard-schema.d.ts +0 -126
- package/lib/myLib/zod/src/v4/core/standard-schema.js +0 -1
- package/lib/myLib/zod/src/v4/core/to-json-schema.d.ts +0 -114
- package/lib/myLib/zod/src/v4/core/to-json-schema.js +0 -488
- package/lib/myLib/zod/src/v4/core/util.d.ts +0 -199
- package/lib/myLib/zod/src/v4/core/util.js +0 -656
- package/lib/myLib/zod/src/v4/core/versions.d.ts +0 -5
- package/lib/myLib/zod/src/v4/core/versions.js +0 -5
- package/lib/myLib/zod/src/v4/core/zsf.d.ts +0 -91
- package/lib/myLib/zod/src/v4/core/zsf.js +0 -1
- package/lib/myLib/zod/src/v4/mini/checks.d.ts +0 -1
- package/lib/myLib/zod/src/v4/mini/checks.js +0 -1
- package/lib/myLib/zod/src/v4/mini/coerce.d.ts +0 -7
- package/lib/myLib/zod/src/v4/mini/coerce.js +0 -27
- package/lib/myLib/zod/src/v4/mini/external.d.ts +0 -11
- package/lib/myLib/zod/src/v4/mini/external.js +0 -16
- package/lib/myLib/zod/src/v4/mini/index.d.ts +0 -530
- package/lib/myLib/zod/src/v4/mini/index.js +0 -30
- package/lib/myLib/zod/src/v4/mini/iso.d.ts +0 -22
- package/lib/myLib/zod/src/v4/mini/iso.js +0 -46
- package/lib/myLib/zod/src/v4/mini/parse.d.ts +0 -1
- package/lib/myLib/zod/src/v4/mini/parse.js +0 -1
- package/lib/myLib/zod/src/v4/mini/schemas.js +0 -1244
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
id:
|
|
4
|
-
modelType:
|
|
5
|
-
scale:
|
|
6
|
-
size:
|
|
7
|
-
rotation:
|
|
8
|
-
position:
|
|
9
|
-
subDevId:
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
16
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
17
|
-
modelInfo: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniObject<{
|
|
18
|
-
id: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
19
|
-
modelType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
20
|
-
scale: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
21
|
-
size: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
22
|
-
rotation: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
23
|
-
position: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
24
|
-
subDevId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
|
-
}, z.core.$strip>;
|
|
27
|
-
export type SetDeviceModelData = z.infer<typeof setDeviceModelSchema>;
|
|
28
|
-
export type DeviceModelResponse = z.infer<typeof deviceModelResponseSchema>;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface DeviceModelInfo {
|
|
3
|
+
id: number;
|
|
4
|
+
modelType: number;
|
|
5
|
+
scale: number;
|
|
6
|
+
size: number[];
|
|
7
|
+
rotation: number[];
|
|
8
|
+
position: number[];
|
|
9
|
+
subDevId: string;
|
|
10
|
+
}
|
|
11
|
+
export type SetDeviceModelData = DeviceModelInfo[];
|
|
12
|
+
export interface DeviceModelResponse extends BaseResponse {
|
|
13
|
+
modelInfo: DeviceModelInfo[];
|
|
14
|
+
}
|
|
29
15
|
export type TRequestDeviceList = () => Promise<DeviceModelResponse>;
|
|
30
16
|
export type TSetDeviceModel = (data: SetDeviceModelData) => Promise<DeviceModelResponse>;
|
|
31
|
-
export {};
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema } from './base';
|
|
3
|
-
|
|
4
|
-
// 设备模型信息 Schema
|
|
5
|
-
const deviceModelInfoSchema = z.object({
|
|
6
|
-
id: z.int(),
|
|
7
|
-
// 设备模型ID
|
|
8
|
-
modelType: z.int(),
|
|
9
|
-
// 设备模型类型
|
|
10
|
-
scale: z.number(),
|
|
11
|
-
// 设备模型缩放比例
|
|
12
|
-
size: z.array(z.number()),
|
|
13
|
-
// 设备模型尺寸
|
|
14
|
-
rotation: z.array(z.number()),
|
|
15
|
-
// 设备模型旋转角度
|
|
16
|
-
position: z.array(z.number()),
|
|
17
|
-
// 设备模型位置
|
|
18
|
-
subDevId: z.string() // 当前设备模型所关联的设备ID
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// 设置设备模型参数 Schema
|
|
22
|
-
export const setDeviceModelSchema = z.array(deviceModelInfoSchema); // 设备模型信息数组
|
|
23
|
-
|
|
24
|
-
// 设备模型响应 Schema
|
|
25
|
-
const deviceModelResponseSchema = z.extend(BaseResponseSchema, {
|
|
26
|
-
// 设备模型信息数组
|
|
27
|
-
modelInfo: z.array(deviceModelInfoSchema)
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// 类型导出
|
|
31
|
-
|
|
32
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
modelType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
15
|
-
scale: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
16
|
-
size: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
17
|
-
rotation: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
18
|
-
position: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>>;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
type RequestFurnitureListData = z.infer<typeof requestFurnitureListSchema>;
|
|
21
|
-
type FurnitureModelInfo = z.infer<typeof furnitureModelInfoSchema>;
|
|
22
|
-
export type FurnitureModelResponse = z.infer<typeof BaseResponseSchema> & {
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface RequestFurnitureListData {
|
|
3
|
+
}
|
|
4
|
+
export interface FurnitureModelInfo {
|
|
5
|
+
id: number;
|
|
6
|
+
modelType: number;
|
|
7
|
+
scale: number;
|
|
8
|
+
size: number[];
|
|
9
|
+
rotation: number[];
|
|
10
|
+
position: number[];
|
|
11
|
+
}
|
|
12
|
+
export type SetFurnitureModelData = FurnitureModelInfo[];
|
|
13
|
+
export interface FurnitureModelResponse extends BaseResponse {
|
|
23
14
|
modelInfo: FurnitureModelInfo[];
|
|
24
|
-
}
|
|
15
|
+
}
|
|
25
16
|
export type TRequestFurnitureList = (data?: RequestFurnitureListData) => Promise<FurnitureModelResponse>;
|
|
26
|
-
export type TSetFurnitureModel = (data:
|
|
27
|
-
export {};
|
|
17
|
+
export type TSetFurnitureModel = (data: SetFurnitureModelData) => Promise<FurnitureModelResponse>;
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// 家具模型信息 Schema
|
|
3
|
-
const furnitureModelInfoSchema = z.object({
|
|
4
|
-
id: z.int(),
|
|
5
|
-
// 家具模型ID
|
|
6
|
-
modelType: z.int(),
|
|
7
|
-
// 家具模型类型
|
|
8
|
-
scale: z.number(),
|
|
9
|
-
// 家具模型缩放比例
|
|
10
|
-
size: z.array(z.number()),
|
|
11
|
-
// 家具模型尺寸
|
|
12
|
-
rotation: z.array(z.number()),
|
|
13
|
-
// 家具模型旋转角度
|
|
14
|
-
position: z.array(z.number()) // 家具模型位置
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// 请求家具列表参数 Schema(目前为空,但保留扩展性)
|
|
18
|
-
export const requestFurnitureListSchema = z.object({});
|
|
19
|
-
|
|
20
|
-
// 设置家具模型参数 Schema
|
|
21
|
-
export const setFurnitureModelSchema = z.array(furnitureModelInfoSchema); // 家具模型信息数组
|
|
22
|
-
|
|
23
|
-
// 类型导出
|
|
24
|
-
|
|
25
|
-
// 显式定义类型以确保正确推断(z.infer 对 z.extend 的结果类型推断可能有问题)
|
|
26
|
-
|
|
27
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,39 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
mapId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
declare const changeCurrentMapResponseSchema: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniObject<{
|
|
23
|
-
success: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniBoolean<boolean>;
|
|
24
|
-
errCode: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
25
|
-
reqType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
26
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
27
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
28
|
-
mapId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
export type DeleteHistoryMapData = z.infer<typeof deleteHistoryMapSchema>;
|
|
31
|
-
export type SaveMapData = z.infer<typeof saveMapSchema>;
|
|
32
|
-
export type ChangeCurrentMapData = z.infer<typeof changeCurrentMapSchema>;
|
|
33
|
-
export type DeleteMapResponse = z.infer<typeof BaseResponseSchema>;
|
|
34
|
-
export type SaveMapResponse = z.infer<typeof saveMapResponseSchema>;
|
|
35
|
-
export type UseMapResponse = z.infer<typeof changeCurrentMapResponseSchema>;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface DeleteHistoryMapData {
|
|
3
|
+
mapId: number;
|
|
4
|
+
}
|
|
5
|
+
export interface SaveMapData {
|
|
6
|
+
oper: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ChangeCurrentMapData {
|
|
9
|
+
mapId: number;
|
|
10
|
+
url: string;
|
|
11
|
+
urlLen: number;
|
|
12
|
+
}
|
|
13
|
+
export type DeleteMapResponse = BaseResponse;
|
|
14
|
+
export interface SaveMapResponse extends BaseResponse {
|
|
15
|
+
mapId: number;
|
|
16
|
+
}
|
|
17
|
+
export interface UseMapResponse extends BaseResponse {
|
|
18
|
+
mapId: number;
|
|
19
|
+
}
|
|
36
20
|
export type TDeleteHistoryMap = (mapId: number) => Promise<DeleteMapResponse>;
|
|
37
21
|
export type TSaveMap = (data?: SaveMapData) => Promise<SaveMapResponse>;
|
|
38
22
|
export type TChangeCurrentMap = (mapId: number, url: string) => Promise<UseMapResponse>;
|
|
39
|
-
export {};
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema } from './base';
|
|
3
|
-
|
|
4
|
-
// 删除历史地图参数 Schema
|
|
5
|
-
export const deleteHistoryMapSchema = z.object({
|
|
6
|
-
mapId: z.int() // 地图ID
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// 保存当前地图参数 Schema
|
|
10
|
-
export const saveMapSchema = z.object({
|
|
11
|
-
oper: z.int() // 操作类型:0 表示保存
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// 更改当前使用的地图参数 Schema
|
|
15
|
-
export const changeCurrentMapSchema = z.object({
|
|
16
|
-
mapId: z.int(),
|
|
17
|
-
// 地图ID
|
|
18
|
-
url: z.string(),
|
|
19
|
-
// 地图URL
|
|
20
|
-
urlLen: z.int() // URL 长度
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// 保存地图响应 Schema
|
|
24
|
-
const saveMapResponseSchema = z.extend(BaseResponseSchema, {
|
|
25
|
-
// 保存后的地图ID
|
|
26
|
-
mapId: z.int()
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// 更改当前地图响应 Schema
|
|
30
|
-
const changeCurrentMapResponseSchema = z.extend(BaseResponseSchema, {
|
|
31
|
-
// 当前使用的地图ID
|
|
32
|
-
mapId: z.int()
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// 类型导出
|
|
36
|
-
|
|
37
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export declare const originSchema: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniObject<{
|
|
8
|
-
x: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
9
|
-
y: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
declare const partDivisionResponseSchema: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniObject<{
|
|
12
|
-
success: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniBoolean<boolean>;
|
|
13
|
-
errCode: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
14
|
-
reqType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
15
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
16
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export type PartDivisionResponse = z.infer<typeof partDivisionResponseSchema>;
|
|
19
|
-
export type TSetPartDivision = (points: z.infer<typeof pointsSchema>, roomId: z.infer<typeof roomIdSchema>, origin: z.infer<typeof originSchema>) => Promise<PartDivisionResponse>;
|
|
20
|
-
export {};
|
|
1
|
+
import type { BaseResponse, Point, StringOrNumber } from './base';
|
|
2
|
+
export type PartDivisionPoints = Point[];
|
|
3
|
+
export type PartDivisionRoomId = StringOrNumber;
|
|
4
|
+
export type PartDivisionOrigin = Point;
|
|
5
|
+
export type PartDivisionResponse = BaseResponse;
|
|
6
|
+
export type TSetPartDivision = (points: PartDivisionPoints, roomId: PartDivisionRoomId, origin: PartDivisionOrigin) => Promise<PartDivisionResponse>;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema, Point } from './base';
|
|
3
|
-
export const pointsSchema = z.array(Point).check(z.minLength(1));
|
|
4
|
-
export const roomIdSchema = z.union([z.int(), z.string()]);
|
|
5
|
-
export const originSchema = Point;
|
|
6
|
-
|
|
7
|
-
// 房间分隔响应 Schema(BaseResponseSchema 已包含所有必需字段)
|
|
8
|
-
const partDivisionResponseSchema = BaseResponseSchema;
|
|
9
|
-
|
|
10
|
-
// 类型导出
|
|
11
|
-
|
|
12
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
success: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniBoolean<boolean>;
|
|
5
|
-
errCode: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
6
|
-
reqType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
7
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
8
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
export type SetPartMergeData = z.infer<typeof setPartMergeSchema>;
|
|
11
|
-
export type PartMergeResponse = z.infer<typeof partMergeResponseSchema>;
|
|
1
|
+
import type { BaseResponse, StringOrNumber } from './base';
|
|
2
|
+
export type SetPartMergeData = StringOrNumber[];
|
|
3
|
+
export type PartMergeResponse = BaseResponse;
|
|
12
4
|
export type TSetPartMerge = (data: SetPartMergeData) => Promise<PartMergeResponse>;
|
|
13
|
-
export {};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema } from './base';
|
|
3
|
-
|
|
4
|
-
// 设置分区合并参数 Schema
|
|
5
|
-
export const setPartMergeSchema = z.array(z.union([z.int(), z.string()])).check(z.minLength(2));
|
|
6
|
-
|
|
7
|
-
// 分区合并响应 Schema(BaseResponseSchema 已包含所有必需字段)
|
|
8
|
-
const partMergeResponseSchema = BaseResponseSchema;
|
|
9
|
-
|
|
10
|
-
// 类型导出
|
|
11
|
-
|
|
12
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
password:
|
|
4
|
-
oldPassword
|
|
5
|
-
taskId
|
|
6
|
-
}
|
|
7
|
-
export
|
|
8
|
-
password:
|
|
9
|
-
taskId
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
success: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniBoolean<boolean>;
|
|
13
|
-
errCode: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumber<number>;
|
|
14
|
-
reqType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
15
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
16
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export type SetPasswordData = z.infer<typeof setPasswordSchema>;
|
|
19
|
-
export type CheckPasswordData = z.infer<typeof checkPasswordSchema>;
|
|
20
|
-
export type PasswordResponse = z.infer<typeof passwordResponseSchema>;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface SetPasswordData {
|
|
3
|
+
password: string;
|
|
4
|
+
oldPassword?: string;
|
|
5
|
+
taskId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CheckPasswordData {
|
|
8
|
+
password: string;
|
|
9
|
+
taskId?: string;
|
|
10
|
+
}
|
|
11
|
+
export type PasswordResponse = BaseResponse;
|
|
21
12
|
export type TRequestPassword = () => Promise<PasswordResponse>;
|
|
22
13
|
export type TSetPassword = (data: SetPasswordData) => Promise<PasswordResponse>;
|
|
23
14
|
export type TCheckPassword = (data: CheckPasswordData) => Promise<PasswordResponse>;
|
|
24
|
-
export {};
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema } from './base';
|
|
3
|
-
|
|
4
|
-
// 设置密码参数 Schema
|
|
5
|
-
export const setPasswordSchema = z.object({
|
|
6
|
-
password: z.string(),
|
|
7
|
-
// 密码(MD5 加密后的字符串)
|
|
8
|
-
oldPassword: z.optional(z.string()),
|
|
9
|
-
// 旧密码(MD5 加密后的字符串,可选)
|
|
10
|
-
taskId: z.optional(z.string()) // 任务ID(可选)
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// 校验密码参数 Schema
|
|
14
|
-
export const checkPasswordSchema = z.object({
|
|
15
|
-
password: z.string(),
|
|
16
|
-
// 密码(MD5 加密后的字符串)
|
|
17
|
-
taskId: z.optional(z.string()) // 任务ID(可选)
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// 密码响应 Schema(基础响应)
|
|
21
|
-
const passwordResponseSchema = BaseResponseSchema;
|
|
22
|
-
|
|
23
|
-
// 类型导出
|
|
24
|
-
|
|
25
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
reqType: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
19
|
-
version: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
20
|
-
taskId: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>;
|
|
21
|
-
active: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
22
|
-
time: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>>;
|
|
23
|
-
day: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
|
-
export type SetQuietHoursData = z.infer<typeof setQuietHoursSchema>;
|
|
26
|
-
export type QuietHoursResponse = z.infer<typeof quietHoursResponseSchema>;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface QuietHoursTime {
|
|
3
|
+
hour: number;
|
|
4
|
+
minute: number;
|
|
5
|
+
}
|
|
6
|
+
export interface SetQuietHoursData {
|
|
7
|
+
startTime: QuietHoursTime;
|
|
8
|
+
endTime: QuietHoursTime;
|
|
9
|
+
active: number;
|
|
10
|
+
day: number;
|
|
11
|
+
version?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface QuietHoursResponse extends BaseResponse {
|
|
14
|
+
active: number;
|
|
15
|
+
time: string[];
|
|
16
|
+
day: number;
|
|
17
|
+
}
|
|
27
18
|
export type TRequestQuietHours = () => Promise<QuietHoursResponse>;
|
|
28
19
|
export type TSetQuietHours = (data: SetQuietHoursData) => Promise<QuietHoursResponse>;
|
|
29
|
-
export {};
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseResponseSchema } from './base';
|
|
3
|
-
|
|
4
|
-
// 时间对象 Schema
|
|
5
|
-
const timeSchema = z.object({
|
|
6
|
-
hour: z.int().check(z.gte(0), z.lte(23)),
|
|
7
|
-
minute: z.int().check(z.gte(0), z.lte(59))
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// 设置勿扰模式参数 Schema
|
|
11
|
-
export const setQuietHoursSchema = z.object({
|
|
12
|
-
startTime: timeSchema,
|
|
13
|
-
// 开始时间
|
|
14
|
-
endTime: timeSchema,
|
|
15
|
-
// 结束时间
|
|
16
|
-
active: z.int().check(z.gte(0), z.lte(1)),
|
|
17
|
-
// 1:开启 0:关闭
|
|
18
|
-
day: z.int(),
|
|
19
|
-
// 是否有跨天,1:有 0:无
|
|
20
|
-
version: z.optional(z.string()) // 协议版本(可选)
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// 勿扰模式响应 Schema
|
|
24
|
-
const quietHoursResponseSchema = z.extend(BaseResponseSchema, {
|
|
25
|
-
// 是否激活,0 表示未激活,1 表示激活
|
|
26
|
-
active: z.int(),
|
|
27
|
-
// 时间段数组,每个元素为 "开始时间, 结束时间" 的字符串
|
|
28
|
-
time: z.array(z.string()),
|
|
29
|
-
// 星期几,1 表示星期一,2 表示星期二,以此类推
|
|
30
|
-
day: z.int()
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// 类型导出
|
|
34
|
-
|
|
35
|
-
// 函数类型定义
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export type ResetMapResponse = z.infer<typeof BaseResponseSchema>;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export type ResetMapResponse = BaseResponse;
|
|
4
3
|
export type TSetResetMap = () => Promise<ResetMapResponse>;
|
|
@@ -1,48 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
num
|
|
4
|
-
ids:
|
|
5
|
-
suctions
|
|
6
|
-
cisterns
|
|
7
|
-
cleanCounts
|
|
8
|
-
yMops
|
|
9
|
-
sweepMopModes
|
|
10
|
-
floorTypes
|
|
11
|
-
names
|
|
12
|
-
nameLabels
|
|
13
|
-
orders
|
|
14
|
-
routePreferences
|
|
15
|
-
waterValues
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
nameLabels: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniOptional<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat>>;
|
|
34
|
-
orders: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniOptional<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniNumberFormat>>;
|
|
35
|
-
routePreferences: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniOptional<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniString<string>>>;
|
|
36
|
-
waterValues: import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniOptional<import("../../../myLib/zod/src/v4/mini/schemas").ZodMiniArray<any>>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
/**
|
|
39
|
-
* 验证设置房间属性协议数据
|
|
40
|
-
* @param data 已验证基础 schema 的数据
|
|
41
|
-
* @throws MqttError 验证失败时抛出
|
|
42
|
-
*/
|
|
43
|
-
export declare function validateSetRoomProperty(data: SetRoomPropertyData): void;
|
|
1
|
+
import type { BaseResponse } from './base';
|
|
2
|
+
export interface SetRoomPropertyData {
|
|
3
|
+
num?: number;
|
|
4
|
+
ids: number[];
|
|
5
|
+
suctions?: string[];
|
|
6
|
+
cisterns?: string[];
|
|
7
|
+
cleanCounts?: number[];
|
|
8
|
+
yMops?: number[];
|
|
9
|
+
sweepMopModes?: string[];
|
|
10
|
+
floorTypes?: number[];
|
|
11
|
+
names?: string[];
|
|
12
|
+
nameLabels?: number[];
|
|
13
|
+
orders?: number[];
|
|
14
|
+
routePreferences?: string[];
|
|
15
|
+
waterValues?: number[];
|
|
16
|
+
}
|
|
17
|
+
export interface RoomPropertyResponse extends BaseResponse {
|
|
18
|
+
suctions?: string[];
|
|
19
|
+
cisterns?: string[];
|
|
20
|
+
cleanCounts?: number[];
|
|
21
|
+
yMops?: number[];
|
|
22
|
+
sweepMopModes?: string[];
|
|
23
|
+
ids?: number[];
|
|
24
|
+
num: number;
|
|
25
|
+
mapId: number;
|
|
26
|
+
floorTypes?: number[];
|
|
27
|
+
names?: string[];
|
|
28
|
+
nameLabels?: number[];
|
|
29
|
+
orders?: number[];
|
|
30
|
+
routePreferences?: string[];
|
|
31
|
+
waterValues?: number[];
|
|
32
|
+
}
|
|
44
33
|
export type TRequestRoomProperty = () => Promise<RoomPropertyResponse>;
|
|
45
34
|
export type TSetRoomProperty = (data: SetRoomPropertyData) => Promise<RoomPropertyResponse>;
|
|
46
|
-
export type SetRoomPropertyData = z.infer<typeof setRoomPropertySchema>;
|
|
47
|
-
export type RoomPropertyResponse = z.infer<typeof roomPropertyResponseSchema>;
|
|
48
|
-
export {};
|