@ray-js/api 1.6.0-beta.9 → 1.6.0
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/@types/BaseKit.d.ts +837 -37
- package/@types/BizKit.d.ts +1831 -85
- package/@types/DeviceKit.d.ts +581 -58
- package/@types/HomeKit.d.ts +0 -74
- package/@types/MiniKit.d.ts +411 -8
- package/@types/api-cloud.d.ts +145 -0
- package/@types/api-extend.d.ts +42 -10
- package/@types/api.d.ts +3 -0
- package/@types/gateway.d.ts +146 -0
- package/@types/health.d.ts +309 -0
- package/lib/{BaseKit-3.11.0.d.ts → BaseKit-3.14.3.d.ts} +29 -1
- package/lib/{BaseKit-3.11.0.js → BaseKit-3.14.3.js} +32 -1
- package/lib/BizKit-4.10.4.d.ts +84 -0
- package/lib/{BizKit-3.2.7.js → BizKit-4.10.4.js} +46 -5
- package/lib/{DeviceKit-3.3.1.d.ts → DeviceKit-4.9.0.d.ts} +22 -1
- package/lib/{DeviceKit-3.3.1.js → DeviceKit-4.9.0.js} +66 -0
- package/lib/HomeKit-3.1.4.d.ts +0 -1
- package/lib/MapKit-3.4.13.d.ts +0 -1
- package/lib/{MiniKit-3.1.0.d.ts → MiniKit-3.12.1.d.ts} +11 -1
- package/lib/{MiniKit-3.1.0.js → MiniKit-3.12.1.js} +12 -1
- package/lib/OutdoorKit-1.0.4.d.ts +0 -1
- package/lib/P2PKit-2.0.3.d.ts +0 -1
- package/lib/PlayNetKit-1.1.3.d.ts +24 -24
- package/lib/all-kits.d.ts +5 -5
- package/lib/all-kits.js +5 -5
- package/lib/cloud/device.d.ts +3 -3
- package/lib/cloud/gateway.d.ts +11 -0
- package/lib/cloud/gateway.js +39 -0
- package/lib/cloud/health.d.ts +19 -0
- package/lib/cloud/health.js +71 -0
- package/lib/cloud/index.d.ts +3 -0
- package/lib/cloud/index.js +6 -1
- package/lib/cloud/interface.d.ts +40 -1
- package/lib/cloud/laser-clean/index.d.ts +3 -0
- package/lib/cloud/laser-clean/index.js +3 -0
- package/lib/cloud/laser-clean/map.d.ts +3 -0
- package/lib/cloud/laser-clean/map.js +4 -0
- package/lib/cloud/laser-clean/record.d.ts +3 -0
- package/lib/cloud/laser-clean/record.js +4 -0
- package/lib/cloud/laser-clean/voice.d.ts +2 -0
- package/lib/cloud/laser-clean/voice.js +3 -0
- package/lib/cloud/recipe/basket.js +1 -0
- package/lib/cloud/recipe/custom.js +1 -0
- package/lib/cloud/recipe/menu.js +1 -0
- package/lib/cloud/recipe/query.js +1 -0
- package/lib/cloud/recipe/score.js +1 -0
- package/lib/cloud/recipe/star.js +1 -0
- package/lib/getBoundingClientRect/index.thing.js +1 -0
- package/lib/getBoundingClientRect/index.wechat.js +1 -0
- package/lib/getCdnUrl/index.thing.js +13 -8
- package/lib/hideTabBar/index.d.ts +4 -5
- package/lib/index.d.ts +0 -1
- package/lib/navigateBack/index.d.ts +0 -1
- package/lib/navigateTo/index.d.ts +0 -1
- package/lib/panel/devInfo/index.js +7 -1
- package/lib/panel/i18n/index.js +4 -0
- package/lib/panel/i18n/index.wechat.js +4 -0
- package/lib/panel/publishDps.js +2 -0
- package/lib/reLaunch/index.d.ts +0 -1
- package/lib/redirectTo/index.d.ts +0 -1
- package/lib/redirectTo/index.js +1 -0
- package/lib/requestCloud/index.d.ts +0 -1
- package/lib/setNavigationBarColor/index.d.ts +0 -1
- package/lib/setNavigationBarTitle/index.d.ts +0 -1
- package/lib/showTabBar/index.d.ts +4 -5
- package/lib/switchTab/index.d.ts +0 -1
- package/lib/utils.wechat.js +1 -0
- package/lib/viewAPI.d.ts +1 -1
- package/lib/viewAPI.js +2 -1
- package/package.json +8 -8
- package/lib/BizKit-3.2.7.d.ts +0 -46
- package/lib/cloud/doorlock/README.md +0 -62
- package/lib/cloud/doorlock/auth.md +0 -323
- package/lib/cloud/doorlock/device.md +0 -265
- package/lib/cloud/doorlock/log.md +0 -153
- package/lib/cloud/doorlock/member-opmode.md +0 -279
- package/lib/cloud/doorlock/member.md +0 -276
- package/lib/cloud/doorlock/offline-pwd.md +0 -155
- package/lib/cloud/doorlock/temp-pwd.md +0 -362
- package/lib/cloud/doorlock/unlock-method.md +0 -121
- package/lib/cloud/doorlock/unlock.md +0 -222
package/@types/HomeKit.d.ts
CHANGED
@@ -179,80 +179,6 @@ declare namespace ty.home {
|
|
179
179
|
}) => void
|
180
180
|
}): void
|
181
181
|
|
182
|
-
// /**
|
183
|
-
// * 验证码校验成功
|
184
|
-
// */
|
185
|
-
// export function onTicketSuccess(params?: {
|
186
|
-
// /** ticket */
|
187
|
-
// map?: Record<string, string>
|
188
|
-
// complete?: () => void
|
189
|
-
// success?: (params: {
|
190
|
-
// /** ticket */
|
191
|
-
// map?: Record<string, string>
|
192
|
-
// }) => void
|
193
|
-
// fail?: (params: {
|
194
|
-
// errorMsg: string
|
195
|
-
// errorCode: string | number
|
196
|
-
// innerError: {
|
197
|
-
// errorCode: string | number
|
198
|
-
// errorMsg: string
|
199
|
-
// }
|
200
|
-
// }) => void
|
201
|
-
// }): void
|
202
|
-
|
203
|
-
// /**
|
204
|
-
// * 【废弃】打开推荐场景详情页面
|
205
|
-
// *请用deviceKit包下同名方法替代
|
206
|
-
// *详细文档链接:https://wiki.tuya-inc.com:7799/page/1456192108871295013
|
207
|
-
// */
|
208
|
-
// export function openRecommendSceneDetail(params: {
|
209
|
-
// /** 来源 */
|
210
|
-
// source: string
|
211
|
-
// /** 场景模型 */
|
212
|
-
// sceneModel: Record<string, any>
|
213
|
-
// complete?: () => void
|
214
|
-
// success?: (params: {
|
215
|
-
// /** 返回状态,默认返回 true */
|
216
|
-
// status?: boolean
|
217
|
-
// /** 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣 */
|
218
|
-
// type: number
|
219
|
-
// /** 返回的场景数据,可能为空 */
|
220
|
-
// data?: Record<string, any>
|
221
|
-
// }) => void
|
222
|
-
// fail?: (params: {
|
223
|
-
// errorMsg: string
|
224
|
-
// errorCode: string | number
|
225
|
-
// innerError: {
|
226
|
-
// errorCode: string | number
|
227
|
-
// errorMsg: string
|
228
|
-
// }
|
229
|
-
// }) => void
|
230
|
-
// }): void
|
231
|
-
|
232
|
-
// /**
|
233
|
-
// * 【废弃】跳转一键执行和自动化页面
|
234
|
-
// *请用deviceKit包下同名方法替代
|
235
|
-
// */
|
236
|
-
// export function openDeviceExecutionAndAnutomation(params: {
|
237
|
-
// /**
|
238
|
-
// * deviceId
|
239
|
-
// * 设备 id
|
240
|
-
// */
|
241
|
-
// deviceId: string
|
242
|
-
// /** 页面标题,Android 需要 */
|
243
|
-
// title?: string
|
244
|
-
// complete?: () => void
|
245
|
-
// success?: (params: null) => void
|
246
|
-
// fail?: (params: {
|
247
|
-
// errorMsg: string
|
248
|
-
// errorCode: string | number
|
249
|
-
// innerError: {
|
250
|
-
// errorCode: string | number
|
251
|
-
// errorMsg: string
|
252
|
-
// }
|
253
|
-
// }) => void
|
254
|
-
// }): void
|
255
|
-
|
256
182
|
export type RoomData = {
|
257
183
|
/** 房间id */
|
258
184
|
roomId: number
|
package/@types/MiniKit.d.ts
CHANGED
@@ -27,14 +27,28 @@ declare enum HighwayMethod {
|
|
27
27
|
/**
|
28
28
|
* MiniKit
|
29
29
|
*
|
30
|
-
* @version 3.1
|
30
|
+
* @version 3.12.1
|
31
31
|
*/
|
32
32
|
declare namespace ty {
|
33
33
|
/**
|
34
|
-
*
|
35
|
-
* 基础库 2.0.12 开始支持, 低版本需做兼容处理。
|
34
|
+
* 特殊方法:是否异层渲染响应
|
36
35
|
*/
|
37
|
-
export function nativeDisabled(params:
|
36
|
+
export function nativeDisabled(params: {
|
37
|
+
/** 禁用异层渲染手势分发 */
|
38
|
+
nativeDisabled: boolean
|
39
|
+
/** 需要禁止或启用手势分发的页面id */
|
40
|
+
pageId: string
|
41
|
+
complete?: () => void
|
42
|
+
success?: (params: string) => void
|
43
|
+
fail?: (params: {
|
44
|
+
errorMsg: string
|
45
|
+
errorCode: string | number
|
46
|
+
innerError: {
|
47
|
+
errorCode: string | number
|
48
|
+
errorMsg: string
|
49
|
+
}
|
50
|
+
}) => void
|
51
|
+
}): void
|
38
52
|
|
39
53
|
/**
|
40
54
|
* 通用方法:调用组件API
|
@@ -311,7 +325,7 @@ declare namespace ty {
|
|
311
325
|
/** data 请求入参 */
|
312
326
|
data?: Record<string, any>
|
313
327
|
/** method 请求方法 */
|
314
|
-
method?:
|
328
|
+
method?: HighwayMethod
|
315
329
|
complete?: () => void
|
316
330
|
success?: (params: {
|
317
331
|
/**
|
@@ -792,6 +806,163 @@ declare namespace ty {
|
|
792
806
|
miniProgram: MiniProgramAccountInfo
|
793
807
|
}
|
794
808
|
|
809
|
+
/**
|
810
|
+
* 获取小程序自定义配置
|
811
|
+
*/
|
812
|
+
export function getMiniAppConfig(params?: {
|
813
|
+
complete?: () => void
|
814
|
+
success?: (params: {
|
815
|
+
/** 小程序自定义配置 */
|
816
|
+
config: {}
|
817
|
+
}) => void
|
818
|
+
fail?: (params: {
|
819
|
+
errorMsg: string
|
820
|
+
errorCode: string | number
|
821
|
+
innerError: {
|
822
|
+
errorCode: string | number
|
823
|
+
errorMsg: string
|
824
|
+
}
|
825
|
+
}) => void
|
826
|
+
}): void
|
827
|
+
|
828
|
+
/**
|
829
|
+
* 获取小程序自定义配置
|
830
|
+
*/
|
831
|
+
export function getMiniAppConfigSync(): {
|
832
|
+
/** 小程序自定义配置 */
|
833
|
+
config: {}
|
834
|
+
}
|
835
|
+
|
836
|
+
/**
|
837
|
+
* 唤起小程序看板页
|
838
|
+
*/
|
839
|
+
export function showBoard(params?: {
|
840
|
+
complete?: () => void
|
841
|
+
success?: (params: null) => void
|
842
|
+
fail?: (params: {
|
843
|
+
errorMsg: string
|
844
|
+
errorCode: string | number
|
845
|
+
innerError: {
|
846
|
+
errorCode: string | number
|
847
|
+
errorMsg: string
|
848
|
+
}
|
849
|
+
}) => void
|
850
|
+
}): void
|
851
|
+
|
852
|
+
/**
|
853
|
+
* 重置小程序看板页自定义栏item
|
854
|
+
*/
|
855
|
+
export function resetBoardMenus(params: {
|
856
|
+
/** 生效页面, 默认当前页面 */
|
857
|
+
effectPage?: EffectPage
|
858
|
+
/** item列表 */
|
859
|
+
menus: BoardItemBean[]
|
860
|
+
complete?: () => void
|
861
|
+
success?: (params: null) => void
|
862
|
+
fail?: (params: {
|
863
|
+
errorMsg: string
|
864
|
+
errorCode: string | number
|
865
|
+
innerError: {
|
866
|
+
errorCode: string | number
|
867
|
+
errorMsg: string
|
868
|
+
}
|
869
|
+
}) => void
|
870
|
+
}): void
|
871
|
+
|
872
|
+
/**
|
873
|
+
* 重置小程序看板页默认栏item
|
874
|
+
*/
|
875
|
+
export function resetSystemMenus(params: {
|
876
|
+
/** 生效页面, 默认当前页面 */
|
877
|
+
effectPage?: EffectPage
|
878
|
+
/** item列表 */
|
879
|
+
menus: BoardItemBean[]
|
880
|
+
complete?: () => void
|
881
|
+
success?: (params: null) => void
|
882
|
+
fail?: (params: {
|
883
|
+
errorMsg: string
|
884
|
+
errorCode: string | number
|
885
|
+
innerError: {
|
886
|
+
errorCode: string | number
|
887
|
+
errorMsg: string
|
888
|
+
}
|
889
|
+
}) => void
|
890
|
+
}): void
|
891
|
+
|
892
|
+
/**
|
893
|
+
* 针对具体的看板itemKey显示红点
|
894
|
+
*/
|
895
|
+
export function showRedBot(params: {
|
896
|
+
/** 生效页面, 默认当前页面 */
|
897
|
+
effectPage?: EffectPage
|
898
|
+
/** 看板item名称 */
|
899
|
+
key: string
|
900
|
+
complete?: () => void
|
901
|
+
success?: (params: null) => void
|
902
|
+
fail?: (params: {
|
903
|
+
errorMsg: string
|
904
|
+
errorCode: string | number
|
905
|
+
innerError: {
|
906
|
+
errorCode: string | number
|
907
|
+
errorMsg: string
|
908
|
+
}
|
909
|
+
}) => void
|
910
|
+
}): void
|
911
|
+
|
912
|
+
/**
|
913
|
+
* 针对具体的看板itemKey隐藏红点
|
914
|
+
*/
|
915
|
+
export function hiddenRedBot(params: {
|
916
|
+
/** 生效页面, 默认当前页面 */
|
917
|
+
effectPage?: EffectPage
|
918
|
+
/** 看板item名称 */
|
919
|
+
key: string
|
920
|
+
complete?: () => void
|
921
|
+
success?: (params: null) => void
|
922
|
+
fail?: (params: {
|
923
|
+
errorMsg: string
|
924
|
+
errorCode: string | number
|
925
|
+
innerError: {
|
926
|
+
errorCode: string | number
|
927
|
+
errorMsg: string
|
928
|
+
}
|
929
|
+
}) => void
|
930
|
+
}): void
|
931
|
+
|
932
|
+
/**
|
933
|
+
* 关闭小程序页面加载框
|
934
|
+
*/
|
935
|
+
export function hideRenderLoading(params?: {
|
936
|
+
complete?: () => void
|
937
|
+
success?: (params: null) => void
|
938
|
+
fail?: (params: {
|
939
|
+
errorMsg: string
|
940
|
+
errorCode: string | number
|
941
|
+
innerError: {
|
942
|
+
errorCode: string | number
|
943
|
+
errorMsg: string
|
944
|
+
}
|
945
|
+
}) => void
|
946
|
+
}): void
|
947
|
+
|
948
|
+
/**
|
949
|
+
* 设置小程序页面背景图片,调用后小程序导航栏背景色将变为透明
|
950
|
+
*/
|
951
|
+
export function setBackgroundImage(params: {
|
952
|
+
/** 图片地址,支持网络图片和本地图片 */
|
953
|
+
imageUrl: string
|
954
|
+
complete?: () => void
|
955
|
+
success?: (params: null) => void
|
956
|
+
fail?: (params: {
|
957
|
+
errorMsg: string
|
958
|
+
errorCode: string | number
|
959
|
+
innerError: {
|
960
|
+
errorCode: string | number
|
961
|
+
errorMsg: string
|
962
|
+
}
|
963
|
+
}) => void
|
964
|
+
}): void
|
965
|
+
|
795
966
|
/**
|
796
967
|
* 在当前页面显示导航条加载动画
|
797
968
|
*/
|
@@ -888,6 +1059,19 @@ declare namespace ty {
|
|
888
1059
|
url: string
|
889
1060
|
/** 打开方式,支持全屏full,半屏half;默认全屏full */
|
890
1061
|
type?: string
|
1062
|
+
/**
|
1063
|
+
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
1064
|
+
* 取值范围:【1-屏幕的高度】单位:px
|
1065
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1066
|
+
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
1067
|
+
*/
|
1068
|
+
topMargin?: number
|
1069
|
+
/**
|
1070
|
+
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
1071
|
+
* 取值范围【1-99】单位:百分比
|
1072
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1073
|
+
*/
|
1074
|
+
topMarginPercent?: number
|
891
1075
|
complete?: () => void
|
892
1076
|
success?: (params: null) => void
|
893
1077
|
fail?: (params: {
|
@@ -926,6 +1110,19 @@ declare namespace ty {
|
|
926
1110
|
url: string
|
927
1111
|
/** 打开方式,支持全屏full,半屏half;默认全屏full */
|
928
1112
|
type?: string
|
1113
|
+
/**
|
1114
|
+
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
1115
|
+
* 取值范围:【1-屏幕的高度】单位:px
|
1116
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1117
|
+
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
1118
|
+
*/
|
1119
|
+
topMargin?: number
|
1120
|
+
/**
|
1121
|
+
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
1122
|
+
* 取值范围【1-99】单位:百分比
|
1123
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1124
|
+
*/
|
1125
|
+
topMarginPercent?: number
|
929
1126
|
complete?: () => void
|
930
1127
|
success?: (params: null) => void
|
931
1128
|
fail?: (params: {
|
@@ -946,6 +1143,19 @@ declare namespace ty {
|
|
946
1143
|
url: string
|
947
1144
|
/** 打开方式,支持全屏full,半屏half;默认全屏full */
|
948
1145
|
type?: string
|
1146
|
+
/**
|
1147
|
+
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
1148
|
+
* 取值范围:【1-屏幕的高度】单位:px
|
1149
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1150
|
+
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
1151
|
+
*/
|
1152
|
+
topMargin?: number
|
1153
|
+
/**
|
1154
|
+
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
1155
|
+
* 取值范围【1-99】单位:百分比
|
1156
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1157
|
+
*/
|
1158
|
+
topMarginPercent?: number
|
949
1159
|
complete?: () => void
|
950
1160
|
success?: (params: null) => void
|
951
1161
|
fail?: (params: {
|
@@ -966,6 +1176,19 @@ declare namespace ty {
|
|
966
1176
|
url: string
|
967
1177
|
/** 打开方式,支持全屏full,半屏half;默认全屏full */
|
968
1178
|
type?: string
|
1179
|
+
/**
|
1180
|
+
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
1181
|
+
* 取值范围:【1-屏幕的高度】单位:px
|
1182
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1183
|
+
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
1184
|
+
*/
|
1185
|
+
topMargin?: number
|
1186
|
+
/**
|
1187
|
+
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
1188
|
+
* 取值范围【1-99】单位:百分比
|
1189
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1190
|
+
*/
|
1191
|
+
topMarginPercent?: number
|
969
1192
|
complete?: () => void
|
970
1193
|
success?: (params: null) => void
|
971
1194
|
fail?: (params: {
|
@@ -1072,15 +1295,63 @@ declare namespace ty {
|
|
1072
1295
|
}) => void
|
1073
1296
|
}): void
|
1074
1297
|
|
1298
|
+
/**
|
1299
|
+
* 移除当前widget视图, 仅在widget内部调用且不支持Dialog形式
|
1300
|
+
*/
|
1301
|
+
export function widgetRemove(params?: {
|
1302
|
+
/** 移除模式 */
|
1303
|
+
mode?: WidgetMode
|
1304
|
+
complete?: () => void
|
1305
|
+
success?: (params: null) => void
|
1306
|
+
fail?: (params: {
|
1307
|
+
errorMsg: string
|
1308
|
+
errorCode: string | number
|
1309
|
+
innerError: {
|
1310
|
+
errorCode: string | number
|
1311
|
+
errorMsg: string
|
1312
|
+
}
|
1313
|
+
}) => void
|
1314
|
+
}): void
|
1315
|
+
|
1075
1316
|
/**
|
1076
1317
|
* 原生上报的事件
|
1077
1318
|
*/
|
1078
|
-
export function onNativeEvent(
|
1319
|
+
export function onNativeEvent(
|
1320
|
+
listener: (params: NativeUploadData) => void
|
1321
|
+
): void
|
1079
1322
|
|
1080
1323
|
/**
|
1081
1324
|
* 取消监听:原生上报的事件
|
1082
1325
|
*/
|
1083
|
-
export function offNativeEvent(
|
1326
|
+
export function offNativeEvent(
|
1327
|
+
listener: (params: NativeUploadData) => void
|
1328
|
+
): void
|
1329
|
+
|
1330
|
+
export enum HighwayMethod {
|
1331
|
+
/** HTTP 请求 OPTIONS */
|
1332
|
+
OPTIONS = "OPTIONS",
|
1333
|
+
|
1334
|
+
/** HTTP 请求 GET */
|
1335
|
+
GET = "GET",
|
1336
|
+
|
1337
|
+
/** HTTP 请求 HEAD */
|
1338
|
+
HEAD = "HEAD",
|
1339
|
+
|
1340
|
+
/** HTTP 请求 POST */
|
1341
|
+
POST = "POST",
|
1342
|
+
|
1343
|
+
/** HTTP 请求 PUT */
|
1344
|
+
PUT = "PUT",
|
1345
|
+
|
1346
|
+
/** HTTP 请求 DELETE */
|
1347
|
+
DELETE = "DELETE",
|
1348
|
+
|
1349
|
+
/** HTTP 请求 TRACE */
|
1350
|
+
TRACE = "TRACE",
|
1351
|
+
|
1352
|
+
/** HTTP 请求 TRACE */
|
1353
|
+
CONNECT = "CONNECT",
|
1354
|
+
}
|
1084
1355
|
|
1085
1356
|
export type ReferrerInfo = {
|
1086
1357
|
/** 来源小程序、公众号或 App 的 appId */
|
@@ -1116,6 +1387,29 @@ declare namespace ty {
|
|
1116
1387
|
envVersion: string
|
1117
1388
|
/** 小程序版本号 */
|
1118
1389
|
version: string
|
1390
|
+
/** 小程序名称 */
|
1391
|
+
appName: string
|
1392
|
+
/** 小程序图标 */
|
1393
|
+
appIcon: string
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
export enum EffectPage {
|
1397
|
+
/** 当前页面 */
|
1398
|
+
current = "current",
|
1399
|
+
|
1400
|
+
/** 所有页面 */
|
1401
|
+
all = "all",
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
export type BoardItemBean = {
|
1405
|
+
/** item名称 */
|
1406
|
+
key: string
|
1407
|
+
/** item图标 */
|
1408
|
+
iconPath: string
|
1409
|
+
/** item文案 */
|
1410
|
+
text: string
|
1411
|
+
/** item是否显示 */
|
1412
|
+
isShow?: boolean
|
1119
1413
|
}
|
1120
1414
|
|
1121
1415
|
export type NavigationBarColorAnimationInfo = {
|
@@ -1138,6 +1432,14 @@ declare namespace ty {
|
|
1138
1432
|
params?: Record<string, any>
|
1139
1433
|
}
|
1140
1434
|
|
1435
|
+
export enum WidgetMode {
|
1436
|
+
/** 单次移除 */
|
1437
|
+
ONCE = "ONCE",
|
1438
|
+
|
1439
|
+
/** 永久移除 */
|
1440
|
+
FOREVER = "FOREVER",
|
1441
|
+
}
|
1442
|
+
|
1141
1443
|
export type NativeUploadData = {
|
1142
1444
|
/** 原生组件的EventName */
|
1143
1445
|
eventName: string
|
@@ -1231,7 +1533,7 @@ declare namespace ty {
|
|
1231
1533
|
/** data 请求入参 */
|
1232
1534
|
data?: Record<string, any>
|
1233
1535
|
/** method 请求方法 */
|
1234
|
-
method?:
|
1536
|
+
method?: HighwayMethod
|
1235
1537
|
}
|
1236
1538
|
|
1237
1539
|
export type HighwayRequestResponse = {
|
@@ -1307,6 +1609,42 @@ declare namespace ty {
|
|
1307
1609
|
miniProgram: MiniProgramAccountInfo
|
1308
1610
|
}
|
1309
1611
|
|
1612
|
+
export type MiniAppConfigResp = {
|
1613
|
+
/** 小程序自定义配置 */
|
1614
|
+
config: {}
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
export type BoardMenusBean = {
|
1618
|
+
/** 生效页面, 默认当前页面 */
|
1619
|
+
effectPage?: EffectPage
|
1620
|
+
/** item列表 */
|
1621
|
+
menus: BoardItemBean[]
|
1622
|
+
}
|
1623
|
+
|
1624
|
+
export type RedBodReq = {
|
1625
|
+
/** 生效页面, 默认当前页面 */
|
1626
|
+
effectPage?: EffectPage
|
1627
|
+
/** 看板item名称 */
|
1628
|
+
key: string
|
1629
|
+
}
|
1630
|
+
|
1631
|
+
export type BackgroundImageBean = {
|
1632
|
+
/** 图片地址,支持网络图片和本地图片 */
|
1633
|
+
imageUrl: string
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
export type CreateReq = {
|
1637
|
+
/** managerId: 通知管理器id */
|
1638
|
+
managerId: string
|
1639
|
+
/** name: 通知名称 */
|
1640
|
+
name: string
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
export type ObserverReq = {
|
1644
|
+
/** managerId: 通知管理器id */
|
1645
|
+
managerId: string
|
1646
|
+
}
|
1647
|
+
|
1310
1648
|
export type NavigationBarLoadingParams = {
|
1311
1649
|
/** 页面标题 */
|
1312
1650
|
title: string
|
@@ -1326,6 +1664,19 @@ declare namespace ty {
|
|
1326
1664
|
url: string
|
1327
1665
|
/** 打开方式,支持全屏full,半屏half;默认全屏full */
|
1328
1666
|
type?: string
|
1667
|
+
/**
|
1668
|
+
* 非全屏页面距离屏幕顶部的距离,type 为 half 时有效
|
1669
|
+
* 取值范围:【1-屏幕的高度】单位:px
|
1670
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1671
|
+
* 因此 Android 的 topMargin 的最大值是屏幕高度减去状态栏的高度。
|
1672
|
+
*/
|
1673
|
+
topMargin?: number
|
1674
|
+
/**
|
1675
|
+
* 非全屏页面距离屏幕顶部的百分比,type 为 half 时有效,优先级高于 topMargin
|
1676
|
+
* 取值范围【1-99】单位:百分比
|
1677
|
+
* 注意:Android 显示区域不包括状态栏,iOS显示区域包括状态栏。
|
1678
|
+
*/
|
1679
|
+
topMarginPercent?: number
|
1329
1680
|
}
|
1330
1681
|
|
1331
1682
|
export type BackRouteBean = {
|
@@ -1342,4 +1693,56 @@ declare namespace ty {
|
|
1342
1693
|
/** extApi返回数据 */
|
1343
1694
|
data?: {}
|
1344
1695
|
}
|
1696
|
+
|
1697
|
+
export type MiniWidgetRemoveBean = {
|
1698
|
+
/** 移除模式 */
|
1699
|
+
mode?: WidgetMode
|
1700
|
+
}
|
1701
|
+
|
1702
|
+
/**
|
1703
|
+
* 原生主动发送通知
|
1704
|
+
*/
|
1705
|
+
interface CreateNativeEventManagerTask {
|
1706
|
+
/**
|
1707
|
+
* 停止监听通知
|
1708
|
+
*/
|
1709
|
+
offerListener(params: {
|
1710
|
+
complete?: () => void
|
1711
|
+
success?: (params: null) => void
|
1712
|
+
fail?: (params: {
|
1713
|
+
errorMsg: string
|
1714
|
+
errorCode: string | number
|
1715
|
+
innerError: {
|
1716
|
+
errorCode: string | number
|
1717
|
+
errorMsg: string
|
1718
|
+
}
|
1719
|
+
}) => void
|
1720
|
+
}): void
|
1721
|
+
|
1722
|
+
/**
|
1723
|
+
* 开始监听通知
|
1724
|
+
*/
|
1725
|
+
onListener(
|
1726
|
+
listener: (params: {
|
1727
|
+
/** managerId */
|
1728
|
+
managerId: string
|
1729
|
+
/** data: 通知内容 */
|
1730
|
+
data: {}
|
1731
|
+
}) => void
|
1732
|
+
): void
|
1733
|
+
}
|
1734
|
+
export function createNativeEventManager(params: {
|
1735
|
+
/** name: 通知名称 */
|
1736
|
+
name: string
|
1737
|
+
complete?: () => void
|
1738
|
+
success?: (params: null) => void
|
1739
|
+
fail?: (params: {
|
1740
|
+
errorMsg: string
|
1741
|
+
errorCode: string | number
|
1742
|
+
innerError: {
|
1743
|
+
errorCode: string | number
|
1744
|
+
errorMsg: string
|
1745
|
+
}
|
1746
|
+
}) => void
|
1747
|
+
}): CreateNativeEventManagerTask
|
1345
1748
|
}
|