@astralsight/astroforge-core 0.0.1
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/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/apis.d.mts +992 -0
- package/dist/apis.mjs +103 -0
- package/dist/components.d.mts +249 -0
- package/dist/components.mjs +49 -0
- package/dist/hooks.d.mts +12 -0
- package/dist/hooks.mjs +18 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +5 -0
- package/dist/jsx-runtime.d.mts +19 -0
- package/dist/jsx-runtime.mjs +11 -0
- package/dist/platform.d.mts +33 -0
- package/dist/platform.mjs +138 -0
- package/package.json +63 -0
package/dist/apis.d.mts
ADDED
|
@@ -0,0 +1,992 @@
|
|
|
1
|
+
//#region src/apis.d.ts
|
|
2
|
+
type BridgeValue = unknown;
|
|
3
|
+
type BridgeCallback<Args extends unknown[] = []> = (...args: Args) => void;
|
|
4
|
+
type BridgeFailCallback = (errMsg: string, errCode: number) => void;
|
|
5
|
+
interface CallbackOptions<Success = BridgeValue> {
|
|
6
|
+
success?: BridgeCallback<[Success]>;
|
|
7
|
+
fail?: BridgeFailCallback;
|
|
8
|
+
complete?: BridgeCallback;
|
|
9
|
+
}
|
|
10
|
+
interface LocaleInfo {
|
|
11
|
+
language: string;
|
|
12
|
+
countryOrRegion: string;
|
|
13
|
+
}
|
|
14
|
+
interface RouteObject {
|
|
15
|
+
uri: string;
|
|
16
|
+
params?: Record<string, BridgeValue>;
|
|
17
|
+
}
|
|
18
|
+
interface RouterBackOptions {
|
|
19
|
+
path?: string;
|
|
20
|
+
}
|
|
21
|
+
interface RouteStack {
|
|
22
|
+
name: string;
|
|
23
|
+
path: string;
|
|
24
|
+
}
|
|
25
|
+
interface RouteState extends RouteStack {
|
|
26
|
+
index: number;
|
|
27
|
+
}
|
|
28
|
+
interface RouterApi {
|
|
29
|
+
getPages(): RouteStack[];
|
|
30
|
+
push(options: RouteObject): void;
|
|
31
|
+
replace(options: RouteObject): void;
|
|
32
|
+
back(options?: RouterBackOptions): void;
|
|
33
|
+
clear(): void;
|
|
34
|
+
getLength(): number;
|
|
35
|
+
getState(): RouteState;
|
|
36
|
+
}
|
|
37
|
+
interface AppSource {
|
|
38
|
+
[key: string]: BridgeValue;
|
|
39
|
+
}
|
|
40
|
+
interface AppInfo {
|
|
41
|
+
packageName: string;
|
|
42
|
+
name: string;
|
|
43
|
+
versionName: string;
|
|
44
|
+
versionCode: number;
|
|
45
|
+
icon: string;
|
|
46
|
+
logLevel: string;
|
|
47
|
+
source: AppSource;
|
|
48
|
+
}
|
|
49
|
+
interface AppApi {
|
|
50
|
+
getInfo(): AppInfo;
|
|
51
|
+
terminate(): void;
|
|
52
|
+
canIUse(capability?: BridgeValue): boolean;
|
|
53
|
+
loadLibrary(libraryName: string): BridgeValue;
|
|
54
|
+
}
|
|
55
|
+
interface PromptToastOptions {
|
|
56
|
+
message: string;
|
|
57
|
+
duration?: BridgeValue;
|
|
58
|
+
}
|
|
59
|
+
interface PromptDialogResult {
|
|
60
|
+
index: number;
|
|
61
|
+
}
|
|
62
|
+
interface PromptDialogOptions {
|
|
63
|
+
title?: string;
|
|
64
|
+
message: string;
|
|
65
|
+
autocancel?: boolean;
|
|
66
|
+
success?: BridgeCallback<[PromptDialogResult]>;
|
|
67
|
+
cancel?: BridgeCallback;
|
|
68
|
+
complete?: BridgeCallback;
|
|
69
|
+
}
|
|
70
|
+
interface PromptApi {
|
|
71
|
+
showToast(options: PromptToastOptions): void;
|
|
72
|
+
showDialog(options: PromptDialogOptions): void;
|
|
73
|
+
}
|
|
74
|
+
interface FetchOptions {
|
|
75
|
+
url: string;
|
|
76
|
+
data?: BridgeValue;
|
|
77
|
+
header?: BridgeValue;
|
|
78
|
+
method?: "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | "CONNECT" | "PATCH" | string;
|
|
79
|
+
responseType?: "" | "text" | "json" | "file" | "arraybuffer" | string;
|
|
80
|
+
timeout?: number;
|
|
81
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
82
|
+
fail?: BridgeFailCallback;
|
|
83
|
+
complete?: BridgeCallback;
|
|
84
|
+
}
|
|
85
|
+
interface UploadSuccess {
|
|
86
|
+
data?: BridgeValue;
|
|
87
|
+
statusCode?: number;
|
|
88
|
+
header?: BridgeValue;
|
|
89
|
+
[key: string]: BridgeValue;
|
|
90
|
+
}
|
|
91
|
+
interface UploadProgress {
|
|
92
|
+
progress: number;
|
|
93
|
+
totalBytesSent: number;
|
|
94
|
+
totalBytesExpectedToSend: number;
|
|
95
|
+
}
|
|
96
|
+
interface UploadFileOptions {
|
|
97
|
+
url: string;
|
|
98
|
+
filePath: string;
|
|
99
|
+
name: string;
|
|
100
|
+
header?: BridgeValue;
|
|
101
|
+
formData?: BridgeValue;
|
|
102
|
+
timeout?: number;
|
|
103
|
+
success?: BridgeCallback<[UploadSuccess]>;
|
|
104
|
+
fail?: BridgeFailCallback;
|
|
105
|
+
complete?: BridgeCallback;
|
|
106
|
+
}
|
|
107
|
+
interface UploadTask {
|
|
108
|
+
abort(): void;
|
|
109
|
+
onProgressUpdate(callback: BridgeCallback<[UploadProgress]>): void;
|
|
110
|
+
offProgressUpdate(callback?: BridgeCallback<[UploadProgress]>): void;
|
|
111
|
+
}
|
|
112
|
+
interface DownloadNotifyData {
|
|
113
|
+
progress?: number;
|
|
114
|
+
totalBytesWritten?: number;
|
|
115
|
+
totalBytesExpectedToWrite?: number;
|
|
116
|
+
[key: string]: BridgeValue;
|
|
117
|
+
}
|
|
118
|
+
interface DownloadSuccess {
|
|
119
|
+
token: string;
|
|
120
|
+
[key: string]: BridgeValue;
|
|
121
|
+
}
|
|
122
|
+
interface DownloadCompleteSuccess {
|
|
123
|
+
uri: string;
|
|
124
|
+
[key: string]: BridgeValue;
|
|
125
|
+
}
|
|
126
|
+
interface DownloadOptions {
|
|
127
|
+
url: string;
|
|
128
|
+
header?: string;
|
|
129
|
+
filename?: string;
|
|
130
|
+
share?: boolean;
|
|
131
|
+
onDownLoadNotify?: BridgeCallback<[DownloadNotifyData]>;
|
|
132
|
+
success?: BridgeCallback<[DownloadSuccess]>;
|
|
133
|
+
fail?: BridgeFailCallback;
|
|
134
|
+
complete?: BridgeCallback;
|
|
135
|
+
}
|
|
136
|
+
interface DownloadCompleteOptions {
|
|
137
|
+
token: string;
|
|
138
|
+
success?: BridgeCallback<[DownloadCompleteSuccess]>;
|
|
139
|
+
fail?: BridgeFailCallback;
|
|
140
|
+
complete?: BridgeCallback;
|
|
141
|
+
}
|
|
142
|
+
interface NetworkApi {
|
|
143
|
+
fetch(options: FetchOptions): Promise<BridgeValue>;
|
|
144
|
+
uploadFile(options: UploadFileOptions): UploadTask;
|
|
145
|
+
download(options: DownloadOptions): void;
|
|
146
|
+
onDownloadComplete(options: DownloadCompleteOptions): void;
|
|
147
|
+
getType(options: CallbackOptions<NetworkTypeInfo>): void;
|
|
148
|
+
subscribe(options: {
|
|
149
|
+
callback?: BridgeCallback<[NetworkTypeInfo]>;
|
|
150
|
+
fail?: BridgeFailCallback;
|
|
151
|
+
}): void;
|
|
152
|
+
unsubscribe(): void;
|
|
153
|
+
}
|
|
154
|
+
type NetworkType = "2g" | "3g" | "4g" | "5g" | "wifi" | "bluetooth" | "none" | "others";
|
|
155
|
+
interface NetworkTypeInfo {
|
|
156
|
+
type: NetworkType | string;
|
|
157
|
+
}
|
|
158
|
+
interface StorageGetOptions {
|
|
159
|
+
key: string;
|
|
160
|
+
default?: string;
|
|
161
|
+
success?: BridgeCallback<[string]>;
|
|
162
|
+
fail?: BridgeFailCallback;
|
|
163
|
+
complete?: BridgeCallback<[string]>;
|
|
164
|
+
}
|
|
165
|
+
interface StorageSetOptions {
|
|
166
|
+
key: string;
|
|
167
|
+
value?: string;
|
|
168
|
+
success?: BridgeCallback<[string]>;
|
|
169
|
+
fail?: BridgeFailCallback;
|
|
170
|
+
complete?: BridgeCallback<[string]>;
|
|
171
|
+
}
|
|
172
|
+
interface StorageDeleteOptions {
|
|
173
|
+
key: string;
|
|
174
|
+
success?: BridgeCallback<[string]>;
|
|
175
|
+
fail?: BridgeFailCallback;
|
|
176
|
+
complete?: BridgeCallback<[string]>;
|
|
177
|
+
}
|
|
178
|
+
interface StorageKeyOptions {
|
|
179
|
+
index: number;
|
|
180
|
+
success?: BridgeCallback<[string]>;
|
|
181
|
+
fail?: BridgeFailCallback;
|
|
182
|
+
complete?: BridgeCallback<[string]>;
|
|
183
|
+
}
|
|
184
|
+
interface StorageApi {
|
|
185
|
+
get(options: StorageGetOptions): void;
|
|
186
|
+
set(options: StorageSetOptions): void;
|
|
187
|
+
clear(options?: CallbackOptions<string>): void;
|
|
188
|
+
delete(options: StorageDeleteOptions): void;
|
|
189
|
+
key(options: StorageKeyOptions): void;
|
|
190
|
+
length: number;
|
|
191
|
+
}
|
|
192
|
+
interface ExchangeOptions {
|
|
193
|
+
key?: string;
|
|
194
|
+
value?: string;
|
|
195
|
+
scope?: string;
|
|
196
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
197
|
+
fail?: BridgeFailCallback;
|
|
198
|
+
complete?: BridgeCallback<[string]>;
|
|
199
|
+
}
|
|
200
|
+
interface ExchangeApi {
|
|
201
|
+
set(options: ExchangeOptions & {
|
|
202
|
+
key: string;
|
|
203
|
+
value: string;
|
|
204
|
+
}): void;
|
|
205
|
+
get(options: ExchangeOptions & {
|
|
206
|
+
key: string;
|
|
207
|
+
}): void;
|
|
208
|
+
remove(options: ExchangeOptions & {
|
|
209
|
+
key: string;
|
|
210
|
+
}): void;
|
|
211
|
+
clear(options?: ExchangeOptions): void;
|
|
212
|
+
}
|
|
213
|
+
interface CryptoHashDigestOptions {
|
|
214
|
+
data?: BridgeValue;
|
|
215
|
+
uri?: string;
|
|
216
|
+
algo?: string;
|
|
217
|
+
}
|
|
218
|
+
interface CryptoHmacDigestOptions extends CallbackOptions {
|
|
219
|
+
data: string;
|
|
220
|
+
algo?: string;
|
|
221
|
+
key: string;
|
|
222
|
+
}
|
|
223
|
+
interface CryptoSignOptions extends CallbackOptions {
|
|
224
|
+
data?: BridgeValue;
|
|
225
|
+
uri?: string;
|
|
226
|
+
algo?: string;
|
|
227
|
+
privateKey: string;
|
|
228
|
+
}
|
|
229
|
+
interface CryptoVerifyOptions {
|
|
230
|
+
data?: BridgeValue;
|
|
231
|
+
uri?: string;
|
|
232
|
+
algo?: string;
|
|
233
|
+
signature: BridgeValue;
|
|
234
|
+
publicKey: string;
|
|
235
|
+
success?: BridgeCallback<[boolean]>;
|
|
236
|
+
fail?: BridgeFailCallback;
|
|
237
|
+
complete?: BridgeCallback;
|
|
238
|
+
}
|
|
239
|
+
interface CryptoCryptOptions extends CallbackOptions {
|
|
240
|
+
data: BridgeValue;
|
|
241
|
+
algo?: string;
|
|
242
|
+
key: string;
|
|
243
|
+
options?: BridgeValue;
|
|
244
|
+
}
|
|
245
|
+
interface CryptoApi {
|
|
246
|
+
hashDigest(options: CryptoHashDigestOptions): string;
|
|
247
|
+
hmacDigest(options: CryptoHmacDigestOptions): void;
|
|
248
|
+
sign(options: CryptoSignOptions): void;
|
|
249
|
+
verify(options: CryptoVerifyOptions): void;
|
|
250
|
+
encrypt(options: CryptoCryptOptions): void;
|
|
251
|
+
decrypt(options: CryptoCryptOptions): void;
|
|
252
|
+
btoa(value: string): string;
|
|
253
|
+
atob(value: string): string;
|
|
254
|
+
}
|
|
255
|
+
interface CipherRSAOptions extends CallbackOptions {
|
|
256
|
+
action: string;
|
|
257
|
+
text: string;
|
|
258
|
+
key: string;
|
|
259
|
+
hashType?: string;
|
|
260
|
+
}
|
|
261
|
+
interface CipherVerifyOptions extends CallbackOptions {
|
|
262
|
+
text: string;
|
|
263
|
+
key: string;
|
|
264
|
+
hashType?: string;
|
|
265
|
+
signature: string;
|
|
266
|
+
}
|
|
267
|
+
interface CipherDigestOptions extends CallbackOptions {
|
|
268
|
+
hashType?: string;
|
|
269
|
+
text: string;
|
|
270
|
+
}
|
|
271
|
+
interface CipherMd5Options extends CallbackOptions {
|
|
272
|
+
text: string;
|
|
273
|
+
}
|
|
274
|
+
interface CipherAESOptions {
|
|
275
|
+
action: string;
|
|
276
|
+
text: string;
|
|
277
|
+
key: string;
|
|
278
|
+
iv: string;
|
|
279
|
+
ivOffset?: number;
|
|
280
|
+
ivLen?: number;
|
|
281
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
282
|
+
fail?: BridgeCallback<[BridgeValue, number]>;
|
|
283
|
+
complete?: BridgeCallback;
|
|
284
|
+
}
|
|
285
|
+
interface CipherApi {
|
|
286
|
+
rsa(options: CipherRSAOptions): void;
|
|
287
|
+
sign(options: CipherRSAOptions): void;
|
|
288
|
+
verify(options: CipherVerifyOptions): void;
|
|
289
|
+
digest(options: CipherDigestOptions): void;
|
|
290
|
+
md5(options: CipherMd5Options): void;
|
|
291
|
+
aes(options: CipherAESOptions): void;
|
|
292
|
+
}
|
|
293
|
+
interface ProtobufType {
|
|
294
|
+
verify(message: BridgeValue): boolean;
|
|
295
|
+
encode(message: BridgeValue): BridgeValue;
|
|
296
|
+
decode(buffer: BridgeValue): BridgeValue;
|
|
297
|
+
}
|
|
298
|
+
interface ProtobufRoot {
|
|
299
|
+
readonly syntax: string;
|
|
300
|
+
lookupType(typeName: string): ProtobufType;
|
|
301
|
+
}
|
|
302
|
+
interface ProtobufLoadOptions {
|
|
303
|
+
filePath?: string;
|
|
304
|
+
fail?: BridgeFailCallback;
|
|
305
|
+
complete?: BridgeCallback;
|
|
306
|
+
}
|
|
307
|
+
interface ProtobufApi {
|
|
308
|
+
load(options: ProtobufLoadOptions): Promise<{
|
|
309
|
+
root: ProtobufRoot;
|
|
310
|
+
}>;
|
|
311
|
+
release(root: ProtobufRoot): boolean;
|
|
312
|
+
}
|
|
313
|
+
interface MessageCodecApi {
|
|
314
|
+
verify(value: BridgeValue): boolean;
|
|
315
|
+
decode(value: BridgeValue): BridgeValue;
|
|
316
|
+
encode(value: BridgeValue): BridgeValue;
|
|
317
|
+
}
|
|
318
|
+
interface SensorCallbackOptions<T> {
|
|
319
|
+
reserved?: boolean;
|
|
320
|
+
interval?: string;
|
|
321
|
+
callback: BridgeCallback<[T]>;
|
|
322
|
+
fail?: BridgeFailCallback;
|
|
323
|
+
}
|
|
324
|
+
interface AccelerometerData {
|
|
325
|
+
x: number;
|
|
326
|
+
y: number;
|
|
327
|
+
z: number;
|
|
328
|
+
}
|
|
329
|
+
interface CompassData {
|
|
330
|
+
direction: number;
|
|
331
|
+
}
|
|
332
|
+
interface ProximityData {
|
|
333
|
+
distance?: number;
|
|
334
|
+
value?: BridgeValue;
|
|
335
|
+
}
|
|
336
|
+
interface LightData {
|
|
337
|
+
intensity?: number;
|
|
338
|
+
value?: BridgeValue;
|
|
339
|
+
}
|
|
340
|
+
interface ScalarSensorData {
|
|
341
|
+
value?: number;
|
|
342
|
+
accuracy?: number;
|
|
343
|
+
timestamp?: number;
|
|
344
|
+
[key: string]: BridgeValue;
|
|
345
|
+
}
|
|
346
|
+
interface GenericSensorSubscribeOptions {
|
|
347
|
+
type: number;
|
|
348
|
+
reserved?: boolean;
|
|
349
|
+
interval?: string;
|
|
350
|
+
callback: BridgeCallback<[BridgeValue]>;
|
|
351
|
+
fail?: BridgeFailCallback;
|
|
352
|
+
}
|
|
353
|
+
interface SensorRecentDataOptions {
|
|
354
|
+
type: number;
|
|
355
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
356
|
+
fail?: BridgeFailCallback;
|
|
357
|
+
complete?: BridgeCallback;
|
|
358
|
+
}
|
|
359
|
+
interface SensorApi {
|
|
360
|
+
subscribeAccelerometer(options: SensorCallbackOptions<AccelerometerData>): void;
|
|
361
|
+
unsubscribeAccelerometer(): void;
|
|
362
|
+
subscribeCompass(options: SensorCallbackOptions<CompassData>): void;
|
|
363
|
+
unsubscribeCompass(): void;
|
|
364
|
+
subscribeProximity(options: SensorCallbackOptions<ProximityData>): void;
|
|
365
|
+
unsubscribeProximity(): void;
|
|
366
|
+
subscribeLight(options: SensorCallbackOptions<LightData>): void;
|
|
367
|
+
unsubscribeLight(): void;
|
|
368
|
+
subscribeStepCounter(options: SensorCallbackOptions<ScalarSensorData>): void;
|
|
369
|
+
unsubscribeStepCounter(): void;
|
|
370
|
+
subscribePressure(options: SensorCallbackOptions<ScalarSensorData>): void;
|
|
371
|
+
unsubscribePressure(): void;
|
|
372
|
+
subscribeHumidity(options: SensorCallbackOptions<ScalarSensorData>): void;
|
|
373
|
+
unsubscribeHumidity(): void;
|
|
374
|
+
subscribeAmbientTemperature(options: SensorCallbackOptions<ScalarSensorData>): void;
|
|
375
|
+
unsubscribeAmbientTemperature(): void;
|
|
376
|
+
DATA_TYPES: BridgeValue;
|
|
377
|
+
subscribe(options: GenericSensorSubscribeOptions): number;
|
|
378
|
+
unsubscribe(subscriptionId: number): void;
|
|
379
|
+
getRecentData(options: SensorRecentDataOptions): void;
|
|
380
|
+
checkAvailable(sensorType: number): boolean;
|
|
381
|
+
}
|
|
382
|
+
interface GeolocationOptions {
|
|
383
|
+
timeout?: number;
|
|
384
|
+
}
|
|
385
|
+
interface LocationInfo {
|
|
386
|
+
longitude: number;
|
|
387
|
+
latitude: number;
|
|
388
|
+
altitude: number;
|
|
389
|
+
speed: number;
|
|
390
|
+
accuracy: number;
|
|
391
|
+
accuracyInfo: BridgeValue;
|
|
392
|
+
}
|
|
393
|
+
interface GeolocationApi {
|
|
394
|
+
getLocation(options?: GeolocationOptions): Promise<LocationInfo>;
|
|
395
|
+
subscribe(options: {
|
|
396
|
+
callback: BridgeCallback<[LocationInfo]>;
|
|
397
|
+
fail?: BridgeFailCallback;
|
|
398
|
+
}): void;
|
|
399
|
+
unsubscribe(): void;
|
|
400
|
+
}
|
|
401
|
+
interface VibrateOptions {
|
|
402
|
+
mode?: string;
|
|
403
|
+
}
|
|
404
|
+
interface VibrateStartOptions {
|
|
405
|
+
duration?: number;
|
|
406
|
+
interval?: number;
|
|
407
|
+
count?: number;
|
|
408
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
409
|
+
fail?: BridgeFailCallback;
|
|
410
|
+
complete?: BridgeCallback;
|
|
411
|
+
}
|
|
412
|
+
interface VibratorApi {
|
|
413
|
+
vibrate(options?: VibrateOptions): void;
|
|
414
|
+
start(options: VibrateStartOptions): void;
|
|
415
|
+
stop(vibrationId: number): boolean;
|
|
416
|
+
getSystemDefaultMode(): number;
|
|
417
|
+
}
|
|
418
|
+
interface FileCallbacks<T = string> {
|
|
419
|
+
success?: BridgeCallback<[T]>;
|
|
420
|
+
fail?: BridgeFailCallback;
|
|
421
|
+
complete?: BridgeCallback;
|
|
422
|
+
}
|
|
423
|
+
interface FileMoveOptions extends FileCallbacks {
|
|
424
|
+
srcUri: string;
|
|
425
|
+
dstUri: string;
|
|
426
|
+
}
|
|
427
|
+
interface FileListOptions extends FileCallbacks<{
|
|
428
|
+
fileList: BridgeValue[];
|
|
429
|
+
}> {
|
|
430
|
+
uri: string;
|
|
431
|
+
}
|
|
432
|
+
interface FileGetOptions extends FileCallbacks<BridgeValue> {
|
|
433
|
+
uri: string;
|
|
434
|
+
recursive?: boolean;
|
|
435
|
+
}
|
|
436
|
+
interface FileUriOptions extends FileCallbacks<void> {
|
|
437
|
+
uri: string;
|
|
438
|
+
}
|
|
439
|
+
interface FileWriteTextOptions extends FileCallbacks<void> {
|
|
440
|
+
uri: string;
|
|
441
|
+
text: string;
|
|
442
|
+
encoding?: string;
|
|
443
|
+
append?: boolean;
|
|
444
|
+
}
|
|
445
|
+
interface FileWriteArrayBufferOptions extends FileCallbacks<void> {
|
|
446
|
+
uri: string;
|
|
447
|
+
buffer: BridgeValue;
|
|
448
|
+
position?: number;
|
|
449
|
+
append?: boolean;
|
|
450
|
+
}
|
|
451
|
+
interface FileReadTextOptions extends FileCallbacks<BridgeValue> {
|
|
452
|
+
uri: string;
|
|
453
|
+
encoding?: string;
|
|
454
|
+
}
|
|
455
|
+
interface FileReadArrayBufferOptions extends FileCallbacks<BridgeValue> {
|
|
456
|
+
uri: string;
|
|
457
|
+
position?: number;
|
|
458
|
+
length?: number;
|
|
459
|
+
}
|
|
460
|
+
interface FileMkdirOptions extends FileCallbacks<void> {
|
|
461
|
+
uri: string;
|
|
462
|
+
recursive?: boolean;
|
|
463
|
+
}
|
|
464
|
+
interface FileApi {
|
|
465
|
+
move(options: FileMoveOptions): void;
|
|
466
|
+
copy(options: FileMoveOptions): void;
|
|
467
|
+
list(options: FileListOptions): void;
|
|
468
|
+
get(options: FileGetOptions): void;
|
|
469
|
+
delete(options: FileUriOptions): void;
|
|
470
|
+
writeText(options: FileWriteTextOptions): void;
|
|
471
|
+
writeArrayBuffer(options: FileWriteArrayBufferOptions): void;
|
|
472
|
+
readText(options: FileReadTextOptions): void;
|
|
473
|
+
readArrayBuffer(options: FileReadArrayBufferOptions): void;
|
|
474
|
+
access(options: FileUriOptions): void;
|
|
475
|
+
mkdir(options: FileMkdirOptions): void;
|
|
476
|
+
rmdir(options: FileMkdirOptions): void;
|
|
477
|
+
}
|
|
478
|
+
interface ZipApi {
|
|
479
|
+
decompress(options: {
|
|
480
|
+
srcUri: string;
|
|
481
|
+
dstUri: string;
|
|
482
|
+
success?: BridgeCallback;
|
|
483
|
+
fail?: BridgeFailCallback;
|
|
484
|
+
complete?: BridgeCallback;
|
|
485
|
+
}): void;
|
|
486
|
+
}
|
|
487
|
+
interface ZlibApi {
|
|
488
|
+
decompressSync(compressedData: BridgeValue): BridgeValue;
|
|
489
|
+
}
|
|
490
|
+
interface ServiceClientConnectOptions {
|
|
491
|
+
name: string;
|
|
492
|
+
package?: string;
|
|
493
|
+
params?: BridgeValue;
|
|
494
|
+
policy?: string;
|
|
495
|
+
}
|
|
496
|
+
interface ServiceInstance {
|
|
497
|
+
postMessage(message: BridgeValue): void;
|
|
498
|
+
disconnect(): void;
|
|
499
|
+
onmessage(callback: BridgeCallback<[string]>): void;
|
|
500
|
+
onerror(callback: BridgeCallback<[number]>): void;
|
|
501
|
+
}
|
|
502
|
+
interface ServiceClientApi {
|
|
503
|
+
connect(options: ServiceClientConnectOptions): ServiceInstance;
|
|
504
|
+
}
|
|
505
|
+
interface SystemEventApi {
|
|
506
|
+
publish(options: {
|
|
507
|
+
eventName: string;
|
|
508
|
+
options?: BridgeValue;
|
|
509
|
+
}): void;
|
|
510
|
+
subscribe(options: {
|
|
511
|
+
eventName: string;
|
|
512
|
+
callback: BridgeCallback<[BridgeValue]>;
|
|
513
|
+
}): BridgeValue;
|
|
514
|
+
unsubscribe(options: {
|
|
515
|
+
id: number;
|
|
516
|
+
}): void;
|
|
517
|
+
}
|
|
518
|
+
interface DeviceInfo {
|
|
519
|
+
brand?: string;
|
|
520
|
+
manufacturer?: string;
|
|
521
|
+
model?: string;
|
|
522
|
+
product?: string;
|
|
523
|
+
osType?: string;
|
|
524
|
+
osVersionName?: string;
|
|
525
|
+
osVersionCode?: number;
|
|
526
|
+
platformVersionName?: string;
|
|
527
|
+
platformVersionCode?: number;
|
|
528
|
+
screenWidth?: number;
|
|
529
|
+
screenHeight?: number;
|
|
530
|
+
windowWidth?: number;
|
|
531
|
+
windowHeight?: number;
|
|
532
|
+
statusBarHeight?: number;
|
|
533
|
+
[key: string]: BridgeValue;
|
|
534
|
+
}
|
|
535
|
+
interface DeviceCommonOptions extends CallbackOptions {}
|
|
536
|
+
interface DeviceApi {
|
|
537
|
+
getInfo(options: CallbackOptions<DeviceInfo>): void;
|
|
538
|
+
getSystemUptime(): Promise<{
|
|
539
|
+
systemUptime: number;
|
|
540
|
+
}>;
|
|
541
|
+
getDeviceId(options?: DeviceCommonOptions): string;
|
|
542
|
+
getId(options: DeviceCommonOptions): void;
|
|
543
|
+
getSerial(options: DeviceCommonOptions): void;
|
|
544
|
+
getTotalStorage(options: DeviceCommonOptions): void;
|
|
545
|
+
getAvailableStorage(options: DeviceCommonOptions): void;
|
|
546
|
+
}
|
|
547
|
+
interface FolmeAnimationOptions {
|
|
548
|
+
id: string;
|
|
549
|
+
fromState?: BridgeValue;
|
|
550
|
+
toState?: BridgeValue;
|
|
551
|
+
config?: BridgeValue;
|
|
552
|
+
onUpdate?: BridgeCallback;
|
|
553
|
+
onComplete?: BridgeCallback;
|
|
554
|
+
}
|
|
555
|
+
interface FolmeApi {
|
|
556
|
+
to(options: Omit<FolmeAnimationOptions, "fromState">): void;
|
|
557
|
+
setTo(options: Omit<FolmeAnimationOptions, "fromState" | "onUpdate" | "onComplete">): void;
|
|
558
|
+
fromTo(options: FolmeAnimationOptions): void;
|
|
559
|
+
startGroup(options: FolmeAnimationOptions[]): void;
|
|
560
|
+
cancel(options: {
|
|
561
|
+
id: string;
|
|
562
|
+
attrs?: BridgeValue;
|
|
563
|
+
}): void;
|
|
564
|
+
getState(options: {
|
|
565
|
+
id: string;
|
|
566
|
+
attr: string;
|
|
567
|
+
}): {
|
|
568
|
+
value: string;
|
|
569
|
+
isFinished: boolean;
|
|
570
|
+
speed: number;
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
interface VolumeValue {
|
|
574
|
+
value: number;
|
|
575
|
+
}
|
|
576
|
+
interface VolumeApi {
|
|
577
|
+
onMediaValueChanged(callback: BridgeCallback<[VolumeValue]>): void;
|
|
578
|
+
setMediaValue(options: {
|
|
579
|
+
value: number;
|
|
580
|
+
success?: BridgeCallback<[VolumeValue]>;
|
|
581
|
+
fail?: BridgeFailCallback;
|
|
582
|
+
complete?: BridgeCallback<[string]>;
|
|
583
|
+
}): void;
|
|
584
|
+
getMediaValue(options: {
|
|
585
|
+
success?: BridgeCallback<[VolumeValue]>;
|
|
586
|
+
fail?: BridgeFailCallback;
|
|
587
|
+
complete?: BridgeCallback<[string]>;
|
|
588
|
+
}): void;
|
|
589
|
+
}
|
|
590
|
+
interface AudioMetaInfo {
|
|
591
|
+
title?: string;
|
|
592
|
+
album?: string;
|
|
593
|
+
artist?: string;
|
|
594
|
+
[key: string]: BridgeValue;
|
|
595
|
+
}
|
|
596
|
+
interface AudioState {
|
|
597
|
+
state?: string;
|
|
598
|
+
currentTime?: number;
|
|
599
|
+
duration?: number;
|
|
600
|
+
[key: string]: BridgeValue;
|
|
601
|
+
}
|
|
602
|
+
interface AudioApi {
|
|
603
|
+
src: string;
|
|
604
|
+
meta: AudioMetaInfo;
|
|
605
|
+
currentTime: number;
|
|
606
|
+
readonly duration: number;
|
|
607
|
+
autoplay: boolean;
|
|
608
|
+
loop: boolean;
|
|
609
|
+
volume: number;
|
|
610
|
+
muted: boolean;
|
|
611
|
+
readonly streamType: string;
|
|
612
|
+
readonly percent: number;
|
|
613
|
+
play(): void;
|
|
614
|
+
pause(): void;
|
|
615
|
+
stop(): void;
|
|
616
|
+
getPlayState(options: CallbackOptions<AudioState>): void;
|
|
617
|
+
onplay?: BridgeCallback;
|
|
618
|
+
onpause?: BridgeCallback;
|
|
619
|
+
onstop?: BridgeCallback;
|
|
620
|
+
onloadeddata?: BridgeCallback;
|
|
621
|
+
onended?: BridgeCallback;
|
|
622
|
+
ondurationchange?: BridgeCallback;
|
|
623
|
+
ontimeupdate?: BridgeCallback;
|
|
624
|
+
onerror?: BridgeCallback;
|
|
625
|
+
onctrlplayprev?: BridgeCallback;
|
|
626
|
+
onctrlplaynext?: BridgeCallback;
|
|
627
|
+
}
|
|
628
|
+
interface MediaSessionFeedback {
|
|
629
|
+
success?: BridgeCallback<[string]>;
|
|
630
|
+
fail?: BridgeFailCallback;
|
|
631
|
+
complete?: BridgeCallback;
|
|
632
|
+
}
|
|
633
|
+
interface MediaSession {
|
|
634
|
+
start(options: MediaSessionFeedback): void;
|
|
635
|
+
pause(options: MediaSessionFeedback): void;
|
|
636
|
+
stop(options: MediaSessionFeedback): void;
|
|
637
|
+
prev(options: MediaSessionFeedback): void;
|
|
638
|
+
next(options: MediaSessionFeedback): void;
|
|
639
|
+
increaseVolume(options: MediaSessionFeedback): void;
|
|
640
|
+
decreaseVolume(options: MediaSessionFeedback): void;
|
|
641
|
+
onEvent?: BridgeCallback<[string]>;
|
|
642
|
+
}
|
|
643
|
+
interface MediaSessionApi {
|
|
644
|
+
createSession(name: string): MediaSession;
|
|
645
|
+
}
|
|
646
|
+
interface RecordStartOptions {
|
|
647
|
+
duration?: number;
|
|
648
|
+
sampleRate?: number;
|
|
649
|
+
numberOfChannels?: number;
|
|
650
|
+
encodeBitRate?: number;
|
|
651
|
+
frameSize?: number;
|
|
652
|
+
format?: string;
|
|
653
|
+
success?: BridgeCallback<[BridgeValue]>;
|
|
654
|
+
fail?: BridgeFailCallback;
|
|
655
|
+
complete?: BridgeCallback;
|
|
656
|
+
}
|
|
657
|
+
interface RecordApi {
|
|
658
|
+
onframerecorded(callback: BridgeCallback<[BridgeValue]>): void;
|
|
659
|
+
start(options: RecordStartOptions): void;
|
|
660
|
+
stop(): void;
|
|
661
|
+
}
|
|
662
|
+
interface DebugApi {
|
|
663
|
+
enable(): Promise<number>;
|
|
664
|
+
disable(): Promise<number>;
|
|
665
|
+
getStatus(): Promise<number>;
|
|
666
|
+
}
|
|
667
|
+
interface PowerApi {
|
|
668
|
+
shutDown(options?: CallbackOptions<string>): void;
|
|
669
|
+
reboot(options?: CallbackOptions<string>): void;
|
|
670
|
+
}
|
|
671
|
+
interface PackageInfo {
|
|
672
|
+
packageName: string;
|
|
673
|
+
name: string;
|
|
674
|
+
icon: string;
|
|
675
|
+
installedPath: string;
|
|
676
|
+
manifest: string;
|
|
677
|
+
appType: string;
|
|
678
|
+
version: string;
|
|
679
|
+
installTime: string;
|
|
680
|
+
appSize?: number;
|
|
681
|
+
extra?: string;
|
|
682
|
+
}
|
|
683
|
+
interface PackageApi {
|
|
684
|
+
getAllPackageInfo(): PackageInfo[];
|
|
685
|
+
getPackageInfo(packageName: string): PackageInfo;
|
|
686
|
+
clearAppCache(packageName: string): number;
|
|
687
|
+
installPackage(options: {
|
|
688
|
+
path: string;
|
|
689
|
+
isForce?: boolean;
|
|
690
|
+
progress?: BridgeCallback<[string, number]>;
|
|
691
|
+
result?: BridgeCallback<[string, number, string]>;
|
|
692
|
+
}): void;
|
|
693
|
+
uninstallPackage(options: {
|
|
694
|
+
packageName: string;
|
|
695
|
+
isClearCache?: boolean;
|
|
696
|
+
result?: BridgeCallback<[string, number, string]>;
|
|
697
|
+
}): void;
|
|
698
|
+
}
|
|
699
|
+
interface ActivityApi {
|
|
700
|
+
startActivity(abilityName: string, params?: BridgeValue): number;
|
|
701
|
+
stopActivity(abilityName: string): number;
|
|
702
|
+
startService(serviceName: string, params?: BridgeValue): number;
|
|
703
|
+
stopService(serviceName: string): number;
|
|
704
|
+
bindService(serviceName: string, params: BridgeValue, connection: {
|
|
705
|
+
connectCallBack: BridgeCallback;
|
|
706
|
+
disconnectCallBack: BridgeCallback;
|
|
707
|
+
}): number;
|
|
708
|
+
unbindService(connectionId: number): void;
|
|
709
|
+
moveToBackground(enabled: boolean): boolean;
|
|
710
|
+
}
|
|
711
|
+
interface MessageChannelApi {
|
|
712
|
+
sendMessage(target: string, message: string): Promise<string>;
|
|
713
|
+
reply(requestId: number, message: string): void;
|
|
714
|
+
setReceiveRequestCallback(topic: string, callback: BridgeCallback<[number, string]>): void;
|
|
715
|
+
notifyMessage(topic: string, message: string): void;
|
|
716
|
+
setTopicListener(topic: string, callback: BridgeCallback<[string, string]>): void;
|
|
717
|
+
unsetTopicListener(topic: string): void;
|
|
718
|
+
unsetTopicListenerCb(topic: string, callback: BridgeCallback<[string, string]>): void;
|
|
719
|
+
createSession(peer: string): Promise<number>;
|
|
720
|
+
sessionSend(sessionId: number, message: string): void;
|
|
721
|
+
sessionClose(sessionId: number): void;
|
|
722
|
+
acceptSession(sessionId: number): void;
|
|
723
|
+
sessionOnData(sessionId: number, callback: BridgeCallback<[string]>): void;
|
|
724
|
+
readonly SESSION_REASON_CLOSE: 0;
|
|
725
|
+
readonly SESSION_REASON_CLOSE_PEER: 1;
|
|
726
|
+
readonly SESSION_REASON_PEER_SHUTDOWN: 2;
|
|
727
|
+
sessionOnClose(sessionId: number, callback: BridgeCallback<[number]>): void;
|
|
728
|
+
sessionOnReceive(topic: string, callback: BridgeCallback<[number, string]>): void;
|
|
729
|
+
print(message: string): void;
|
|
730
|
+
}
|
|
731
|
+
interface InterconnectReadyState {
|
|
732
|
+
status: 1 | 2 | number;
|
|
733
|
+
}
|
|
734
|
+
interface InterconnectDiagnosisResult {
|
|
735
|
+
status: 0 | 204 | 1000 | 1001 | number;
|
|
736
|
+
}
|
|
737
|
+
interface InterconnectError {
|
|
738
|
+
data?: string;
|
|
739
|
+
code?: number;
|
|
740
|
+
[key: string]: BridgeValue;
|
|
741
|
+
}
|
|
742
|
+
interface InterconnectMessage {
|
|
743
|
+
data?: BridgeValue;
|
|
744
|
+
status?: number;
|
|
745
|
+
isReconnected?: boolean;
|
|
746
|
+
code?: number;
|
|
747
|
+
[key: string]: BridgeValue;
|
|
748
|
+
}
|
|
749
|
+
interface InterconnectConnect {
|
|
750
|
+
getReadyState(options?: {
|
|
751
|
+
success?: BridgeCallback<[InterconnectReadyState]>;
|
|
752
|
+
fail?: BridgeCallback<[string | InterconnectError, number]>;
|
|
753
|
+
}): void;
|
|
754
|
+
diagnosis(options?: {
|
|
755
|
+
timeout?: number;
|
|
756
|
+
success?: BridgeCallback<[InterconnectDiagnosisResult]>;
|
|
757
|
+
fail?: BridgeCallback<[string | InterconnectError, number]>;
|
|
758
|
+
}): void;
|
|
759
|
+
send(options: {
|
|
760
|
+
data: Record<string, BridgeValue>;
|
|
761
|
+
success?: BridgeCallback;
|
|
762
|
+
fail?: BridgeCallback<[string | InterconnectError, number]>;
|
|
763
|
+
}): void;
|
|
764
|
+
onmessage?: BridgeCallback<[InterconnectMessage]>;
|
|
765
|
+
onopen?: BridgeCallback<[InterconnectMessage]>;
|
|
766
|
+
onclose?: BridgeCallback<[InterconnectMessage]>;
|
|
767
|
+
onerror?: BridgeCallback<[InterconnectMessage]>;
|
|
768
|
+
}
|
|
769
|
+
interface InterconnectApi {
|
|
770
|
+
instance(): InterconnectConnect;
|
|
771
|
+
}
|
|
772
|
+
interface BatteryStatus {
|
|
773
|
+
charging: boolean;
|
|
774
|
+
level: number;
|
|
775
|
+
}
|
|
776
|
+
interface BatteryApi {
|
|
777
|
+
getStatus(options?: CallbackOptions<BatteryStatus>): void;
|
|
778
|
+
}
|
|
779
|
+
interface BrightnessValue {
|
|
780
|
+
value: number;
|
|
781
|
+
}
|
|
782
|
+
interface BrightnessMode {
|
|
783
|
+
mode: 0 | 1 | number;
|
|
784
|
+
}
|
|
785
|
+
interface BrightnessApi {
|
|
786
|
+
getValue(options?: CallbackOptions<BrightnessValue>): void;
|
|
787
|
+
setValue(options: {
|
|
788
|
+
value: number;
|
|
789
|
+
} & CallbackOptions<void>): void;
|
|
790
|
+
getMode(options?: CallbackOptions<BrightnessMode>): void;
|
|
791
|
+
setMode(options: {
|
|
792
|
+
mode: 0 | 1 | number;
|
|
793
|
+
} & CallbackOptions<void>): void;
|
|
794
|
+
setKeepScreenOn(options: {
|
|
795
|
+
keepScreenOn: boolean;
|
|
796
|
+
} & CallbackOptions<void>): void;
|
|
797
|
+
}
|
|
798
|
+
type BLEAddressType = "PUBLIC" | "RANDOM" | "ANONYMOUS" | "UNKNOWN";
|
|
799
|
+
interface BLEScanFilter {
|
|
800
|
+
deviceId?: string;
|
|
801
|
+
name?: string;
|
|
802
|
+
serviceUuid?: string;
|
|
803
|
+
}
|
|
804
|
+
interface BLEScanOptions {
|
|
805
|
+
dutyMode?: number;
|
|
806
|
+
}
|
|
807
|
+
interface BLEScanResult {
|
|
808
|
+
deviceId: string;
|
|
809
|
+
name?: string;
|
|
810
|
+
serviceUuid?: string;
|
|
811
|
+
rssi?: number;
|
|
812
|
+
addressType?: BLEAddressType | string;
|
|
813
|
+
[key: string]: BridgeValue;
|
|
814
|
+
}
|
|
815
|
+
interface BLEStartScanOptions extends CallbackOptions<void> {
|
|
816
|
+
filters: BLEScanFilter[];
|
|
817
|
+
options?: BLEScanOptions;
|
|
818
|
+
}
|
|
819
|
+
interface BLEScanStateResult {
|
|
820
|
+
scanState: number;
|
|
821
|
+
}
|
|
822
|
+
interface BLEScanner {
|
|
823
|
+
startBLEScan(options: BLEStartScanOptions): void;
|
|
824
|
+
stopBLEScan(): void;
|
|
825
|
+
getScanState(options?: CallbackOptions<BLEScanStateResult>): void;
|
|
826
|
+
subscribeBLEDeviceFind(options?: {
|
|
827
|
+
callback?: BridgeCallback<[BLEScanResult[]]>;
|
|
828
|
+
fail?: BridgeFailCallback;
|
|
829
|
+
}): number;
|
|
830
|
+
unsubscribeBLEDeviceFind(subscribeId: number): void;
|
|
831
|
+
close(): void;
|
|
832
|
+
}
|
|
833
|
+
interface BLEGattService {
|
|
834
|
+
uuid?: string;
|
|
835
|
+
isPrimary?: boolean;
|
|
836
|
+
[key: string]: BridgeValue;
|
|
837
|
+
}
|
|
838
|
+
interface BLEGattCharacteristic {
|
|
839
|
+
serviceUuid?: string;
|
|
840
|
+
characteristicUuid?: string;
|
|
841
|
+
value?: BridgeValue;
|
|
842
|
+
properties?: BridgeValue;
|
|
843
|
+
[key: string]: BridgeValue;
|
|
844
|
+
}
|
|
845
|
+
interface BLEGattDescriptor {
|
|
846
|
+
serviceUuid?: string;
|
|
847
|
+
characteristicUuid?: string;
|
|
848
|
+
descriptorUuid?: string;
|
|
849
|
+
value?: BridgeValue;
|
|
850
|
+
[key: string]: BridgeValue;
|
|
851
|
+
}
|
|
852
|
+
interface BLEGattOptions<T = void> extends CallbackOptions<T> {
|
|
853
|
+
serviceUuid?: string;
|
|
854
|
+
characteristicUuid?: string;
|
|
855
|
+
descriptorUuid?: string;
|
|
856
|
+
value?: BridgeValue;
|
|
857
|
+
mtu?: number;
|
|
858
|
+
enable?: boolean;
|
|
859
|
+
}
|
|
860
|
+
interface BLEGattClientDevice {
|
|
861
|
+
connect(options?: CallbackOptions<void>): void;
|
|
862
|
+
disconnect(options?: CallbackOptions<void>): void;
|
|
863
|
+
close(): void;
|
|
864
|
+
getServices(options?: CallbackOptions<{
|
|
865
|
+
services: BLEGattService[];
|
|
866
|
+
}>): void;
|
|
867
|
+
readCharacteristicValue(options: BLEGattOptions<{
|
|
868
|
+
characteristic: BLEGattCharacteristic;
|
|
869
|
+
}>): void;
|
|
870
|
+
readDescriptorValue(options: BLEGattOptions<{
|
|
871
|
+
descriptor: BLEGattDescriptor;
|
|
872
|
+
}>): void;
|
|
873
|
+
writeCharacteristicValue(options: BLEGattOptions<void>): void;
|
|
874
|
+
writeDescriptorValue(options: BLEGattOptions<void>): void;
|
|
875
|
+
setBLEMtuSize(options: BLEGattOptions<void>): void;
|
|
876
|
+
setNotifyCharacteristicChanged(options: BLEGattOptions<void>): void;
|
|
877
|
+
getDeviceName(options?: CallbackOptions<{
|
|
878
|
+
name: string;
|
|
879
|
+
}>): void;
|
|
880
|
+
getRssiValue(options?: CallbackOptions<{
|
|
881
|
+
rssi: number;
|
|
882
|
+
}>): void;
|
|
883
|
+
onBLECharacteristicChange?: BridgeCallback<[BLEGattCharacteristic]>;
|
|
884
|
+
onBLEConnectionStateChange?: BridgeCallback<[BridgeValue]>;
|
|
885
|
+
}
|
|
886
|
+
interface BluetoothBLEApi {
|
|
887
|
+
createScanner(): BLEScanner;
|
|
888
|
+
createGattClientDevice(deviceId: string, addressType?: BLEAddressType): BLEGattClientDevice;
|
|
889
|
+
}
|
|
890
|
+
declare const ScanDuty: {
|
|
891
|
+
readonly SCAN_MODE_LOW_POWER: 0;
|
|
892
|
+
readonly SCAN_MODE_BALANCED: 1;
|
|
893
|
+
readonly SCAN_MODE_LOW_LATENCY: 2;
|
|
894
|
+
};
|
|
895
|
+
declare const ScanState: {
|
|
896
|
+
readonly STATE_NON_SCAN: 0;
|
|
897
|
+
readonly STATE_SCANING: 1;
|
|
898
|
+
};
|
|
899
|
+
interface JumpAppApi {
|
|
900
|
+
jumpApp(packageName: string, paramsOrPath?: string): void;
|
|
901
|
+
launchQuickApp(packageName: string): void;
|
|
902
|
+
}
|
|
903
|
+
interface VelaApi {
|
|
904
|
+
locale: {
|
|
905
|
+
get(): LocaleInfo;
|
|
906
|
+
};
|
|
907
|
+
exchange: ExchangeApi;
|
|
908
|
+
crypto: CryptoApi;
|
|
909
|
+
configuration: {
|
|
910
|
+
getLocale(): LocaleInfo;
|
|
911
|
+
};
|
|
912
|
+
zlib: ZlibApi;
|
|
913
|
+
serviceclient: ServiceClientApi;
|
|
914
|
+
event: SystemEventApi;
|
|
915
|
+
folme: FolmeApi;
|
|
916
|
+
volume: VolumeApi;
|
|
917
|
+
mediaSession: MediaSessionApi;
|
|
918
|
+
protobuf: ProtobufApi;
|
|
919
|
+
mqttmessage: MessageCodecApi;
|
|
920
|
+
debug: DebugApi;
|
|
921
|
+
interconnect: InterconnectApi;
|
|
922
|
+
battery: BatteryApi;
|
|
923
|
+
brightness: BrightnessApi;
|
|
924
|
+
bluetoothBLE: BluetoothBLEApi;
|
|
925
|
+
jumpApp: JumpAppApi;
|
|
926
|
+
internals: VelaInternalsApi;
|
|
927
|
+
}
|
|
928
|
+
interface SystemApi {
|
|
929
|
+
app: AppApi;
|
|
930
|
+
prompt: PromptApi;
|
|
931
|
+
router: RouterApi;
|
|
932
|
+
storage: StorageApi;
|
|
933
|
+
network: NetworkApi;
|
|
934
|
+
cipher: CipherApi;
|
|
935
|
+
sensor: SensorApi;
|
|
936
|
+
geolocation: GeolocationApi;
|
|
937
|
+
vibrator: VibratorApi;
|
|
938
|
+
file: FileApi;
|
|
939
|
+
zip: ZipApi;
|
|
940
|
+
device: DeviceApi;
|
|
941
|
+
audio: AudioApi;
|
|
942
|
+
record: RecordApi;
|
|
943
|
+
vela: VelaApi;
|
|
944
|
+
}
|
|
945
|
+
interface VelaInternalsApi {
|
|
946
|
+
power: PowerApi;
|
|
947
|
+
package: PackageApi;
|
|
948
|
+
activity: ActivityApi;
|
|
949
|
+
messageChannel: MessageChannelApi;
|
|
950
|
+
}
|
|
951
|
+
declare const router: RouterApi;
|
|
952
|
+
declare const app: AppApi;
|
|
953
|
+
declare const prompt: PromptApi;
|
|
954
|
+
declare const network: NetworkApi;
|
|
955
|
+
declare const storage: StorageApi;
|
|
956
|
+
declare const cipher: CipherApi;
|
|
957
|
+
declare const sensor: SensorApi;
|
|
958
|
+
declare const geolocation: GeolocationApi;
|
|
959
|
+
declare const vibrator: VibratorApi;
|
|
960
|
+
declare const file: FileApi;
|
|
961
|
+
declare const zip: ZipApi;
|
|
962
|
+
declare const device: DeviceApi;
|
|
963
|
+
declare const audio: AudioApi;
|
|
964
|
+
declare const record: RecordApi;
|
|
965
|
+
declare const velaLocale: {
|
|
966
|
+
get(): LocaleInfo;
|
|
967
|
+
};
|
|
968
|
+
declare const velaExchange: ExchangeApi;
|
|
969
|
+
declare const velaCrypto: CryptoApi;
|
|
970
|
+
declare const velaConfiguration: {
|
|
971
|
+
getLocale(): LocaleInfo;
|
|
972
|
+
};
|
|
973
|
+
declare const velaZlib: ZlibApi;
|
|
974
|
+
declare const velaServiceClient: ServiceClientApi;
|
|
975
|
+
declare const velaEvent: SystemEventApi;
|
|
976
|
+
declare const velaFolme: FolmeApi;
|
|
977
|
+
declare const velaVolume: VolumeApi;
|
|
978
|
+
declare const velaMediaSession: MediaSessionApi;
|
|
979
|
+
declare const velaProtobuf: ProtobufApi;
|
|
980
|
+
declare const velaMqttMessage: MessageCodecApi;
|
|
981
|
+
declare const velaDebug: DebugApi;
|
|
982
|
+
declare const velaInterconnect: InterconnectApi;
|
|
983
|
+
declare const velaBattery: BatteryApi;
|
|
984
|
+
declare const velaBrightness: BrightnessApi;
|
|
985
|
+
declare const velaBluetoothBLE: BluetoothBLEApi;
|
|
986
|
+
declare const velaJumpApp: JumpAppApi;
|
|
987
|
+
declare const velaInternals: VelaInternalsApi;
|
|
988
|
+
declare const VelaInternals: VelaInternalsApi;
|
|
989
|
+
declare const vela: VelaApi;
|
|
990
|
+
declare const system: SystemApi;
|
|
991
|
+
//#endregion
|
|
992
|
+
export { AccelerometerData, ActivityApi, AppApi, AppInfo, AppSource, AudioApi, AudioMetaInfo, AudioState, BLEAddressType, BLEGattCharacteristic, BLEGattClientDevice, BLEGattDescriptor, BLEGattOptions, BLEGattService, BLEScanFilter, BLEScanOptions, BLEScanResult, BLEScanStateResult, BLEScanner, BLEStartScanOptions, BatteryApi, BatteryStatus, BluetoothBLEApi, BridgeCallback, BridgeFailCallback, BridgeValue, BrightnessApi, BrightnessMode, BrightnessValue, CallbackOptions, CipherAESOptions, CipherApi, CipherDigestOptions, CipherMd5Options, CipherRSAOptions, CipherVerifyOptions, CompassData, CryptoApi, CryptoCryptOptions, CryptoHashDigestOptions, CryptoHmacDigestOptions, CryptoSignOptions, CryptoVerifyOptions, DebugApi, DeviceApi, DeviceCommonOptions, DeviceInfo, DownloadCompleteOptions, DownloadCompleteSuccess, DownloadNotifyData, DownloadOptions, DownloadSuccess, ExchangeApi, ExchangeOptions, FetchOptions, FileApi, FileCallbacks, FileGetOptions, FileListOptions, FileMkdirOptions, FileMoveOptions, FileReadArrayBufferOptions, FileReadTextOptions, FileUriOptions, FileWriteArrayBufferOptions, FileWriteTextOptions, FolmeAnimationOptions, FolmeApi, GenericSensorSubscribeOptions, GeolocationApi, GeolocationOptions, InterconnectApi, InterconnectConnect, InterconnectDiagnosisResult, InterconnectError, InterconnectMessage, InterconnectReadyState, JumpAppApi, LightData, LocaleInfo, LocationInfo, MediaSession, MediaSessionApi, MediaSessionFeedback, MessageChannelApi, MessageCodecApi, NetworkApi, NetworkType, NetworkTypeInfo, PackageApi, PackageInfo, PowerApi, PromptApi, PromptDialogOptions, PromptDialogResult, PromptToastOptions, ProtobufApi, ProtobufLoadOptions, ProtobufRoot, ProtobufType, ProximityData, RecordApi, RecordStartOptions, RouteObject, RouteStack, RouteState, RouterApi, RouterBackOptions, ScalarSensorData, ScanDuty, ScanState, SensorApi, SensorCallbackOptions, SensorRecentDataOptions, ServiceClientApi, ServiceClientConnectOptions, ServiceInstance, StorageApi, StorageDeleteOptions, StorageGetOptions, StorageKeyOptions, StorageSetOptions, SystemApi, SystemEventApi, UploadFileOptions, UploadProgress, UploadSuccess, UploadTask, VelaApi, VelaInternals, VelaInternalsApi, VibrateOptions, VibrateStartOptions, VibratorApi, VolumeApi, VolumeValue, ZipApi, ZlibApi, app, audio, cipher, device, file, geolocation, network, prompt, record, router, sensor, storage, system, vela, velaBattery, velaBluetoothBLE, velaBrightness, velaConfiguration, velaCrypto, velaDebug, velaEvent, velaExchange, velaFolme, velaInterconnect, velaInternals, velaJumpApp, velaLocale, velaMediaSession, velaMqttMessage, velaProtobuf, velaServiceClient, velaVolume, velaZlib, vibrator, zip };
|