@soga/types 0.0.51 → 0.0.53

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.
@@ -0,0 +1,38 @@
1
+ import { ErrorData } from './error';
2
+ import { RecordFtype, RecordListItem, RecordType } from './record';
3
+ export declare enum DownloadStatus {
4
+ NULL = 0,
5
+ PROCESS = 1,
6
+ SUCCESS = 2,
7
+ ERROR = 4
8
+ }
9
+ export type DownloadProgressStep = 'PREPARE' | 'DOWNLOAD_CHUNK' | 'COMBINE_CHUNK' | 'UNPACK' | 'ENDING';
10
+ export type DownloadProgressData = Record<DownloadProgressStep, {
11
+ weight: number;
12
+ percent: number;
13
+ }>;
14
+ export type DownloadFileItem = {
15
+ id: number;
16
+ is_affix: boolean;
17
+ is_paused: boolean;
18
+ type: RecordType;
19
+ ftype: RecordFtype;
20
+ routes: string[];
21
+ download_root: string;
22
+ download_temp: string;
23
+ download_name: string;
24
+ pid: number;
25
+ root_id: number;
26
+ space_id: number;
27
+ uid: number;
28
+ record: RecordListItem;
29
+ order: number;
30
+ status: DownloadStatus;
31
+ file_total: number;
32
+ file_successed: number;
33
+ percent: number;
34
+ progress: DownloadProgressData;
35
+ error: ErrorData;
36
+ update_at: string;
37
+ create_at: string;
38
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DownloadStatus = void 0;
4
+ var DownloadStatus;
5
+ (function (DownloadStatus) {
6
+ DownloadStatus[DownloadStatus["NULL"] = 0] = "NULL";
7
+ DownloadStatus[DownloadStatus["PROCESS"] = 1] = "PROCESS";
8
+ DownloadStatus[DownloadStatus["SUCCESS"] = 2] = "SUCCESS";
9
+ DownloadStatus[DownloadStatus["ERROR"] = 4] = "ERROR";
10
+ })(DownloadStatus || (exports.DownloadStatus = DownloadStatus = {}));
@@ -0,0 +1,10 @@
1
+ export type ErrorData = {
2
+ code: number;
3
+ message: string;
4
+ reason: string[];
5
+ detail: string;
6
+ retryMax: number;
7
+ remark?: string;
8
+ stack?: unknown;
9
+ manual?: boolean;
10
+ };
package/dist/error.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/main.d.ts CHANGED
@@ -7,3 +7,5 @@ export * from './user';
7
7
  export * from './share';
8
8
  export * from './sub';
9
9
  export * from './space';
10
+ export * from './error';
11
+ export * from './download';
package/dist/main.js CHANGED
@@ -23,3 +23,5 @@ __exportStar(require("./user"), exports);
23
23
  __exportStar(require("./share"), exports);
24
24
  __exportStar(require("./sub"), exports);
25
25
  __exportStar(require("./space"), exports);
26
+ __exportStar(require("./error"), exports);
27
+ __exportStar(require("./download"), exports);
package/dist/upload.d.ts CHANGED
@@ -69,6 +69,7 @@ export type UploadTaskItem = {
69
69
  };
70
70
  export type UploadFileItem = {
71
71
  id: number;
72
+ is_paused: boolean;
72
73
  file_total: number;
73
74
  file_successed: number;
74
75
  encode_status: EncodeStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soga/types",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },