@dcloudio/uni-app-x 0.7.90 → 0.7.91

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 (147) hide show
  1. package/package.json +1 -1
  2. package/types/dom2-internal/UniElement.d.ts +9 -0
  3. package/types/dom2-internal/UniNativeBaseView.d.ts +6 -7
  4. package/types/dom2-internal/UniNativeDefines.d.ts +2 -1
  5. package/types/dom2-internal/UniNativeRichTextNativelView.d.ts +15 -0
  6. package/types/dom2-internal/UniPage.d.ts +11 -0
  7. package/types/dom2-internal/UniRichTextNativeEement.d.ts +15 -0
  8. package/types/dom2-internal/global.d.ts +2 -0
  9. package/types/dom2-internal/index.d.ts +3 -0
  10. package/types/dom2-internal/sharedData.d.ts +5 -1
  11. package/types/native/CSSStyleDeclaration.d.ts +20 -18
  12. package/types/native/CanvasRenderingContext2D.d.ts +1872 -905
  13. package/types/native/DrawableContext.d.ts +214 -55
  14. package/types/native/IUniElement.d.ts +400 -419
  15. package/types/native/UniPage.d.ts +74 -0
  16. package/types/native/UniResizeObserver.d.ts +332 -2
  17. package/types/native/global.d.ts +4 -0
  18. package/types/node_modules/.package-lock.json +20 -0
  19. package/types/node_modules/typescript/LICENSE.txt +55 -0
  20. package/types/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  21. package/types/node_modules/typescript/bin/tsc +2 -0
  22. package/types/node_modules/typescript/bin/tsserver +2 -0
  23. package/types/node_modules/typescript/lib/cancellationToken.js +90 -0
  24. package/types/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +1880 -0
  25. package/types/node_modules/typescript/lib/de/diagnosticMessages.generated.json +1880 -0
  26. package/types/node_modules/typescript/lib/es/diagnosticMessages.generated.json +1880 -0
  27. package/types/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +1880 -0
  28. package/types/node_modules/typescript/lib/it/diagnosticMessages.generated.json +1880 -0
  29. package/types/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +1880 -0
  30. package/types/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +1880 -0
  31. package/types/node_modules/typescript/lib/lib.d.ts +22 -0
  32. package/types/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
  33. package/types/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  34. package/types/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +33 -0
  35. package/types/node_modules/typescript/lib/lib.dom.d.ts +28596 -0
  36. package/types/node_modules/typescript/lib/lib.dom.iterable.d.ts +475 -0
  37. package/types/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  38. package/types/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  39. package/types/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  40. package/types/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  41. package/types/node_modules/typescript/lib/lib.es2015.iterable.d.ts +495 -0
  42. package/types/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  43. package/types/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  44. package/types/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  45. package/types/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  46. package/types/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  47. package/types/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  48. package/types/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  49. package/types/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  50. package/types/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  51. package/types/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
  52. package/types/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  53. package/types/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  54. package/types/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  55. package/types/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  56. package/types/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  57. package/types/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  58. package/types/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  59. package/types/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  60. package/types/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +43 -0
  61. package/types/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  62. package/types/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  63. package/types/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  64. package/types/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  65. package/types/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  66. package/types/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  67. package/types/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  68. package/types/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  69. package/types/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  70. package/types/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  71. package/types/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  72. package/types/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  73. package/types/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
  74. package/types/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  75. package/types/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  76. package/types/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  77. package/types/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  78. package/types/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  79. package/types/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  80. package/types/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  81. package/types/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
  82. package/types/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +37 -0
  83. package/types/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  84. package/types/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  85. package/types/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  86. package/types/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  87. package/types/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  88. package/types/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  89. package/types/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  90. package/types/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
  91. package/types/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
  92. package/types/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  93. package/types/node_modules/typescript/lib/lib.es2022.intl.d.ts +117 -0
  94. package/types/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  95. package/types/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  96. package/types/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
  97. package/types/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  98. package/types/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  99. package/types/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  100. package/types/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  101. package/types/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  102. package/types/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  103. package/types/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
  104. package/types/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  105. package/types/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  106. package/types/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
  107. package/types/node_modules/typescript/lib/lib.esnext.d.ts +28 -0
  108. package/types/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  109. package/types/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
  110. package/types/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  111. package/types/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  112. package/types/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
  113. package/types/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
  114. package/types/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
  115. package/types/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
  116. package/types/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  117. package/types/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +33 -0
  118. package/types/node_modules/typescript/lib/lib.webworker.d.ts +9431 -0
  119. package/types/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  120. package/types/node_modules/typescript/lib/lib.webworker.iterable.d.ts +276 -0
  121. package/types/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +1880 -0
  122. package/types/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +1880 -0
  123. package/types/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +1880 -0
  124. package/types/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +1880 -0
  125. package/types/node_modules/typescript/lib/tsc.js +129741 -0
  126. package/types/node_modules/typescript/lib/tsserver.js +621 -0
  127. package/types/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  128. package/types/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  129. package/types/node_modules/typescript/lib/typesMap.json +497 -0
  130. package/types/node_modules/typescript/lib/typescript.d.ts +11240 -0
  131. package/types/node_modules/typescript/lib/typescript.js +194910 -0
  132. package/types/node_modules/typescript/lib/typingsInstaller.js +236 -0
  133. package/types/node_modules/typescript/lib/watchGuard.js +53 -0
  134. package/types/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +1880 -0
  135. package/types/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +1880 -0
  136. package/types/node_modules/typescript/package.json +116 -0
  137. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +2 -2
  138. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +10 -0
  139. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +5 -0
  140. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +141 -71
  141. package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +16 -8
  142. package/types/uni/uts-plugin-component/lib/uni-canvas-dom2/utssdk/interface.d.ts +16 -8
  143. package/types/uni/uts-plugin-component/lib/uni-progress-global/utssdk/interface.d.ts +1 -1
  144. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +18 -9
  145. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/interface.d.ts +131 -110
  146. package/types/uni-cloud/index.d.ts +3 -1
  147. package/types/uni-cloud/interface.d.ts +305 -62
