index.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. ObjectId: any;
  36. startTransaction: any;
  37. runTransaction: any;
  38. config: ICloudBaseConfig;
  39. static ws: any;
  40. static reqClass: any;
  41. static wsClass: any;
  42. static createSign: Function;
  43. static getAccessToken: Function;
  44. static dataVersion: string;
  45. static runtime: string;
  46. static appSecretInfo: any;
  47. constructor(config?: any);
  48. collection(collName: string): CollectionReference;
  49. createCollection(collName: string): any;
  50. }