index.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { Point } from './geo/point';
  2. import { CollectionReference } from './collection';
  3. import { Command } from './command';
  4. interface GeoTeyp {
  5. Point: typeof Point;
  6. }
  7. export { Query } from './query';
  8. export { CollectionReference } from './collection';
  9. export { DocumentReference } from './document';
  10. interface ICloudBaseConfig {
  11. timeout?: number;
  12. isHttp?: boolean;
  13. secretId?: string;
  14. secretKey?: string;
  15. envName?: string;
  16. env?: string;
  17. sessionToken?: string;
  18. serviceUrl?: string;
  19. headers?: any;
  20. proxy?: string;
  21. version?: string;
  22. credentials?: ICredentialsInfo;
  23. _useFeature?: boolean;
  24. throwOnCode?: boolean;
  25. }
  26. interface ICredentialsInfo {
  27. private_key_id: string;
  28. private_key: string;
  29. }
  30. export declare class Db {
  31. Geo: GeoTeyp;
  32. command: typeof Command;
  33. RegExp: any;
  34. serverDate: any;
  35. startTransaction: any;
  36. runTransaction: any;
  37. config: ICloudBaseConfig;
  38. static ws: any;
  39. static reqClass: any;
  40. static wsClass: any;
  41. static createSign: Function;
  42. static getAccessToken: Function;
  43. static dataVersion: string;
  44. static runtime: string;
  45. static appSecretInfo: any;
  46. constructor(config?: any);
  47. collection(collName: string): CollectionReference;
  48. createCollection(collName: string): any;
  49. }