@dcloudio/uni-app-x 0.7.7 → 0.7.8

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.
Files changed (215) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +1 -1
  3. package/options.d.ts +9 -9
  4. package/package.json +27 -27
  5. package/types/app.d.ts +843 -843
  6. package/types/index.d.ts +7 -7
  7. package/types/native/AsyncApiResult.d.ts +7 -7
  8. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  9. package/types/native/DOMRect.d.ts +56 -56
  10. package/types/native/DrawableContext.d.ts +162 -162
  11. package/types/native/INavigationBar.d.ts +22 -22
  12. package/types/native/IUniElement.d.ts +762 -755
  13. package/types/native/IUniError.d.ts +20 -20
  14. package/types/native/IUniForm.d.ts +9 -9
  15. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  16. package/types/native/NodeData.d.ts +22 -22
  17. package/types/native/PageNode.d.ts +6 -6
  18. package/types/native/SnapshotOptions.d.ts +63 -63
  19. package/types/native/SourceError.d.ts +46 -46
  20. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  21. package/types/native/UniAggregateError.d.ts +19 -19
  22. package/types/native/UniApp.d.ts +66 -66
  23. package/types/native/UniCallbackWrapper.d.ts +7 -7
  24. package/types/native/UniCustomEvent.d.ts +24 -24
  25. package/types/native/UniDocument.d.ts +35 -35
  26. package/types/native/UniElement.d.ts +74 -74
  27. package/types/native/UniError.d.ts +70 -70
  28. package/types/native/UniEvent.d.ts +62 -62
  29. package/types/native/UniFormControl.d.ts +8 -8
  30. package/types/native/UniFormControlElement.d.ts +14 -14
  31. package/types/native/UniImageErrorEvent.d.ts +15 -15
  32. package/types/native/UniImageLoadEvent.d.ts +19 -19
  33. package/types/native/UniInputBlurEvent.d.ts +19 -19
  34. package/types/native/UniInputConfirmEvent.d.ts +15 -15
  35. package/types/native/UniInputEvent.d.ts +33 -24
  36. package/types/native/UniInputFocusEvent.d.ts +33 -33
  37. package/types/native/{UniPage.d.ts → UniNativePage.d.ts} +141 -96
  38. package/types/native/UniPageEvent.d.ts +10 -10
  39. package/types/native/UniPageManager.d.ts +17 -17
  40. package/types/native/UniPageScrollEvent.d.ts +13 -13
  41. package/types/native/UniPointerEvent.d.ts +74 -73
  42. package/types/native/UniRefresherEvent.d.ts +18 -14
  43. package/types/native/UniResizeEvent.d.ts +34 -34
  44. package/types/native/UniRichTextItemClickEvent.d.ts +23 -23
  45. package/types/native/UniScrollEvent.d.ts +42 -36
  46. package/types/native/UniScrollToLowerEvent.d.ts +23 -16
  47. package/types/native/UniScrollToUpperEvent.d.ts +23 -16
  48. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  49. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  50. package/types/native/UniSwiperAnimationFinishEvent.d.ts +19 -19
  51. package/types/native/UniSwiperChangeEvent.d.ts +19 -19
  52. package/types/native/UniSwiperTransitionEvent.d.ts +19 -19
  53. package/types/native/UniTabTapEvent.d.ts +18 -18
  54. package/types/native/UniTabsElement.d.ts +29 -29
  55. package/types/native/UniTextElement.d.ts +17 -17
  56. package/types/native/UniTextareaFocusEvent.d.ts +34 -34
  57. package/types/native/UniTouchEvent.d.ts +64 -60
  58. package/types/native/UniVideoElement.d.ts +70 -70
  59. package/types/native/UniWebViewDownloadEvent.d.ts +42 -42
  60. package/types/native/UniWebViewElement.d.ts +10 -10
  61. package/types/native/UniWebViewErrorEvent.d.ts +37 -37
  62. package/types/native/UniWebViewLoadEvent.d.ts +26 -26
  63. package/types/native/UniWebViewLoadingEvent.d.ts +27 -27
  64. package/types/native/UniWebViewMessageEvent.d.ts +26 -26
  65. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  66. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  67. package/types/native/WebViewStyles.d.ts +20 -20
  68. package/types/native/global.d.ts +446 -429
  69. package/types/native/index.d.ts +65 -65
  70. package/types/native-global/index.d.ts +1 -1
  71. package/types/page.d.ts +1593 -1593
  72. package/types/process.d.ts +5 -5
  73. package/types/uni/base/index.d.ts +3 -3
  74. package/types/uni/core/global.d.ts +13 -13
  75. package/types/uni/core/index.d.ts +13 -13
  76. package/types/uni/core/lib/base/event/global.d.ts +16 -16
  77. package/types/uni/core/lib/base/event/index.d.ts +7 -7
  78. package/types/uni/core/lib/base/event/interface.d.ts +277 -277
  79. package/types/uni/core/lib/base/interceptor/global.d.ts +18 -18
  80. package/types/uni/core/lib/base/interceptor/index.d.ts +8 -8
  81. package/types/uni/core/lib/base/interceptor/interface.d.ts +150 -150
  82. package/types/uni/core/lib/interface.d.ts +28 -28
  83. package/types/uni/core/lib/lifecycle/global.d.ts +10 -10
  84. package/types/uni/core/lib/lifecycle/index.d.ts +4 -4
  85. package/types/uni/core/lib/lifecycle/interface.d.ts +37 -37
  86. package/types/uni/core/lib/performance/global.d.ts +22 -22
  87. package/types/uni/core/lib/performance/index.d.ts +10 -10
  88. package/types/uni/core/lib/performance/interface.d.ts +157 -157
  89. package/types/uni/core/lib/route/global.d.ts +68 -68
  90. package/types/uni/core/lib/route/index.d.ts +33 -33
  91. package/types/uni/core/lib/route/interface.d.ts +2031 -2031
  92. package/types/uni/core/lib/ui/create-selector-query/global.d.ts +20 -20
  93. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +9 -9
  94. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +412 -412
  95. package/types/uni/core/lib/ui/get-element-by-id/global.d.ts +10 -10
  96. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +4 -4
  97. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +73 -73
  98. package/types/uni/core/lib/ui/load-font-face/global.d.ts +26 -26
  99. package/types/uni/core/lib/ui/load-font-face/index.d.ts +12 -12
  100. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +560 -560
  101. package/types/uni/core/lib/ui/page-scroll-to/global.d.ts +26 -26
  102. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +12 -12
  103. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +145 -145
  104. package/types/uni/core/lib/ui/pull-down-refresh/global.d.ts +28 -28
  105. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +13 -13
  106. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +176 -176
  107. package/types/uni/core/lib/ui/set-navigation-bar-color/global.d.ts +28 -28
  108. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +13 -13
  109. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +431 -431
  110. package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +28 -28
  111. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +13 -13
  112. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +368 -368
  113. package/types/uni/core/lib/ui/tab-bar/global.d.ts +130 -130
  114. package/types/uni/core/lib/ui/tab-bar/index.d.ts +64 -64
  115. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +928 -928
  116. package/types/uni/env/index.d.ts +64 -64
  117. package/types/uni/global.d.ts +6 -6
  118. package/types/uni/index.d.ts +3 -3
  119. package/types/uni/uts-plugin-api/global.d.ts +23 -22
  120. package/types/uni/uts-plugin-api/index.d.ts +23 -22
  121. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  122. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  123. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +43 -43
  124. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  125. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  126. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +101 -101
  127. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  128. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +82 -82
  130. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +66 -66
  131. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +32 -32
  132. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +423 -423
  133. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  134. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  135. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  136. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  137. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  138. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  139. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +350 -350
  140. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  141. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  142. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +20 -20
  143. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +9 -9
  144. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +151 -151
  145. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +24 -24
  146. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +11 -11
  147. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +24 -0
  148. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +11 -0
  149. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +87 -0
  150. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  151. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  152. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  153. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  154. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  155. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  156. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +158 -158
  157. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +78 -78
  158. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +906 -906
  159. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +68 -68
  160. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +33 -33
  161. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  162. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  163. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  164. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  165. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +74 -62
  166. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +36 -30
  167. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +40 -8
  168. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/global.d.ts +28 -28
  169. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/index.d.ts +13 -13
  170. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/interface.d.ts +1 -1
  171. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  172. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  173. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +33 -33
  174. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  175. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  176. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +531 -531
  177. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  178. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  179. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  180. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  181. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  182. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  183. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +132 -132
  184. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  185. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  186. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +141 -141
  187. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +56 -56
  188. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +27 -27
  189. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  190. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  191. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +203 -203
  192. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  193. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  194. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  195. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  196. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +356 -356
  197. package/types/uni-cloud/index.d.ts +59 -59
  198. package/types/uni-cloud/interface.d.ts +801 -801
  199. package/types/uni-cloud/unicloud-db/index.ts +313 -313
  200. package/types/uni-global/index.d.ts +1 -1
  201. package/types/vue/CheckboxGroupChangeEvent.d.ts +36 -36
  202. package/types/vue/LifeCycle.d.ts +55 -55
  203. package/types/vue/PickerViewChangeEvent.d.ts +36 -36
  204. package/types/vue/ProgressActiveendEvent.d.ts +30 -30
  205. package/types/vue/RadioGroupChangeEvent.d.ts +36 -36
  206. package/types/vue/SliderChangeEvent.d.ts +32 -32
  207. package/types/vue/SwitchChangeEvent.d.ts +30 -30
  208. package/types/vue/UniCanvasElement.d.ts +270 -270
  209. package/types/vue/UniCloudDBElement.d.ts +215 -215
  210. package/types/vue/UniFormElement.d.ts +51 -51
  211. package/types/vue/UniNavigatorElement.d.ts +7 -7
  212. package/types/vue/index.d.ts +11 -11
  213. package/uts-plugin.d.ts +26 -26
  214. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
  215. package/types/vue/UniButtonElement.d.ts +0 -7