@@ -291,11 +291,11 @@ type UniCloudUserInfo = {
291
291
  };
292
292
 
293
293
  declare class UniCloudError extends Error {
294
- code: any;
295
- errMsg: string;
296
- errCode: any;
297
- errSubject?: string;
298
- requestId?: string;
294
+ code: any
295
+ errMsg: string
296
+ errCode: any
297
+ errSubject?: string
298
+ requestId?: string
299
299
  /**
300
300
  * 错误详情
301
301
  * @description 合并查询请求
@@ -328,55 +328,72 @@ declare class UniCloudError extends Error {
328
328
  * }
329
329
  * }
330
330
  */
331
- detail?: UTSJSONObject;
331
+ detail?: UTSJSONObject
332
+
332
333
  constructor(message: string, code: string, subject?: string, options?: UTSJSONObject);
333
- private _init;
334
+
335
+ private _init
336
+
334
337
  toJson(): UTSJSONObject;
335
338
  }
336
339
 
337
340
  declare class EventEmitter<T> {
338
- private _callbacks;
341
+ private _callbacks
342
+
339
343
  constructor();
344
+
340
345
  on(eventName: string, callback: UniCloudCallback<T>): void;
346
+
341
347
  off(eventName: string, callback: UniCloudCallback<T>): void;
348
+
342
349
  emit(eventName: string, arg: T): void;
343
350
  }
344
351
 
