@ray-js/api 1.4.38 → 1.4.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,232 @@
1
+ /**
2
+ * OutdoorKit
3
+ *
4
+ * @version 1.0.4
5
+ */
6
+ declare namespace ty.outdoor {
7
+ /**
8
+ * 出行获取当前首页展示的设备ID
9
+ */
10
+ export function currentDevice(params?: {
11
+ complete?: () => void
12
+ success?: (params: {
13
+ /** deviceID 设备ID */
14
+ deviceID: string
15
+ }) => void
16
+ fail?: (params: {
17
+ errorMsg: string
18
+ errorCode: string | number
19
+ innerError: {
20
+ errorCode: string | number
21
+ errorMsg: string
22
+ }
23
+ }) => void
24
+ }): void
25
+
26
+ /**
27
+ * 切换设备,会弹出Native切换选择器
28
+ */
29
+ export function switchDevice(params?: {
30
+ complete?: () => void
31
+ success?: (params: boolean) => void
32
+ fail?: (params: {
33
+ errorMsg: string
34
+ errorCode: string | number
35
+ innerError: {
36
+ errorCode: string | number
37
+ errorMsg: string
38
+ }
39
+ }) => void
40
+ }): void
41
+
42
+ /**
43
+ * 获取已绑定设备ID集合
44
+ */
45
+ export function getBoundDeviceIdList(params?: {
46
+ complete?: () => void
47
+ success?: (params: {
48
+ /** 返回已绑定的设备ID集合 */
49
+ devIdList: string[]
50
+ }) => void
51
+ fail?: (params: {
52
+ errorMsg: string
53
+ errorCode: string | number
54
+ innerError: {
55
+ errorCode: string | number
56
+ errorMsg: string
57
+ }
58
+ }) => void
59
+ }): void
60
+
61
+ /**
62
+ * 获取可绑定设备ID集合
63
+ */
64
+ export function getUnbindDeviceIdList(params?: {
65
+ complete?: () => void
66
+ success?: (params: {
67
+ /** 返回可绑定的设备ID集合 */
68
+ devIdList: string[]
69
+ }) => void
70
+ fail?: (params: {
71
+ errorMsg: string
72
+ errorCode: string | number
73
+ innerError: {
74
+ errorCode: string | number
75
+ errorMsg: string
76
+ }
77
+ }) => void
78
+ }): void
79
+
80
+ /**
81
+ * 从设备绑定
82
+ */
83
+ export function bindSlaveDevice(params: {
84
+ /** 从设备ID */
85
+ slaveDevId: string
86
+ /** 主设备ID */
87
+ masterDevId: string
88
+ complete?: () => void
89
+ success?: (params: boolean) => void
90
+ fail?: (params: {
91
+ errorMsg: string
92
+ errorCode: string | number
93
+ innerError: {
94
+ errorCode: string | number
95
+ errorMsg: string
96
+ }
97
+ }) => void
98
+ }): void
99
+
100
+ /**
101
+ * 从设备移除
102
+ */
103
+ export function unbindDevice(params: {
104
+ /** 从设备ID */
105
+ devId: string
106
+ complete?: () => void
107
+ success?: (params: boolean) => void
108
+ fail?: (params: {
109
+ errorMsg: string
110
+ errorCode: string | number
111
+ innerError: {
112
+ errorCode: string | number
113
+ errorMsg: string
114
+ }
115
+ }) => void
116
+ }): void
117
+
118
+ /**
119
+ * 小程序表盘设置
120
+ */
121
+ export function saveDialViewTag(params: {
122
+ /** 表盘左侧 */
123
+ leftViewTag: string
124
+ /** 表盘中间数据 */
125
+ centerViewTag: string
126
+ /** 表盘右侧数据 */
127
+ rightViewTag: string
128
+ complete?: () => void
129
+ success?: (params: boolean) => void
130
+ fail?: (params: {
131
+ errorMsg: string
132
+ errorCode: string | number
133
+ innerError: {
134
+ errorCode: string | number
135
+ errorMsg: string
136
+ }
137
+ }) => void
138
+ }): void
139
+
140
+ /**
141
+ * 保存骑行语音播报数据
142
+ */
143
+ export function saveTTSData(params: {
144
+ /** 骑行数据播报总开关 */
145
+ ttsMainSwitch: boolean
146
+ /** 天气 */
147
+ weather: boolean
148
+ /** 骑行数据播报总开关 */
149
+ abnormalWear: boolean
150
+ /** 骑行里程 */
151
+ cyclingMileage: boolean
152
+ /** 低电量 */
153
+ lowBattery: boolean
154
+ /** 具体电量数值 */
155
+ electricThreshold: number
156
+ /** 骑行里程 */
157
+ callReminder: boolean
158
+ complete?: () => void
159
+ success?: (params: boolean) => void
160
+ fail?: (params: {
161
+ errorMsg: string
162
+ errorCode: string | number
163
+ innerError: {
164
+ errorCode: string | number
165
+ errorMsg: string
166
+ }
167
+ }) => void
168
+ }): void
169
+
170
+ /**
171
+ * 获取骑行播报数据
172
+ */
173
+ export function getTTSData(params?: {
174
+ complete?: () => void
175
+ success?: (params: {
176
+ /** 骑行数据播报总开关 */
177
+ ttsMainSwitch: boolean
178
+ /** 天气 */
179
+ weather: boolean
180
+ /** 骑行数据播报总开关 */
181
+ abnormalWear: boolean
182
+ /** 骑行里程 */
183
+ cyclingMileage: boolean
184
+ /** 低电量 */
185
+ lowBattery: boolean
186
+ /** 具体电量数值 */
187
+ electricThreshold: number
188
+ /** 骑行里程 */
189
+ callReminder: boolean
190
+ }) => void
191
+ fail?: (params: {
192
+ errorMsg: string
193
+ errorCode: string | number
194
+ innerError: {
195
+ errorCode: string | number
196
+ errorMsg: string
197
+ }
198
+ }) => void
199
+ }): void
200
+
201
+ /**
202
+ * 是否有通话权限
203
+ */
204
+ export function isCallPhoneGranted(params?: {
205
+ complete?: () => void
206
+ success?: (params: boolean) => void
207
+ fail?: (params: {
208
+ errorMsg: string
209
+ errorCode: string | number
210
+ innerError: {
211
+ errorCode: string | number
212
+ errorMsg: string
213
+ }
214
+ }) => void
215
+ }): void
216
+
217
+ /**
218
+ * 申请通话权限
219
+ */
220
+ export function requestCallPhonePermission(params?: {
221
+ complete?: () => void
222
+ success?: (params: boolean) => void
223
+ fail?: (params: {
224
+ errorMsg: string
225
+ errorCode: string | number
226
+ innerError: {
227
+ errorCode: string | number
228
+ errorMsg: string
229
+ }
230
+ }) => void
231
+ }): void
232
+ }
@@ -6,3 +6,4 @@
6
6
  /// <reference path="./MapKit.d.ts" />
7
7
  /// <reference path="./HomeKit.d.ts" />
8
8
  /// <reference path="./P2PKit.d.ts" />
9
+ /// <reference path="./OutdoorKit.d.ts" />
@@ -0,0 +1,14 @@
1
+ /// <reference path="../@types/OutdoorKit.d.ts" />
2
+ export declare const outdoor: {
3
+ bindSlaveDevice: typeof ty.outdoor.bindSlaveDevice;
4
+ currentDevice: typeof ty.outdoor.currentDevice;
5
+ getBoundDeviceIdList: typeof ty.outdoor.getBoundDeviceIdList;
6
+ getTTSData: typeof ty.outdoor.getTTSData;
7
+ getUnbindDeviceIdList: typeof ty.outdoor.getUnbindDeviceIdList;
8
+ isCallPhoneGranted: typeof ty.outdoor.isCallPhoneGranted;
9
+ requestCallPhonePermission: typeof ty.outdoor.requestCallPhonePermission;
10
+ saveDialViewTag: typeof ty.outdoor.saveDialViewTag;
11
+ saveTTSData: typeof ty.outdoor.saveTTSData;
12
+ switchDevice: typeof ty.outdoor.switchDevice;
13
+ unbindDevice: typeof ty.outdoor.unbindDevice;
14
+ };
@@ -0,0 +1,38 @@
1
+ /// <reference path="../@types/OutdoorKit.d.ts" />
2
+
3
+ import { factory } from './utils';
4
+ export const outdoor = {
5
+ bindSlaveDevice: factory('bindSlaveDevice', {
6
+ "namespace": "outdoor"
7
+ }),
8
+ currentDevice: factory('currentDevice', {
9
+ "namespace": "outdoor"
10
+ }),
11
+ getBoundDeviceIdList: factory('getBoundDeviceIdList', {
12
+ "namespace": "outdoor"
13
+ }),
14
+ getTTSData: factory('getTTSData', {
15
+ "namespace": "outdoor"
16
+ }),
17
+ getUnbindDeviceIdList: factory('getUnbindDeviceIdList', {
18
+ "namespace": "outdoor"
19
+ }),
20
+ isCallPhoneGranted: factory('isCallPhoneGranted', {
21
+ "namespace": "outdoor"
22
+ }),
23
+ requestCallPhonePermission: factory('requestCallPhonePermission', {
24
+ "namespace": "outdoor"
25
+ }),
26
+ saveDialViewTag: factory('saveDialViewTag', {
27
+ "namespace": "outdoor"
28
+ }),
29
+ saveTTSData: factory('saveTTSData', {
30
+ "namespace": "outdoor"
31
+ }),
32
+ switchDevice: factory('switchDevice', {
33
+ "namespace": "outdoor"
34
+ }),
35
+ unbindDevice: factory('unbindDevice', {
36
+ "namespace": "outdoor"
37
+ })
38
+ };
package/lib/all-kits.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from './PlayNetKit-1.1.3';
6
6
  export * from './MapKit-3.4.9';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
+ export * from './OutdoorKit-1.0.4';
9
10
  import * as device from './DeviceKit-3.3.1';
10
11
  export { device };
package/lib/all-kits.js CHANGED
@@ -6,5 +6,6 @@ export * from './PlayNetKit-1.1.3';
6
6
  export * from './MapKit-3.4.9';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
+ export * from './OutdoorKit-1.0.4';
9
10
  import * as device from './DeviceKit-3.3.1';
10
11
  export { device };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.4.38",
3
+ "version": "1.4.40",
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.4.38",
33
- "@ray-js/router": "1.4.38",
32
+ "@ray-js/framework": "1.4.40",
33
+ "@ray-js/router": "1.4.40",
34
34
  "@ray-js/wechat": "^0.0.33",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.4.38",
39
+ "@ray-js/cli": "1.4.40",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.2",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "90a4ff46cecf0423df2de590703d8892ce56203b"
49
+ "gitHead": "3d90dad321f4eb65b668c0b612e3066f3b285096"
50
50
  }