@soga/types 0.0.52 → 0.0.54
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.
- package/README.md +3 -3
- package/dist/download.d.ts +39 -0
- package/dist/download.js +10 -0
- package/dist/error.d.ts +10 -0
- package/dist/error.js +2 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +3 -0
- package/dist/net-success.d.ts +20 -0
- package/dist/net-success.js +8 -0
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
- StageType -> UploadFileStage
|
|
2
|
-
- UploadItem -> UploadFileItem
|
|
3
|
-
- UploadControlData -> UploadControlConfig
|
|
1
|
+
- StageType -> UploadFileStage
|
|
2
|
+
- UploadItem -> UploadFileItem
|
|
3
|
+
- UploadControlData -> UploadControlConfig
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
file_size: number;
|
|
34
|
+
percent: number;
|
|
35
|
+
progress: DownloadProgressData;
|
|
36
|
+
error: ErrorData;
|
|
37
|
+
update_at: string;
|
|
38
|
+
create_at: string;
|
|
39
|
+
};
|
package/dist/download.js
ADDED
|
@@ -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 = {}));
|
package/dist/error.d.ts
ADDED
package/dist/error.js
ADDED
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -23,3 +23,6 @@ __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);
|
|
28
|
+
__exportStar(require("./net-success"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RecordFtype, RecordType } from './record';
|
|
2
|
+
export declare enum NetType {
|
|
3
|
+
DOWNLOAD = "download",
|
|
4
|
+
UPLOAD = "upload"
|
|
5
|
+
}
|
|
6
|
+
export type NetSuccessItem = {
|
|
7
|
+
id: number;
|
|
8
|
+
uid: number;
|
|
9
|
+
net_type: NetType;
|
|
10
|
+
is_affix: boolean;
|
|
11
|
+
type: RecordType;
|
|
12
|
+
ftype: RecordFtype;
|
|
13
|
+
space_id: number;
|
|
14
|
+
title: string;
|
|
15
|
+
download_path: string;
|
|
16
|
+
record_id: number;
|
|
17
|
+
file_total: number;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
created_at: Date;
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@soga/types",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
6
|
-
},
|
|
7
|
-
"description": "",
|
|
8
|
-
"main": "dist/main.js",
|
|
9
|
-
"types": "dist/main.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "rimraf dist && tsc",
|
|
15
|
-
"dev": "tsc --watch",
|
|
16
|
-
"lint": "eslint . --ext .ts",
|
|
17
|
-
"prepublishOnly": "npm run build"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/node": "^22.5.1",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
22
|
-
"@typescript-eslint/parser": "^8.3.0",
|
|
23
|
-
"eslint": "^9.9.1",
|
|
24
|
-
"eslint-config-prettier": "^9.1.0",
|
|
25
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
26
|
-
"prettier": "^3.3.3",
|
|
27
|
-
"rimraf": "^6.0.1",
|
|
28
|
-
"ts-node": "^10.9.2",
|
|
29
|
-
"typescript": "^5.5.4"
|
|
30
|
-
},
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/dpan-com/types.git"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [],
|
|
36
|
-
"author": "",
|
|
37
|
-
"license": "ISC",
|
|
38
|
-
"bugs": {
|
|
39
|
-
"url": "https://github.com/dpan-com/types/issues"
|
|
40
|
-
},
|
|
41
|
-
"homepage": "https://github.com/dpan-com/types#readme"
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@soga/types",
|
|
3
|
+
"version": "0.0.54",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "",
|
|
8
|
+
"main": "dist/main.js",
|
|
9
|
+
"types": "dist/main.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "rimraf dist && tsc",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"lint": "eslint . --ext .ts",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^22.5.1",
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
22
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
23
|
+
"eslint": "^9.9.1",
|
|
24
|
+
"eslint-config-prettier": "^9.1.0",
|
|
25
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
26
|
+
"prettier": "^3.3.3",
|
|
27
|
+
"rimraf": "^6.0.1",
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"typescript": "^5.5.4"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/dpan-com/types.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [],
|
|
36
|
+
"author": "",
|
|
37
|
+
"license": "ISC",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/dpan-com/types/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/dpan-com/types#readme"
|
|
42
|
+
}
|