345
352
  declare class UniCloudUnified {
346
- config: UniCloudInitOptions;
347
- private _client;
348
- private _baseSystemInfo;
349
- private _hasBaseSystemInfo;
350
- private _provider;
351
- private _spaceId;
352
- private _prepareLocalServerHub;
353
- responseEventEmitter: EventEmitter<UniCloudResponseEvent>;
354
- refreshTokenEventEmitter: EventEmitter<UniCloudRefreshTokenEvent>;
353
+ config: UniCloudInitOptions
354
+ private _client
355
+ private _baseSystemInfo
356
+ private _hasBaseSystemInfo
357
+ private _provider
358
+ private _spaceId
359
+ private _prepareLocalServerHub
360
+ responseEventEmitter: EventEmitter<UniCloudResponseEvent>
361
+ refreshTokenEventEmitter: EventEmitter<UniCloudRefreshTokenEvent>
362
+
355
363
  constructor(options: UniCloudInitOptions);
356
- private _getBaseSystemInfo;
357
- private _getSystemInfo;
358
- private _getUniIdToken;
359
- private _isServerOk;
360
- private _pingLocalServer;
361
- private _prepareLocalServer;
362
- private _checkFunction;
363
- private _prepareFunction;
364
- private _getCallFunctionOptions;
365
- private _callCloudFunction;
366
- private _callLocalFunction;
364
+
365
+ private _getBaseSystemInfo
366
+ private _getSystemInfo
367
+ private _getUniIdToken
368
+ private _isServerOk
369
+ private _pingLocalServer
370
+ private _prepareLocalServer
371
+ private _checkFunction
372
+ private _prepareFunction
373
+ private _getCallFunctionOptions
374
+ private _callCloudFunction
375
+ private _callLocalFunction
376
+
367
377
  callFunction<T = UTSJSONObject>(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult<T>>;
378
+
368
379
  uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
380
+
369
381
  getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
382
+
370
383
  importObject(objectName: string, options: UniCloudImportObjectOptions): UniCloudCloudObjectCaller;
371
384
  }
372
385
 
373
386
  declare class InternalUniCloudCloudObjectCaller {
374
- protected _obj: InternalUniCloudCloudObject;
387
+ protected _obj: InternalUniCloudCloudObject
388
+
375
389
  constructor(obj: InternalUniCloudCloudObject);
390
+
376
391
  protected _getArgs(...args: Array<any | null>): Array<any | null>;
377
392
  }
378
393
 
379
- type UniCloudCloudObjectCaller = InternalUniCloudCloudObjectCaller & Record<string, <T = UTSJSONObject>(...args: Array<any | null>) => Promise<T>>;
394
+ type UniCloudCloudObjectCaller =
395
+ InternalUniCloudCloudObjectCaller
396
+ & Record<string, <T = UTSJSONObject>(...args: Array<any | null>) => Promise<T>>;
380
397
 
381
398
  type UniCloudImportObjectLoadingOptions = {
382
399
  /**
@@ -444,154 +461,226 @@ type UniCloudImportObjectOptions = {
444
461
  */
445
462
  secretMethods?: Record<string, SecretType>;
446
463
  };
464
+
447
465
  declare class InternalUniCloudCloudObject {
448
- private _name;
449
- private _client;
450
- private _customUI;
451
- private _loadingUITitle;
452
- private _loadingUIMask;
453
- private _errorUIType;
454
- private _errorUIRetry;
466
+ private _name
467
+ private _client
468
+ private _customUI
469
+ private _loadingUITitle
470
+ private _loadingUIMask
471
+ private _errorUIType
472
+ private _errorUIRetry
473
+
455
474
  constructor(client: UniCloudUnified, name: string, options: UniCloudImportObjectOptions);
456
- private _initUIOptions;
457
- private _internalCallMethod;
475
+
476
+ private _initUIOptions
477
+ private _internalCallMethod
478
+
458
479
  callMethod<T = UTSJSONObject>(methodName: string, args: Array<any | null>): Promise<T>;
459
480
  }
460
481
 
461
482
  declare class Stage {
462
- $method: string;
463
- $param?: Array<any> | null;
483
+ $method: string
484
+ $param?: Array<any> | null
485
+
464
486
  constructor($method: string, $param?: Array<any> | null);
465
487
  }
488
+
466
489
  declare class Stages {
467
- private _client?;
468
- private _stages;
469
- private _isNew;
490
+ private _client?
491
+ private _stages
492
+ private _isNew
493
+
470
494
  constructor(stages?: Array<Stage>, isNew?: boolean, client?: UniCloudUnified | null);
495
+
471
496
  push(stage: Stage): Stages;
497
+
472
498
  toJSON(): UTSJSONObject;
473
- private _emitResponse;
499
+
500
+ private _emitResponse
501
+
474
502
  sendAdd(): Promise<UniCloudDBAddResult>;
503
+
475
504
  sendBatchAdd(): Promise<UniCloudDBBatchAddResult>;
505
+
476
506
  sendUpdate(): Promise<UniCloudDBUpdateResult>;
507
+
477
508
  sendRemove(): Promise<UniCloudDBRemoveResult>;
509
+
478
510
  sendGet(): Promise<UniCloudDBGetResult>;
511
+
479
512
  sendCount(): Promise<UniCloudDBCountResult>;
480
- private _send;
513
+
514
+ private _send
481
515
  }
482
516
 
483
517
  declare class UniCloudDBQuery {
484
- private _client;
485
- private _stages;
518
+ private _client
519
+ private _stages
520
+
486
521
  constructor(client: UniCloudUnified, stages: Stages);
522
+
487
523
  get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
524
+
488
525
  count(): Promise<UniCloudDBCountResult>;
526
+
489
527
  getTemp(): UTSJSONObject;
528
+
490
529
  field(filed: string): UniCloudDBQuery;
530
+
491
531
  skip(num: number): UniCloudDBQuery;
532
+
492
533
  limit(num: number): UniCloudDBQuery;
534
+
493
535
  orderBy(order: string): UniCloudDBQuery;
536
+
494
537
  groupBy(field: string): UniCloudDBQuery;
538
+
495
539
  groupField(field: string): UniCloudDBQuery;
540
+
496
541
  distinct(field: string): UniCloudDBQuery;
542
+
497
543
  geoNear(options: UTSJSONObject): UniCloudDBQuery;
498
544
  }
499
545
 
500
546
  declare class UniCloudDBFilter {
501
- private _client;
502
- private _stages;
547
+ private _client
548
+ private _stages
549
+
503
550
  constructor(client: UniCloudUnified, stages: Stages);
551
+
504
552
  get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
553
+
505
554
  count(): Promise<UniCloudDBCountResult>;
555
+
506
556
  update(data: UTSJSONObject): Promise<UniCloudDBUpdateResult>;
557
+
507
558
  remove(): Promise<UniCloudDBRemoveResult>;
559
+
508
560
  getTemp(): UTSJSONObject;
561
+
509
562
  where(condition: any): UniCloudDBFilter;
563
+
510
564
  doc(docId: string): UniCloudDBFilter;
565
+
511
566
  field(filed: string): UniCloudDBQuery;
567
+
512
568
  skip(num: number): UniCloudDBQuery;
569
+
513
570
  limit(num: number): UniCloudDBQuery;
571
+
514
572
  orderBy(order: string): UniCloudDBQuery;
573
+
515
574
  groupBy(field: string): UniCloudDBQuery;
575
+
516
576
  groupField(field: string): UniCloudDBQuery;
577
+
517
578
  distinct(field: string): UniCloudDBQuery;
579
+
518
580
  geoNear(options: UTSJSONObject): UniCloudDBQuery;
519
581
  }
520
582
 
521
583
  declare class Collection {
522
- private _client;
523
- private _collectionList;
524
- private _stages;
584
+ private _client
585
+ private _collectionList
586
+ private _stages
587
+
525
588
  constructor(client: UniCloudUnified, collectionList: Array<any>);
589
+
526
590
  where(condition: any): UniCloudDBFilter;
591
+
527
592
  doc(docId: string): UniCloudDBFilter;
593
+
528
594
  aggregate(): UniCloudDBFilter;
595
+
529
596
  foreignKey(foreignKey: string): UniCloudDBFilter;
597
+
530
598
  add(data: UTSJSONObject): Promise<UniCloudDBAddResult>;
531
599
  add(data: UTSJSONObject[]): Promise<UniCloudDBBatchAddResult>;
600
+
532
601
  get(arg?: UTSJSONObject | null): Promise<UniCloudDBGetResult>;
602
+
533
603
  count(): Promise<UniCloudDBCountResult>;
604
+
534
605
  getTemp(): UTSJSONObject;
606
+
535
607
  field(filed: string): UniCloudDBQuery;
608
+
536
609
  skip(num: number): UniCloudDBQuery;
610
+
537
611
  limit(num: number): UniCloudDBQuery;
612
+
538
613
  orderBy(order: string): UniCloudDBQuery;
539
614
  }
540
615
 
541
616
  declare class UniCloudDBCommand {
542
- private static _push;
617
+ private static _push
618
+
543
619
  /**
544
620
  * 查询操作符,用于表示逻辑 "与" 的关系,表示需同时满足多个查询筛选条件
545
621
  */
546
622
  static and(args: Array<UTSJSONObject>): UTSJSONObject;
623
+
547
624
  /**
548
625
  * 查询操作符,用于表示逻辑 "或" 的关系,表示需同时满足多个查询筛选条件
549
626
  */
550
627
  static or(args: Array<UTSJSONObject>): UTSJSONObject;
628
+
551
629
  /**
552
630
  * 查询操作符,用于表示逻辑 "非" 的关系,表示需不满足指定的条件
553
631
  */
554
632
  static not(arg: UTSJSONObject): UTSJSONObject;
633
+
555
634
  /**
556
635
  * 查询操作符,用于表示逻辑 "都不" 的关系,表示需不满足指定的所有条件
557
636
  */
558
637
  static nor(args: Array<UTSJSONObject>): UTSJSONObject;
638
+
559
639
  /**
560
640
  * 查询筛选条件,表示字段等于某个值
561
641
  */
562
642
  static eq(arg: any): UTSJSONObject;
643
+
563
644
  /**
564
645
  * 查询筛选条件,表示字段不等于某个值
565
646
  */
566
647
  static neq(arg: any): UTSJSONObject;
648
+
567
649
  /**
568
650
  * 查询筛选操作符,表示需小于指定值
569
651
  */
570
652
  static lt(arg: any): UTSJSONObject;
653
+
571
654
  /**
572
655
  * 查询筛选操作符,表示需小于或等于指定值
573
656
  */
574
657
  static lte(arg: any): UTSJSONObject;
658
+
575
659
  /**
576
660
  * 查询筛选操作符,表示需大于指定值
577
661
  */
578
662
  static gt(arg: any): UTSJSONObject;
663
+
579
664
  /**
580
665
  * 查询筛选操作符,表示需大于或等于指定值
581
666
  */
582
667
  static gte(arg: any): UTSJSONObject;
668
+
583
669
  /**
584
670
  * 查询筛选操作符,表示要求值在给定的数组内
585
671
  */
586
672
  static in(arr: Array<any>): UTSJSONObject;
673
+
587
674
  /**
588
675
  * 查询筛选操作符,表示要求值不在给定的数组内
589
676
  */
590
677
  static nin(arr: Array<any>): UTSJSONObject;
678
+
591
679
  /**
592
680
  * 判断字段是否存在
593
681
  */
594
682
  static exists(arg: boolean): UTSJSONObject;
683
+
595
684
  /**
596
685
  * 查询筛选操作符,给定除数 divisor 和余数 remainder
597
686
  * @param divisor 除数
@@ -599,26 +688,32 @@ declare class UniCloudDBCommand {
599
688
  * @returns
600
689
  */
601
690
  static mod(divisor: number, remainder: number): UTSJSONObject;
691
+
602
692
  /**
603
693
  * 数组查询操作符。用于数组字段的查询筛选条件,要求数组字段中包含给定数组的所有元素
604
694
  */
605
695
  static all(arr: Array<any>): UTSJSONObject;
696
+
606
697
  /**
607
698
  * 用于数组字段的查询筛选条件,要求数组中包含至少一个满足 elemMatch 给定的所有条件的元素
608
699
  */
609
700
  static elemMatch(arg: UTSJSONObject): UTSJSONObject;
701
+
610
702
  /**
611
703
  * 更新操作符,用于数组字段的查询筛选条件,要求数组长度为给定值
612
704
  */
613
705
  static size(arg: number): UTSJSONObject;
706
+
614
707
  /**
615
708
  * 按从近到远的顺序,找出字段值在给定点的附近的记录
616
709
  */
617
710
  static geoNear(arg: UTSJSONObject): UTSJSONObject;
711
+
618
712
  /**
619
713
  * 找出字段值在指定区域内的记录,无排序。指定的区域必须是多边形(Polygon)或多边形集合(MultiPolygon)
620
714
  */
621
715
  static geoWithin(arg: UTSJSONObject): UTSJSONObject;
716
+
622
717
  /**
623
718
  * 找出给定的地理位置图形相交的记录
624
719
  */
@@ -628,45 +723,57 @@ declare class UniCloudDBCommand {
628
723
  declare class Geometry extends UTSJSONObject {
629
724
  constructor(arg: UTSJSONObject);
630
725
  }
726
+
631
727
  declare class GeoPoint extends Geometry {
632
728
  constructor(lat: number, lng: number);
633
729
  }
730
+
634
731
  declare class GeoLineString extends Geometry {
635
732
  constructor(points: Array<GeoPoint>);
636
733
  }
734
+
637
735
  declare class GeoPolygon extends Geometry {
638
736
  constructor(lines: Array<GeoLineString>);
639
737
  }
738
+
640
739
  declare class GeoMultiPoint extends Geometry {
641
740
  constructor(points: Array<GeoPoint>);
642
741
  }
742
+
643
743
  declare class GeoMultiLineString extends Geometry {
644
744
  constructor(lines: Array<GeoLineString>);
645
745
  }
746
+
646
747
  declare class GeoMultiPolygon extends Geometry {
647
748
  constructor(polygons: Array<GeoPolygon>);
648
749
  }
750
+
649
751
  declare class UniCloudDBGeo {
650
752
  /**
651
753
  * 地理位置点
652
754
  */
653
755
  static get Point(): typeof GeoPoint;
756
+
654
757
  /**
655
758
  * 地理路径,是由两个或者更多的 Point 组成的线段
656
759
  */
657
760
  static get LineString(): typeof GeoLineString;
761
+
658
762
  /**
659
763
  * 地理上的一个多边形(有洞或无洞均可),它是由一个或多个闭环 LineString 组成的几何图形
660
764
  */
661
765
  static get Polygon(): typeof GeoPolygon;
766
+
662
767
  /**
663
768
  * 多个地理位置点 Point 的集合
664
769
  */
665
770
  static get MultiPoint(): typeof GeoMultiPoint;
771
+
666
772
  /**
667
773
  * 多个地理路径 LineString 的集合
668
774
  */
669
775
  static get MultiLineString(): typeof GeoMultiLineString;
776
+
670
777
  /**
671
778
  * 多个地理多边形 Polygon 的集合
672
779
  */
@@ -674,11 +781,16 @@ declare class UniCloudDBGeo {
674
781
  }
675
782
 
676
783
  declare class Database {
677
- private _client;
784
+ private _client
785
+
678
786
  constructor(client: UniCloudUnified);
787
+
679
788
  collection(...args: Array<any>): Collection;
789
+
680
790
  get command(): typeof UniCloudDBCommand;
791
+
681
792
  get Geo(): typeof UniCloudDBGeo;
793
+
682
794
  /**
683
795
  * 合并查询请求
684
796
  * @description 合并查询请求
@@ -755,19 +867,23 @@ type UniCloudConnectWebSocketOptions = {
755
867
 
756
868
  declare class SSEChannel implements IJSONStringify {
757
869
  constructor();
870
+
758
871
  /**
759
872
  * @description 开启通道,注意只有开启之后才能把SSEChannel实例传入云函数
760
873
  */
761
874
  open(): Promise<void>;
875
+
762
876
  toJSON(): {
763
877
  appId: string;
764
878
  pushClientId: string;
765
879
  seqId: string;
766
880
  };
881
+
767
882
  /**
768
883
  * @description 关闭通道
769
884
  */
770
885
  close(): void;
886
+
771
887
  /**
772
888
  * @description 监听消息接收事件
773
889
  */
@@ -788,6 +904,7 @@ declare class SSEChannel implements IJSONStringify {
788
904
  * @description 监听连接错误事件
789
905
  */
790
906
  on(event: 'error', callback: (error: UniCloudError) => void): void;
907
+
791
908
  /**
792
909
  * @description 取消监听消息接收事件
793
910
  */
@@ -810,13 +927,26 @@ declare class SSEChannel implements IJSONStringify {
810
927
  off(event: 'error', callback: (error: UniCloudError) => void): void;
811
928
  }
812
929
 
930
+
931
+ /** 故障切换事件回调参数 */
932
+ type UniCloudFailoverEvent = {
933
+ /** 是否启用故障切换 */
934
+ isEnabled: boolean
935
+ /** 状态是否有变化 */
936
+ hasStatusChanged: boolean
937
+ /** 备用服务空间配置 */
938
+ failoverSpace?: UniCloudInitOptions
939
+ }
940
+
813
941
  declare class UniCloud {
814
- private _client;
815
- private _provider;
816
- private _spaceId;
817
- config: UniCloudInitOptions;
818
- mixinDatacom: typeof mixinDatacom;
942
+ private _client
943
+ private _provider
944
+ private _spaceId
945
+ config: UniCloudInitOptions
946
+ mixinDatacom: typeof mixinDatacom
947
+
819
948
  constructor(options: UniCloudInitOptions);
949
+
820
950
  // /**
821
951
  // * 连接其他服务空间
822
952
  // * @uniPlatform {
@@ -904,6 +1034,7 @@ declare class UniCloud {
904
1034
  * }
905
1035
  */
906
1036
  callFunction<T = UTSJSONObject>(options: UniCloudCallFunctionOptions): Promise<UniCloudCallFunctionResult<T>>;
1037
+
907
1038
  /**
908
1039
  * 上传文件到云存储
909
1040
  * @description 上传文件到云存储
@@ -937,6 +1068,7 @@ declare class UniCloud {
937
1068
  * }
938
1069
  */
939
1070
  uploadFile(options: UniCloudUploadFileOptions): Promise<UniCloudUploadFileResult>;
1071
+
940
1072
  /**
941
1073
  * 获取文件临时URL
942
1074
  * @description 获取文件临时URL
@@ -970,6 +1102,7 @@ declare class UniCloud {
970
1102
  * }
971
1103
  */
972
1104
  getTempFileURL(options: UniCloudGetTempFileURLOptions): Promise<UniCloudGetTempFileURLResult>;
1105
+
973
1106
  /**
974
1107
  * 引用云对象
975
1108
  * @description 引用云对象
@@ -1007,6 +1140,7 @@ declare class UniCloud {
1007
1140
  * }
1008
1141
  */
1009
1142
  importObject(objectName: string | string.CloudObjectString, options?: UniCloudImportObjectOptions): UniCloudCloudObjectCaller;
1143
+
1010
1144
  /**
1011
1145
  * 监听响应事件
1012
1146
  * @description 监听响应事件
@@ -1040,6 +1174,7 @@ declare class UniCloud {
1040
1174
  * }
1041
1175
  */
1042
1176
  onResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
1177
+
1043
1178
  /**
1044
1179
  * 移除响应事件监听
1045
1180
  * @description 移除响应事件监听
@@ -1073,6 +1208,7 @@ declare class UniCloud {
1073
1208
  * }
1074
1209
  */
1075
1210
  offResponse(callback: UniCloudCallback<UniCloudResponseEvent>): void;
1211
+
1076
1212
  /**
1077
1213
  * 监听token刷新事件
1078
1214
  * @description 监听token刷新事件
@@ -1106,6 +1242,7 @@ declare class UniCloud {
1106
1242
  * }
1107
1243
  */
1108
1244
  onRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
1245
+
1109
1246
  /**
1110
1247
  * 移除token刷新事件监听
1111
1248
  * @description 移除token刷新事件监听
@@ -1139,6 +1276,7 @@ declare class UniCloud {
1139
1276
  * }
1140
1277
  */
1141
1278
  offRefreshToken(callback: UniCloudCallback<UniCloudRefreshTokenEvent>): void;
1279
+
1142
1280
  /**
1143
1281
  * 获取数据库操作实例
1144
1282
  * @description 获取数据库操作实例
@@ -1172,6 +1310,7 @@ declare class UniCloud {
1172
1310
  * }
1173
1311
  */
1174
1312
  databaseForJQL(): Database;
1313
+
1175
1314
  /**
1176
1315
  * 获取token内缓存的用户信息
1177
1316
  * @description 获取token内缓存的用户信息
@@ -1205,6 +1344,7 @@ declare class UniCloud {
1205
1344
  * }
1206
1345
  */
1207
1346
  getCurrentUserInfo(): UniCloudUserInfo;
1347
+
1208
1348
  /**
1209
1349
  * 选择并上传文件
1210
1350
  * @description 选择并上传文件
@@ -1238,6 +1378,7 @@ declare class UniCloud {
1238
1378
  * }
1239
1379
  */
1240
1380
  chooseAndUploadFile(options: UniCloudChooseAndUploadFileOptions): Promise<UniCloudChooseAndUploadFileResult>;
1381
+
1241
1382
  /**
1242
1383
  * 连接 WebSocket
1243
1384
  * @description 连接 WebSocket
@@ -1271,6 +1412,7 @@ declare class UniCloud {
1271
1412
  * }
1272
1413
  */
1273
1414
  connectWebSocket(options: UniCloudConnectWebSocketOptions): SocketTask;
1415
+
1274
1416
  /**
1275
1417
  * 服务端通知通道
1276
1418
  * @description 服务端通知通道
@@ -1304,8 +1446,109 @@ declare class UniCloud {
1304
1446
  * }
1305
1447
  */
1306
1448
  get SSEChannel(): typeof SSEChannel;
1449
+
1450
+ /**
1451
+ * 监听故障切换事件
1452
+ * @description 监听故障切换事件
1453
+ * @uniPlatform {
1454
+ * "app": {
1455
+ * "android": {
1456
+ * "osVer": "5.0",
1457
+ * "uniVer": "√",
1458
+ * "unixVer": "5.0"
1459
+ * },
1460
+ * "ios": {
1461
+ * "uniVer": "√",
1462
+ * "unixVer": "5.0"
1463
+ * },
1464
+ * "harmony": {
1465
+ * "uniVer": "√",
1466
+ * "unixVer": "5.0"
1467
+ * }
1468
+ * },
1469
+ * "mp": {
1470
+ * "weixin": {
1471
+ * "osVer": "√",
1472
+ * "uniVer": "√",
1473
+ * "unixVer": "5.0"
1474
+ * }
1475
+ * },
1476
+ * "web": {
1477
+ * "uniVer": "√",
1478
+ * "unixVer": "5.0"
1479
+ * }
1480
+ * }
1481
+ */
1482
+ onFailover(callback: UniCloudCallback<UniCloudFailoverEvent>): void
1483
+
1484
+ /**
1485
+ * 移除故障切换事件监听
1486
+ * @description 移除故障切换事件监听
1487
+ * @uniPlatform {
1488
+ * "app": {
1489
+ * "android": {
1490
+ * "osVer": "5.0",
1491
+ * "uniVer": "√",
1492
+ * "unixVer": "5.0"
1493
+ * },
1494
+ * "ios": {
1495
+ * "uniVer": "√",
1496
+ * "unixVer": "5.0"
1497
+ * },
1498
+ * "harmony": {
1499
+ * "uniVer": "√",
1500
+ * "unixVer": "5.0"
1501
+ * }
1502
+ * },
1503
+ * "mp": {
1504
+ * "weixin": {
1505
+ * "osVer": "√",
1506
+ * "uniVer": "√",
1507
+ * "unixVer": "5.0"
1508
+ * }
1509
+ * },
1510
+ * "web": {
1511
+ * "uniVer": "√",
1512
+ * "unixVer": "5.0"
1513
+ * }
1514
+ * }
1515
+ */
1516
+ offFailover(callback: UniCloudCallback<UniCloudFailoverEvent>): void
1307
1517
  }
1308
1518
 
1309
- declare const uniCloud: UniCloud;
1519
+ declare const uniCloud: UniCloud
1310
1520
 
1311
- export { type UniCloudCallFunctionOptions, type UniCloudCallFunctionResult, type UniCloudChooseAndUploadFileOptions, type UniCloudChooseAndUploadFileResult, type UniCloudChooseAndUploadFileItem, type UniCloudChooseAndUploadFileProgressEvent, type UniCloudDBAddResult, type UniCloudDBBatchAddResult, type UniCloudDBCountResult, UniCloudDBFilter, type UniCloudDBGetResult, UniCloudDBQuery, type UniCloudDBRemoveResult, type UniCloudDBUpdateResult, type UniCloudDBMultiSendResultItem, type UniCloudDBMultiSendResult, 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 };
1521
+ export {
1522
+ type UniCloudCallFunctionOptions,
1523
+ type UniCloudCallFunctionResult,
1524
+ type UniCloudChooseAndUploadFileOptions,
1525
+ type UniCloudChooseAndUploadFileResult,
1526
+ type UniCloudChooseAndUploadFileItem,
1527
+ type UniCloudChooseAndUploadFileProgressEvent,
1528
+ type UniCloudDBAddResult,
1529
+ type UniCloudDBBatchAddResult,
1530
+ type UniCloudDBCountResult,
1531
+ UniCloudDBFilter,
1532
+ type UniCloudDBGetResult,
1533
+ UniCloudDBQuery,
1534
+ type UniCloudDBRemoveResult,
1535
+ type UniCloudDBUpdateResult,
1536
+ type UniCloudDBMultiSendResultItem,
1537
+ type UniCloudDBMultiSendResult,
1538
+ UniCloudError,
1539
+ type UniCloudGetTempFileURLOptions,
1540
+ type UniCloudGetTempFileURLResult,
1541
+ type UniCloudGetTempFileURLResultItem,
1542
+ type UniCloudImportObjectErrorOptions,
1543
+ type UniCloudImportObjectLoadingOptions,
1544
+ type UniCloudImportObjectOptions,
1545
+ type UniCloudInitOptions,
1546
+ type UniCloudRefreshTokenEvent,
1547
+ type UniCloudResponseEvent,
1548
+ type UniCloudUploadFileOptions,
1549
+ type UniCloudUploadFileResult,
1550
+ type UniCloudUploadProgress,
1551
+ type UniCloudUserInfo,
1552
+ type UniCloudFailoverEvent,
1553
+ uniCloud
1554
+ }