@@ -1,801 +1,801 @@
1
- import { mixinDatacom } from './unicloud-db'
2
-
3
- type UniCloudCallback<T> = (arg: T) => any | null;
4
-
5
- type UniCloudInitOptions = {
6
- /**
7
- * 服务商,目前支持 aliyun、tencent、alipay
8
- */
9
- provider : string
10
- /**
11
- * 服务空间名
12
- */
13
- spaceName ?: string
14
- /**
15
- * 服务空间id
16
- */
17
- spaceId : string
18
- /**
19
- * 阿里云clientSecret
20
- */
21
- clientSecret ?: string
22
- /**
23
- * 阿里云endpoint
24
- */
25
- endpoint ?: string
26
- /**
27
- * 支付宝小程序云spaceAppId
28
- */
29
- spaceAppId ?: string
30
- /**
31
- * 支付宝小程序云accessKey
32
- */
33
- accessKey ?: string
34
- /**
35
- * 支付宝小程序云secretKey
36
- */
37
- secretKey ?: string
38
- };
39
- type UniCloudCallFunctionOptions = {
40
- /**
41
- * 云函数名
42
- */
43
- name: string | string.CloudFunctionString;
44
- /**
45
- * 云函数参数
46
- */
47
- data?: UTSJSONObject;
48
- };
49
- type UniCloudCallFunctionResult = {
50
- /**
51
- * 云函数返回结果
52
- */
53
- result: UTSJSONObject;
54
- /**
55
- * 云函数请求id
56
- */
57
- requestId?: string;
58
- };
59
- type UniCloudUploadProgress = {
60
- /**
61
- * 已上传大小
62
- */
63
- loaded: number;
64
- /**
65
- * 总大小
66
- */
67
- total: number;
68
- };
69
- type UniCloudUploadFileOptions = {
70
- /**
71
- * 文件路径
72
- */
73
- filePath: string;
74
- /**
75
- * 云端路径
76
- */
77
- cloudPath: string;
78
- /**
79
- * 是否以云端路径是否为真实路径保存上传的文件
80
- */
81
- cloudPathAsRealPath?: boolean;
82
- /**
83
- * 上传进度回调
84
- * @param options 上传进度回调参数
85
- * @returns
86
- */
87
- onUploadProgress?: (options: UniCloudUploadProgress) => any;
88
- };
89
- type UniCloudUploadFileResult = {
90
- /**
91
- * 文件路径
92
- */
93
- filePath: string;
94
- /**
95
- * 文件id
96
- */
97
- fileID: string;
98
- };
99
- type UniCloudGetTempFileURLOptions = {
100
- /**
101
- * 文件列表
102
- */
103
- fileList: Array<string>;
104
- };
105
- type UniCloudGetTempFileURLResultItem = {
106
- /**
107
- * 文件id
108
- */
109
- fileID: string;
110
- /**
111
- * 文件临时url
112
- */
113
- tempFileURL: string;
114
- };
115
- type UniCloudGetTempFileURLResult = {
116
- /**
117
- * 文件列表
118
- */
119
- fileList: Array<UniCloudGetTempFileURLResultItem>;
120
- };
121
- type UniCloudResponseEvent = {
122
- /**
123
- * 响应事件类型
124
- */
125
- type: string;
126
- /**
127
- * 响应事件由哪个云函数触发
128
- */
129
- name: string;
130
- /**
131
- * 响应结果、错误内容
132
- */
133
- content: any;
134
- };
135
- type UniCloudRefreshTokenEvent = {
136
- /**
137
- * token内容
138
- */
139
- token: string;
140
- /**
141
- * token过期时间
142
- */
143
- tokenExpired: number;
144
- };
145
- type UniCloudDBAddResult = {
146
- /**
147
- * 添加的记录的id
148
- */
149
- id: string;
150
- /**
151
- * 请求id
152
- */
153
- requestId?: string;
154
- };
155
- type UniCloudDBBatchAddResult = {
156
- /**
157
- * 添加的记录的id列表
158
- */
159
- ids: Array<string>;
160
- /**
161
- * 添加成功的记录数
162
- */
163
- inserted: number;
164
- /**
165
- * 请求id
166
- */
167
- requestId?: string;
168
- };
169
- type UniCloudDBUpdateResult = {
170
- /**
171
- * 更新成功的记录数
172
- */
173
- updated: number;
174
- /**
175
- * 请求id
176
- */
177
- requestId?: string;
178
- };
179
- type UniCloudDBRemoveResult = {
180
- /**
181
- * 删除成功的记录数
182
- */
183
- deleted: number;
184
- /**
185
- * 请求id
186
- */
187
- requestId?: string;
188
- };
189
- type UniCloudDBGetResult = {
190
- /**
191
- * 添加的记录的id列表
192
- */
193
- data: Array<UTSJSONObject>;
194
- /**
195
- * 匹配到的数据总量
196
- */
197
- count?: number | null;
198
- /**
199
- * 请求id
200
- */
201
- requestId?: string;
202
- };
203
- type UniCloudDBCountResult = {
204
- /**
205
- * 添加的记录的id列表
206
- */
207
- total: number;
208
- /**
209
- * 请求id
210
- */
211
- requestId?: string;
212
- };
213
- type UniCloudUserInfo = {
214
- /**
215
- * 用户id
216
- */
217
- uid?: string | null;
218
- /**
219
- * 用户角色列表
220
- */
221
- role: Array<string>;
222
- /**
223
- * 用户权限列表
224
- */
225
- permission: Array<string>;
226
- /**
227
- * 用户token过期时间
228
- */
229
- tokenExpired: number;
230
- };
231
-
232
- declare class UniCloudError extends Error {
233
- code: any;
234
- errMsg: string;
235
- errCode: any;
236
- errSubject?: string;
237
- requestId?: string;
238
- constructor(message: string, code: string, subject?: string, options?: UTSJSONObject);
239
- private _init;
240
- toJson(): UTSJSONObject;
241
- }
242
-
243
- declare class EventEmitter<T> {
244
- private _callbacks;
245
- constructor();
246
- on(eventName: string, callback: UniCloudCallback<T>): void;
247
- off(eventName: string, callback: UniCloudCallback<T>): void;
248
- emit(eventName: string, arg: T): void;
249
- }
250
-
251
- declare class UniCloudUnified {
252
- config: UniCloudInitOptions;
253
- private _client;
254
- private _baseSystemInfo;
255
- private _hasBaseSystemInfo;
256
- private _provider;
257
- private _spaceId;
258
- private _prepareLocalServerHub;
259
- responseEventEmitter: EventEmitter<UniCloudResponseEvent>;
260
- refreshTokenEventEmitter: EventEmitter<UniCloudRefreshTokenEvent>;
261
- constructor(options: UniCloudInitOptions);
262
- private _getBaseSystemInfo;
263
- private _getSystemInfo;
264
- private _getUniIdToken;
265
- private _isServerOk;
266
- private _pingLocalServer;
267
- private _prepareLocalServer;
268
- private _checkFunction;
269
- private _prepareFunction;
270
- private _getCallFunctionOptions;
271
- private _callCloudFunction;
272
- private _callLocalFunction;
273
- callFunction(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult>;
274
- uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
275
- getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
276
- importObject<T extends InternalUniCloudCloudObjectCaller>(objectName: string, options: UniCloudImportObjectOptions, clazz: Class<T>): T;
277
- }
278
-
279
- declare class InternalUniCloudCloudObjectCaller {
280
- protected _obj: InternalUniCloudCloudObject;
281
- constructor(obj: InternalUniCloudCloudObject);
282
- protected _getArgs(...args: Array<any | null>): Array<any | null>;
283
- }
284
- type UniCloudImportObjectLoadingOptions = {
285
- /**
286
- * 加载框标题
287
- */
288
- title?: string | null;
289
- /**
290
- * 加载框是否显示mask
291
- */
292
- mask?: boolean | null;
293
- };
294
- type UniCloudImportObjectErrorOptions = {
295
- /**
296
- * 错误提示类型,可以是modal或者toast
297
- */
298
- type?: string | null;
299
- /**
300
- * 是否显示重试按钮
301
- */
302
- retry?: boolean | null;
303
- };
304
- type UniCloudImportObjectOptions = {
305
- /**
306
- * 是否移除自动展示的ui
307
- */
308
- customUI?: boolean | null;
309
- /**
310
- * loading界面配置
311
- */
312
- loadingOptions?: UniCloudImportObjectLoadingOptions | null;
313
- /**
314
- * 错误提示配置
315
- */
316
- errorOptions?: UniCloudImportObjectErrorOptions | null;
317
- };
318
- declare class InternalUniCloudCloudObject {
319
- private _name;
320
- private _client;
321
- private _customUI;
322
- private _loadingUITitle;
323
- private _loadingUIMask;
324
- private _errorUIType;
325
- private _errorUIRetry;
326
- constructor(client: UniCloudUnified, name: string, options: UniCloudImportObjectOptions);
327
- private _initUIOptions;
328
- private _internalCallMethod;
329
- callMethod(methodName: string, args: Array<any | null>): Promise<UTSJSONObject>;
330
- }
331
-
332
- declare class Stage {
333
- $method: string;
334
- $param?: Array<any> | null;
335
- constructor($method: string, $param?: Array<any> | null);
336
- }
337
- declare class Stages {
338
- private _client?;
339
- private _stages;
340
- private _isNew;
341
- constructor(stages?: Array<Stage>, isNew?: boolean, client?: UniCloudUnified | null);
342
- push(stage: Stage): Stages;
343
- toJSON(): UTSJSONObject;
344
- private _emitResponse;
345
- sendAdd(): Promise<UniCloudDBAddResult>;
346
- sendBatchAdd(): Promise<UniCloudDBBatchAddResult>;
347
- sendUpdate(): Promise<UniCloudDBUpdateResult>;
348
- sendRemove(): Promise<UniCloudDBRemoveResult>;
349
- sendGet(): Promise<UniCloudDBGetResult>;
350
- sendCount(): Promise<UniCloudDBCountResult>;
351
- private _send;
352
- }
353
-
354
- declare class UniCloudDBQuery {
355
- private _client;
356
- private _stages;
357
- constructor(client: UniCloudUnified, stages: Stages);
358
- get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
359
- count(): Promise<UniCloudDBCountResult>;
360
- getTemp(): UTSJSONObject;
361
- field(filed: string): UniCloudDBQuery;
362
- skip(num: number): UniCloudDBQuery;
363
- limit(num: number): UniCloudDBQuery;
364
- orderBy(order: string): UniCloudDBQuery;
365
- groupBy(field: string): UniCloudDBQuery;
366
- groupField(field: string): UniCloudDBQuery;
367
- distinct(field: string): UniCloudDBQuery;
368
- geoNear(options: UTSJSONObject): UniCloudDBQuery;
369
- }
370
-
371
- declare class UniCloudDBFilter {
372
- private _client;
373
- private _stages;
374
- constructor(client: UniCloudUnified, stages: Stages);
375
- get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
376
- count(): Promise<UniCloudDBCountResult>;
377
- update(data: UTSJSONObject): Promise<UniCloudDBUpdateResult>;
378
- remove(): Promise<UniCloudDBRemoveResult>;
379
- getTemp(): UTSJSONObject;
380
- where(condition: any): UniCloudDBFilter;
381
- doc(docId: string): UniCloudDBFilter;
382
- field(filed: string): UniCloudDBQuery;
383
- skip(num: number): UniCloudDBQuery;
384
- limit(num: number): UniCloudDBQuery;
385
- orderBy(order: string): UniCloudDBQuery;
386
- groupBy(field: string): UniCloudDBQuery;
387
- groupField(field: string): UniCloudDBQuery;
388
- distinct(field: string): UniCloudDBQuery;
389
- geoNear(options: UTSJSONObject): UniCloudDBQuery;
390
- }
391
-
392
- declare class Collection {
393
- private _client;
394
- private _collectionList;
395
- private _stages;
396
- constructor(client: UniCloudUnified, collectionList: Array<any>);
397
- where(condition: any): UniCloudDBFilter;
398
- doc(docId: string): UniCloudDBFilter;
399
- aggregate(): UniCloudDBFilter;
400
- foreignKey(foreignKey: string): UniCloudDBFilter;
401
- add(data: UTSJSONObject): Promise<UniCloudDBAddResult>;
402
- add(data: UTSJSONObject[]): Promise<UniCloudDBBatchAddResult>;
403
- get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
404
- count(): Promise<UniCloudDBCountResult>;
405
- getTemp(): UTSJSONObject;
406
- field(filed: string): UniCloudDBQuery;
407
- skip(num: number): UniCloudDBQuery;
408
- limit(num: number): UniCloudDBQuery;
409
- orderBy(order: string): UniCloudDBQuery;
410
- }
411
-
412
- declare class UniCloudDBCommand {
413
- private static _push;
414
- /**
415
- * 查询操作符,用于表示逻辑 "与" 的关系,表示需同时满足多个查询筛选条件
416
- */
417
- static and(args: Array<UTSJSONObject>): UTSJSONObject;
418
- /**
419
- * 查询操作符,用于表示逻辑 "或" 的关系,表示需同时满足多个查询筛选条件
420
- */
421
- static or(args: Array<UTSJSONObject>): UTSJSONObject;
422
- /**
423
- * 查询操作符,用于表示逻辑 "非" 的关系,表示需不满足指定的条件
424
- */
425
- static not(arg: UTSJSONObject): UTSJSONObject;
426
- /**
427
- * 查询操作符,用于表示逻辑 "都不" 的关系,表示需不满足指定的所有条件
428
- */
429
- static nor(args: Array<UTSJSONObject>): UTSJSONObject;
430
- /**
431
- * 查询筛选条件,表示字段等于某个值
432
- */
433
- static eq(arg: any): UTSJSONObject;
434
- /**
435
- * 查询筛选条件,表示字段不等于某个值
436
- */
437
- static neq(arg: any): UTSJSONObject;
438
- /**
439
- * 查询筛选操作符,表示需小于指定值
440
- */
441
- static lt(arg: any): UTSJSONObject;
442
- /**
443
- * 查询筛选操作符,表示需小于或等于指定值
444
- */
445
- static lte(arg: any): UTSJSONObject;
446
- /**
447
- * 查询筛选操作符,表示需大于指定值
448
- */
449
- static gt(arg: any): UTSJSONObject;
450
- /**
451
- * 查询筛选操作符,表示需大于或等于指定值
452
- */
453
- static gte(arg: any): UTSJSONObject;
454
- /**
455
- * 查询筛选操作符,表示要求值在给定的数组内
456
- */
457
- static in(arr: Array<any>): UTSJSONObject;
458
- /**
459
- * 查询筛选操作符,表示要求值不在给定的数组内
460
- */
461
- static nin(arr: Array<any>): UTSJSONObject;
462
- /**
463
- * 判断字段是否存在
464
- */
465
- static exists(arg: boolean): UTSJSONObject;
466
- /**
467
- * 查询筛选操作符,给定除数 divisor 和余数 remainder
468
- * @param divisor 除数
469
- * @param remainder 余数
470
- * @returns
471
- */
472
- static mod(divisor: number, remainder: number): UTSJSONObject;
473
- /**
474
- * 数组查询操作符。用于数组字段的查询筛选条件,要求数组字段中包含给定数组的所有元素
475
- */
476
- static all(arr: Array<any>): UTSJSONObject;
477
- /**
478
- * 用于数组字段的查询筛选条件,要求数组中包含至少一个满足 elemMatch 给定的所有条件的元素
479
- */
480
- static elemMatch(arg: UTSJSONObject): UTSJSONObject;
481
- /**
482
- * 更新操作符,用于数组字段的查询筛选条件,要求数组长度为给定值
483
- */
484
- static size(arg: number): UTSJSONObject;
485
- /**
486
- * 按从近到远的顺序,找出字段值在给定点的附近的记录
487
- */
488
- static geoNear(arg: UTSJSONObject): UTSJSONObject;
489
- /**
490
- * 找出字段值在指定区域内的记录,无排序。指定的区域必须是多边形(Polygon)或多边形集合(MultiPolygon)
491
- */
492
- static geoWithin(arg: UTSJSONObject): UTSJSONObject;
493
- /**
494
- * 找出给定的地理位置图形相交的记录
495
- */
496
- static geoIntersects(arg: UTSJSONObject): UTSJSONObject;
497
- }
498
-
499
- declare class Geometry extends UTSJSONObject {
500
- constructor(arg: UTSJSONObject);
501
- }
502
- declare class GeoPoint extends Geometry {
503
- constructor(lat: number, lng: number);
504
- }
505
- declare class GeoLineString extends Geometry {
506
- constructor(points: Array<GeoPoint>);
507
- }
508
- declare class GeoPolygon extends Geometry {
509
- constructor(lines: Array<GeoLineString>);
510
- }
511
- declare class GeoMultiPoint extends Geometry {
512
- constructor(points: Array<GeoPoint>);
513
- }
514
- declare class GeoMultiLineString extends Geometry {
515
- constructor(lines: Array<GeoLineString>);
516
- }
517
- declare class GeoMultiPolygon extends Geometry {
518
- constructor(polygons: Array<GeoPolygon>);
519
- }
520
- declare class UniCloudDBGeo {
521
- /**
522
- * 地理位置点
523
- */
524
- static get Point(): typeof GeoPoint;
525
- /**
526
- * 地理路径,是由两个或者更多的 Point 组成的线段
527
- */
528
- static get LineString(): typeof GeoLineString;
529
- /**
530
- * 地理上的一个多边形(有洞或无洞均可),它是由一个或多个闭环 LineString 组成的几何图形
531
- */
532
- static get Polygon(): typeof GeoPolygon;
533
- /**
534
- * 多个地理位置点 Point 的集合
535
- */
536
- static get MultiPoint(): typeof GeoMultiPoint;
537
- /**
538
- * 多个地理路径 LineString 的集合
539
- */
540
- static get MultiLineString(): typeof GeoMultiLineString;
541
- /**
542
- * 多个地理多边形 Polygon 的集合
543
- */
544
- static get MultiPolygon(): typeof GeoMultiPolygon;
545
- }
546
-
547
- declare class Database {
548
- private _client;
549
- constructor(client: UniCloudUnified);
550
- collection(...args: Array<any>): Collection;
551
- get command(): typeof UniCloudDBCommand;
552
- get Geo(): typeof UniCloudDBGeo;
553
- }
554
-
555
- type UniCloudChooseAndUploadFileOptions = {
556
- sourceType?: Array<string> | null;
557
- count?: number | null;
558
- sizeType?: Array<string> | null;
559
- extension?: Array<string> | null;
560
- compressed?: boolean | null;
561
- maxDuration?: number | null;
562
- camera?: string | null;
563
- crop?: ChooseImageCropOptions | null;
564
- type: string;
565
- onChooseFile?: (arg: UniCloudChooseFileResult) => void | null;
566
- onUploadProgress?: (arg: UniCloudChooseAndUploadFileProgressEvent) => void | null;
567
- };
568
- type UniCloudChooseAndUploadFileProgressEvent = {
569
- index: number;
570
- loaded: number;
571
- total: number;
572
- tempFilePath: string;
573
- tempFile: UniCloudChooseFileItem;
574
- };
575
- type UniCloudChooseAndUploadFileResult = {
576
- tempFiles: Array<UniCloudChooseFileItem>;
577
- tempFilePaths: Array<string>;
578
- };
579
- type UniCloudChooseFileResult = {
580
- tempFiles: Array<UniCloudChooseFileItem>;
581
- tempFilePaths: Array<string>;
582
- };
583
- type UniCloudChooseFileItem = {
584
- name: string;
585
- path: string;
586
- cloudPath: string;
587
- cloudPathAsRealPath?: boolean | null;
588
- url?: string | null;
589
- errMsg?: string | null;
590
- };
591
-
592
- declare class UniCloud {
593
- private _client;
594
- private _provider;
595
- private _spaceId;
596
- config: UniCloudInitOptions;
597
- mixinDatacom: typeof mixinDatacom;
598
- constructor(options: UniCloudInitOptions);
599
- /**
600
- * 请求云函数
601
- * @description 请求云函数
602
- * @uniPlatform {
603
- * "app": {
604
- * "android": {
605
- * "osVer": "5.0",
606
- * "uniVer": "√",
607
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
608
- * },
609
- * "ios": {
610
- * "uniVer": "√",
611
- * "unixVer": "x"
612
- * }
613
- * }
614
- * }
615
- */
616
- callFunction(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult>;
617
- /**
618
- * 上传文件到云存储
619
- * @description 上传文件到云存储
620
- * @uniPlatform {
621
- * "app": {
622
- * "android": {
623
- * "osVer": "5.0",
624
- * "uniVer": "√",
625
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
626
- * },
627
- * "ios": {
628
- * "uniVer": "√",
629
- * "unixVer": "x"
630
- * }
631
- * }
632
- * }
633
- */
634
- uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
635
- /**
636
- * 获取文件临时URL
637
- * @description 获取文件临时URL
638
- * @uniPlatform {
639
- * "app": {
640
- * "android": {
641
- * "osVer": "5.0",
642
- * "uniVer": "√",
643
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
644
- * },
645
- * "ios": {
646
- * "uniVer": "√",
647
- * "unixVer": "x"
648
- * }
649
- * }
650
- * }
651
- */
652
- getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
653
- /**
654
- * 引用云对象
655
- * @description 引用云对象
656
- * @uniPlatform {
657
- * "app": {
658
- * "android": {
659
- * "osVer": "5.0",
660
- * "uniVer": "√",
661
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
662
- * },
663
- * "ios": {
664
- * "uniVer": "√",
665
- * "unixVer": "x"
666
- * }
667
- * }
668
- * }
669
- */
670
- importObject(objectName: string | string.CloudObjectString, options?: UniCloudImportObjectOptions): any;
671
- /**
672
- * 监听响应事件
673
- * @description 监听响应事件
674
- * @uniPlatform {
675
- * "app": {
676
- * "android": {
677
- * "osVer": "5.0",
678
- * "uniVer": "√",
679
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
680
- * },
681
- * "ios": {
682
- * "uniVer": "√",
683
- * "unixVer": "x"
684
- * }
685
- * }
686
- * }
687
- */
688
- onResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
689
- /**
690
- * 移除响应事件监听
691
- * @description 移除响应事件监听
692
- * @uniPlatform {
693
- * "app": {
694
- * "android": {
695
- * "osVer": "5.0",
696
- * "uniVer": "√",
697
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
698
- * },
699
- * "ios": {
700
- * "uniVer": "√",
701
- * "unixVer": "x"
702
- * }
703
- * }
704
- * }
705
- */
706
- offResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
707
- /**
708
- * 监听token刷新事件
709
- * @description 监听token刷新事件
710
- * @uniPlatform {
711
- * "app": {
712
- * "android": {
713
- * "osVer": "5.0",
714
- * "uniVer": "√",
715
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
716
- * },
717
- * "ios": {
718
- * "uniVer": "√",
719
- * "unixVer": "x"
720
- * }
721
- * }
722
- * }
723
- */
724
- onRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
725
- /**
726
- * 移除token刷新事件监听
727
- * @description 移除token刷新事件监听
728
- * @uniPlatform {
729
- * "app": {
730
- * "android": {
731
- * "osVer": "5.0",
732
- * "uniVer": "√",
733
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
734
- * },
735
- * "ios": {
736
- * "uniVer": "√",
737
- * "unixVer": "x"
738
- * }
739
- * }
740
- * }
741
- */
742
- offRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
743
- /**
744
- * 获取数据库操作实例
745
- * @description 获取数据库操作实例
746
- * @uniPlatform {
747
- * "app": {
748
- * "android": {
749
- * "osVer": "5.0",
750
- * "uniVer": "√",
751
- * "unixVer": "阿里云 3.91,腾讯云 3.91"
752
- * },
753
- * "ios": {
754
- * "uniVer": "√",
755
- * "unixVer": "x"
756
- * }
757
- * }
758
- * }
759
- */
760
- databaseForJQL(): Database;
761
- /**
762
- * 获取token内缓存的用户信息
763
- * @description 获取token内缓存的用户信息
764
- * @uniPlatform {
765
- * "app": {
766
- * "android": {
767
- * "osVer": "5.0",
768
- * "uniVer": "√",
769
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
770
- * },
771
- * "ios": {
772
- * "uniVer": "√",
773
- * "unixVer": "x"
774
- * }
775
- * }
776
- * }
777
- */
778
- getCurrentUserInfo(): UniCloudUserInfo;
779
- /**
780
- * 选择并上传文件
781
- * @description 选择并上传文件
782
- * @uniPlatform {
783
- * "app": {
784
- * "android": {
785
- * "osVer": "5.0",
786
- * "uniVer": "√",
787
- * "unixVer": "阿里云 3.9,腾讯云 3.91"
788
- * },
789
- * "ios": {
790
- * "uniVer": "√",
791
- * "unixVer": "x"
792
- * }
793
- * }
794
- * }
795
- */
796
- chooseAndUploadFile(options: UniCloudChooseAndUploadFileOptions): Promise<UniCloudChooseAndUploadFileResult>;
797
- }
798
-
799
- declare const uniCloud: UniCloud;
800
-
801
- export { type UniCloudCallFunctionOptions, type UniCloudCallFunctionResult, type UniCloudChooseAndUploadFileOptions, type UniCloudChooseAndUploadFileResult, type UniCloudDBAddResult, type UniCloudDBBatchAddResult, type UniCloudDBCountResult, UniCloudDBFilter, type UniCloudDBGetResult, UniCloudDBQuery, type UniCloudDBRemoveResult, type UniCloudDBUpdateResult, UniCloudError, type UniCloudGetTempFileURLOptions, type UniCloudGetTempFileURLResult, type UniCloudGetTempFileURLResultItem, type UniCloudImportObjectErrorOptions, type UniCloudImportObjectLoadingOptions, type UniCloudImportObjectOptions, type UniCloudInitOptions, type UniCloudRefreshTokenEvent, type UniCloudResponseEvent, type UniCloudUploadFileOptions, type UniCloudUploadFileResult, type UniCloudUploadProgress, type UniCloudUserInfo, uniCloud };
1
+ import { mixinDatacom } from './unicloud-db'
2
+
3
+ type UniCloudCallback<T> = (arg: T) => any | null;
4
+
5
+ type UniCloudInitOptions = {
6
+ /**
7
+ * 服务商,目前支持 aliyun、tencent、alipay
8
+ */
9
+ provider : string
10
+ /**
11
+ * 服务空间名
12
+ */
13
+ spaceName ?: string
14
+ /**
15
+ * 服务空间id
16
+ */
17
+ spaceId : string
18
+ /**
19
+ * 阿里云clientSecret
20
+ */
21
+ clientSecret ?: string
22
+ /**
23
+ * 阿里云endpoint
24
+ */
25
+ endpoint ?: string
26
+ /**
27
+ * 支付宝小程序云spaceAppId
28
+ */
29
+ spaceAppId ?: string
30
+ /**
31
+ * 支付宝小程序云accessKey
32
+ */
33
+ accessKey ?: string
34
+ /**
35
+ * 支付宝小程序云secretKey
36
+ */
37
+ secretKey ?: string
38
+ };
39
+ type UniCloudCallFunctionOptions = {
40
+ /**
41
+ * 云函数名
42
+ */
43
+ name: string | string.CloudFunctionString;
44
+ /**
45
+ * 云函数参数
46
+ */
47
+ data?: UTSJSONObject;
48
+ };
49
+ type UniCloudCallFunctionResult = {
50
+ /**
51
+ * 云函数返回结果
52
+ */
53
+ result: UTSJSONObject;
54
+ /**
55
+ * 云函数请求id
56
+ */
57
+ requestId?: string;
58
+ };
59
+ type UniCloudUploadProgress = {
60
+ /**
61
+ * 已上传大小
62
+ */
63
+ loaded: number;
64
+ /**
65
+ * 总大小
66
+ */
67
+ total: number;
68
+ };
69
+ type UniCloudUploadFileOptions = {
70
+ /**
71
+ * 文件路径
72
+ */
73
+ filePath: string;
74
+ /**
75
+ * 云端路径
76
+ */
77
+ cloudPath: string;
78
+ /**
79
+ * 是否以云端路径是否为真实路径保存上传的文件
80
+ */
81
+ cloudPathAsRealPath?: boolean;
82
+ /**
83
+ * 上传进度回调
84
+ * @param options 上传进度回调参数
85
+ * @returns
86
+ */
87
+ onUploadProgress?: (options: UniCloudUploadProgress) => any;
88
+ };
89
+ type UniCloudUploadFileResult = {
90
+ /**
91
+ * 文件路径
92
+ */
93
+ filePath: string;
94
+ /**
95
+ * 文件id
96
+ */
97
+ fileID: string;
98
+ };
99
+ type UniCloudGetTempFileURLOptions = {
100
+ /**
101
+ * 文件列表
102
+ */
103
+ fileList: Array<string>;
104
+ };
105
+ type UniCloudGetTempFileURLResultItem = {
106
+ /**
107
+ * 文件id
108
+ */
109
+ fileID: string;
110
+ /**
111
+ * 文件临时url
112
+ */
113
+ tempFileURL: string;
114
+ };
115
+ type UniCloudGetTempFileURLResult = {
116
+ /**
117
+ * 文件列表
118
+ */
119
+ fileList: Array<UniCloudGetTempFileURLResultItem>;
120
+ };
121
+ type UniCloudResponseEvent = {
122
+ /**
123
+ * 响应事件类型
124
+ */
125
+ type: string;
126
+ /**
127
+ * 响应事件由哪个云函数触发
128
+ */
129
+ name: string;
130
+ /**
131
+ * 响应结果、错误内容
132
+ */
133
+ content: any;
134
+ };
135
+ type UniCloudRefreshTokenEvent = {
136
+ /**
137
+ * token内容
138
+ */
139
+ token: string;
140
+ /**
141
+ * token过期时间
142
+ */
143
+ tokenExpired: number;
144
+ };
145
+ type UniCloudDBAddResult = {
146
+ /**
147
+ * 添加的记录的id
148
+ */
149
+ id: string;
150
+ /**
151
+ * 请求id
152
+ */
153
+ requestId?: string;
154
+ };
155
+ type UniCloudDBBatchAddResult = {
156
+ /**
157
+ * 添加的记录的id列表
158
+ */
159
+ ids: Array<string>;
160
+ /**
161
+ * 添加成功的记录数
162
+ */
163
+ inserted: number;
164
+ /**
165
+ * 请求id
166
+ */
167
+ requestId?: string;
168
+ };
169
+ type UniCloudDBUpdateResult = {
170
+ /**
171
+ * 更新成功的记录数
172
+ */
173
+ updated: number;
174
+ /**
175
+ * 请求id
176
+ */
177
+ requestId?: string;
178
+ };
179
+ type UniCloudDBRemoveResult = {
180
+ /**
181
+ * 删除成功的记录数
182
+ */
183
+ deleted: number;
184
+ /**
185
+ * 请求id
186
+ */
187
+ requestId?: string;
188
+ };
189
+ type UniCloudDBGetResult = {
190
+ /**
191
+ * 添加的记录的id列表
192
+ */
193
+ data: Array<UTSJSONObject>;
194
+ /**
195
+ * 匹配到的数据总量
196
+ */
197
+ count?: number | null;
198
+ /**
199
+ * 请求id
200
+ */
201
+ requestId?: string;
202
+ };
203
+ type UniCloudDBCountResult = {
204
+ /**
205
+ * 添加的记录的id列表
206
+ */
207
+ total: number;
208
+ /**
209
+ * 请求id
210
+ */
211
+ requestId?: string;
212
+ };
213
+ type UniCloudUserInfo = {
214
+ /**
215
+ * 用户id
216
+ */
217
+ uid?: string | null;
218
+ /**
219
+ * 用户角色列表
220
+ */
221
+ role: Array<string>;
222
+ /**
223
+ * 用户权限列表
224
+ */
225
+ permission: Array<string>;
226
+ /**
227
+ * 用户token过期时间
228
+ */
229
+ tokenExpired: number;
230
+ };
231
+
232
+ declare class UniCloudError extends Error {
233
+ code: any;
234
+ errMsg: string;
235
+ errCode: any;
236
+ errSubject?: string;
237
+ requestId?: string;
238
+ constructor(message: string, code: string, subject?: string, options?: UTSJSONObject);
239
+ private _init;
240
+ toJson(): UTSJSONObject;
241
+ }
242
+
243
+ declare class EventEmitter<T> {
244
+ private _callbacks;
245
+ constructor();
246
+ on(eventName: string, callback: UniCloudCallback<T>): void;
247
+ off(eventName: string, callback: UniCloudCallback<T>): void;
248
+ emit(eventName: string, arg: T): void;
249
+ }
250
+
251
+ declare class UniCloudUnified {
252
+ config: UniCloudInitOptions;
253
+ private _client;
254
+ private _baseSystemInfo;
255
+ private _hasBaseSystemInfo;
256
+ private _provider;
257
+ private _spaceId;
258
+ private _prepareLocalServerHub;
259
+ responseEventEmitter: EventEmitter<UniCloudResponseEvent>;
260
+ refreshTokenEventEmitter: EventEmitter<UniCloudRefreshTokenEvent>;
261
+ constructor(options: UniCloudInitOptions);
262
+ private _getBaseSystemInfo;
263
+ private _getSystemInfo;
264
+ private _getUniIdToken;
265
+ private _isServerOk;
266
+ private _pingLocalServer;
267
+ private _prepareLocalServer;
268
+ private _checkFunction;
269
+ private _prepareFunction;
270
+ private _getCallFunctionOptions;
271
+ private _callCloudFunction;
272
+ private _callLocalFunction;
273
+ callFunction(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult>;
274
+ uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
275
+ getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
276
+ importObject<T extends InternalUniCloudCloudObjectCaller>(objectName: string, options: UniCloudImportObjectOptions, clazz: Class<T>): T;
277
+ }
278
+
279
+ declare class InternalUniCloudCloudObjectCaller {
280
+ protected _obj: InternalUniCloudCloudObject;
281
+ constructor(obj: InternalUniCloudCloudObject);
282
+ protected _getArgs(...args: Array<any | null>): Array<any | null>;
283
+ }
284
+ type UniCloudImportObjectLoadingOptions = {
285
+ /**
286
+ * 加载框标题
287
+ */
288
+ title?: string | null;
289
+ /**
290
+ * 加载框是否显示mask
291
+ */
292
+ mask?: boolean | null;
293
+ };
294
+ type UniCloudImportObjectErrorOptions = {
295
+ /**
296
+ * 错误提示类型,可以是modal或者toast
297
+ */
298
+ type?: string | null;
299
+ /**
300
+ * 是否显示重试按钮
301
+ */
302
+ retry?: boolean | null;
303
+ };
304
+ type UniCloudImportObjectOptions = {
305
+ /**
306
+ * 是否移除自动展示的ui
307
+ */
308
+ customUI?: boolean | null;
309
+ /**
310
+ * loading界面配置
311
+ */
312
+ loadingOptions?: UniCloudImportObjectLoadingOptions | null;
313
+ /**
314
+ * 错误提示配置
315
+ */
316
+ errorOptions?: UniCloudImportObjectErrorOptions | null;
317
+ };
318
+ declare class InternalUniCloudCloudObject {
319
+ private _name;
320
+ private _client;
321
+ private _customUI;
322
+ private _loadingUITitle;
323
+ private _loadingUIMask;
324
+ private _errorUIType;
325
+ private _errorUIRetry;
326
+ constructor(client: UniCloudUnified, name: string, options: UniCloudImportObjectOptions);
327
+ private _initUIOptions;
328
+ private _internalCallMethod;
329
+ callMethod(methodName: string, args: Array<any | null>): Promise<UTSJSONObject>;
330
+ }
331
+
332
+ declare class Stage {
333
+ $method: string;
334
+ $param?: Array<any> | null;
335
+ constructor($method: string, $param?: Array<any> | null);
336
+ }
337
+ declare class Stages {
338
+ private _client?;
339
+ private _stages;
340
+ private _isNew;
341
+ constructor(stages?: Array<Stage>, isNew?: boolean, client?: UniCloudUnified | null);
342
+ push(stage: Stage): Stages;
343
+ toJSON(): UTSJSONObject;
344
+ private _emitResponse;
345
+ sendAdd(): Promise<UniCloudDBAddResult>;
346
+ sendBatchAdd(): Promise<UniCloudDBBatchAddResult>;
347
+ sendUpdate(): Promise<UniCloudDBUpdateResult>;
348
+ sendRemove(): Promise<UniCloudDBRemoveResult>;
349
+ sendGet(): Promise<UniCloudDBGetResult>;
350
+ sendCount(): Promise<UniCloudDBCountResult>;
351
+ private _send;
352
+ }
353
+
354
+ declare class UniCloudDBQuery {
355
+ private _client;
356
+ private _stages;
357
+ constructor(client: UniCloudUnified, stages: Stages);
358
+ get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
359
+ count(): Promise<UniCloudDBCountResult>;
360
+ getTemp(): UTSJSONObject;
361
+ field(filed: string): UniCloudDBQuery;
362
+ skip(num: number): UniCloudDBQuery;
363
+ limit(num: number): UniCloudDBQuery;
364
+ orderBy(order: string): UniCloudDBQuery;
365
+ groupBy(field: string): UniCloudDBQuery;
366
+ groupField(field: string): UniCloudDBQuery;
367
+ distinct(field: string): UniCloudDBQuery;
368
+ geoNear(options: UTSJSONObject): UniCloudDBQuery;
369
+ }
370
+
371
+ declare class UniCloudDBFilter {
372
+ private _client;
373
+ private _stages;
374
+ constructor(client: UniCloudUnified, stages: Stages);
375
+ get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
376
+ count(): Promise<UniCloudDBCountResult>;
377
+ update(data: UTSJSONObject): Promise<UniCloudDBUpdateResult>;
378
+ remove(): Promise<UniCloudDBRemoveResult>;
379
+ getTemp(): UTSJSONObject;
380
+ where(condition: any): UniCloudDBFilter;
381
+ doc(docId: string): UniCloudDBFilter;
382
+ field(filed: string): UniCloudDBQuery;
383
+ skip(num: number): UniCloudDBQuery;
384
+ limit(num: number): UniCloudDBQuery;
385
+ orderBy(order: string): UniCloudDBQuery;
386
+ groupBy(field: string): UniCloudDBQuery;
387
+ groupField(field: string): UniCloudDBQuery;
388
+ distinct(field: string): UniCloudDBQuery;
389
+ geoNear(options: UTSJSONObject): UniCloudDBQuery;
390
+ }
391
+
392
+ declare class Collection {
393
+ private _client;
394
+ private _collectionList;
395
+ private _stages;
396
+ constructor(client: UniCloudUnified, collectionList: Array<any>);
397
+ where(condition: any): UniCloudDBFilter;
398
+ doc(docId: string): UniCloudDBFilter;
399
+ aggregate(): UniCloudDBFilter;
400
+ foreignKey(foreignKey: string): UniCloudDBFilter;
401
+ add(data: UTSJSONObject): Promise<UniCloudDBAddResult>;
402
+ add(data: UTSJSONObject[]): Promise<UniCloudDBBatchAddResult>;
403
+ get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
404
+ count(): Promise<UniCloudDBCountResult>;
405
+ getTemp(): UTSJSONObject;
406
+ field(filed: string): UniCloudDBQuery;
407
+ skip(num: number): UniCloudDBQuery;
408
+ limit(num: number): UniCloudDBQuery;
409
+ orderBy(order: string): UniCloudDBQuery;
410
+ }
411
+
412
+ declare class UniCloudDBCommand {
413
+ private static _push;
414
+ /**
415
+ * 查询操作符,用于表示逻辑 "与" 的关系,表示需同时满足多个查询筛选条件
416
+ */
417
+ static and(args: Array<UTSJSONObject>): UTSJSONObject;
418
+ /**
419
+ * 查询操作符,用于表示逻辑 "或" 的关系,表示需同时满足多个查询筛选条件
420
+ */
421
+ static or(args: Array<UTSJSONObject>): UTSJSONObject;
422
+ /**
423
+ * 查询操作符,用于表示逻辑 "非" 的关系,表示需不满足指定的条件
424
+ */
425
+ static not(arg: UTSJSONObject): UTSJSONObject;
426
+ /**
427
+ * 查询操作符,用于表示逻辑 "都不" 的关系,表示需不满足指定的所有条件
428
+ */
429
+ static nor(args: Array<UTSJSONObject>): UTSJSONObject;
430
+ /**
431
+ * 查询筛选条件,表示字段等于某个值
432
+ */
433
+ static eq(arg: any): UTSJSONObject;
434
+ /**
435
+ * 查询筛选条件,表示字段不等于某个值
436
+ */
437
+ static neq(arg: any): UTSJSONObject;
438
+ /**
439
+ * 查询筛选操作符,表示需小于指定值
440
+ */
441
+ static lt(arg: any): UTSJSONObject;
442
+ /**
443
+ * 查询筛选操作符,表示需小于或等于指定值
444
+ */
445
+ static lte(arg: any): UTSJSONObject;
446
+ /**
447
+ * 查询筛选操作符,表示需大于指定值
448
+ */
449
+ static gt(arg: any): UTSJSONObject;
450
+ /**
451
+ * 查询筛选操作符,表示需大于或等于指定值
452
+ */
453
+ static gte(arg: any): UTSJSONObject;
454
+ /**
455
+ * 查询筛选操作符,表示要求值在给定的数组内
456
+ */
457
+ static in(arr: Array<any>): UTSJSONObject;
458
+ /**
459
+ * 查询筛选操作符,表示要求值不在给定的数组内
460
+ */
461
+ static nin(arr: Array<any>): UTSJSONObject;
462
+ /**
463
+ * 判断字段是否存在
464
+ */
465
+ static exists(arg: boolean): UTSJSONObject;
466
+ /**
467
+ * 查询筛选操作符,给定除数 divisor 和余数 remainder
468
+ * @param divisor 除数
469
+ * @param remainder 余数
470
+ * @returns
471
+ */
472
+ static mod(divisor: number, remainder: number): UTSJSONObject;
473
+ /**
474
+ * 数组查询操作符。用于数组字段的查询筛选条件,要求数组字段中包含给定数组的所有元素
475
+ */
476
+ static all(arr: Array<any>): UTSJSONObject;
477
+ /**
478
+ * 用于数组字段的查询筛选条件,要求数组中包含至少一个满足 elemMatch 给定的所有条件的元素
479
+ */
480
+ static elemMatch(arg: UTSJSONObject): UTSJSONObject;
481
+ /**
482
+ * 更新操作符,用于数组字段的查询筛选条件,要求数组长度为给定值
483
+ */
484
+ static size(arg: number): UTSJSONObject;
485
+ /**
486
+ * 按从近到远的顺序,找出字段值在给定点的附近的记录
487
+ */
488
+ static geoNear(arg: UTSJSONObject): UTSJSONObject;
489
+ /**
490
+ * 找出字段值在指定区域内的记录,无排序。指定的区域必须是多边形(Polygon)或多边形集合(MultiPolygon)
491
+ */
492
+ static geoWithin(arg: UTSJSONObject): UTSJSONObject;
493
+ /**
494
+ * 找出给定的地理位置图形相交的记录
495
+ */
496
+ static geoIntersects(arg: UTSJSONObject): UTSJSONObject;
497
+ }
498
+
499
+ declare class Geometry extends UTSJSONObject {
500
+ constructor(arg: UTSJSONObject);
501
+ }
502
+ declare class GeoPoint extends Geometry {
503
+ constructor(lat: number, lng: number);
504
+ }
505
+ declare class GeoLineString extends Geometry {
506
+ constructor(points: Array<GeoPoint>);
507
+ }
508
+ declare class GeoPolygon extends Geometry {
509
+ constructor(lines: Array<GeoLineString>);
510
+ }
511
+ declare class GeoMultiPoint extends Geometry {
512
+ constructor(points: Array<GeoPoint>);
513
+ }
514
+ declare class GeoMultiLineString extends Geometry {
515
+ constructor(lines: Array<GeoLineString>);
516
+ }
517
+ declare class GeoMultiPolygon extends Geometry {
518
+ constructor(polygons: Array<GeoPolygon>);
519
+ }
520
+ declare class UniCloudDBGeo {
521
+ /**
522
+ * 地理位置点
523
+ */
524
+ static get Point(): typeof GeoPoint;
525
+ /**
526
+ * 地理路径,是由两个或者更多的 Point 组成的线段
527
+ */
528
+ static get LineString(): typeof GeoLineString;
529
+ /**
530
+ * 地理上的一个多边形(有洞或无洞均可),它是由一个或多个闭环 LineString 组成的几何图形
531
+ */
532
+ static get Polygon(): typeof GeoPolygon;
533
+ /**
534
+ * 多个地理位置点 Point 的集合
535
+ */
536
+ static get MultiPoint(): typeof GeoMultiPoint;
537
+ /**
538
+ * 多个地理路径 LineString 的集合
539
+ */
540
+ static get MultiLineString(): typeof GeoMultiLineString;
541
+ /**
542
+ * 多个地理多边形 Polygon 的集合
543
+ */
544
+ static get MultiPolygon(): typeof GeoMultiPolygon;
545
+ }
546
+
547
+ declare class Database {
548
+ private _client;
549
+ constructor(client: UniCloudUnified);
550
+ collection(...args: Array<any>): Collection;
551
+ get command(): typeof UniCloudDBCommand;
552
+ get Geo(): typeof UniCloudDBGeo;
553
+ }
554
+
555
+ type UniCloudChooseAndUploadFileOptions = {
556
+ sourceType?: Array<string> | null;
557
+ count?: number | null;
558
+ sizeType?: Array<string> | null;
559
+ extension?: Array<string> | null;
560
+ compressed?: boolean | null;
561
+ maxDuration?: number | null;
562
+ camera?: string | null;
563
+ crop?: ChooseImageCropOptions | null;
564
+ type: string;
565
+ onChooseFile?: (arg: UniCloudChooseFileResult) => void | null;
566
+ onUploadProgress?: (arg: UniCloudChooseAndUploadFileProgressEvent) => void | null;
567
+ };
568
+ type UniCloudChooseAndUploadFileProgressEvent = {
569
+ index: number;
570
+ loaded: number;
571
+ total: number;
572
+ tempFilePath: string;
573
+ tempFile: UniCloudChooseFileItem;
574
+ };
575
+ type UniCloudChooseAndUploadFileResult = {
576
+ tempFiles: Array<UniCloudChooseFileItem>;
577
+ tempFilePaths: Array<string>;
578
+ };
579
+ type UniCloudChooseFileResult = {
580
+ tempFiles: Array<UniCloudChooseFileItem>;
581
+ tempFilePaths: Array<string>;
582
+ };
583
+ type UniCloudChooseFileItem = {
584
+ name: string;
585
+ path: string;
586
+ cloudPath: string;
587
+ cloudPathAsRealPath?: boolean | null;
588
+ url?: string | null;
589
+ errMsg?: string | null;
590
+ };
591
+
592
+ declare class UniCloud {
593
+ private _client;
594
+ private _provider;
595
+ private _spaceId;
596
+ config: UniCloudInitOptions;
597
+ mixinDatacom: typeof mixinDatacom;
598
+ constructor(options: UniCloudInitOptions);
599
+ /**
600
+ * 请求云函数
601
+ * @description 请求云函数
602
+ * @uniPlatform {
603
+ * "app": {
604
+ * "android": {
605
+ * "osVer": "5.0",
606
+ * "uniVer": "√",
607
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
608
+ * },
609
+ * "ios": {
610
+ * "uniVer": "√",
611
+ * "unixVer": "x"
612
+ * }
613
+ * }
614
+ * }
615
+ */
616
+ callFunction(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult>;
617
+ /**
618
+ * 上传文件到云存储
619
+ * @description 上传文件到云存储
620
+ * @uniPlatform {
621
+ * "app": {
622
+ * "android": {
623
+ * "osVer": "5.0",
624
+ * "uniVer": "√",
625
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
626
+ * },
627
+ * "ios": {
628
+ * "uniVer": "√",
629
+ * "unixVer": "x"
630
+ * }
631
+ * }
632
+ * }
633
+ */
634
+ uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
635
+ /**
636
+ * 获取文件临时URL
637
+ * @description 获取文件临时URL
638
+ * @uniPlatform {
639
+ * "app": {
640
+ * "android": {
641
+ * "osVer": "5.0",
642
+ * "uniVer": "√",
643
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
644
+ * },
645
+ * "ios": {
646
+ * "uniVer": "√",
647
+ * "unixVer": "x"
648
+ * }
649
+ * }
650
+ * }
651
+ */
652
+ getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
653
+ /**
654
+ * 引用云对象
655
+ * @description 引用云对象
656
+ * @uniPlatform {
657
+ * "app": {
658
+ * "android": {
659
+ * "osVer": "5.0",
660
+ * "uniVer": "√",
661
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
662
+ * },
663
+ * "ios": {
664
+ * "uniVer": "√",
665
+ * "unixVer": "x"
666
+ * }
667
+ * }
668
+ * }
669
+ */
670
+ importObject(objectName: string | string.CloudObjectString, options?: UniCloudImportObjectOptions): any;
671
+ /**
672
+ * 监听响应事件
673
+ * @description 监听响应事件
674
+ * @uniPlatform {
675
+ * "app": {
676
+ * "android": {
677
+ * "osVer": "5.0",
678
+ * "uniVer": "√",
679
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
680
+ * },
681
+ * "ios": {
682
+ * "uniVer": "√",
683
+ * "unixVer": "x"
684
+ * }
685
+ * }
686
+ * }
687
+ */
688
+ onResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
689
+ /**
690
+ * 移除响应事件监听
691
+ * @description 移除响应事件监听
692
+ * @uniPlatform {
693
+ * "app": {
694
+ * "android": {
695
+ * "osVer": "5.0",
696
+ * "uniVer": "√",
697
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
698
+ * },
699
+ * "ios": {
700
+ * "uniVer": "√",
701
+ * "unixVer": "x"
702
+ * }
703
+ * }
704
+ * }
705
+ */
706
+ offResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
707
+ /**
708
+ * 监听token刷新事件
709
+ * @description 监听token刷新事件
710
+ * @uniPlatform {
711
+ * "app": {
712
+ * "android": {
713
+ * "osVer": "5.0",
714
+ * "uniVer": "√",
715
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
716
+ * },
717
+ * "ios": {
718
+ * "uniVer": "√",
719
+ * "unixVer": "x"
720
+ * }
721
+ * }
722
+ * }
723
+ */
724
+ onRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
725
+ /**
726
+ * 移除token刷新事件监听
727
+ * @description 移除token刷新事件监听
728
+ * @uniPlatform {
729
+ * "app": {
730
+ * "android": {
731
+ * "osVer": "5.0",
732
+ * "uniVer": "√",
733
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
734
+ * },
735
+ * "ios": {
736
+ * "uniVer": "√",
737
+ * "unixVer": "x"
738
+ * }
739
+ * }
740
+ * }
741
+ */
742
+ offRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
743
+ /**
744
+ * 获取数据库操作实例
745
+ * @description 获取数据库操作实例
746
+ * @uniPlatform {
747
+ * "app": {
748
+ * "android": {
749
+ * "osVer": "5.0",
750
+ * "uniVer": "√",
751
+ * "unixVer": "阿里云 3.91,腾讯云 3.91"
752
+ * },
753
+ * "ios": {
754
+ * "uniVer": "√",
755
+ * "unixVer": "x"
756
+ * }
757
+ * }
758
+ * }
759
+ */
760
+ databaseForJQL(): Database;
761
+ /**
762
+ * 获取token内缓存的用户信息
763
+ * @description 获取token内缓存的用户信息
764
+ * @uniPlatform {
765
+ * "app": {
766
+ * "android": {
767
+ * "osVer": "5.0",
768
+ * "uniVer": "√",
769
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
770
+ * },
771
+ * "ios": {
772
+ * "uniVer": "√",
773
+ * "unixVer": "x"
774
+ * }
775
+ * }
776
+ * }
777
+ */
778
+ getCurrentUserInfo(): UniCloudUserInfo;
779
+ /**
780
+ * 选择并上传文件
781
+ * @description 选择并上传文件
782
+ * @uniPlatform {
783
+ * "app": {
784
+ * "android": {
785
+ * "osVer": "5.0",
786
+ * "uniVer": "√",
787
+ * "unixVer": "阿里云 3.9,腾讯云 3.91"
788
+ * },
789
+ * "ios": {
790
+ * "uniVer": "√",
791
+ * "unixVer": "x"
792
+ * }
793
+ * }
794
+ * }
795
+ */
796
+ chooseAndUploadFile(options: UniCloudChooseAndUploadFileOptions): Promise<UniCloudChooseAndUploadFileResult>;
797
+ }
798
+
799
+ declare const uniCloud: UniCloud;
800
+
801
+ export { type UniCloudCallFunctionOptions, type UniCloudCallFunctionResult, type UniCloudChooseAndUploadFileOptions, type UniCloudChooseAndUploadFileResult, type UniCloudDBAddResult, type UniCloudDBBatchAddResult, type UniCloudDBCountResult, UniCloudDBFilter, type UniCloudDBGetResult, UniCloudDBQuery, type UniCloudDBRemoveResult, type UniCloudDBUpdateResult, UniCloudError, type UniCloudGetTempFileURLOptions, type UniCloudGetTempFileURLResult, type UniCloudGetTempFileURLResultItem, type UniCloudImportObjectErrorOptions, type UniCloudImportObjectLoadingOptions, type UniCloudImportObjectOptions, type UniCloudInitOptions, type UniCloudRefreshTokenEvent, type UniCloudResponseEvent, type UniCloudUploadFileOptions, type UniCloudUploadFileResult, type UniCloudUploadProgress, type UniCloudUserInfo, uniCloud };