promisify.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. declare namespace My {
  2. interface TempFile {
  3. /**
  4. * @description 本地临时文件路径(本地路径)
  5. */
  6. path: string;
  7. /**
  8. * @description 本地临时文件大小,单位为 B
  9. */
  10. size: number;
  11. }
  12. interface ChooseImage {
  13. apFilePaths?: string[];
  14. tempFilePaths?: string[];
  15. filePaths?: string[];
  16. tempFiles?: TempFile[];
  17. }
  18. interface ChooseVideo {
  19. tempFilePath: string;
  20. duration: number;
  21. size: number;
  22. height: number;
  23. width: number;
  24. success: boolean;
  25. }
  26. interface ChooseFileFromDisk {
  27. apFilePath: string;
  28. success: boolean;
  29. }
  30. interface UploadFile {
  31. data: string;
  32. statusCode: string | number;
  33. header: string;
  34. }
  35. interface GetFileInfo {
  36. digest: string;
  37. size: number;
  38. }
  39. interface DownloadFile {
  40. apFilePath: string;
  41. }
  42. }
  43. export declare const chooseImage: (option: any) => Promise<My.ChooseImage>;
  44. export declare const chooseVideo: (option: any) => Promise<My.ChooseVideo>;
  45. export declare const chooseFileFromDisk: (option?: any) => Promise<My.ChooseFileFromDisk>;
  46. export declare const uploadFile: (option: any) => Promise<My.UploadFile>;
  47. export declare const getFileInfo: (option: any) => Promise<My.GetFileInfo>;
  48. export declare const previewImage: (option: any) => void;
  49. export declare const downloadFile: (option: any) => Promise<My.DownloadFile>;
  50. export {};