@ray-js/api 1.7.21 → 1.7.22
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/cloud/outdoor.d.ts +100 -0
- package/lib/cloud/outdoor.js +107 -0
- package/lib/getCustomConfig/index.d.ts +3 -0
- package/lib/getCustomConfig/index.js +4 -0
- package/lib/getCustomConfig/index.thing.d.ts +3 -0
- package/lib/getCustomConfig/index.thing.js +1 -0
- package/lib/getCustomConfig/index.wechat.d.ts +3 -0
- package/lib/getCustomConfig/index.wechat.js +4 -0
- package/lib/getCustomConfig/type.d.ts +22 -0
- package/lib/getCustomConfig/type.js +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -5
package/lib/cloud/outdoor.d.ts
CHANGED
@@ -12,4 +12,104 @@ type ProductIconVOMap = {
|
|
12
12
|
export declare const getOutdoorDeviceIcon: (params: {
|
13
13
|
deviceIds: string[];
|
14
14
|
}) => Promise<ProductIconVOMap>;
|
15
|
+
/**
|
16
|
+
* 获取设备当前位置参数
|
17
|
+
*/
|
18
|
+
type GetLocationParams = {
|
19
|
+
deviceId: string;
|
20
|
+
proSource?: string;
|
21
|
+
coordinate?: string;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* 获取设备当前位置响应
|
25
|
+
*/
|
26
|
+
type GetLocationResult = {
|
27
|
+
lat: number;
|
28
|
+
lon: number;
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* 获取设备当前位置
|
32
|
+
* @param {GetLocationParams} params
|
33
|
+
* @returns {Promise<GetLocationResult>}
|
34
|
+
*/
|
35
|
+
export declare const getLatestLocation: (params: GetLocationParams) => Promise<GetLocationResult>;
|
36
|
+
/**
|
37
|
+
* 获取 appType 参数
|
38
|
+
*/
|
39
|
+
type GetAppTypeParams = {
|
40
|
+
deviceId: string;
|
41
|
+
};
|
42
|
+
/**
|
43
|
+
* 获取 appType 响应
|
44
|
+
*/
|
45
|
+
type GetAppTypeResult = {
|
46
|
+
appType: number;
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* 获取 appType
|
50
|
+
* @param {GetAppTypeParams} params
|
51
|
+
* @returns {Promise<GetAppTypeResult>}
|
52
|
+
*/
|
53
|
+
export declare const getAppType: (params: GetAppTypeParams) => Promise<GetAppTypeResult>;
|
54
|
+
/**
|
55
|
+
* 获取车辆详情参数
|
56
|
+
*/
|
57
|
+
type GetVehicleDetailParams = {
|
58
|
+
deviceId: string;
|
59
|
+
};
|
60
|
+
/**
|
61
|
+
* 获取车辆详情响应
|
62
|
+
*/
|
63
|
+
type GetVehicleDetailResult = any;
|
64
|
+
/**
|
65
|
+
* 获取车辆详情
|
66
|
+
* @param {GetVehicleDetailParams} params
|
67
|
+
* @returns {Promise<GetVehicleDetailResult>}
|
68
|
+
*/
|
69
|
+
export declare const getVehicleDetail: (params: GetVehicleDetailParams) => Promise<GetVehicleDetailResult>;
|
70
|
+
/**
|
71
|
+
* 获取车辆详情图片地址参数
|
72
|
+
*/
|
73
|
+
type GetVehicleImgUrlParams = {
|
74
|
+
bizKey: string;
|
75
|
+
};
|
76
|
+
/**
|
77
|
+
* 获取车辆详情图片地址响应
|
78
|
+
*/
|
79
|
+
type GetVehicleImgUrlResult = string;
|
80
|
+
/**
|
81
|
+
* 获取车辆详情图片地址
|
82
|
+
* @param {GetVehicleImgUrlParams} params
|
83
|
+
* @returns {Promise<GetVehicleImgUrlResult>}
|
84
|
+
*/
|
85
|
+
export declare const GetVehicleImgUrl: (params: GetVehicleImgUrlParams) => Promise<GetVehicleImgUrlResult>;
|
86
|
+
/**
|
87
|
+
* 获取车辆详情图片地址参数
|
88
|
+
*/
|
89
|
+
type GetActivityInfoParams = {
|
90
|
+
activityTypes: string;
|
91
|
+
time: number;
|
92
|
+
};
|
93
|
+
/**
|
94
|
+
* 根据活动类型展示位置等获取活动信息响应
|
95
|
+
*/
|
96
|
+
type SourceItem = {
|
97
|
+
image: string;
|
98
|
+
url: string;
|
99
|
+
};
|
100
|
+
type GetActivityInfoResult = {
|
101
|
+
activityName: string;
|
102
|
+
activityType: number;
|
103
|
+
endTime: number;
|
104
|
+
id: number;
|
105
|
+
priority: number;
|
106
|
+
sourceList: SourceItem[];
|
107
|
+
templateConfig: Record<string, any>;
|
108
|
+
};
|
109
|
+
/**
|
110
|
+
* 根据活动类型展示位置等获取活动信息
|
111
|
+
* @param {GetActivityInfoParams} params
|
112
|
+
* @returns {Promise<GetActivityInfoResult[]>}
|
113
|
+
*/
|
114
|
+
export declare const getActivityInfo: (params: GetActivityInfoParams) => Promise<GetActivityInfoResult[]>;
|
15
115
|
export {};
|
package/lib/cloud/outdoor.js
CHANGED
@@ -22,4 +22,111 @@ export const getOutdoorDeviceIcon = params => {
|
|
22
22
|
}
|
23
23
|
});
|
24
24
|
});
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* 获取设备当前位置参数
|
29
|
+
*/
|
30
|
+
|
31
|
+
/**
|
32
|
+
* 获取设备当前位置响应
|
33
|
+
*/
|
34
|
+
|
35
|
+
/**
|
36
|
+
* 获取设备当前位置
|
37
|
+
* @param {GetLocationParams} params
|
38
|
+
* @returns {Promise<GetLocationResult>}
|
39
|
+
*/
|
40
|
+
export const getLatestLocation = params => {
|
41
|
+
return requestCloud({
|
42
|
+
api: `${THING}.m.trip.outdoors.location.get`,
|
43
|
+
version: '1.0',
|
44
|
+
data: params
|
45
|
+
});
|
46
|
+
};
|
47
|
+
|
48
|
+
/**
|
49
|
+
* 获取 appType 参数
|
50
|
+
*/
|
51
|
+
|
52
|
+
/**
|
53
|
+
* 获取 appType 响应
|
54
|
+
*/
|
55
|
+
|
56
|
+
/**
|
57
|
+
* 获取 appType
|
58
|
+
* @param {GetAppTypeParams} params
|
59
|
+
* @returns {Promise<GetAppTypeResult>}
|
60
|
+
*/
|
61
|
+
export const getAppType = params => {
|
62
|
+
return requestCloud({
|
63
|
+
api: `${THING}.m.trip.outdoors.app.apptype.get`,
|
64
|
+
version: '1.0',
|
65
|
+
data: params
|
66
|
+
});
|
67
|
+
};
|
68
|
+
|
69
|
+
/**
|
70
|
+
* 获取车辆详情参数
|
71
|
+
*/
|
72
|
+
|
73
|
+
/**
|
74
|
+
* 获取车辆详情响应
|
75
|
+
*/
|
76
|
+
|
77
|
+
/**
|
78
|
+
* 获取车辆详情
|
79
|
+
* @param {GetVehicleDetailParams} params
|
80
|
+
* @returns {Promise<GetVehicleDetailResult>}
|
81
|
+
*/
|
82
|
+
export const getVehicleDetail = params => {
|
83
|
+
return requestCloud({
|
84
|
+
api: `m.outdoors.device.vehicle.detail`,
|
85
|
+
version: '1.0',
|
86
|
+
data: params
|
87
|
+
});
|
88
|
+
};
|
89
|
+
|
90
|
+
/**
|
91
|
+
* 获取车辆详情图片地址参数
|
92
|
+
*/
|
93
|
+
|
94
|
+
/**
|
95
|
+
* 获取车辆详情图片地址响应
|
96
|
+
*/
|
97
|
+
|
98
|
+
// 图片地址
|
99
|
+
|
100
|
+
/**
|
101
|
+
* 获取车辆详情图片地址
|
102
|
+
* @param {GetVehicleImgUrlParams} params
|
103
|
+
* @returns {Promise<GetVehicleImgUrlResult>}
|
104
|
+
*/
|
105
|
+
export const GetVehicleImgUrl = params => {
|
106
|
+
return requestCloud({
|
107
|
+
api: `m.outdoors.device.vehicle.pic`,
|
108
|
+
version: '1.0',
|
109
|
+
data: params
|
110
|
+
});
|
111
|
+
};
|
112
|
+
|
113
|
+
/**
|
114
|
+
* 获取车辆详情图片地址参数
|
115
|
+
*/
|
116
|
+
|
117
|
+
/**
|
118
|
+
* 根据活动类型展示位置等获取活动信息响应
|
119
|
+
*/
|
120
|
+
|
121
|
+
/**
|
122
|
+
* 根据活动类型展示位置等获取活动信息
|
123
|
+
* @param {GetActivityInfoParams} params
|
124
|
+
* @returns {Promise<GetActivityInfoResult[]>}
|
125
|
+
*/
|
126
|
+
export const getActivityInfo = params => {
|
127
|
+
return requestCloud({
|
128
|
+
api: `smartlife.m.activity.info.get`,
|
129
|
+
version: '1.0',
|
130
|
+
data: params
|
131
|
+
});
|
25
132
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default ty.getCustomConfig;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
interface GeneralCallbackResult {
|
2
|
+
errorMsg: string;
|
3
|
+
errorCode: string;
|
4
|
+
innerError?: {
|
5
|
+
errorCode: string;
|
6
|
+
errorMsg: string;
|
7
|
+
};
|
8
|
+
}
|
9
|
+
type IAnyObject = Record<string, any>;
|
10
|
+
/**
|
11
|
+
* 异步回调方法的通用阐述
|
12
|
+
*/
|
13
|
+
type AsyncApiOptions<S, F extends GeneralCallbackResult = GeneralCallbackResult> = {
|
14
|
+
success?: (res: S) => void;
|
15
|
+
fail?: (res: F) => void;
|
16
|
+
complete?: (res: S | F) => void;
|
17
|
+
};
|
18
|
+
export type TGetCustomConfig<T = IAnyObject> = {
|
19
|
+
(options?: AsyncApiOptions<T>): void;
|
20
|
+
(): Promise<T>;
|
21
|
+
};
|
22
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/lib/index.d.ts
CHANGED
@@ -83,7 +83,7 @@ export { onNavigationBarBack, offNavigationBarBack } from './onNavigationBarBack
|
|
83
83
|
export { default as setNavigationBarBack } from './setNavigationBarBack';
|
84
84
|
export { default as getCdnUrl, getCdnUrlAsync } from './getCdnUrl';
|
85
85
|
/**
|
86
|
-
* 提供
|
86
|
+
* 提供 global-api 将 wx / ty 对象暴露出去,供给业务在Ray为显示导出api时进行快速响应开发。
|
87
87
|
*/
|
88
88
|
export { default as globalApi } from './global-api';
|
89
89
|
export * from './cloud';
|
package/lib/index.js
CHANGED
@@ -29,7 +29,7 @@ export { default as setNavigationBarBack } from './setNavigationBarBack';
|
|
29
29
|
export { default as getCdnUrl, getCdnUrlAsync } from './getCdnUrl';
|
30
30
|
|
31
31
|
/**
|
32
|
-
* 提供
|
32
|
+
* 提供 global-api 将 wx / ty 对象暴露出去,供给业务在Ray为显示导出api时进行快速响应开发。
|
33
33
|
*/
|
34
34
|
export { default as globalApi } from './global-api';
|
35
35
|
export * from './cloud';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.7.
|
3
|
+
"version": "1.7.22",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -29,14 +29,14 @@
|
|
29
29
|
"watch": "ray start --type=component"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@ray-js/framework": "1.7.
|
33
|
-
"@ray-js/router": "1.7.
|
32
|
+
"@ray-js/framework": "1.7.22",
|
33
|
+
"@ray-js/router": "1.7.22",
|
34
34
|
"@ray-js/wechat": "^0.3.13",
|
35
35
|
"base64-browser": "^1.0.1",
|
36
36
|
"query-string": "^7.1.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ray-js/cli": "1.7.
|
39
|
+
"@ray-js/cli": "1.7.22",
|
40
40
|
"art-template": "^4.13.4",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.3",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.com"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "1937ed036e026f2f0b1358c99df9650ea558a3b0"
|
50
50
|
}
|